CN111031105B - Statistical method, device, device and storage medium for message frequency in autonomous driving - Google Patents
Statistical method, device, device and storage medium for message frequency in autonomous driving Download PDFInfo
- Publication number
- CN111031105B CN111031105B CN201911174489.3A CN201911174489A CN111031105B CN 111031105 B CN111031105 B CN 111031105B CN 201911174489 A CN201911174489 A CN 201911174489A CN 111031105 B CN111031105 B CN 111031105B
- Authority
- CN
- China
- Prior art keywords
- message
- frequency
- sending module
- module
- message sending
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/14—Network analysis or design
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Debugging And Monitoring (AREA)
Abstract
本申请公开了一种消息频率的统计方法、装置、电子设备及存储介质,涉及信息流技术领域,可用于自动驾驶的操作系统。具体实现方案为:消息频率的统计方法由消息频率的统计装置执行,消息频率的统计装置设置在一进程中;消息频率的统计装置在收到预先订阅的与消息频率的统计装置位于同进程中的消息发送模块发送的多个消息的过程中,记录多个消息的多个接收时刻;根据在预设时间长度内的多个接收时刻,统计消息发送模块发送消息的频率。本申请能够克服现有技术中频率统计不准确的技术问题,由于本申请的频率统计发生在同一进程间,不存在跨进程的通信时延,能够有效地提高消息发送模块发送消息的频率统计的准确性。
The application discloses a statistical method, device, electronic device and storage medium of message frequency, which relate to the technical field of information flow and can be used in an operating system for automatic driving. The specific implementation scheme is: the statistical method of message frequency is executed by the statistical device of message frequency, and the statistical device of message frequency is set in a process; the statistical device of message frequency is located in the same process as the statistical device of message frequency after receiving the pre-subscribed message. In the process of sending multiple messages by the message sending module, the multiple receiving moments of the multiple messages are recorded; according to the multiple receiving moments within the preset time length, the frequency of sending messages by the message sending module is counted. The present application can overcome the technical problem of inaccurate frequency statistics in the prior art. Since the frequency statistics of the present application occur between the same processes, there is no inter-process communication delay, which can effectively improve the frequency statistics of messages sent by the message sending module. accuracy.
Description
技术领域technical field
本申请涉及计算机技术领域,尤其涉及信息流的处理,具体涉及一种消息频率的统计方法、装置、电子设备及存储介质,可用于自动驾驶的操作系统。The present application relates to the field of computer technology, in particular to the processing of information flow, and in particular to a statistical method, device, electronic device and storage medium for message frequency, which can be used in an operating system for automatic driving.
背景技术Background technique
在自动驾驶系统中,如传感器模块、障碍物识别模块、规划模块等等具有消息传输关系的相邻两个模块之间的通信是通过发布和订阅topic(即消息数据)的方式来实现的,每个模块的topic发布也是有周期性的,如果某个模块出现异常有可能导致该模块的topic的发布频率输出异常。因此,模块的topic的发布频率的统计是一项非常重要的工作,工作人员可以基于模块的topic的发布频率,可以预测该模块是否正常。In an automatic driving system, the communication between two adjacent modules with a message transmission relationship, such as a sensor module, an obstacle recognition module, a planning module, etc., is realized by publishing and subscribing to topics (ie, message data). The topic publishing of each module is also periodic. If an exception occurs in a module, the output frequency of the topic of the module may be abnormal. Therefore, the statistics of the publishing frequency of the topic of the module is a very important task, and the staff can predict whether the module is normal based on the publishing frequency of the topic of the module.
但是,现有技术中提供的各种模块的消息频率的统计方案,统计的频率都不够精准,亟需提供一种能够准确统计消息的频率的方案。However, the statistical solutions of the message frequencies of various modules provided in the prior art are not accurate enough to count the frequencies, and it is urgent to provide a solution that can accurately count the message frequencies.
发明内容SUMMARY OF THE INVENTION
为了解决上述技术问题,本申请提供一种消息频率的统计方法、装置、电子设备及存储介质,用于提供一种能够准确统计频率技术方案。In order to solve the above technical problems, the present application provides a method, device, electronic device and storage medium for statistics of message frequencies, which are used to provide a technical solution capable of accurately counting frequencies.
一方面,本申请提供一种消息频率的统计方法,所述方法由消息频率的统计装置执行,所述消息频率的统计装置设置在一进程中,所述方法包括:In one aspect, the present application provides a method for statistics of message frequencies, the method is performed by a device for statistics of message frequencies, the device for statistics of message frequencies is set in a process, and the method includes:
在收到预先订阅的与所述消息频率的统计装置位于同进程中的消息发送模块的多个发送所述消息的过程中时,记录所述多个消息的多个接收所述消息的发送时刻;When receiving the pre-subscribed message sending modules that are in the same process as the message frequency statistics device in the process of sending the message, record the sending time when the multiple messages receive the message ;
根据在预设时间长度内的所述多个接收时刻,统计所述消息发送模块发送消息的频率。According to the multiple receiving moments within the preset time length, the frequency of sending messages by the message sending module is counted.
进一步可选地,如上所述的方法中,在收到预先订阅的与所述频率统计装置位于同进程中的消息发送模块发送的多个消息之前,所述方法还包括:Further optionally, in the above method, before receiving a plurality of pre-subscribed messages sent by a message sending module located in the same process as the frequency statistics device, the method further includes:
根据所述进程的进程标识,确定所述消息发送模块的模块标识;Determine the module identifier of the message sending module according to the process identifier of the process;
向消息管理模块发送对所述消息发送模块发送的消息的订阅请求,所述订阅请求包括所述模块标识。A subscription request for the message sent by the message sending module is sent to the message management module, where the subscription request includes the module identifier.
进一步可选地,如上所述的方法中,在统计所述消息发送模块发送的消息的频率之后,所述方法还包括:Further optionally, in the above method, after counting the frequency of messages sent by the message sending module, the method further includes:
根据所述消息发送模块发送消息的频率和预设的频率阈值,检测对应的所述消息发送模块是否异常。According to the frequency of sending messages by the message sending module and a preset frequency threshold, it is detected whether the corresponding message sending module is abnormal.
进一步可选地,如上所述的方法中,在统计所述消息发送模块发送消息的频率之后,所述方法还包括:Further optionally, in the above method, after counting the frequency of sending messages by the message sending module, the method further includes:
接收频率请求端发送的消息频率请求;Receive the message frequency request sent by the frequency requester;
向所述频率请求端发送所述消息发送模块发送所述消息发送模块发送消息的频率,所述消息发送模块发送消息的频率指示所述消息发送模块是否异常。Send the frequency of the message sending module sending the message to the frequency requesting terminal, and the frequency of sending the message by the message sending module indicates whether the message sending module is abnormal.
另一方面,本申请还提供了一种消息频率的统计装置,所述消息频率的统计装置设置在一进程中,所述装置包括:On the other hand, the present application also provides a message frequency statistics device, the message frequency statistics device is set in a process, and the device includes:
记录模块,用于在收到预先订阅的与所述消息频率的统计装置位于同进程中的消息发送模块发送的多个消息的过程中,记录所述多个消息的多个接收时刻;a recording module, configured to record multiple reception times of the multiple messages in the process of receiving the multiple messages sent by the pre-subscribed message sending module located in the same process as the message frequency statistics device;
统计模块,用于根据在预设时间长度内的所述多个接收时刻,统计所述消息发送模块发送消息的频率。A statistics module, configured to count the frequency of messages sent by the message sending module according to the multiple receiving moments within a preset time length.
再一方面,本申请还提供了一种电子设备,包括:In another aspect, the application also provides an electronic device, comprising:
至少一个处理器;以及at least one processor; and
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如上任一项所述的方法。The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of any of the above.
又一方面,本申请还提供一种存储有计算机指令的非瞬时计算机可读存储介质,所述计算机指令用于使所述计算机执行如上任一项所述的方法。In yet another aspect, the present application also provides a non-transitory computer-readable storage medium storing computer instructions, the computer instructions being used to cause the computer to perform the method as described in any one of the above.
上述申请中的一个实施例具有如下优点或有益效果:设置在一进程中的消息频率的统计装置,通过在收到预先订阅的与消息频率的统计装置位于同进程中的消息发送模块发送的多个消息的过程中,记录多个消息的多个接收时刻;根据在预设时间长度内的多个接收时刻,统计消息发送模块发送消息的频率,能够克服现有技术中频率统计不准确的技术问题,由于本申请实施例的频率统计发生在同一进程间,不存在跨进程的通信时延,能够有效地提高消息发送模块发送消息的频率统计的准确性。An embodiment in the above application has the following advantages or beneficial effects: a device for statistics of message frequencies in a process is provided, and the number of messages sent by a message sending module located in the same process as the device for statistics of message frequencies that are pre-subscribed is sent. In the process of each message, multiple receiving moments of multiple messages are recorded; according to multiple receiving moments within a preset time length, the frequency of messages sent by the message sending module is counted, which can overcome the inaccurate frequency statistics in the prior art. The problem is that since the frequency statistics in the embodiments of the present application occur between the same processes, there is no communication delay across processes, which can effectively improve the accuracy of the frequency statistics of messages sent by the message sending module.
进一步地,本申请的技术方案,还能够基于统计的频率,检测消息发送模块是否异常,能够自动地对消息发送模块是否异常进行有效检测,同时还能够有效地扩展频率统计的功能及应用。Further, the technical solution of the present application can also detect whether the message sending module is abnormal based on the frequency of statistics, can automatically and effectively detect whether the message sending module is abnormal, and can also effectively expand the function and application of frequency statistics.
进一步地,本申请的技术方案,还能够根据频率请求段的消息频率请求,向频率请求段返回预先统计好的消息发送模块发送消息的频率,不用在接收到消息频率请求后,再计算消息发送模块发送消息的频率,能够有效地保证返回的频率的准确性。Further, the technical solution of the present application can also return to the frequency request segment the pre-statistical frequency of sending messages by the message sending module according to the message frequency request in the frequency request segment, without calculating the message sending frequency after receiving the message frequency request. The frequency of sending messages by the module can effectively ensure the accuracy of the returned frequency.
上述可选方式所具有的其他效果将在下文中结合具体实施例加以说明。Other effects of the above-mentioned optional manners will be described below with reference to specific embodiments.
附图说明Description of drawings
附图用于更好地理解本方案,不构成对本申请的限定。其中:The accompanying drawings are used for better understanding of the present solution, and do not constitute a limitation to the present application. in:
图1是根据本申请第一实施例的示意图;1 is a schematic diagram according to a first embodiment of the present application;
图2是根据本申请第二实施例的示意图;2 is a schematic diagram according to a second embodiment of the present application;
图3是根据本申请第三实施例的示意图;3 is a schematic diagram according to a third embodiment of the present application;
图4是用来实现本申请实施例的频率统计方法的电子设备的框图。FIG. 4 is a block diagram of an electronic device used to implement the frequency statistics method according to the embodiment of the present application.
具体实施方式Detailed ways
以下结合附图对本申请的示范性实施例做出说明,其中包括本申请实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本申请的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。Exemplary embodiments of the present application are described below with reference to the accompanying drawings, which include various details of the embodiments of the present application to facilitate understanding, and should be considered as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted from the following description for clarity and conciseness.
图1为本申请的频率统计方法一实施例的流程图。如图1所示,本实施例的消息频率的统计方法,所述方法由消息频率的统计装置执行,该消息频率的统计装置设置在一进程中,所述方法具体可以包括如下步骤:FIG. 1 is a flowchart of an embodiment of a frequency statistics method of the present application. As shown in FIG. 1 , the method for statistics of message frequencies in this embodiment is executed by a device for statistics of message frequencies. The device for statistics of message frequencies is set in a process, and the method may specifically include the following steps:
S101、在收到预先订阅的与频率统计装置位于同进程中的消息发送模块发送的多个消息的过程中,记录多个消息的多个接收时刻;S101, in the process of receiving the pre-subscribed multiple messages sent by the message sending module located in the same process as the frequency statistics device, record multiple reception times of the multiple messages;
S102、根据在预设时间长度内的多个接收时刻,统计消息发送模块发送消息的频率。S102: Count the frequency of messages sent by the message sending module according to multiple receiving moments within a preset time length.
即,本实施例的消息频率的统计方法的执行主体为消息频率的统计装置,该消息频率的统计装置与要统计的频率的消息发送模块设置在同一个进程中,以对同进程中的消息发送模块发送消息的频率进行统计。That is, the execution subject of the method for statistics of message frequencies in this embodiment is a device for statistics of message frequencies, and the device for statistics of message frequencies and the message sending module of the frequencies to be counted are set in the same process, so as to monitor the messages in the same process. The frequency of sending messages by the sending module is counted.
本实施例的消息频率的统计方法可以用于对信息流中任何两个具有信息交互的模块中任一模块发送消息的频率进行统计。The method for statistics of message frequencies in this embodiment can be used to perform statistics on the frequencies of messages sent by any one of any two modules having information interaction in the information flow.
可选地,本实施例的消息频率的统计装置可以为一个应用集成的软件模块,也可以扩展为一个电子实体,用于对业务上处于同进程中的消息发送模块进行监控。Optionally, the device for counting message frequencies in this embodiment may be an application-integrated software module, or may be extended to an electronic entity for monitoring message sending modules in the same process in business.
本申请实施例中,也可以采用一个独立的消息频率的统计模块来实现可以跨进程的对任意其他进程中的消息的频率进行统计,例如,若消息频率的统计模块设置在第一个进程中,当统计第二个进程中的消息发送模块的频率时,第二进程的消息发送模块发布topic消息数据时,topic消息数据从第二进程到第一进程中的消息频率的统计模块属于跨进程的操作,存在时延,这样第一进程中的消息频率的统计模块记录第二进程中的消息发送模块发布topic消息数据的时刻本身就不够准确。另外,在其他模块需要该消息发送模块的频率时,可能也是跨进程向第一进程中的消息频率的统计模块请求第二进程中的消息发送模块的频率,该请求本身也存在通信时延,第一进程的消息频率的统计模块获取到该请求后,才开始基于当前的时刻统计第二进程中的消息发送模块的频率,便会导致消息发送模块发送消息的频率统计准确度不高。In this embodiment of the present application, an independent message frequency statistics module may also be used to implement cross-process statistics on the message frequencies in any other process. For example, if the message frequency statistics module is set in the first process , when the frequency of the message sending module in the second process is counted, when the message sending module of the second process publishes topic message data, the statistical module of the message frequency of the topic message data from the second process to the first process belongs to the cross-process operation, there is a time delay, so the statistics module of the message frequency in the first process records the moment when the message sending module in the second process publishes the topic message data itself is not accurate enough. In addition, when other modules need the frequency of the message sending module, it may also be cross-process requesting the frequency of the message sending module in the second process from the statistics module of the message frequency in the first process. The request itself also has a communication delay. After the statistics module of the message frequency of the first process obtains the request, it starts to count the frequency of the message sending module in the second process based on the current time, which will lead to the low accuracy of the frequency statistics of the message sending module.
为了进一步提高消息频率统计的准确性,本实施例中,可以在每个进程中设置一个消息频率的统计装置,以对同进程中的消息发送模块发送的消息的频率进行统计。由于同进程中的信息处理的优先级是最高的,远大于跨进程的信息通信,这样可以有效地缩短时延,提高频率统计的准确性。In order to further improve the accuracy of message frequency statistics, in this embodiment, a message frequency statistics device may be set in each process to perform statistics on the frequencies of messages sent by message sending modules in the same process. Since the priority of information processing in the same process is the highest, which is far greater than that of inter-process information communication, this can effectively shorten the time delay and improve the accuracy of frequency statistics.
具体地,本实施例中,需要预先订阅同进程中的消息发送模块的消息,这样,消息发送模块在发送消息时,该消息频率的统计装置才能够接收到订阅的消息,这样才能记录消息的接收时刻。也就是说,本实施例的消息频率的统计装置虽然订阅了同进程中的消息发送模块的消息,但是并不保存消息发送模块的消息,仅仅记录接收到消息发送模块发送的消息的接收时刻。Specifically, in this embodiment, the message of the message sending module in the same process needs to be subscribed in advance. In this way, when the message sending module sends a message, the statistics device of the message frequency can receive the subscribed message, so as to record the information of the message. receive time. That is to say, although the device for statistics of message frequencies in this embodiment subscribes to messages of the message sending modules in the same process, it does not save the messages of the message sending modules, and only records the reception time of receiving the messages sent by the message sending modules.
另外,本实施例中,以统计所采用时长为预设时间长度为例,消息频率的统计装置在收到预先订阅的、位于同进程中的消息发送模块在预设时间长度内、发送的多个消息的过程中,记录多个消息的多个接收时刻,即每个消息对应一个接收时刻。由于在同一个进程中,消息频率的统计装置接收到每个消息的接收时刻与消息发送模块发送该消息的发送时刻的时间差非常小,因此,本实施例中,可以根据预设时间长度内、接收到消息发送模块发送的多个消息的多个接收时刻,统计该消息发送模块发送消息的频率。例如,具体可以采用预设时间长度内发送消息的数量除以预设时间长度,便可以得到相应的消息发送模块发送消息的频率。In addition, in this embodiment, taking the time used for statistics as a preset time length as an example, when the device for statistics of message frequencies receives a pre-subscribed message sending module located in the same process within the preset time length, more In the process of each message, multiple receiving moments of the multiple messages are recorded, that is, each message corresponds to one receiving moment. In the same process, the time difference between the time when the message frequency statistics device receives each message and the time when the message sending module sends the message is very small. Therefore, in this embodiment, according to the preset time length, After receiving multiple reception times of the multiple messages sent by the message sending module, count the frequency of the messages sent by the message sending module. For example, the frequency of sending messages by the corresponding message sending module can be obtained by dividing the number of messages sent within the preset time length by the preset time length.
本实施例的预设时间长度可以根据实际应用中的具体场景需求来设置。例如,可以为30s、1min或者其他时间长度。例如,在对频率要求不精准的场景中,可以设置较长的预设时间长度,在对频率要求非常精准地场景中,可以设置相对较短的预设时间长度。The preset time length in this embodiment may be set according to specific scene requirements in practical applications. For example, it can be 30s, 1min, or other length of time. For example, in a scenario with inaccurate frequency requirements, a longer preset time length can be set, and in a scenario with very precise frequency requirements, a relatively short preset time length can be set.
可选地,在进程外,设置有消息管理模块,用于对各个进程中的消息发送模块进行管理,具体记录有多个进程中的多个消息发送模块的信息。实际应用中,可以在该消息管理模块中订阅消息发送模块的消息,如当前的频率统计装置所在进程的ID为“10”,可以在消息管理模块中订阅所属的进程ID为“10”的消息发送模块的消息。具体实现时,消息频率的统计装置可以根据进程的进程标识,确定要订阅的消息发送模块的模块标识,然后向详细管理模块发送对该消息发送模块发送的消息的订阅请求,即该订阅请求中携带消息发送模块的标识。这样,在消息管理模块中建立该消息频率的统计装置与同进程中的消息发送模块的订阅关系,并通知同进程中的消息发送模块,该消息频率的统计装置订阅了其消息。这样,当同进程的该消息发送模块发送消息数据时,除了将消息发送给发送端,还需要根据该订阅关系,发送给频率统计装置一份。该消息频率的统计装置可以接收到并及时记录接收到消息发送模块发送的消息的接收时刻,由于这些操作在同进程内完成,时延非常小,本实施例中,消息频率的统计装置记录的接收到消息发送模块发送的消息的接收时刻非常准确,进而后续更加准确地统计消息发送模块发送消息的频率。Optionally, outside the process, a message management module is provided for managing the message sending modules in each process, and specifically records information of multiple message sending modules in multiple processes. In practical applications, the message of the message sending module can be subscribed in the message management module. For example, the ID of the process where the current frequency statistics device is located is "10", and the message with the process ID of "10" can be subscribed in the message management module. Send the module's message. During specific implementation, the device for statistics of message frequency can determine the module identifier of the message sending module to be subscribed according to the process identifier of the process, and then send a subscription request for the message sent by the message sending module to the detailed management module, that is, in the subscription request Carry the identifier of the message sending module. In this way, a subscription relationship between the message frequency statistic device and the message sending module in the same process is established in the message management module, and the message sending module in the same process is notified that the message frequency statistic device subscribes to its message. In this way, when the message sending module in the same process sends message data, in addition to sending the message to the sender, it also needs to send a copy to the frequency statistics device according to the subscription relationship. The message frequency statistics device can receive and record in time the time of receiving the message sent by the message sending module. Since these operations are completed in the same process, the delay is very small. In this embodiment, the message frequency statistics device records The receiving time of the message sent by the message sending module is very accurate, and then the frequency of messages sent by the message sending module is more accurately counted subsequently.
另外,本实施例中,可以在未接收到外部的频率请求时,按照本实施例的方式实时地统计消息发送模块的频率,在外部需要频率时,直接获取,并返回。这样统计得到的频率不用根据接收到频率请求的时刻,向前取预设时间长度,来统计消息发送模块的频率,以保证统计的频率不受频率请求时延的影响,统计的频率是非常精准的,能够准确地反应消息发送模块发送消息的情况。In addition, in this embodiment, when no external frequency request is received, the frequency of the message sending module can be counted in real time according to the method of this embodiment, and when the frequency is required externally, the frequency can be directly acquired and returned. The frequency obtained in this way does not need to take a preset time length forward according to the moment when the frequency request is received to count the frequency of the message sending module, so as to ensure that the frequency of the statistics is not affected by the delay of the frequency request, and the frequency of the statistics is very accurate. Yes, it can accurately reflect the situation that the message sending module sends the message.
本实施例的频率统计方法,设置在进程中的频率统计装置通过在收到预先订阅的同进程中的消息发送模块发送的多个消息的过程中,记录多个消息的多个接收时刻;根据在预设时间长度内的多个接收时刻,统计消息发送模块发送消息的频率,能够克服现有技术中频率统计不准确的技术问题,由于本实施例的频率统计发生在同一进程间,不存在跨进程的通信时延,能够有效地提高消息发送模块发送消息的频率统计的准确性。In the frequency statistics method of this embodiment, the frequency statistics device set in the process records multiple reception times of the multiple messages in the process of receiving the pre-subscribed multiple messages sent by the message sending modules in the same process; Counting the frequency of messages sent by the message sending module at multiple receiving moments within a preset time length can overcome the technical problem of inaccurate frequency statistics in the prior art. Since the frequency statistics in this embodiment occur in the same process, there is no The inter-process communication delay can effectively improve the accuracy of the frequency statistics of the messages sent by the message sending module.
图2为本申请的消息频率的统计方法另一实施例的流程图。如图2所示,本实施例的消息频率的统计方法在上述图1所示实施例的基础上,以同一个进程中包括多个消息发送模块为例,来详细介绍本发明的技术方案。如图2所示,本实施例的消息频率的统计方法,具体可以包括如下步骤:FIG. 2 is a flowchart of another embodiment of the method for statistics of message frequencies of the present application. As shown in FIG. 2 , based on the above-mentioned embodiment shown in FIG. 1 , the method for counting message frequencies in this embodiment takes the example of including multiple message sending modules in the same process to introduce the technical solution of the present invention in detail. As shown in FIG. 2 , the method for statistics of message frequencies in this embodiment may specifically include the following steps:
S201、根据当前所在的进程标识,从消息管理模块中订阅属于同进程的消息发送模块发送的消息;S201, according to the current process identifier, from the message management module, subscribe to the message sent by the message sending module belonging to the same process;
例如,本实施例的消息管理模块中存储的信息可以包括如下表1的内容:For example, the information stored in the message management module of this embodiment may include the following contents in Table 1:
表1Table 1
例如,具体在订阅时,可以由消息频率的统计装置先根据自己所在的进程的标识,结合上述表1,确定要订阅的消息发送模块的标识;然后向消息管理模块发送携带要订阅的消息发送模块的标识的订阅请求,由消息管理模块建立该消息频率的统计装置与要订阅的消息发送模块的订阅关系,如该订阅关系采用消息频率的统计装置的标识与消息发送模块的标识之间的订阅关系来标识。而且,该消息管理模块还需要通知消息发送模块该订阅关系,以便于消息发送模块在发送消息时,可以将该消息同时发送给订阅的消息频率的统计装置。For example, when subscribing specifically, the message frequency statistics device can first determine the identifier of the message sending module to be subscribed according to the identifier of the process in which it is located and in combination with the above Table 1; and then send the message carrying the message to be subscribed to the message management module. The subscription request of the identification of the module, the message management module establishes the subscription relationship between the statistical device of the message frequency and the message sending module to be subscribed, such as the subscription relationship adopts the identification of the statistical device of the message frequency and the identification of the message sending module. Subscription relationship to identify. Moreover, the message management module also needs to notify the message sending module of the subscription relationship, so that when the message sending module sends a message, the message can be simultaneously sent to the subscribed message frequency statistics device.
本实施例的频率统计方法,与上述图1的不同在于:本实施例中以同一个进程中包括多个消息发送模块为例,分别订阅每个消息发送模块的消息,以对每个消息发送模块的频率进行统计。或者实际应用中,即使同一个进程中包括有多个消息发送模块,频率统计装置也可以仅订阅其中部分需要重点关注的消息发送模块的消息。该种情况下的订阅,可以需要外部参与选择,例如由工作人员输入同进程中需要订阅的部分消息发送模块的标识,或者输入消息发送模块的哪些特征,然后基于消息发送模块的特征来与同进程中的频率统计装置建立订阅关系。此时,对应地,需要在消息管理模块中记录每个消息发送模块的特征等信息。The difference between the frequency statistics method in this embodiment and the above-mentioned FIG. 1 is that in this embodiment, a process including multiple message sending modules is used as an example, and the messages of each message sending module are subscribed respectively to send messages to each message. The frequency of the module is counted. Or in practical applications, even if the same process includes multiple message sending modules, the frequency statistics device may only subscribe to the messages of some of the message sending modules that need to be focused on. The subscription in this case may require external participation in the selection. For example, the staff input the identifiers of some message sending modules that need to be subscribed in the same process, or input the characteristics of the message sending module, and then based on the characteristics of the message sending module The frequency statistics device in the process establishes a subscription relationship. At this time, correspondingly, information such as the characteristics of each message sending module needs to be recorded in the message management module.
S202、在收到订阅的同进程的各个消息发送模块发送的各个的消息过程中,在各消息发送模块对应的消息时间缓存中记录接收到该消息发送模块发送的各个消息的接收时刻;S202, in the process of receiving each message sent by each message sending module in the same process of the subscription, record the receiving time of each message sent by the message sending module in the message time buffer corresponding to each message sending module;
本实施例中,同进程中包括多个消息发送模块,可以为每个消息发送模块配置一个消息时间缓存buffer,用于记录接收到对应的消息发送模块发送的消息的接收时刻,以保证接收到的不同的消息发送模块的发送的消息的接收时刻不会混淆记录在一起。In this embodiment, multiple message sending modules are included in the same process, and a message time buffer buffer can be configured for each message sending module to record the receiving time of the message sent by the corresponding message sending module, so as to ensure that the message is received. The receiving moments of the messages sent by the different message sending modules are not confused and recorded together.
S203、对于各个消息发送模块,基于相应的消息时间缓存中记录的所有的消息的接收时刻,将预设时间长度内的接收次数除以预设时间长度,得到对应的消息发送模块的发送消息的频率;S203. For each message sending module, based on the reception times of all messages recorded in the corresponding message time buffer, divide the number of receptions within the preset time length by the preset time length to obtain the corresponding message sending module's message sending rate. frequency;
本实施例的消息频率的统计装置具体可以通过在同进程中创建一个服务,来计算各消息发送模块对应的消息的发送频率,作为该消息发送模块的频率即工作频率。The device for statistics of message frequencies in this embodiment may specifically create a service in the same process to calculate the sending frequencies of messages corresponding to each message sending module, as the frequency of the message sending module, that is, the working frequency.
S204、对于各个消息发送模块,根据消息的频率和预设的频率阈值,检测对应的消息发送模块是否异常。S204. For each message sending module, according to the frequency of the message and a preset frequency threshold, detect whether the corresponding message sending module is abnormal.
对于通信链路中,大部分模块都需要和其他模块进行消息交互,如消息发送和消息接收。本实施例中,消息发送模块发送消息的频率,从一定程度上也能够代表该消息发送模块的工作频率。如果工作频率出现异常,则可以认为该消息发送模块出现异常。本实施例中可以通过对发送消息的频率进行监控,以判断相应的消息发送模块是否异常。对于不同的消息发送模块,可以基于其工作机制,设置不同的频率阈值。本实施例中,消息频率的统计装置还可以检测各消息发送模块发送消息的频率是否低于对应的预设频率阈值,若低于,则认为该消息发送模块存在异常,若大于或者等于该预设频率阈值,则认为该消息发送模块正常。In the communication link, most modules need to interact with other modules, such as message sending and message receiving. In this embodiment, the frequency at which the message sending module sends messages can also represent the working frequency of the message sending module to a certain extent. If the working frequency is abnormal, it can be considered that the message sending module is abnormal. In this embodiment, the frequency of sending messages can be monitored to determine whether the corresponding message sending module is abnormal. For different message sending modules, different frequency thresholds can be set based on their working mechanisms. In this embodiment, the message frequency statistics device can also detect whether the frequency of messages sent by each message sending module is lower than the corresponding preset frequency threshold. If it is lower, it is considered that the message sending module is abnormal. If the frequency threshold is set, it is considered that the message sending module is normal.
实际应用中,当某个频率请求端有频率请求时,向该频率统计装置发送频率请求,该频率统计装置将统计得到的频率反馈给频率请求端,这样就可以避免现有技术所述的不同进程间通信的时延,进而提高频率的准确性。例如,此时包括的技术方案具体可以包括如下步骤:In practical applications, when a frequency requesting terminal has a frequency request, it sends a frequency request to the frequency statistics device, and the frequency statistics device feeds back the frequency obtained by the statistics to the frequency request terminal, so that the differences described in the prior art can be avoided. The delay of inter-process communication, thereby improving the accuracy of frequency. For example, the technical solution included at this time may specifically include the following steps:
(a)接收频率请求端发送的消息频率请求;(a) Receive the message frequency request sent by the frequency requester;
(b)向频率请求端发送消息发送模块发送消息的频率,消息发送模块发送消息的频率指示消息发送模块是否异常,这样,可以供频率请求端根据消息的频率和预设的频率阈值,检测对应的消息发送模块是否异常,详细参考上述消息频率的统计装置侧的相关记载,在此不再赘述。(b) sending the frequency of the message sending module to the frequency requester, and the frequency of the message sending module indicating whether the message sending module is abnormal, so that the frequency requester can detect the corresponding Whether the message sending module is abnormal, please refer to the relevant records on the side of the above-mentioned message frequency statistics device for details, which will not be repeated here.
需要说明的是,向频率请求端返回的消息发送模块发送消息的频率是当前时刻最新的消息发送模块发送消息的频率。也就是说,频率统计装置一直在实时统计消息的频率,当接收到消息频率请求时,仅获取当前时刻对应的消息发送模块的消息的频率,即消息发送模块的消息的最新的频率,而不用获取该消息发送模块的历史的消息频率。It should be noted that the frequency of sending messages by the message sending module returned to the frequency requester is the frequency of sending messages by the latest message sending module at the current moment. That is to say, the frequency counting device has been counting the frequency of messages in real time. When receiving a message frequency request, it only obtains the frequency of the message of the message sending module corresponding to the current moment, that is, the latest frequency of the message of the message sending module. Get the historical message frequency of the message sending module.
需要说明的是,若该进程中仅存在一个消息发送模块,该频率统计装置仅统计一个消息发送模块可以按照上述实施例来实现。而若进程中包括有多个消息发送模块,此时可以按照上述实施例的实现方式将每个消息发送模块的消息的频率都发送给频率请求端。或者如果频率请求端仅想要请求某个消息发送模块的消息的频率时,可以在消息频率请求中携带该消息发送模块的标识。对应地,频率统计装置获取该消息发送模块的标识对应的最新的消息的频率,并返回给频率请求端,以供频率请求端可以根据该消息的频率和预设的频率阈值,检测该消息发送模块是否异常。或者也可以根据该消息发送模块的消息的频率,进行其他业务处理,在此不再一一举例赘述。It should be noted that, if there is only one message sending module in the process, the frequency statistics device only counts one message sending module, which can be implemented according to the above embodiment. However, if the process includes multiple message sending modules, at this time, the frequency of the message of each message sending module can be sent to the frequency requester according to the implementation manner of the above embodiment. Or if the frequency requester only wants to request the frequency of a message of a certain message sending module, the identifier of the message sending module can be carried in the message frequency request. Correspondingly, the frequency statistics device obtains the frequency of the latest message corresponding to the identifier of the message sending module, and returns it to the frequency requesting end, so that the frequency requesting end can detect the sending of the message according to the frequency of the message and the preset frequency threshold. Whether the module is abnormal. Alternatively, other service processing may also be performed according to the frequency of the message of the message sending module, which will not be repeated here.
本实施例的消息频率的统计方法,可以应用于自动驾驶领域中,用于对传感器模块、障碍物识别模块、规划模块等等具有消息传输关系的每个模块的消息发送频率进行检测,并进一步基于频率检测对应的模块是否异常。The statistical method of the message frequency in this embodiment can be applied to the field of automatic driving, and is used to detect the message sending frequency of each module with a message transmission relationship, such as the sensor module, the obstacle identification module, the planning module, etc., and further Check whether the corresponding module is abnormal based on the frequency.
本实施例的消息频率的统计方法,通过采用上述技术方案,设置在进程中的消息频率的统计装置,可以对同一进程中的多个消息发送模块中每个消息发送模块发送消息的频率进行统计,能够克服现有技术中频率统计不准确的问题,也能够避免跨进程的通信时延,提高消息发送模块发送消息的频率统计的准确性。而且本实施例中,还能够基于统计的频率,检测消息发送模块是否异常,能够自动地对消息发送模块是否异常进行有效检测,同时还能够有效地扩展频率统计的功能及应用。In the method for statistics of message frequencies in this embodiment, by adopting the above technical solution, the device for statistics of message frequencies in a process can perform statistics on the frequency of messages sent by each message transmission module in a plurality of message transmission modules in the same process , the problem of inaccurate frequency statistics in the prior art can be overcome, the communication delay across processes can also be avoided, and the accuracy of the frequency statistics of messages sent by the message sending module can be improved. In addition, in this embodiment, whether the message sending module is abnormal can be detected based on the frequency of statistics, whether the message sending module is abnormal can be effectively detected automatically, and the function and application of frequency statistics can also be effectively expanded.
而且,本实施例中还能够根据频率请求段的消息频率请求,向频率请求段返回预先统计好的消息发送模块发送消息的频率,不用在接收到消息频率请求后,再计算消息发送模块发送消息的频率,能够有效地保证返回的频率的准确性。Moreover, in this embodiment, it is also possible to return to the frequency request segment the pre-statistical frequency of sending messages by the message sending module according to the message frequency request in the frequency request segment, and it is not necessary to calculate the message sending module after receiving the message frequency request. The frequency can effectively ensure the accuracy of the returned frequency.
图3为本发明的消息频率的统计装置实施例的结构图。如图3所示,本实施例的消息频率的统计装置300,该消息频率的统计装置设置在一进程中,所述装置包括:FIG. 3 is a structural diagram of an embodiment of an apparatus for counting message frequencies according to the present invention. As shown in FIG. 3 , the
记录模块301用于在收到预先订阅的与消息频率的统计装置位于同进程中的消息发送模块发送的多个消息的过程中,记录多个消息的多个接收时刻;The
统计模块302用于根据在预设时间长度内的多个接收时刻,统计消息发送模块发送消息的频率。The
进一步可选地,如图3所示,本实施例的频率统计装置300中,还包括:确定模块303,用于根据进程的进程标识,确定消息发送模块的模块标识;Further optionally, as shown in FIG. 3 , the
发送模块304用于向消息管理模块发送对消息发送模块发送的消息的订阅请求,订阅请求包括模块标识。The sending
进一步可选地,如图3所示,本实施例的频率统计装置300中,还包括:Further optionally, as shown in FIG. 3 , the
检测模块305用于根据消息发送模块发送消息的频率和预设的频率阈值,检测消息发送模块是否异常。The
进一步可选地,如图3所示,本实施例的频率统计装置300中,还包括:Further optionally, as shown in FIG. 3 , the
接收模块306用于接收频率请求端发送的消息频率请求;The receiving
发送模块304用于向频率请求端发送消息发送模块发送消息发送模块发送消息的频率;消息发送模块发送消息的频率指示消息发送模块是否异常。The sending
本实施例的频率统计装置,通过采用上述模块实现频率统计的实现原理以及技术效果与上述相关方法实施例的实现相同,详细可以参考上述相关方法实施例的记载,在此不再赘述。In the frequency statistics apparatus of this embodiment, the implementation principle and technical effect of implementing frequency statistics by using the above-mentioned modules are the same as those of the above-mentioned related method embodiments.
根据本申请的实施例,本申请还提供了一种电子设备和一种可读存储介质。According to the embodiments of the present application, the present application further provides an electronic device and a readable storage medium.
如图4所示,是根据本申请实施例的频率统计方法的电子设备的框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本申请的实现。As shown in FIG. 4 , it is a block diagram of an electronic device according to the frequency statistics method according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are by way of example only, and are not intended to limit implementations of the application described and/or claimed herein.
如图4所示,该电子设备包括:一个或多个处理器401、存储器402,以及用于连接各部件的接口,包括高速接口和低速接口。各个部件利用不同的总线互相连接,并且可以被安装在公共主板上或者根据需要以其它方式安装。处理器可以对在电子设备内执行的指令进行处理,包括存储在存储器中或者存储器上以在外部输入/输出装置(诸如,耦合至接口的显示设备)上显示GUI的图形信息的指令。在其它实施方式中,若需要,可以将多个处理器和/或多条总线与多个存储器和多个存储器一起使用。同样,可以连接多个电子设备,各个设备提供部分必要的操作(例如,作为服务器阵列、一组刀片式服务器、或者多处理器系统)。图4中以一个处理器401为例。As shown in FIG. 4, the electronic device includes: one or
存储器402即为本申请所提供的非瞬时计算机可读存储介质。其中,所述存储器存储有可由至少一个处理器执行的指令,以使所述至少一个处理器执行本申请所提供的频率统计方法。本申请的非瞬时计算机可读存储介质存储计算机指令,该计算机指令用于使计算机执行本申请所提供的频率统计方法。The
存储器402作为一种非瞬时计算机可读存储介质,可用于存储非瞬时软件程序、非瞬时计算机可执行程序以及模块,如本申请实施例中的频率统计方法对应的程序指令/模块(例如,附图3所示的相关模块)。处理器401通过运行存储在存储器402中的非瞬时软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例中的频率统计方法。As a non-transitory computer-readable storage medium, the
存储器402可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据频率统计方法的电子设备的使用所创建的数据等。此外,存储器402可以包括高速随机存取存储器,还可以包括非瞬时存储器,例如至少一个磁盘存储器件、闪存器件、或其他非瞬时固态存储器件。在一些实施例中,存储器402可选包括相对于处理器401远程设置的存储器,这些远程存储器可以通过网络连接至频率统计方法的电子设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The
频率统计方法的电子设备还可以包括:输入装置403和输出装置404。处理器401、存储器402、输入装置403和输出装置404可以通过总线或者其他方式连接,图4中以通过总线连接为例。The electronic device for the frequency statistics method may further include: an
输入装置403可接收输入的数字或字符信息,以及产生与XXX的电子设备的用户设置以及功能控制有关的键信号输入,例如触摸屏、小键盘、鼠标、轨迹板、触摸板、指示杆、一个或者多个鼠标按钮、轨迹球、操纵杆等输入装置。输出装置404可以包括显示设备、辅助照明装置(例如,LED)和触觉反馈装置(例如,振动电机)等。该显示设备可以包括但不限于,液晶显示器(LCD)、发光二极管(LED)显示器和等离子体显示器。在一些实施方式中,显示设备可以是触摸屏。The
此处描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、专用ASIC(专用集成电路)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described herein can be implemented in digital electronic circuitry, integrated circuit systems, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs executable and/or interpretable on a programmable system including at least one programmable processor that The processor, which may be a special purpose or general-purpose programmable processor, may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device an output device.
这些计算程序(也称作程序、软件、软件应用、或者代码)包括可编程处理器的机器指令,并且可以利用高级过程和/或面向对象的编程语言、和/或汇编/机器语言来实施这些计算程序。如本文使用的,术语“机器可读介质”和“计算机可读介质”指的是用于将机器指令和/或数据提供给可编程处理器的任何计算机程序产品、设备、和/或装置(例如,磁盘、光盘、存储器、可编程逻辑装置(PLD)),包括,接收作为机器可读信号的机器指令的机器可读介质。术语“机器可读信号”指的是用于将机器指令和/或数据提供给可编程处理器的任何信号。These computational programs (also referred to as programs, software, software applications, or codes) include machine instructions for programmable processors, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages calculation program. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or apparatus for providing machine instructions and/or data to a programmable processor ( For example, magnetic disks, optical disks, memories, programmable logic devices (PLDs), including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide interaction with a user, the systems and techniques described herein may be implemented on a computer having a display device (eg, a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user ); and a keyboard and pointing device (eg, a mouse or trackball) through which a user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (eg, visual feedback, auditory feedback, or tactile feedback); and can be in any form (including acoustic input, voice input, or tactile input) to receive input from the user.
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)和互联网。The systems and techniques described herein may be implemented on a computing system that includes back-end components (eg, as a data server), or a computing system that includes middleware components (eg, an application server), or a computing system that includes front-end components (eg, a user's computer having a graphical user interface or web browser through which a user may interact with implementations of the systems and techniques described herein), or including such backend components, middleware components, Or any combination of front-end components in a computing system. The components of the system may be interconnected by any form or medium of digital data communication (eg, a communication network). Examples of communication networks include: Local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。A computer system can include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other.
根据本申请实施例的技术方案,通过在预先订阅的同进程的消息发送模块发送消息时,记录消息的发送时刻;根据消息在预设时间长度内的多个发送时刻,统计消息的频率,能够克服现有技术中频率统计不准确的技术问题,由于本申请实施例的频率统计发生在同一进程间,不存在跨进程的通信时延,能够有效地提高频率统计的准确性。According to the technical solutions of the embodiments of the present application, when a pre-subscribed message sending module of the same process sends a message, the sending time of the message is recorded; To overcome the technical problem of inaccurate frequency statistics in the prior art, since the frequency statistics in the embodiments of the present application occur between the same processes, there is no inter-process communication delay, and the accuracy of the frequency statistics can be effectively improved.
根据本申请实施例的技术方案,还可以对同一进程中的多个消息发送模块中每个消息发送模块的频率进行统计,且能够有效地保证每个消息发送模块的频率统计的准确性。According to the technical solutions of the embodiments of the present application, the frequency of each message sending module in the multiple message sending modules in the same process can also be counted, and the accuracy of the frequency statistics of each message sending module can be effectively ensured.
根据本申请实施例的技术方案,还可以为每个消息发送模块配置消息时间缓存,用于记录对应的消息发送模块发送消息的发送时刻,以便于后续能够准确统计该消息发送模块的频率,避免多个消息发送模块放在一起统计时出现频率统计错误的情况发生。According to the technical solutions of the embodiments of the present application, a message time cache can also be configured for each message sending module, which is used to record the sending time of the message sent by the corresponding message sending module, so that the frequency of the message sending module can be accurately counted in the follow-up, so as to avoid Frequency statistics error occurs when multiple message sending modules are put together for statistics.
根据本申请实施例的技术方案,还能够基于统计的频率,检测消息发送模块是否异常,能够自动地对消息发送模块是否异常进行有效检测,同时还能够有效地扩展频率统计的功能及应用。According to the technical solutions of the embodiments of the present application, it is also possible to detect whether the message sending module is abnormal based on the frequency of statistics, to automatically and effectively detect whether the message sending module is abnormal, and to effectively expand the function and application of frequency statistics.
根据本申请实施例的技术方案,还能够根据频率请求段的消息频率请求,向频率请求段返回预先统计好的消息发送模块发送消息的频率,不用在接收到消息频率请求后,再计算消息发送模块发送消息的频率,能够有效地保证返回的频率的准确性。According to the technical solutions of the embodiments of the present application, it is also possible to return to the frequency request segment the pre-statistical frequency of sending messages by the message sending module according to the message frequency request in the frequency request segment, and it is not necessary to calculate the message sending frequency after receiving the message frequency request. The frequency of sending messages by the module can effectively ensure the accuracy of the returned frequency.
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发申请中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本申请公开的技术方案所期望的结果,本文在此不进行限制。It should be understood that steps may be reordered, added or deleted using the various forms of flow shown above. For example, the steps described in the present application can be performed in parallel, sequentially or in different orders, and as long as the desired results of the technical solutions disclosed in the present application can be achieved, no limitation is imposed herein.
上述具体实施方式,并不构成对本申请保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本申请的精神和原则之内所作的修改、等同替换和改进等,均应包含在本申请保护范围之内。The above-mentioned specific embodiments do not constitute a limitation on the protection scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of this application shall be included within the protection scope of this application.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911174489.3A CN111031105B (en) | 2019-11-26 | 2019-11-26 | Statistical method, device, device and storage medium for message frequency in autonomous driving |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911174489.3A CN111031105B (en) | 2019-11-26 | 2019-11-26 | Statistical method, device, device and storage medium for message frequency in autonomous driving |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111031105A CN111031105A (en) | 2020-04-17 |
| CN111031105B true CN111031105B (en) | 2022-06-28 |
Family
ID=70202254
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201911174489.3A Active CN111031105B (en) | 2019-11-26 | 2019-11-26 | Statistical method, device, device and storage medium for message frequency in autonomous driving |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111031105B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115123302A (en) * | 2022-07-07 | 2022-09-30 | 九识(苏州)智能科技有限公司 | Decision planning system and method for automatic driving vehicle and vehicle |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103207808A (en) * | 2012-01-13 | 2013-07-17 | 百度在线网络技术(北京)有限公司 | Processing method and device in multi-core system |
| CN106899943A (en) * | 2017-03-10 | 2017-06-27 | 广东欧珀移动通信有限公司 | Control broadcast transmission person sends method, device and the terminal device of broadcast message |
| CN109756528A (en) * | 2017-11-01 | 2019-05-14 | 广州腾讯科技有限公司 | Control method for frequency and device, equipment, storage medium, server |
Family Cites Families (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070297327A1 (en) * | 2006-06-27 | 2007-12-27 | International Business Machines Corporation | Method for applying stochastic control optimization for messaging systems |
| CN101312554A (en) * | 2007-05-25 | 2008-11-26 | 株洲南车时代电气股份有限公司 | Control method for data wireless transmission in the field of traffic and application server |
| CN102811283A (en) * | 2012-04-18 | 2012-12-05 | 中兴通讯股份有限公司 | Terminal communication display method and terminal thereof |
| US10235278B2 (en) * | 2013-03-07 | 2019-03-19 | International Business Machines Corporation | Software testing using statistical error injection |
| CN105511946A (en) * | 2015-11-30 | 2016-04-20 | 青岛海尔智能家电科技有限公司 | Intelligent home appliance equipment active degree statistic method and device and internet gateway |
| CN107483521A (en) * | 2016-06-08 | 2017-12-15 | 阿里巴巴集团控股有限公司 | An information display method, device and system |
| CN107797902B (en) * | 2016-09-06 | 2021-07-30 | 北京百度网讯科技有限公司 | Method and apparatus for monitoring message transmission frequency of robot operating system |
| CN109194736B (en) * | 2018-08-30 | 2021-04-27 | 百度在线网络技术(北京)有限公司 | Message duplicate removal method and device, electronic equipment, medium and unmanned vehicle |
| CN109547282B (en) * | 2018-10-22 | 2022-04-12 | 中国平安人寿保险股份有限公司 | Overload protection method and device, computer readable storage medium and server |
| CN110399405A (en) * | 2019-07-26 | 2019-11-01 | 广州虎牙科技有限公司 | Log alarming method, apparatus, system and storage medium |
-
2019
- 2019-11-26 CN CN201911174489.3A patent/CN111031105B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103207808A (en) * | 2012-01-13 | 2013-07-17 | 百度在线网络技术(北京)有限公司 | Processing method and device in multi-core system |
| CN106899943A (en) * | 2017-03-10 | 2017-06-27 | 广东欧珀移动通信有限公司 | Control broadcast transmission person sends method, device and the terminal device of broadcast message |
| CN109756528A (en) * | 2017-11-01 | 2019-05-14 | 广州腾讯科技有限公司 | Control method for frequency and device, equipment, storage medium, server |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111031105A (en) | 2020-04-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111858248B (en) | Application monitoring method, device, equipment and storage medium | |
| CN111756579A (en) | Abnormal early warning method, device, equipment and storage medium | |
| CN111897694B (en) | Method and device for processing message in applet, equipment and storage medium | |
| CN111694646A (en) | Resource scheduling method and device, electronic equipment and computer readable storage medium | |
| CN110659184B (en) | Health state checking method, device and system | |
| CN112561332B (en) | Model management method, device, electronic equipment, storage medium and program product | |
| CN111865720B (en) | Method, apparatus, device and storage medium for processing requests | |
| CN112491617B (en) | Link tracking method, device, electronic equipment and medium | |
| CN110737560B (en) | Service state detection method and device, electronic equipment and medium | |
| EP3836484A2 (en) | Method for transmitting live message, apparatus, electronic device, medium and computer program product | |
| CN111866071A (en) | Data uploading method, device, electronic device and storage medium for business application | |
| CN111461343A (en) | Model parameter update method and related equipment | |
| CN112565356A (en) | Data storage method and device and electronic equipment | |
| CN110716959A (en) | Streaming data processing method and device, electronic equipment and storage medium | |
| CN111177513B (en) | Method, device, electronic equipment and storage medium for determining abnormal access address | |
| CN111726402B (en) | User behavior data processing method and device, electronic equipment and storage medium | |
| CN111917814B (en) | Data publishing method, data subscribing method, data publishing device, data subscribing system and readable storage medium | |
| CN111031105B (en) | Statistical method, device, device and storage medium for message frequency in autonomous driving | |
| CN111049690B (en) | Equipment fault monitoring and processing method, device, equipment and storage medium | |
| CN112615795A (en) | Flow control method and device, electronic equipment, storage medium and product | |
| CN112770415B (en) | Information processing method and device for wireless hotspot | |
| CN111966421B (en) | Page component operation monitoring method, device, equipment and storage medium | |
| CN110580322A (en) | Method, device, electronic device and storage medium for independent visitor information processing | |
| CN111597026B (en) | Method and device for obtaining information | |
| CN112099933A (en) | A task operation, query method, device, electronic device and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |