Method and device for obtaining end-to-end delay based on autonomous driving system
By obtaining the callback information of each processing module in the autonomous driving system and using depth-first search and preset pruning algorithms, the problem of multi-sensor data processing delay analysis is solved, and accurate calculation of end-to-end delay and system maintenance are achieved. simplify.
Patent Information
- Application Number
- CN202211659123.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-22
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2042-12-22
AI Technical Summary
Existing autonomous driving systems are unable to effectively process data from multiple sensors when acquiring end-to-end latency, resulting in difficulty in maintenance and inconsistent latency analysis, making it impossible to achieve detailed historical data analysis.
By obtaining the callback information of each processing module in the autonomous driving system, using depth-first search and preset pruning algorithm, the end-to-end delay from the input sensor to the output module is determined, avoiding the coupling of the transmission time of the upstream and downstream modules, and realizing Unified consideration and delay analysis of all sensors are provided.
It significantly improves the efficiency and accuracy of delay analysis, simplifies system maintenance, and achieves comprehensive and accurate calculation of end-to-end delay.
Smart Images

Figure CN116248556B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving technology, and in particular to a method and device for acquiring end-to-end delay based on an autonomous driving system. Background Art
[0002] The autonomous driving system needs to rely on artificial intelligence, visual computing, radar, monitoring devices and global positioning systems to work together to automatically and safely operate motor vehicles without any external operation. Autonomous driving technology often requires various sensors to perceive the surrounding environment, among which the more typical sensors include cameras, millimeter wave radars, GPS, and lidar. Autonomous driving vehicles can detect and classify the environment around the vehicle through these sensors, and transmit the acquired information to the planning and control module after processing by various modules to provide effective information for the decision of the vehicle's future driving path, and finally execute it through the actuator to complete the entire assisted driving or autonomous driving process. If the autonomous driving system cannot convey instructions in time due to long delays, it will threaten driving safety. Therefore, how to more accurately and simply obtain the end-to-end delay from the time when each sensor collects data to the decision time of the planning and control module is an urgent problem to be solved.
[0003] At present, the methods for obtaining the end-to-end delay of the autonomous driving system mainly include: selecting the data collection time of a certain sensor (such as millimeter-wave radar) as the input time, and transmitting it between various intermediate modules. If you need to record the delay from the input to the current module, you need to obtain the system time of the current module, and then use the obtained system time to subtract the input time, and then update the delay metric indicator and upload it to the cloud statistics.
[0004] However, the above method can generally only select one sensor as the input end. In actual situations, there are multiple sensors in the autonomous driving system, and the modules in the delay calculation path all implement the logic of recording the input end time and passing it backwards, which needs to be strongly bound to the data structure transmitted between modules. Therefore, when reselecting the sensor as the input end, the business code needs to be modified to realize the transmission of sensor time between upstream and downstream modules, which is difficult to maintain and difficult to expand. In addition, the logic of delay calculation and recording is embedded in the vehicle code, and the logic of when to obtain the system time in each module is inconsistent, which easily leads to inconsistent delay standards for different modules and makes it impossible to perform a more detailed analysis of historical data. Summary of the invention
[0005] The present invention provides a method and device for obtaining end-to-end delay based on an autonomous driving system, which is used to solve the defect in the prior art that the transmission of sensor time between upstream and downstream modules needs to be adjusted according to the selected sensor, resulting in great maintenance difficulty. The method and device have strong generalization ability and improve the efficiency and comprehensiveness of delay analysis.
[0006] The present invention provides a method for obtaining end-to-end delay based on an autonomous driving system, comprising: obtaining callback information corresponding to each processing module in the autonomous driving system, the processing module comprising an input-end sensor, an output-end module and an intermediate-end module arranged between the input-end sensor and the output-end module, the intermediate-end module processing information collected by the input-end sensor and sending the processed information to the output-end module; and obtaining the end-to-end delay from the input-end sensor to the output-end module according to the callback information of all processing modules.
[0007] According to a method for obtaining end-to-end delay based on an autonomous driving system provided by the present invention, the callback information includes a release callback record, and the end-to-end delay from the input-end sensor to the output-end module is obtained according to the callback information of all processing modules, including: based on depth-first search DFS and a preset pruning algorithm, the output-end module and the input-end sensor in the processing module are determined, the release callback records of the output-end module are sorted from small to large according to the callback time, and starting from each release callback record of the output-end module, the release callback record corresponding to each input-end sensor is obtained; according to the release callback records of each of the input-end sensors, the minimum release callback time of the input-end sensor is obtained; according to the minimum release callback time of the input-end sensor and the release callback time of the current output-end module, the end-to-end delay from the corresponding sensor to the output-end module is obtained.
[0008] According to a method for obtaining end-to-end delay based on an autonomous driving system provided by the present invention, the callback information also includes subscription information that is dependent on when publishing the callback, and the output module and input sensor in the processing module are determined based on the depth-first search DFS and a preset pruning algorithm, including: searching for the callback information of the processing modules that have not been accessed, and judging whether the publishing callback of the current processing module depends on the upstream processing module based on the subscription information that the searched current processing module depends on when publishing the callback; if the publishing callback of the current processing module does not depend on the upstream processing module, determining that the current processing module is an input sensor, and determining the publishing callback time of the corresponding input sensor based on the callback information of the current processing module, and adding it to the global information; otherwise, combining the global information and the callback information corresponding to each of the processing modules, obtaining the publishing callback record of the upstream processing module corresponding to the current processing module.
[0009] According to a method for obtaining end-to-end delay based on an autonomous driving system provided by the present invention, the callback information of the upstream processing module corresponding to the current processing module is obtained, including: looping all subscription topic numbers of the current processing module, and obtaining the current processing module subscription callback record corresponding to the current processing module publishing callback based on a first preset condition; and obtaining the upstream module publishing callback record corresponding to the current processing module subscription callback record based on a second preset condition.
[0010] According to a method for obtaining end-to-end delay based on an autonomous driving system provided by the present invention, the first preset condition includes: the module instance name in the callback information is consistent with the module instance name of the currently published callback record; the subject number in the callback information is consistent with the subject number of the currently published callback record; the callback start time in the callback information is less than the callback start time in the currently published callback record; the callback start time in the callback information is the largest;
[0011] The second preset condition includes: the module instance name in the callback information is consistent with the module instance name of the currently published callback record; the topic number published in the callback information contains the topic number of the currently published callback record; the callback start time in the callback information is less than the message publishing time of the upstream module corresponding to the currently published callback record; the callback start time in the callback information is the largest.
[0012] According to a method for obtaining end-to-end delay based on an autonomous driving system provided by the present invention, before obtaining the callback information corresponding to each processing module in the autonomous driving system, the method includes: enabling the function of recording callback information of each processing module to record the corresponding callback information; wherein the callback information includes the callback time, callback type, topic number, instance name of the module, corresponding upstream module name and corresponding upstream module message release time of the processing module.
[0013] According to a method for obtaining the end-to-end delay of an autonomous driving system provided by the present invention, after obtaining the end-to-end delay from the sensor to the output end module, the method comprises: performing mathematical statistics on the end-to-end delay based on a preset number of items to obtain a statistical result; and outputting the statistical result based on a preset format file to present the end-to-end delay.
[0014] The present invention also provides an acquisition device based on the end-to-end delay of an autonomous driving system, comprising: a record acquisition module, which acquires callback information corresponding to each processing module in the autonomous driving system, the processing module comprising an input end sensor, an output end module, and an intermediate end module arranged between the input end sensor and the output end module, the intermediate end module processes the information collected by the input end sensor and sends the processed information to the output end module; a delay acquisition module, which obtains the end-to-end delay from the input end sensor to the output end module according to the callback information of all processing modules.
[0015] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-mentioned methods for acquiring the end-to-end delay of the autonomous driving system are implemented.
[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for obtaining the end-to-end delay of the autonomous driving system as described in any one of the above are implemented.
[0017] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned methods for obtaining end-to-end delay based on an autonomous driving system.
[0018] The method and device for obtaining the end-to-end delay of the autonomous driving system provided by the present invention obtain the callback information of all processing modules, so as to consider all sensors involved in the system as input ends in a more comprehensive and accurate manner, and avoid the coupling caused by the transmission of input end time by upstream and downstream modules when calculating the end-to-end delay. Based on the depth-first search DFS and the preset pruning algorithm, the end-to-end delay of the system is automatically analyzed, thereby significantly improving the accuracy and convenience of calculating the end-to-end delay of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 This is one of the flow charts of the method for obtaining the end-to-end delay based on the automatic driving system provided by the present invention;
[0021] Figure 2This is the second flow chart of the method for obtaining the end-to-end delay of the automatic driving system provided by the present invention;
[0022] Figure 3 It is a message topology diagram between the processing modules provided by the present invention;
[0023] Figure 4 It is a structural schematic diagram of a device for acquiring end-to-end delay based on an autonomous driving system provided by the present invention;
[0024] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0026] Figure 1 A flow chart of a method for obtaining end-to-end delay based on an autonomous driving system according to the present invention is shown, and the method comprises:
[0027] S11, obtaining callback information corresponding to each processing module in the autonomous driving system, wherein the processing module includes an input end sensor, an output end module, and an intermediate end module disposed between the input end sensor and the output end module, wherein the intermediate end module processes information collected by the input end sensor and sends the processed information to the output end module;
[0028] S12, obtaining the end-to-end delay from the input-end sensor to the output-end module according to the callback information of all processing modules.
[0029] It should be noted that S1N in this specification does not represent the order of the method for obtaining the end-to-end delay of the autonomous driving system. Figure 2-Figure 3 The present invention describes a method for obtaining end-to-end delay based on an autonomous driving system.
[0030] Step S11, obtaining callback information corresponding to each processing module in the autonomous driving system, wherein the processing module includes an input end sensor, an output end module, and an intermediate end module arranged between the input end sensor and the output end module, and the intermediate end module processes the information collected by the input end sensor and sends the processed information to the output end module.
[0031] In this embodiment, before obtaining the callback information of each processing module in the autonomous driving system, it includes: enabling the function of recording callback information of each processing module to record the corresponding callback information; wherein the callback information includes the callback time, callback type, topic number, instance name of this module, corresponding upstream module name and corresponding upstream module message publishing time (only valid for subscription callback type, invalid for publishing callback type) of the processing module, so as to record all callback information of each processing module after the system is running, thereby ensuring the provision of a unified standard and method for recording module callback information. It should be added that the callback type includes subscription callback or publishing callback.
[0032] In an optional embodiment, obtaining callback information corresponding to each processing module in the autonomous driving system includes: obtaining callback information recorded by each processing module; parsing the obtained callback information. It should be noted that, since in the actual processing process, the recorded callback information can be stored in a specific file format, such as a rec file format, after obtaining the callback information recorded by each processing module, it is also necessary to parse it into a specific format file, such as a json format file, through an offline tool.
[0033] In addition, after parsing the obtained callback information through offline tools, it also includes: parsing the publish-subscribe topology relationship file of the processing module to obtain the upstream topic number that each processing module depends on for publishing callbacks and the topic number published to the downstream; filtering out the publishing callback information of the output end module from the callback information of all processing modules, and sorting the filtered callback information from small to large according to the callback time.
[0034] Step S12: obtaining the end-to-end delay from the input-end sensor to the output-end module according to the callback information of all processing modules.
[0035] In this embodiment, the callback information includes a release callback record, and the end-to-end delay from the input-end sensor to the output-end module is obtained according to the callback information of all processing modules, including: based on the depth-first search DFS and the preset pruning algorithm, the output-end module and the input-end sensor in the processing module are determined, the release callback records of the output-end module are sorted in ascending order according to the callback time, and starting from each release callback record of the output-end module, the release callback record corresponding to each input-end sensor is obtained; according to the release callback records of each input-end sensor, the minimum release callback time of the input-end sensor is obtained; according to the minimum release callback time of the input-end sensor and the release callback time of the current output-end module, the end-to-end delay from the corresponding sensor to the output-end module is obtained.
[0036] It should be noted that for each output module publishing callback information, the callback time of each input sensor module is obtained based on the callback information of all processing modules based on depth-first search and pruning algorithm. The end-to-end delay is: the output module publishing callback time - the minimum value of the callback start time of all input sensor modules.
[0037] Specifically, refer to Figure 2 , the callback information also includes the subscription information that is relied upon when publishing the callback, and the output module and input sensor in the processing module are determined based on the depth-first search DFS and the preset pruning algorithm, including: searching for the callback information of the processing module that has not been accessed, and judging whether the publishing callback of the current processing module depends on the upstream processing module according to the subscription information that the current processing module relies on when publishing the callback; if the publishing callback of the current processing module does not depend on the upstream processing module, the current processing module is determined to be an input sensor, and the corresponding input sensor publishing callback time is determined according to the callback information of the current processing module, and it is added to the global information; otherwise, the callback information of the upstream processing module corresponding to the current processing module is obtained by combining the global information and the callback information corresponding to each processing module. It should be noted that the global information can be a list, text or other form of expression, which is not further limited here.
[0038] Furthermore, the callback information of the upstream processing module corresponding to the current processing module is obtained, including: looping all subscription topic numbers of the current processing module, and obtaining the subscription callback record of the current processing module corresponding to the publishing callback of the current processing module based on the first preset condition; and obtaining the publishing callback record of the upstream module corresponding to the subscription callback record of the current processing module based on the second preset condition.
[0039] For example, Figure 3 As shown in the message topology diagram between each processing module, there are processing modules I, H, G, F, C, D, E and B. The release callback of I, H, G, and F does not depend on the upstream processing module, and they are input sensor modules; B is an output module, which can be an output module in the autonomous driving system; other modules such as C, D, and E are intermediate processing modules. The upstream processing modules of C are I, H, and D, the upstream processing modules of D are C, E, and G, the upstream processing module of E is F, and the upstream processing modules of B are C and E.
[0040] First, obtain the callback information of I, H, G, F, C, D, E, and B record times and the upstream topic number that the release callback depends on and the topic number published to the downstream. Then filter the release callback information of module B and sort its release callback time from small to large. Starting from each record of the release callback information of module B, mark B as having been accessed in the global mapping table; first filter out the subscription callback information of B corresponding to the release callback information of B based on the first preset condition; then filter out the release callback information of the upstream module C corresponding to B based on the second preset condition according to the subscription callback information of B; then filter out the subscription callback information of C based on the first preset condition according to the release callback information of module C, and mark C as having been accessed in the global mapping table; filter out the release callback information of the upstream module D corresponding to C based on the second preset condition; then filter out the subscription callback information of D based on the first preset condition according to the release callback information of D, and mark D as having been accessed in the global mapping table; since C has been marked as accessed in the global mapping table before, the upstream of D cannot be C, but G; therefore, the release callback information of G can be filtered out based on the second preset condition. Since G is already a sensor module, the effective path of this path is B->C->D->G; the end-to-end delay of this path is: the release callback start time of B-the release callback start time of G. Similarly, the end-to-end delays of the valid paths B->C->I, B->E->F, B->C->H, B->C->D->E->F can be calculated. The maximum end-to-end delay of all valid paths is the end-to-end delay of the corresponding B's release callback record.
[0041] It should be added that the first preset condition includes: the module instance name in the callback information is consistent with the module instance name of the currently published callback record; the topic number in the callback information is consistent with the topic number of the currently published callback record; the callback start time in the callback information is less than the callback start time in the currently published callback record; the callback start time in the callback information is the largest.
[0042] In addition, the second preset condition includes: the module instance name in the callback information is consistent with the module instance name of the currently published callback record; the topic number published in the callback information contains the topic number of the currently published callback record; the callback start time in the callback information is less than the message publishing time of the upstream module corresponding to the currently published callback record; the callback start time in the callback information is the largest.
[0043] In an optional embodiment, after obtaining the end-to-end delay from the sensor to the output module, it includes: performing mathematical statistics on the end-to-end delay based on a preset number of items to obtain statistical results; outputting the statistical results based on a preset format file to present the end-to-end delay. It should be supplemented that the mathematical statistics include calculating the mean, median, maximum, minimum, tp90 value, tp99 value and standard deviation, etc. In addition, the preset format file can be in yaml format, csv format, html format, etc., so as to output reports in multiple formats, including visual charts, to provide multiple ways to present the end-to-end delay. The specific preset format file can be set according to the actual required presentation form; the preset number of items can be determined according to the number of end-to-end delays actually obtained, and is not further limited here.
[0044] In summary, the embodiments of the present invention obtain the callback information of all processing modules to more comprehensively and accurately consider all sensors involved in the system as input ends, avoid the coupling caused by the transmission of input end time by upstream and downstream modules when calculating the end-to-end delay, and automatically analyze the end-to-end delay of the system based on the depth-first search DFS and the preset pruning algorithm, thereby significantly improving the accuracy and convenience of calculating the end-to-end delay of the system.
[0045] The following is a description of the device for obtaining the end-to-end delay based on the autonomous driving system provided by the present invention. The device for obtaining the end-to-end delay based on the autonomous driving system described below and the method for obtaining the end-to-end delay based on the autonomous driving system described above can be referenced to each other.
[0046] Figure 4 A schematic diagram of the structure of a device for acquiring end-to-end delay based on an autonomous driving system is shown, the device comprising:
[0047] A record acquisition module 41 is used to acquire callback information corresponding to each processing module in the automatic driving system. The processing module includes an input end sensor, an output end module, and an intermediate end module disposed between the input end sensor and the output end module. The intermediate end module processes the information collected by the input end sensor and sends the processed information to the output end module.
[0048] The delay acquisition module 42 obtains the end-to-end delay from the input-end sensor to the output-end module according to the callback information of all processing modules.
[0049] In this embodiment, the device further includes: a function activation module, which activates the function of recording callback information of each processing module before obtaining the callback information of each processing module in the automatic driving system, so as to record the corresponding callback information; wherein the callback information includes the callback time, callback type, topic number, instance name of this module, corresponding upstream module name and corresponding upstream module message publishing time (only valid for subscription callback type, invalid for publishing callback type) of the processing module, so that after the system is running, all callback information of each processing module can be recorded, thereby ensuring the provision of a unified standard and method for recording module callback information. It should be added that the callback type includes subscription callback or publishing callback.
[0050] In an optional embodiment, the record acquisition module 41 includes: a record acquisition unit, which acquires the callback information recorded by each processing module; and a parsing unit, which parses the acquired callback information.
[0051] In an optional embodiment, the record acquisition module 41 also includes: a topic number acquisition unit, which parses the publish-subscribe topology relationship file of the processing module to obtain the upstream topic number that each processing module depends on for publishing callbacks and the topic number published to the downstream; an information acquisition unit, which filters out the publishing callback information of the output end module from the callback information of all processing modules, and sorts the filtered callback information from small to large according to the callback time.
[0052] The delay acquisition module 42 includes: a record acquisition unit, which determines the output module and the input sensor in the processing module based on the depth-first search DFS and the preset pruning algorithm, sorts the release callback records of the output module from small to large according to the callback time, and obtains the release callback records corresponding to each input sensor from the release callback record of each output module; a minimum time acquisition unit, which obtains the minimum release callback time of the input sensor according to the release callback records of each input sensor; and a delay acquisition unit, which obtains the end-to-end delay from the corresponding sensor to the output module according to the minimum release callback time of the input sensor and the release callback time of the current output module.
[0053] Specifically, the callback information also includes the subscription information that is relied upon when publishing the callback, and the record acquisition unit includes: a search and judgment subunit, which searches for the callback information of the processing modules that have not been accessed, and judges whether the publishing callback of the current processing module depends on the upstream processing module based on the subscription information that is relied upon when publishing the callback of the current processing module; a time determination subunit, if the publishing callback of the current processing module does not depend on the upstream processing module, determines that the current processing module is an input end sensor, and determines the corresponding input end sensor publishing callback time based on the callback information of the current processing module, and adds it to the global information; otherwise, the information acquisition subunit, combining the global information and the callback information corresponding to each processing module, obtains the callback information of the upstream processing module corresponding to the current processing module.
[0054] Furthermore, the information acquisition sub-unit includes: a first record acquisition grandchild unit, which loops all subscription topic numbers of the current processing module, and obtains the current processing module subscription callback record corresponding to the current processing module publishing callback based on a first preset condition; a second record acquisition grandchild unit, which obtains the upstream module publishing callback record corresponding to the current processing module subscription callback record based on a second preset condition.
[0055] It should be added that the first preset condition includes: the module instance name in the callback information is consistent with the module instance name of the currently published callback record; the topic number in the callback information is consistent with the topic number of the currently published callback record; the callback start time in the callback information is less than the callback start time in the currently published callback record; the callback start time in the callback information is the largest.
[0056] In addition, the second preset condition includes: the module instance name in the callback information is consistent with the module instance name of the currently published callback record; the topic number published in the callback information contains the topic number of the currently published callback record; the callback start time in the callback information is less than the message publishing time of the upstream module corresponding to the currently published callback record; the callback start time in the callback information is the largest.
[0057] In an optional embodiment, the device also includes: a statistical module, which, after obtaining the end-to-end delay from the sensor to the output end module, performs mathematical statistics on the end-to-end delay based on a preset number of items to obtain statistical results; and a data presentation module, which outputs the statistical results based on a preset format file to present the end-to-end delay.
[0058] In summary, the embodiment of the present invention obtains the callback information of all processing modules through the record acquisition module, so as to consider all sensors involved in the system as input ends more comprehensively and accurately, avoid the coupling caused by the transmission of input end time by upstream and downstream modules when calculating the end-to-end delay, and thus use the delay acquisition module based on depth-first search DFS and preset pruning algorithm to automatically analyze the end-to-end delay of the system, thereby significantly improving the accuracy and convenience of calculating the end-to-end delay of the system.
[0059] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor 51, a communication interface 52, a memory 53 and a communication bus 54, wherein the processor 51, the communication interface 52 and the memory 53 communicate with each other through the communication bus 54. The processor 51 may call the logic instructions in the memory 53 to execute the acquisition method based on the end-to-end delay of the autonomous driving system, the method comprising: acquiring callback information corresponding to each processing module in the autonomous driving system, the processing module comprising an input end sensor, an output end module and an intermediate end module arranged between the input end sensor and the output end module, the intermediate end module processes the information collected by the input end sensor and sends the processed information to the output end module; according to the callback information of all processing modules, the end-to-end delay from the input end sensor to the output end module is obtained.
[0060] In addition, the logic instructions in the above-mentioned memory 53 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0061] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the acquisition method based on the end-to-end delay of the autonomous driving system provided by the above-mentioned methods, and the method includes: obtaining callback information corresponding to each processing module in the autonomous driving system, the processing module includes an input sensor, an output module, and an intermediate module arranged between the input sensor and the output module, the intermediate module processes the information collected by the input sensor and sends the processed information to the output module; according to the callback information of all processing modules, the end-to-end delay from the input sensor to the output module is obtained.
[0062] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the method for obtaining the end-to-end delay of the autonomous driving system provided by the above-mentioned methods, the method comprising: obtaining callback information corresponding to each processing module in the autonomous driving system, the processing module comprising an input sensor, an output module, and an intermediate module arranged between the input sensor and the output module, the intermediate module processing information collected by the input sensor and sending the processed information to the output module; according to the callback information of all processing modules, obtaining the end-to-end delay from the input sensor to the output module.
[0063] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0064] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0065] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for obtaining end-to-end delay based on an autonomous driving system, characterized in that: include: Acquire callback information corresponding to each processing module in the automatic driving system, wherein the processing module includes an input end sensor, an output end module, and an intermediate end module disposed between the input end sensor and the output end module, wherein the intermediate end module processes information collected by the input end sensor and sends the processed information to the output end module; According to the callback information of all processing modules, the end-to-end delay from the input end sensor to the output end module is obtained; The callback information includes publishing a callback record, and obtaining the end-to-end delay from the input-end sensor to the output-end module according to the callback information of all processing modules, including: Based on the depth-first search DFS and the preset pruning algorithm, the output end module and the input end sensor in the processing module are determined, the release callback records of the output end module are sorted from small to large according to the callback time, and starting from each release callback record of the output end module, the release callback record corresponding to each input end sensor is obtained; According to the release callback records of each of the input end sensors, a minimum value of the release callback time of the input end sensor is obtained; According to the minimum value of the release callback time of the input-end sensor and the release callback time of the current output-end module, the end-to-end delay from the corresponding sensor to the output-end module is obtained; The callback information also includes subscription information that is relied upon when publishing the callback. The output terminal module and the input terminal sensor in the processing module are determined based on the depth-first search DFS and the preset pruning algorithm, including: Searching for callback information of processing modules that have not been accessed, and judging whether the publishing callback of the current processing module depends on an upstream processing module according to the subscription information that the publishing callback of the searched current processing module depends on; If the release callback of the current processing module does not depend on the upstream processing module, the current processing module is determined to be an input end sensor, and the release callback time of the corresponding input end sensor is determined according to the callback information of the current processing module, and added to the global information; Otherwise, the publishing callback record of the upstream processing module corresponding to the current processing module is obtained by combining the global information and the callback information corresponding to each processing module.
2. The method for obtaining end-to-end delay based on the automatic driving system according to claim 1, characterized in that: The obtaining callback information of the upstream processing module corresponding to the current processing module includes: Looping all subscription topic numbers of the current processing module, and obtaining the current processing module subscription callback record corresponding to the current processing module publishing callback based on the first preset condition; The publishing callback record of the upstream module corresponding to the subscription callback record of the current processing module is obtained based on the second preset condition.
3. The method for obtaining end-to-end delay based on an autonomous driving system according to claim 2, characterized in that: The first preset condition includes: the module instance name in the callback information is consistent with the module instance name of the currently published callback record; the subject number in the callback information is consistent with the subject number of the currently published callback record; the callback start time in the callback information is less than the callback start time in the currently published callback record; the callback start time in the callback information is the largest; The second preset condition includes: the module instance name in the callback information is consistent with the module instance name of the currently published callback record; the topic number published in the callback information contains the topic number of the currently published callback record; the callback start time in the callback information is less than the message publishing time of the upstream module corresponding to the currently published callback record; the callback start time in the callback information is the largest.
4. The method for obtaining end-to-end delay based on an autonomous driving system according to claim 1, characterized in that: Before obtaining callback information corresponding to each processing module in the autonomous driving system, the following steps are included: Enable the function of recording callback information of each processing module to record the corresponding callback information; wherein, the callback information includes the callback time, callback type, topic number, instance name of this module, corresponding upstream module name and corresponding upstream module message release time of the processing module.
5. The method for obtaining end-to-end delay based on an autonomous driving system according to claim 1, characterized in that: After obtaining the end-to-end delay from the sensor to the output module, the method further comprises: Based on a preset number of items, mathematically counting the end-to-end delay to obtain a statistical result; Based on a preset format file, the statistical result is output to present the end-to-end delay.
6. A device for acquiring end-to-end delay based on an autonomous driving system, characterized in that: include: A record acquisition module is used to acquire callback information corresponding to each processing module in the automatic driving system, wherein the processing module includes an input end sensor, an output end module, and an intermediate end module arranged between the input end sensor and the output end module, wherein the intermediate end module processes the information collected by the input end sensor and sends the processed information to the output end module; A delay acquisition module, which obtains the end-to-end delay from the input-end sensor to the output-end module according to the callback information of all processing modules; The delay acquisition module includes: The record acquisition unit determines the output end module and the input end sensor in the processing module based on the depth first search DFS and the preset pruning algorithm, sorts the release callback records of the output end module in ascending order according to the callback time, and acquires the release callback records corresponding to each input end sensor from each release callback record of the output end module; A minimum time acquisition unit, which obtains the minimum value of the input end sensor release callback time according to the release callback records of each input end sensor; A delay acquisition unit, which obtains the end-to-end delay from the sensor to the output-end module according to the minimum value of the callback time released by the input-end sensor and the callback time released by the current output-end module; The callback information also includes subscription information that is relied upon when publishing the callback. The record acquisition unit includes: The search judgment subunit searches for the callback information of the processing module that has not been accessed, and judges whether the publishing callback of the current processing module depends on the upstream processing module according to the subscription information that the publishing callback of the searched current processing module depends on; The time determination subunit determines that the current processing module is an input-end sensor if the release callback of the current processing module does not depend on the upstream processing module, determines the release callback time of the corresponding input-end sensor according to the callback information of the current processing module, and adds it to the global information; Otherwise, the information acquisition subunit combines the global information and the callback information corresponding to each of the processing modules to acquire the publishing callback record of the upstream processing module corresponding to the current processing module.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method for acquiring the end-to-end delay based on the autonomous driving system are implemented as described in any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for obtaining the end-to-end delay based on the autonomous driving system are implemented as described in any one of claims 1 to 5.
