Configurable processing method, system, terminal and medium for unmanned driving BAG data
By recording the task identification and recording time parameters in the configuration file, parsing the configuration file according to the request information, and recording only the required task content, the problem of large capacity and low efficiency in the existing BAG data recording method is solved, and accurate recording and high efficiency are achieved. transmission, simplifying the technician's workflow.
Patent Information
- Application Number
- CN202211487544.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-22
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2042-11-22
AI Technical Summary
In the existing BAG data recording processing method, the task identifier is embedded in the code. Adding, deleting or modifying the task identifier requires modifying the source code, and recording all task identifiers is generated into the same BAG package, resulting in large capacity, low efficiency, and occupied memory. Resources, system congestion, storage and transmission inconvenience, and algorithm personnel need to eliminate interfering data, increasing workload.
By recording the task ID list and recording time parameters in the configuration file, parsing the configuration file according to the request information, recording only the required task ID and task content in the specified time period, generating BAG data, reducing redundant data, and improving transmission and processing efficiency. Complies with software design principles and is easy to configure and modify.
It achieves accurate recording and transmission of BAG data, reduces interference from redundant data, improves data processing and transmission efficiency, reduces system memory usage and storage space, and simplifies the workflow of technicians.
Smart Images

Figure CN115865675B
Abstract
Description
Technical Field
[0001] The present application relates to the field of weighing equipment, and in particular to a configurable processing method, system, terminal and medium for unmanned driving BAG data. Background Art
[0002] In the field of unmanned driving of container trucks in ports, sometimes it is impossible to judge each link of the operation process during the test. At this time, it is necessary to use the bag recording function in ROS to record each task identifier in the operation. Specifically, the BAG recording program is encapsulated into a node using the ROS framework; the task identifier to be recorded and the recording duration are set in the program. The BAG recording node is started together with other unmanned driving business nodes.
[0003] In the existing BAG data recording and processing method, on the one hand, the task identifier to be recorded is embedded in the code. If the task identifier is added / deleted / modified, the source code must be modified, which is not in line with the software design principle of "open to extension, closed to modification" and is prone to errors.
[0004] On the other hand, all the task identifiers to be recorded are included in the same List. Whenever recording is triggered, the task identifiers in the List are traversed and recorded, and generated into the same BAG package. In actual situations, for example, for the PNC problem, the task identifiers to be analyzed are " / vehicle / chassis", " / vehicle / command", and "vehicle / lonctrl"; and for lane line detection, some other task identifiers to be analyzed are: " / camera1 / image / compressed", " / lane_detection / lane", that is, when analyzing and locating problems offline, only part of the task identifiers need to be recorded according to the business scenario, and no extra data is needed. Excessive data will not only cause the BAG recording process to occupy a large amount of memory resources, causing system congestion, but also make the generated BAG package occupy a very large space, which is not convenient for storage and transmission. Finally, algorithm personnel need to eliminate the interference of irrelevant task identifiers when analyzing the BAG package, generating extra workload.
[0005] With respect to the above-mentioned related technologies, the inventors believe that the existing BAG data recording and processing methods have the defects of large BAG recording capacity, low recording efficiency, and being unfavorable for storage and transmission. Summary of the invention
[0006] On the first aspect, in order to reduce the capacity occupied by BAG recording, improve recording efficiency, and facilitate data storage and transmission, the present application provides a configurable processing method for unmanned driving BAG data.
[0007] This application provides a configurable processing method for unmanned driving BAG data, which adopts the following technical solutions:
[0008] A configurable processing method for unmanned driving BAG data, comprising:
[0009] Get request information;
[0010] According to the request information, the task identification list corresponding to the request information is searched in the preset configuration file, and the task identification list required by different BAGs is recorded in the configuration file;
[0011] Collect the task content corresponding to each task identifier according to the task identifier list;
[0012] Write the task content corresponding to the task ID into BAG according to the search results;
[0013] Save the BAG.
[0014] By adopting the above technical solution, the task content describes the data transmitted between businesses. The vehicle will continuously record the task content during operation, but these task contents are scattered. Different task contents are required for offline analysis, so they need to be made into BAGs. The previous operation method is to directly record and copy all the caches and convert them into BAGs, which are received by other programs and then screened by engineers. The data transmission volume is large and the efficiency is low. By writing the task identifier, that is, the category name of the task content, into the configuration file, each time when a request information from other ports is received, the recording program first parses the configuration file according to the content of the request information, and then finds the required task identifier in the configuration file, and writes its task content into BAG, which can reduce the amount of transmitted data and improve the data transmission efficiency and the processing efficiency of technicians.
[0015] Preferably, the configuration file also includes recording time parameters corresponding to different BAGs, and the recording time parameters include at least two of the recording time starting point, the recording time end point, and the recording duration. In the step of collecting the task content corresponding to each task identifier based on the task identifier list, it also includes: collecting the task content within the specified time period of the task identifier according to the recording time parameters.
[0016] By adopting the above technical solution, the collection time of the task content written as BAG can be specified by recording the recording time start time, recording time end time, recording duration, etc. in the configuration file, so as to accurately collect the task content according to the task identifier, reduce the interference of a large amount of redundant data, improve the efficiency of data processing and transmission, and improve the overall system performance.
[0017] Preferably, the step of generating the configuration file includes:
[0018] Obtain business requirements;
[0019] Get the task identification name;
[0020] The task identifiers are grouped according to business requirements. Each group generates a task identifier list and is bound to a business requirement.
[0021] Summarize all task identification groups and generate configuration files;
[0022] Match business needs with request information.
[0023] By adopting the above technical solution, since only part of the task identifiers need to be recorded according to the business scenario during offline analysis and problem location, no redundant data is required. Therefore, the request information, business requirements and required task identifiers are bound. When the recording program receives the request information, it can match the corresponding business requirements, find the corresponding task identifier list in the configuration file, and then write the task content corresponding to the task identifier in the task identifier list into a BAG, so as to achieve accurate matching and improve processing efficiency. Moreover, the task identifier is separated from the source code and recorded separately in the configuration file, so that the organizational structure of the program is more reasonable, which complies with the software design principle of "open for expansion and closed for modification", and is convenient for technical personnel to add / delete / modify task identifiers. Only the configuration file needs to be modified to flexibly configure the task identifier expected to be recorded, the expected recording duration, etc.
[0024] Preferably, the file format of the configuration file adopts toml format.
[0025] By adopting the above technical solution, the task identifier is a string array, and the recording duration is also a number. The toml file format supports a variety of data types (strings, numbers, arrays, comments), and supports the grouping of table arrays. These features are very suitable for the needs of BAG data recording. At the same time, the toml file format semantics are obvious and easy to read, which is convenient for algorithm personnel to add / delete / modify task identifiers, and can support the classification and grouping of task identifiers recorded in different business scenarios.
[0026] Preferably, before the step of searching the preset configuration file for a task identifier list corresponding to the request information according to the request information, the method further includes:
[0027] Obtain a parsing library, and parse the configuration file through the parsing library, wherein the parsing library adopts the toml11 parsing library.
[0028] By adopting the above technical solution, the toml11 parsing library can quickly parse configuration files in the toml format and improve the program running speed.
[0029] Preferably, it also includes:
[0030] When at least two pieces of request information are obtained, it is determined whether there is a completely overlapping task identifier in the task identifier list corresponding to the request information;
[0031] If so, in the step of collecting the task contents corresponding to each task identifier according to the task identifier list, only a single collection is performed for the overlapping task identifiers.
[0032] By adopting the above technical solution, the two request information need to execute the steps of collecting the task content twice. If they are collected separately, more cache will be occupied or more collection time will be spent. Therefore, for the same task identifier, only a single collection of its task content is performed, which can reduce repeated data collection, reduce cache occupancy, and improve processing efficiency.
[0033] Preferably, the step of determining whether there is a completely overlapping task identifier in the task identifier list corresponding to the request information further includes:
[0034] If there are task identifiers with the same name, determine whether the recording time parameters of the task identifiers with the same name are consistent;
[0035] If so, only a single collection is performed for the task identifier with the same name;
[0036] If not, when collecting task content, the recording interval is the union interval of all time periods in two or more groups of recording time parameters with the same task identifier.
[0037] By adopting the above technical solution, when there are task identifiers with the same name, but the recording intervals of the task contents required by the two request information are possibly different, the recording interval when collecting the task contents takes the overall maximum interval of two or more groups of recording time parameters of the task identifiers with the same name, thereby reducing the collection of duplicate data and reducing omissions.
[0038] Secondly, in order to reduce the capacity occupied by BAG recording, improve recording efficiency, and facilitate data storage and transmission, the present application provides a configurable processing system for unmanned driving BAG data.
[0039] The present application provides a configurable processing system for unmanned driving BAG data, which adopts the following technical solutions:
[0040] A configurable processing system for unmanned driving BAG data, comprising:
[0041] Request acquisition module, used to obtain request information;
[0042] The list search module is used to search for the task identification list corresponding to the request information in the preset configuration file according to the request information. The configuration file records the task identification list required by different BAGs;
[0043] A data collection module is used to collect the task content corresponding to each task identification according to the task identification list;
[0044] A BAG generation module is used to write the task content corresponding to the task identifier into a BAG according to the search result; and
[0045] Save module, used to save BAG.
[0046] On the third aspect, in order to reduce the capacity occupied by BAG recording, improve recording efficiency, and facilitate data storage and transmission, the present application provides a smart terminal.
[0047] The present application provides an intelligent terminal, which adopts the following technical solution:
[0048] An intelligent terminal includes a processor and a memory, wherein the memory stores a computer program that can be loaded by the processor and execute the above-mentioned unmanned driving BAG data configurable processing method.
[0049] Fourthly, in order to reduce the capacity occupied by BAG recording, improve recording efficiency, and facilitate data storage and transmission, the present application provides a computer-readable storage medium.
[0050] The present application provides a computer-readable storage medium, which adopts the following technical solution:
[0051] A computer-readable storage medium stores a computer program that can be loaded by a processor and execute the above-mentioned unmanned driving BAG data configurable processing method.
[0052] In summary, the present application includes at least one of the following beneficial technical effects:
[0053] 1. The recording program first parses the configuration file according to the content of the request information, then finds the required task identifier in the configuration file, and writes the task content into BAG, which can reduce the amount of transmitted data, improve data transmission efficiency and technical personnel's processing efficiency;
[0054] 2. The collection time of the task content written as BAG can be specified by recording the recording time start point, recording time end point, recording duration, etc. in the configuration file, so as to accurately collect the task content according to the task identifier, reduce the interference of a large amount of redundant data, improve the efficiency of data processing and transmission, and improve the overall system performance;
[0055] 3. The toml file format supports a variety of data types (strings, numbers, arrays, comments) and supports the grouping of table arrays. These features are very suitable for the needs of BAG data recording. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is a method flow chart of the configurable processing method of unmanned driving BAG data in an embodiment of the present application.
[0057] Figure 2 It is a partial method flow chart of the configurable processing method of unmanned driving BAG data in an embodiment of the present application, which mainly shows the steps of generating a configuration file.
[0058] Figure 3 It is a schematic diagram of the code interface of the configuration file of the embodiment.
[0059] Figure 4 It is a partial method flow chart of the configurable processing method of unmanned driving BAG data in an embodiment of the present application, which mainly shows the execution steps when receiving multiple request information.
[0060] Figure 5 It is a system module diagram of the unmanned driving BAG data configurable processing system of the embodiment. DETAILED DESCRIPTION
[0061] The present application is further described in detail below in conjunction with all the accompanying drawings.
[0062] The present application embodiment discloses a configurable processing method for unmanned driving BAG data, wherein the following "topic" and "task identifier" refer to "task identifier", and the following "msg" and "msgs" refer to "task content". Figure 1 , the configurable processing method of unmanned driving BAG data includes:
[0063] S100: Execute initialization and obtain configuration files.
[0064] Among them, refer to Figure 1 , Figure 2 , the steps to generate the configuration file include:
[0065] SA1. Obtain business requirements;
[0066] SA2. Get the topic name;
[0067] SA3. Group topic names according to business requirements, generate a topic list for each group, and bind a business requirement.
[0068] Specifically, business requirements are formulated according to the requirements of external programs. For example, the lane detection program requires topics such as " / camera1 / image / compressed" and " / lane_detection / lane", so its corresponding topic list includes the above items. Different programs require different topics, so they need to be grouped.
[0069] SA4. Summarize all topic groups and generate configuration files.
[0070] Specifically, the configuration file is independent of the ROS recording program. When topics in different groups need to be modified, only the configuration file needs to be modified without changing the program source code. This complies with the software design principle of "open for extension and closed for modification", making it easy for technicians to add / delete / modify topics.
[0071] SA5. Match business requirements with request information.
[0072] Specifically, the request information is sent by the port of the external program. For example, when the lane detection program needs to analyze topics such as " / camera1 / image / compressed" and " / lane_detection / lane", a request message will be sent. The request message will record the required BAG name, such as BAG1, corresponding to the required topic list.
[0073] S200: Parsing the configuration file: obtaining a parsing library, and parsing the configuration file through the parsing library.
[0074] Specifically, refer to Figure 2 , Figure 3 , topic name is a string array, and recording duration is also a number, so the configuration file uses the toml format. The toml file format supports a variety of data types (strings, numbers, arrays, comments), supports table array grouping, and is very suitable for BAG data recording needs. The parsing library uses the toml11 parsing library, which can quickly parse configuration files in toml format.
[0075] S300: Obtain request information.
[0076] Specifically, the trigger code of the request information may be " / record / trigger".
[0077] S400: searching for a topic list corresponding to the request information in a preset configuration file according to the request information, wherein the configuration file records the topic lists required by different BAGs.
[0078] Specifically, the request information will record the required BAG name, such as BAG1, and the name of the topic group in the configuration file can be specified as BAG1, BAG2, BAG3, so the corresponding group BAG1 can be found and the topic list can be found.
[0079] S410: The configuration file further includes recording time parameters corresponding to different BAGs, where the recording time parameters include at least two of a recording time start point, a recording time end point, and a recording duration.
[0080] Specifically, in the past, the recording duration of the topics to be recorded was uniformly set within a range. In this way, the time interval needs to be set to the minimum left interval time and the maximum right interval time of the topics. For example, " / lane_detection / lane" requires a recording duration of [-90, 2] (the moment of triggering recording is 0, unit s), " / vehicle / chassis" requires a recording duration of [-60, 5], and " / camera1 / image / compressed" requires a recording duration of [-30, 3]; then the unified time interval needs to be set to [-90, 5]. This expands the recording duration of topics, and the msg corresponding to some topics is very large, which also causes the BAG recording process to occupy too much memory, affecting the overall system performance.
[0081] If you want to reduce the amount of msgs collected and reduce invalid redundant data, you need to specify the msgs recording time, the recording time start point to the recording time end point, the recording time start point and the recording duration, the recording time end point, the recording duration, or all three. You can specify different collection segments of msgs corresponding to different topics. At this time, the recording program only needs to follow the recording time parameters of the topic recorded in the configuration file to accurately collect the msgs required by the external program, which can reduce the memory usage of redundant data and facilitate transmission and storage.
[0082] S500: Collect msgs corresponding to each topic according to the topic list.
[0083] Specifically, during the recording process, the recording program will copy the recorded msgs from the vehicle's storage, cache them in memory, and generate BAG after the copy is completed. Define the msg structure that triggers the recording topic:
[0084] Header header
[0085] string module
[0086] string[]ids
[0087] string time
[0088] Among them, ids is the grouping type, which indexes which topics are recorded, and time is the specified collection time period.
[0089] S600: Write the msgs of the corresponding topic into BAG according to the search result;
[0090] Specifically, BAG generation requires calling the open(), write(), close() and other APIs of the rosBAG package provided by ROS, which will not be described here.
[0091] S700: Save BAG.
[0092] Specifically, the generated BAG is stored from the memory to the hard disk for backup, and can be directly read by the external program when used.
[0093] In step S300, refer to Figure 1 , Figure 4 , when at least two request messages are obtained, determine whether there are completely overlapping topics in the topic list corresponding to the request messages;
[0094] If there is no overlap, that is, there is no identical topic name in two or more topic lists, the recording program will collect msgs for each topic list separately.
[0095] If there is a complete overlap, in the step of collecting msgs corresponding to each topic according to the topic list, only a single collection is performed on the overlapping topic.
[0096] If there is a topic with the same name, determine whether the recording time parameters of the topic with the same name are consistent;
[0097] If they are consistent, it is considered to be completely overlapped.
[0098] If they are inconsistent, it is determined that they are not completely overlapped. When collecting msgs, the recording interval is the union interval of all time periods in two or more groups of recording time parameters of the same topic.
[0099] Specifically, the definition of complete overlap is that the topic name and its recording time parameters are exactly the same, and the two BAGs share the msgs of the same topic. The definition of incomplete overlap is that there are topics with the same name, but different recording time parameters. In this case, it is necessary to refer to the recording time parameters of the topic list with the same name. For example, topic: " / lane_detection / lane" is [-30, 5], topic: " / vehicle / chassis" is [-60, 3], then the final collection interval is [-60, 5], and the maximum interval of all time periods in two or more groups of recording time parameters is taken.
[0100] The implementation principle of the configurable processing method of unmanned driving BAG data in the embodiment of the present application is as follows: when the recording program is started, the toml parsing library is called to parse the configuration file, and all grouped topics to be recorded and recording time parameters are obtained and stored in the memory. Other programs send request information, and the request information carries the required BAG information, such as the BAG name or number. The recording program obtains the request information, indexes the topics and recording time parameters to be recorded according to the request information, collects the msgs of the corresponding topics cached in the memory of the industrial computer of the collection truck, and writes them into a BAG package (the BAG package is a file), which is stored in the hard disk.
[0101] This embodiment also provides a configurable processing system for unmanned driving BAG data, referring to Figure 5 ,include:
[0102] Request acquisition module, used to obtain request information;
[0103] The list search module is used to search for the topic list corresponding to the request information in the preset configuration file according to the request information. The configuration file records the topic list required by different BAGs.
[0104] The data collection module is used to collect msgs corresponding to each topic based on the topic list;
[0105] BAG generation module, used to write msgs of the corresponding topic into BAG according to the search results; and
[0106] Save module, used to save BAG.
[0107] The configurable processing system for unmanned driving BAG data also includes:
[0108] The time selection module is used to collect msgs within the specified time period of the topic according to the recording time parameters.
[0109] The configurable processing system for unmanned driving BAG data also includes:
[0110] Configuration file generation module, used to obtain business requirements;
[0111] Get the topic name;
[0112] Group topic names according to business requirements, generate a topic list for each group, and bind a business requirement; summarize all topic groups and generate a configuration file;
[0113] Match business needs with request information.
[0114] The configurable processing system for unmanned driving BAG data also includes:
[0115] The parsing module is used to obtain the parsing library and parse the configuration file through the parsing library. The parsing library adopts the toml11 parsing library.
[0116] The configurable processing system for unmanned driving BAG data also includes:
[0117] A first judgment module is used to judge whether there is a completely overlapping topic in the topic list corresponding to the request information when at least two request information are obtained;
[0118] If so, in the step of collecting msgs corresponding to each topic according to the topic list, only a single collection is performed on the overlapping topics.
[0119] The second judgment module is used to judge whether the recording time parameters of the topics with the same name are consistent if there are topics with the same name;
[0120] If so, only a single collection is performed on the topic with the same name;
[0121] If not, when collecting msgs, the recording interval is the maximum interval of the two or more groups of recording time parameters of the same topic.
[0122] This embodiment also provides an intelligent terminal, including a memory and a processor, the processor can be a central processing unit such as a CPU or an MPU or a host system built with the CPU or the MPU as the core, and the memory can be a storage device such as a RAM, a ROM, an EPROM, an EEPROM, a FLASH, a disk, an optical disk, etc. The memory stores a computer program that can be loaded by the processor and execute the above-mentioned unmanned driving BAG data configurable processing method.
[0123] This embodiment also provides a computer-readable storage medium, which can be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc. Various media that can store program codes. The computer-readable storage medium stores a computer program that can be loaded by a processor and execute the above-mentioned unmanned driving BAG data configurable processing method.
[0124] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.
Claims
1. A configurable processing method for unmanned driving BAG data, characterized in that: include: Get request information; According to the request information, the task identification list corresponding to the request information is searched in the preset configuration file, and the task identification list required by different BAGs is recorded in the configuration file; Collect the task content corresponding to each task identifier according to the task identifier list; Write the task content corresponding to the task ID into BAG according to the search results; Save the BAG.
2. The configurable processing method for unmanned driving BAG data according to claim 1 is characterized in that: The configuration file also includes recording time parameters corresponding to different BAGs, and the recording time parameters include at least two of the recording time start point, the recording time end point, and the recording duration. The task content corresponding to each task identifier is collected according to the task identifier list, including: The task content within the specified time period of the task identifier is collected according to the recording time parameters.
3. The configurable processing method for unmanned driving BAG data according to claim 1 is characterized in that: The steps of generating the configuration file include: Obtain business requirements; Get the task identification name; The task identifiers are grouped according to business requirements. Each group generates a task identifier list and is bound to a business requirement. Summarize all task identification groups and generate configuration files; Match business needs with request information.
4. The configurable processing method for unmanned driving BAG data according to claim 1 is characterized in that: The configuration file adopts the toml format.
5. The configurable processing method for unmanned driving BAG data according to claim 4 is characterized in that: Before the step of searching the preset configuration file for a task identifier list corresponding to the request information according to the request information, the method further includes: Obtain a parsing library, and parse the configuration file through the parsing library, wherein the parsing library adopts the toml11 parsing library.
6. The configurable processing method for unmanned driving BAG data according to claim 1 is characterized in that: Also includes: When at least two pieces of request information are obtained, it is determined whether there is a completely overlapping task identifier in the task identifier list corresponding to the request information; If so, in the step of collecting the task contents corresponding to each task identifier according to the task identifier list, only a single collection is performed for the overlapping task identifiers.
7. The configurable processing method for unmanned driving BAG data according to claim 6 is characterized in that: The step of determining whether there is a completely overlapping task identifier in the task identifier list corresponding to the request information includes: If there are task identifiers with the same name, determine whether the recording time parameters of the task identifiers with the same name are consistent; If so, only a single collection is performed for the task identifier with the same name; If not, when collecting task content, the recording interval is the union interval of all time periods in two or more groups of recording time parameters with the same task identifier.
8. An unmanned driving BAG data configurable processing system, characterized in that: include: A request acquisition module is used to obtain request information; The list search module is used to search for the task identification list corresponding to the request information in the preset configuration file according to the request information. The configuration file records the task identification list required by different BAGs; A data collection module is used to collect the task content corresponding to each task identification according to the task identification list; BAG generation module, used to write the task content corresponding to the task identifier into BAG according to the search result; and Save module, used to save BAG.
9. An intelligent terminal, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executes the configurable processing method for unmanned driving BAG data as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the configurable processing method for unmanned driving BAG data as claimed in any one of claims 1 to 7.
