A processing method for a playback of collected data by an autonomous driving system
By generating a task log list in the autonomous driving system and assigning a message queue and hash table, multiple playback modes are provided, which solves the problem of data resource waste, realizes flexible playback and simulation of data, and expands the scope of application of data.
Patent Information
- Application Number
- CN202210675999.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-15
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2042-06-15
AI Technical Summary
The existing autonomous driving system lacks a special mechanism to play back the collected data, resulting in wasting data resources and it is impossible to effectively use the accumulated road test data for scene playback and simulation.
In the autonomous driving system, by generating a task log list and assigning message queues, message pointer queues and hash tables to each work module, establishing the relationship between the task log and the data source, providing full-task playback, designated module task playback and single-log playback modes, realizing flexible playback of collected data.
It solves the problem that the autonomous driving system cannot perform scene playback, provides a variety of flexible playback methods, expands the scope of application of data, and reduces the workload of simulation testing.
Smart Images

Figure CN115062190B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method for processing the playback of collected data by an autonomous driving system. Background Art
[0002] During the actual road running of an autonomous driving vehicle or a driverless vehicle, the autonomous driving system will accumulate a large amount of road test data, also known as collected data. Under normal circumstances, these collected data will be used as training data by the intelligent models used by the system. However, in terms of the use of the data itself, if it is only applied to model training, it is undoubtedly a waste of data resources. In principle, these collected data can also be applied to the playback and simulation of driving scenarios of the autonomous driving system. The root cause of the current situation of data resource waste is that the conventional autonomous driving system does not have a corresponding implementation mechanism specifically designed for the playback of collected data. Summary of the Invention
[0003] The purpose of the present invention is to provide a method for processing the playback of collected data by an autonomous driving system, an electronic device, and a computer-readable storage medium, aiming at the defects of the existing technology. On the one hand, during the operation of the autonomous driving system, the execution tasks of the system are collected to obtain a corresponding task log list, and at the same time, the output data of each working module, that is, the production data, is asynchronously collected through the production data collection module to obtain the collection data sources of each working module; on the other hand, based on the matching relationship between the data identifier and the message identifier, an association relationship between the log and the data source is established between the task log and the collection data sources of each working module, thus laying the implementation foundation for the task playback of a single task log; on the third hand, three task playback modes are also provided: full task playback mode, specified module task playback mode, and single log playback mode. Through the present invention, not only can the problem that the conventional autonomous driving system cannot perform scenario playback according to the collected data precipitated by itself be solved, but also a variety of flexible playback means are provided for scenario playback; in addition, providing the obtained task log list and the collection data sources of each working module (hash table, message pointer queue, and message queue) to the simulation platform can quickly establish corresponding simulation tasks.
[0004] To achieve the above object, in the first aspect of the embodiments of the present invention, a method for processing the playback of collected data by an autonomous driving system is provided, and the method includes:
[0005] Before playing back the collected data, the autonomous driving system pre-collects the tasks executed by the system to generate a corresponding task log list; and pre-assigns corresponding message queues, message pointer queues, and hash tables to each working module in the system; and collects the production data of each working module through the corresponding message queues, message pointer queues, and hash tables; the task log list includes multiple task logs;
[0006] When the autonomous driving system plays back the collected data, it selects the corresponding task logs from the task log list according to a preset playback mode to form a playback task sequence; and executes each task log in the playback task sequence according to the hash table, message pointer queue, and message queue corresponding to each working module to generate a corresponding task playback report; the playback mode includes a full-task playback mode, a specified-module task playback mode, and a single-log playback mode.
[0007] Preferably, the task log includes a task identifier, a task timestamp, a task module name, a task function name, and a task data group list; the task data group list includes one or more task data groups; the task data group includes a data module name and a data identifier;
[0008] The working modules at least include an ultrasonic sensor module, a lidar sensor module, a millimeter-wave sensor module, an inertial measurement unit sensor module, a global positioning system sensor module, a camera module, a vehicle chassis module, a perception module, a prediction module, a planning module, and a control module;
[0009] The message queue includes multiple message records; the message record includes a module name, a message identifier, a message record length, a message timestamp, and a message body, and the message record length is the data length of the message record;
[0010] The message pointer queue includes multiple message pointer records; the message pointer record includes a message record quantity and a message record address;
[0011] The hash table includes multiple key-value pair records; the key-value pair record includes a keyword name and a keyword attribute.
[0012] Preferably, the collection of the tasks executed by the system to generate a corresponding task log list specifically includes:
[0013] Collect information on the latest tasks executed by the autonomous driving system to generate the corresponding task logs; and form the corresponding task log list from all the obtained task logs.
[0014] Further, the information collection for the latest task executed by the autonomous driving system to generate the corresponding task log specifically includes:
[0015] Collect the unique identifier assigned by the autonomous driving system for the latest task as the corresponding task identifier;
[0016] Collect the execution time of the latest task as the corresponding task timestamp;
[0017] Collect the name of the working module that starts the latest task as the corresponding task module name;
[0018] Collect the name of the system function executed by the latest task as the corresponding task function name;
[0019] Collect the function parameter list of the system function as the corresponding task data group list; the function parameter list includes multiple function parameters; the function parameter is composed of multiple parameter attributes, including a parameter module attribute and a parameter identifier attribute; each task data group in the task data group list corresponds to a function parameter; the data module name in the task data group is the parameter module attribute of the corresponding function parameter, and the data identifier in the task data group is the parameter identifier attribute of the corresponding function parameter;
[0020] The task log corresponding to the latest task is composed of the collected task identifier, task timestamp, task module name, task function name, and task data group list.
[0021] Preferably, the collection of the production data of each working module through the corresponding message queue, message pointer queue, and hash table specifically includes:
[0022] The production data collection module of the autonomous driving system listens for instructions from each working module;
[0023] When the production data collection module listens to a message publishing instruction sent by any working module, extract the aggregation quantity N from the message publishing instruction of the current working module, where N≥1;
[0024] And receive the production data sent by the current working module according to the aggregation quantity N to obtain a corresponding first message record set;
[0025] And calculate the time difference between each message timestamp in the first message record set and the current system time to generate a corresponding first time difference;
[0026] If all the obtained first time differences meet the preset time delay requirements, write the first message record set into the message queue corresponding to the current working module according to the aggregation quantity N and obtain the corresponding first record address;
[0027] And construct a message pointer record according to the aggregation quantity N and the first record address to generate a corresponding first message pointer record; the message record quantity of the first message pointer record is the aggregation quantity N, and the message record address of the first message pointer record is the first record address;
[0028] And write the first message pointer record into the message pointer queue corresponding to the current working module as the latest message pointer record of the queue, and extract the storage address of the latest message pointer record as the corresponding second record address;
[0029] And construct a key-value pair record according to the first and second record addresses to generate a corresponding first key-value pair record; the keyword name of the first key-value pair record is the first record address, and the keyword attribute of the first key-value pair record is the second record address;
[0030] And write the first key-value pair record into the hash table corresponding to the current working module as the latest key-value pair record of the queue;
[0031] And send a message publishing success receipt back to the current working module when the writing of the latest key-value pair record is successful.
[0032] Further, the receiving the production data sent by the current working module according to the aggregation quantity N to obtain a corresponding first message record set specifically includes:
[0033] When the aggregation quantity N is 1, receive the production data sent by the current working module; and extract the production data length from the production data as the corresponding message record length, extract the working module name as the corresponding module name, extract the production data identifier as the corresponding message identifier, extract the production data timestamp as the corresponding message timestamp, and extract the production data content as the corresponding message body; and a first message record composed of the module name, the message identifier, the message record length, the message timestamp, and the message body constitutes the first message record set;
[0034] When the aggregation quantity N is greater than 1, the production data of the aggregation quantity N sent by the current working module is received one by one; for each received production data, the production data length, the working module name, the production data identifier, the production data timestamp, and the production data content are extracted from the current production data as the corresponding message record length, module name, message identifier, message timestamp, and message body to form a corresponding first message record; and the obtained first message records of the aggregation quantity N form a corresponding first message record set.
[0035] Further, writing the first message record set into the message queue corresponding to the current working module according to the aggregation quantity N and obtaining a corresponding first record address specifically includes:
[0036] Taking the message queue corresponding to the current working module as the current message queue;
[0037] If the aggregation quantity N is 1, writing the only first message record in the first message record set into the current message queue as the latest message record of the queue; and extracting the storage address of the latest message record as the corresponding first record address;
[0038] If the aggregation quantity N is greater than 1, writing the first message records of the aggregation quantity N in the first message record set into the current message queue in sequence; and extracting the storage address of the first first message record written into the current message queue as the corresponding first record address.
[0039] Preferably, selecting the corresponding task logs from the task log list according to a preset playback mode to form a playback task sequence specifically includes:
[0040] When the playback mode is the full task playback mode, extracting all the task logs in the task log list and sorting them in the order of the task timestamps to form a corresponding playback task sequence;
[0041] When the playback mode is the specified module task playback mode, sorting the task logs in the task log list whose task module name matches the specified module name in the order of the task timestamps to obtain a corresponding first task log sequence; and intercepting a subsequence whose task timestamp meets the specified time period from the first task log sequence as the corresponding playback task sequence;
[0042] When the playback mode is the single-log playback mode, extract the task logs corresponding to the task identifier and the specified task identifier in the task log list to form the corresponding playback task sequence.
[0043] Preferably, executing each task log in the playback task sequence according to the hash tables, the message pointer queues, and the message queues corresponding to the respective work modules to generate a corresponding task playback report specifically includes:
[0044] Traverse the task logs in the playback task sequence; during traversal, regard the currently traversed task log as the first task log; and regard the work module corresponding to the task module name of the first task log as the first work module, regard the system function corresponding to the task function name of the first task log as the first system function, and regard the task data group list of the first task log as the first task data group list; and according to the hash tables, the message pointer queues, and the message queues corresponding to the respective work modules, obtain the real data content corresponding to each task data group in the first task data group list to generate a corresponding first input data sequence; and call the first work module to input the first input data sequence into the first system function for function operation to obtain a corresponding first function operation result; and form a corresponding task playback record from the first task log, the first input data sequence, and the first function operation result;
[0045] When the traversal ends, sort all the obtained task playback records to obtain the corresponding task playback report.
[0046] Further, obtaining the real data content corresponding to each task data group in the first task data group list according to the hash tables, the message pointer queues, and the message queues corresponding to the respective work modules to generate a corresponding first input data sequence specifically includes:
[0047] Traverse each of the task data groups in the list of the first task data groups; during the traversal, regard the currently traversed task data group as the first task data group; and regard the working module corresponding to the data module name of the first task data group as the second working module, and regard the data identifier of the first task data group as the corresponding first data identifier; and regard the hash table, the message pointer queue, and the message queue corresponding to the second working module as the first hash table, the first message pointer queue, and the first message queue; and query the first hash table and the first message queue according to the first data identifier to obtain the corresponding third record address; and read out the message pointer record corresponding to the third record address in the first message pointer queue as the corresponding second message pointer record; and perform message record reading on the first message queue according to the second message pointer record and perform message body extraction on the reading result to obtain the corresponding first input data.
[0048] When the traversal ends, sort all the obtained first input data to obtain the corresponding first input data sequence.
[0049] Further preferably, the querying the first hash table and the first message queue according to the first data identifier to obtain the corresponding third record address specifically includes:
[0050] Poll each key-value pair record in the first hash table, and regard the currently polled key-value pair record as the current key-value pair record; and regard the keyword name of the current key-value pair record as the current message record address; and regard the message record corresponding to the current message record address in the first message queue as the current message record; and read out the message identifier of the current message record as the corresponding current message identifier; and confirm whether the current message identifier matches the first data identifier; if the confirmation does not match, go to the next key-value pair record to continue polling until the polling of the last key-value pair record ends; if the confirmation matches, stop polling and extract the keyword attribute of the current key-value pair record as the corresponding third record address.
[0051] Further preferably, the performing message record reading on the first message queue according to the second message pointer record and performing message body extraction on the reading result to obtain the corresponding first input data specifically includes:
[0052] Extract the number of message records of the second message pointer record as the corresponding aggregation quantity M.
[0053] If the aggregation quantity M is 1, the message record corresponding to the message record address recorded by the second message pointer in the first message queue is read out as the corresponding third message record, and the message body of the third message record is extracted as the corresponding first input data;
[0054] If the aggregation quantity M is greater than 1, the message record corresponding to the message record address in the first message queue is read out as the first fourth message record, and the message body of the first fourth message record is extracted as the first sub-input data; and the next message record of the first fourth message record is read out as the second fourth message record, and the message body of the second fourth message record is extracted as the second sub-input data; and so on, until the next message record of the (M - 1)-th fourth message record is read out as the M-th fourth message record, and the message body of the M-th fourth message record is extracted as the M-th sub-input data; and the first to M-th sub-input data are sequentially concatenated to obtain the corresponding first input data.
[0055] A second aspect of an embodiment of the present invention provides an electronic device, including: a memory, a processor, and a transceiver;
[0056] The processor is used to be coupled with the memory, read and execute instructions in the memory to implement the method steps described in the first aspect above;
[0057] The transceiver is coupled with the processor, and the processor controls the transceiver to perform message sending and receiving.
[0058] A third aspect of an embodiment of the present invention provides a computer-readable storage medium, where the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a computer, the computer is caused to execute the instructions of the method described in the first aspect above.
[0059] An embodiment of the present invention provides a processing method, an electronic device, and a computer-readable storage medium for a playback of collected data by an autonomous driving system. On the one hand, during the operation of the autonomous driving system, the execution tasks of the system are collected to obtain a corresponding task log list, and at the same time, the output data of each working module, that is, production data, is asynchronously collected by the production data collection module to obtain the collection data sources of each working module. The collection data source of each working module is composed of a corresponding set of message queues, message pointer queues, and hash tables. On the other hand, an association relationship between the task log and the collection data sources (hash tables, message pointer queues, and message queues) of each working module is established based on the matching relationship between the data identifier and the message identifier, thus laying the implementation foundation for the task playback of a single task log. On the third hand, three task playback modes are also provided (full task playback mode, specified module task playback mode, and single log playback mode). In the full task playback mode, all task logs in the task log list are played back one by one. In the specified module task playback mode, the task logs that meet the specified module name and specified time period in the task log list are played back one by one. In the single log playback mode, the task log with the specified task identifier in the task log list is played back individually. Through the present invention, not only the problem that a conventional autonomous driving system cannot perform scenario playback based on the collected data precipitated by itself is solved, but also a variety of flexible playback means are provided for scenario playback. In addition, providing the collected task log list and the collection data sources (hash tables, message pointer queues, and message queues) of each working module to the simulation platform can quickly establish corresponding simulated tasks, thereby further expanding the applicable range of the collected data and reducing the simulation test workload of the autonomous driving system. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 FIG. is a schematic diagram of a processing method for a playback of collected data by an autonomous driving system provided in Embodiment 1 of the present invention;
[0061] Figure 2 FIG. is a schematic diagram of the structure of an electronic device provided in Embodiment 2 of the present invention. DETAILED DESCRIPTION
[0062] In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0063] A processing method for a playback of collected data by an autonomous driving system provided in Embodiment 1 of the present invention is as Figure 1As shown in the schematic diagram of a processing method for replay of collected data by an autonomous driving system provided in Embodiment 1 of the present invention, the method mainly includes the following steps:
[0064] Step 1, before the autonomous driving system replays the collected data, it pre-collects the tasks executed by the system to generate a corresponding task log list; and pre-assigns corresponding message queues, message pointer queues, and hash tables to each working module in the system; and collects the production data of each working module through the corresponding message queues, message pointer queues, and hash tables;
[0065] Among them, the task log list includes multiple task logs; a task log includes a task identifier, a task timestamp, a task module name, a task function name, and a task data group list; the task data group list includes one or more task data groups; a task data group includes a data module name and a data identifier;
[0066] Here, the task log list is used to record each process or thread task executed by the autonomous driving system; each task log corresponds to a process or thread task; the task identifier is actually the unique identifier assigned by the autonomous driving system to the process or thread task; the task timestamp is the timestamp of the corresponding task execution time; the task function name is the name of the system function executed by the current process or thread task; the task data group list corresponds to the function parameter list of the system function currently executed, and each task data group in the task data group list corresponds to a function parameter in the function parameter list; the autonomous driving system in the embodiment of the present invention can record the data source (working module) and data identifier of each function parameter, and collect the name of the working module, which is the data source of each function parameter, to set the data module name of the corresponding task data group, and collect the data identifier of each function parameter to set the data identifier of the corresponding task data group; the task module name is the name of the upper-layer application module that initiates the current process or thread task, and in the autonomous driving system, each upper-layer application module is actually a working module, so the task module name is actually the name of the working module;
[0067] The working modules at least include an ultrasonic sensor module, a lidar sensor module, a millimeter-wave sensor module, an inertial measurement unit sensor module, a global positioning system sensor module, a camera module, a vehicle chassis module, a perception module, a prediction module, a planning module, and a control module;
[0068] The message queue includes multiple message records; a message record includes a module name, a message identifier, a message record length, a message timestamp, and a message body, where the message record length is the data length of the message record; the message pointer queue includes multiple message pointer records; a message pointer record includes the number of message records and the message record address; the hash table includes multiple key-value pair records; a key-value pair record includes a keyword name and a keyword attribute; the message queue, the message pointer queue, and the hash table are all constructed based on the First Input First Output (FIFO) queue method;
[0069] Here, the message queue is used to store the production data continuously generated by the corresponding working module; each message record consists of a fixed-length message header and a variable-length message body; among them, the message header consists of a fixed-length module name, a message identifier, a message length, and a message timestamp, where the message length is the overall data length of the message record; the module name stores the name of the working module corresponding to the message queue; each working module of the autonomous driving system embodiment of the present invention assigns a unique data identifier to each production data generated, and the message identifier stores this unique data identifier; the message timestamp stores the generation time of the production data; the message body stores the actual production data content, such as point cloud data of various radar sensors, images or video data captured by a camera, etc., which will not be elaborated here one by one;
[0070] Here, each message pointer record in the message pointer queue corresponds to a single message record or an aggregated message record composed of multiple message records in the message queue; if the number of message records in the message pointer record is 1, it means that the current message pointer record corresponds to a single message record, and the message record address is the storage address of this single message record in the message queue; if the number of message records in the message pointer record is greater than 1, it means that the current message pointer record corresponds to an aggregated message record composed of multiple message records, and the message record address is the storage address of the first message record in this aggregated message record in the message queue;
[0071] Here, the hash table consists of multiple fixed-length key-value (KV) pair records. The Key in each key-value pair record, that is, the keyword name, is used to store the storage address of a single message record in the message queue, or the storage address of the first message record in an aggregated message record in the message queue; the Value in the key-value pair KV record, that is, the keyword attribute, is used to store the storage address of the message pointer record corresponding to a single message record or an aggregated message record in the message pointer queue;
[0072] Step 1 specifically includes:
[0073] Step 11, collect the tasks executed by the system to generate a corresponding task log list;
[0074] Specifically, it includes: Step 111, collect information on the latest task executed by the autonomous driving system to generate a corresponding task log;
[0075] Specifically, it includes: Step 1111, collect the unique identifier assigned by the autonomous driving system for the latest task as the corresponding task identifier;
[0076] Here, the latest task corresponds to a process or thread task, and the task identifier is actually the unique identifier assigned by the autonomous driving system for this process or thread task;
[0077] Step 1112, collect the execution time of the latest task as the corresponding task timestamp;
[0078] Here, the execution time of the latest task is the system time when the task is started in the autonomous driving system;
[0079] Step 1113, collect the name of the working module that starts the latest task as the corresponding task module name;
[0080] Here, it is actually to collect the name of the upper-level application module that starts the latest task. In the autonomous driving system, each upper-level application module is actually a working module, such as: ultrasonic sensor module, lidar sensor module, millimeter wave sensor module, inertial measurement unit sensor module, global positioning system sensor module, camera module, vehicle chassis module, perception module, prediction module, planning module, and control module. Therefore, the upper-level application module that starts the latest task is actually the working module that starts the latest task;
[0081] Step 1114, collect the name of the system function executed by the latest task as the corresponding task function name;
[0082] Here, the task function name is actually the name of the system function executed by the current process or thread task;
[0083] Step 1115, collect the function parameter list of the system function as the corresponding task data group list;
[0084] Among them, the function parameter list includes multiple function parameters; the function parameters are composed of multiple parameter attributes, including parameter module attributes and parameter identifier attributes; each task data group in the task data group list corresponds to a function parameter; the data module name in the task data group is the parameter module attribute of the corresponding function parameter, and the data identifier in the task data group is the parameter identifier attribute of the corresponding function parameter;
[0085] Here, the function parameter list is the function parameter list of the system function executed by the current process or thread task. As can be seen from the foregoing, the autonomous driving system according to the embodiment of the present invention can record the data source (working module) and data identifier of each function parameter in the list. The content of the parameter module attribute is the name information of the data source (working module) recorded by the system, and the parameter identifier attribute is the data identifier information recorded by the system; the current step generates two in-group data of the corresponding task data group according to the two attributes (parameter module attribute and parameter identifier attribute) of each function parameter: data module name and data identifier; thereby obtaining a task data group list composed of multiple task data groups.
[0086] Step 1116, form a task log corresponding to the latest task from the collected task identifier, task timestamp, task module name, task function name, and task data group list.
[0087] Step 112, form a corresponding task log list from all the obtained task logs.
[0088] Here, through steps 111-112, the embodiment of the present invention establishes an association between the task function name and task data group list of the task log and the production data of different working modules in the runnable system function, and then determines the execution order of the task logs in the task log list through the task timestamps of each task log; it is not difficult to see that the task log list generated by the embodiment of the present invention is actually a batch file that can be used for task replay.
[0089] Step 12, allocate corresponding message queues, message pointer queues, and hash tables for each working module in the system; and collect the production data of each working module through the corresponding message queues, message pointer queues, and hash tables.
[0090] Specifically, it includes: Step 121, allocate corresponding message queues, message pointer queues, and hash tables for each working module in the system.
[0091] Here, the embodiment of the present invention allocates a corresponding set of message queues, message pointer queues, and hash tables for each working module that needs to have its data collected, such as: ultrasonic sensor module, lidar sensor module, millimeter wave sensor module, inertial measurement unit sensor module, global positioning system sensor module, camera module, vehicle chassis module, perception module, prediction module, planning module, and control module.
[0092] Step 122, collect the production data of each working module through the corresponding message queues, message pointer queues, and hash tables.
[0093] Here, after allocating a corresponding set of message queues, message pointer queues, and hash tables to each working module through step 121, the production data of each working module will be collected respectively to obtain the data collection data sources of each working module;
[0094] Specifically, it includes: step 1221, the production data collection module of the autonomous driving system listens for instructions from each working module;
[0095] Here, the embodiments of the present invention collect data from each working module based on the message publishing method based on the asynchronous communication principle. Specifically, a production data collection module, which is an asynchronous communication component, continuously listens for the message publishing instructions of each working module. Once it detects a message publishing instruction sent by any working module, it immediately executes the data collection and processing flow composed of subsequent steps 1222-1230. This data collection and processing flow includes operations such as data reception, writing to the data collection data sources (message queues, message pointer queues, and hash tables), and sending communication receipts;
[0096] Step 1222, when the production data collection module detects a message publishing instruction sent by any working module, it extracts the aggregation quantity N from the message publishing instruction of the current working module, where N≥1;
[0097] Here, if the aggregation quantity N is 1, it means that the current working module will only send one piece of production data subsequently; if the aggregation quantity N is greater than 1, it means that the current working module will send aggregated production data composed of N pieces of production data subsequently;
[0098] Step 1223, and receive the production data sent by the current working module according to the aggregation quantity N to obtain the corresponding first message record set;
[0099] Among them, the production data should at least include the production data length, data production module name, production data identifier, production data timestamp, and production data content;
[0100] Here, the data structure of the production data is production data length + data production module name + production data identifier + production data timestamp + production data content. The production data length is the data length of the data sequence {production data length, data production module name, production data identifier, production data timestamp, production data content}; the data production module name is the name of the current working module; the production data identifier is the unique identifier assigned by the current working module or the autonomous driving system to the current production data content; the production data timestamp is the time information when the current working module generates the current production data content; the production data content is the specific data content, such as the point cloud data of various radar sensors, the images or video data captured by the camera, etc., which will not be elaborated here;
[0101] Specifically, it includes: Step 12231. When the aggregation quantity N is 1, receive the production data sent by the current working module; extract the production data length from the production data as the corresponding message record length, extract the working module name as the corresponding module name, extract the production data identifier as the corresponding message identifier, extract the production data timestamp as the corresponding message timestamp, and extract the production data content as the corresponding message body; and form a first message record set consisting of the module name, message identifier, message record length, message timestamp, and message body;
[0102] Here, when the aggregation quantity N is 1, each time the production data is received, a first message record set with only one first message record will be generated;
[0103] Step 12232. When the aggregation quantity N is greater than 1, receive the production data of the aggregation quantity N sent by the current working module one by one; for each received production data, extract the production data length, working module name, production data identifier, production data timestamp, and production data content from the current production data as the corresponding message record length, module name, message identifier, message timestamp, and message body to form the corresponding first message record; and form a corresponding first message record set from the obtained first message records of the aggregation quantity N;
[0104] Here, when the aggregation quantity N is greater than 1, a first message record set with N first message records will be generated only after receiving N production data;
[0105] Step 1224, and calculate the time difference between each message timestamp in the first message record set and the current system time to generate the corresponding first time difference;
[0106] Step 1225, if all the obtained first time differences meet the preset delay requirements, write the first message record set into the message queue corresponding to the current working module according to the aggregation quantity N and obtain the corresponding first record address;
[0107] Specifically, it includes: Step 12251, use the message queue corresponding to the current working module as the current message queue;
[0108] Step 12252, if the aggregation quantity N is 1, write the only first message record in the first message record set into the current message queue as the latest message record of the queue; and extract the storage address of the latest message record as the corresponding first record address;
[0109] Step 12253, if the aggregation quantity N is greater than 1, write the first message records with the aggregation quantity N in the first message record set into the current message queue in sequence; and extract the storage address of the first message record written into the current message queue first as the corresponding first record address;
[0110] Step 1226, and construct a message pointer record according to the aggregation quantity N and the first record address to generate a corresponding first message pointer record;
[0111] Among them, the number of message records of the first message pointer record is the aggregation quantity N, and the message record address of the first message pointer record is the first record address;
[0112] Step 1227, and write the first message pointer record into the message pointer queue corresponding to the current working module as the latest message pointer record of the queue, and extract the storage address of the latest message pointer record as the corresponding second record address;
[0113] Step 1228, and construct a key-value pair record according to the first and second record addresses to generate a corresponding first key-value pair record;
[0114] Among them, the keyword name of the first key-value pair record is the first record address, and the keyword attribute of the first key-value pair record is the second record address;
[0115] Step 1229, and write the first key-value pair record into the hash table corresponding to the current working module as the latest key-value pair record of the queue;
[0116] Step 1230, and send a message publishing success receipt back to the current working module when the latest key-value pair record is written successfully.
[0117] In summary, the autonomous driving system of the embodiment of the present invention, through Step 1, while collecting the task log list, also completes the collection of the output data of each working module, that is, the production data, and outputs a group of queues (message queue, message pointer queue, and hash table) as the data source for the collection of each working module.
[0118] Step 2, when the autonomous driving system replays the collected data, select the corresponding task logs from the task log list according to the preset replay mode to form a replay task sequence; and execute each task of the replay task sequence according to the hash table, message pointer queue, and message queue corresponding to each working module to generate a corresponding task replay report;
[0119] Among them, the replay mode includes a full task replay mode, a specified module task replay mode, and a single log replay mode;
[0120] Specifically, it includes: Step 21, selecting corresponding task logs from the task log list according to a preset playback mode to form a playback task sequence;
[0121] Specifically, it includes: Step 211, when the playback mode is the full task playback mode, extracting all task logs in the task log list and sorting them in the order of task timestamps to form the corresponding playback task sequence;
[0122] Here, in the full task playback mode of the embodiment of the present invention, all task logs in the task log list will be played back one by one, so the playback task sequence actually includes all task logs in the list;
[0123] Step 212, when the playback mode is the specified module task playback mode, sorting the task logs in the task log list whose task module names match the specified module name in the order of task timestamps to obtain the corresponding first task log sequence; and intercepting the subsequence whose task timestamps meet the specified time period from the first task log sequence as the corresponding playback task sequence;
[0124] Here, if the playback mode is the specified module task playback mode, a specified module name and a specified time period will also be preset in advance; in the specified module task playback mode of the embodiment of the present invention, only the task logs in the task log list that meet the specified module name and the specified time period are played back one by one, so the playback task sequence is actually composed of task logs whose task module names match the specified module name and whose task timestamps meet the specified time period;
[0125] Step 213, when the playback mode is the single log playback mode, extracting the task logs in the task log list corresponding to the specified task identifier to form the corresponding playback task sequence;
[0126] Here, if the playback mode is the single log playback mode, a specified task identifier will also be preset in advance; in the single log playback mode of the embodiment of the present invention, only the task logs in the task log list that match the specified task identifier are played back individually, so the playback task sequence at this time should only include one task log whose task identifier matches the specified task identifier;
[0127] Step 22, performing individual task execution on the task logs of the playback task sequence according to the hash table, message pointer queue, and message queue corresponding to each working module to generate the corresponding task playback report;
[0128] Specifically, it includes: traversing the task logs of the playback task sequence; when traversing, taking the currently traversed task log as the first task log; and taking the working module corresponding to the task module name of the first task log as the first working module, taking the system function corresponding to the task function name of the first task log as the first system function, and taking the task data group list of the first task log as the first task data group list; and generating a corresponding first input data sequence by obtaining the real data content corresponding to each task data group in the first task data group list according to the hash table, message pointer queue, and message queue corresponding to each working module; and calling the first working module to input the first input data sequence into the first system function for function operation to obtain a corresponding first function operation result; and forming a corresponding task playback record from the first task log, the first input data sequence, and the first function operation result; when the traversal ends, sorting all the obtained task playback records to obtain a corresponding task playback report;
[0129] Here, when the embodiment of the present invention processes task playback according to the playback task sequence, it is actually to play back each task log in the playback task sequence one by one in order and obtain corresponding task playback records, and then form an overall task playback report according to all the obtained task playback records; when performing task playback on each task log, the embodiment of the present invention can locate the corresponding system function, that is, the first system function, based on the task function name of the current task log, and can determine which upper application module (working module) should run the system function, that is, the first working module, based on the task module name. Based on the task data group list, the real data content corresponding to each task data group can also be read from the data sources collected by each working module to form the function parameter list of the system function, that is, the first input data sequence. Then, by calling the first working module to input the first input data sequence into the first system function for function operation, the playback process of the current task log is completed and a corresponding playback process result, that is, the first function operation result, is obtained. Then, the task playback record is formed from the log content of the current task log, that is, the first task log, the first input data sequence, and the first function operation result, and the entire playback process of the current task log can be recorded in detail;
[0130] Among them, when traversing the task logs of the playback task sequence, generating a corresponding first input data sequence by obtaining the real data content corresponding to each task data group in the first task data group list according to the hash table, message pointer queue, and message queue corresponding to each working module specifically includes:
[0131] Traverse each task data group in the list of the first task data groups; during the traversal, regard the currently traversed task data group as the first task data group; and regard the working module corresponding to the data module name of the first task data group as the second working module, and regard the data identifier of the first task data group as the corresponding first data identifier; and regard the hash table, message pointer queue, and message queue corresponding to the second working module as the first hash table, the first message pointer queue, and the first message queue; and query the first hash table and the first message queue according to the first data identifier to obtain the corresponding third record address; and read out the message pointer record corresponding to the third record address in the first message pointer queue as the corresponding second message pointer record; and perform message record reading on the first message queue according to the second message pointer record and perform message body extraction on the read result to obtain the corresponding first input data; when the traversal ends, sort all the obtained first input data to obtain the corresponding first input data sequence.
[0132] Here, in the embodiment of the present invention, by traversing each task data group in the list of the first task data groups as described above, during the traversal, the real data content corresponding to the task data group is obtained as the first input data by querying a group of hash tables, message queues, and message pointer queues of the corresponding working module; the processing process of this query is roughly as follows: first, find out the key-value pair record that matches the first data identifier from the hash table, and obtain a record address of a message pointer queue, that is, the third record address, by reading the keyword attribute of the key-value pair record; then read out a message pointer record with the number of message records and the message record address, that is, the second message pointer record, from the message pointer queue according to the third record address; then read out the corresponding message record from the message queue according to the second message pointer record and perform message body extraction as the first input data.
[0133] Further, when traversing each task data group in the list of the first task data groups as described above, querying the first hash table and the first message queue according to the first data identifier to obtain the corresponding third record address specifically includes:
[0134] Poll each key-value pair record in the first hash table, and regard the currently polled key-value pair record as the current key-value pair record; and regard the keyword name of the current key-value pair record as the current message record address; and regard the message record corresponding to the current message record address in the first message queue as the current message record; and read out the message identifier of the current message record as the corresponding current message identifier; and confirm whether the current message identifier matches the first data identifier; if it is confirmed that they do not match, then go to the next key-value pair record to continue polling until the polling of the last key-value pair record ends; if it is confirmed that they match, then stop polling and extract the keyword attribute of the current key-value pair record as the corresponding third record address.
[0135] Here, when the embodiment of the present invention queries the key-value pair record matching the first data identifier from the hash table, it actually polls all the key-value pair records in the hash table until a key-value pair record with a keyword name matching the first data identifier is found; it is known that the keyword name stores a message record address, so the matching relationship between the keyword name and the first data identifier is actually determined by the message identifier of the message record corresponding to the message record address in the message queue. If the message identifier matches the first data identifier, then the keyword name matches the first data identifier; after finding the key-value pair record matching the first data identifier, the keyword attribute of the key-value pair record is extracted to obtain the associated record address of the first data identifier in the message pointer queue, that is, the third record address.
[0136] Further, when traversing each task data group in the first task data group list, the message records in the first message queue are read according to the second message pointer record and the message body is extracted from the read result to obtain the corresponding first input data, which specifically includes:
[0137] Step A1, extract the number of message records of the second message pointer record as the corresponding aggregation quantity M.
[0138] Step A2, if the aggregation quantity M is 1, read the message record corresponding to the message record address of the second message pointer record in the first message queue as the corresponding third message record, and extract the message body of the third message record as the corresponding first input data.
[0139] Step A3, if the aggregation quantity M is greater than 1, read the message record corresponding to the message record address in the first message queue as the first fourth message record, and extract the message body of the first fourth message record as the first sub-input data; and read the next message record of the first fourth message record as the second fourth message record, and extract the message body of the second fourth message record as the second sub-input data; and so on, until the next message record of the (M - 1)th fourth message record is read as the Mth fourth message record, and extract the message body of the Mth fourth message record as the Mth sub-input data; and sequentially splice the first to Mth sub-input data to obtain the corresponding first input data.
[0140] Here, when the embodiment of the present invention reads message records from the first message queue according to the second message pointer record and extracts the message body from the read result, if the number of message records recorded by the second message pointer is 1, it means that only one message record's message body needs to be extracted from the message queue to obtain the corresponding real data content. At this time, directly read the message records from the message queue according to the message record address recorded by the second message pointer to obtain a message record, and extract the message body of this message record to obtain the required real data content, that is, the first input data. If the number of message records recorded by the second message pointer is greater than 1 (aggregation number M), it means that the message bodies of M message records need to be extracted from the message queue to obtain the corresponding real data content. At this time, the message record pointed to by the message record address recorded by the second message pointer in the message queue is used as the first of the M message records, and M - 1 consecutive reads are performed downward from the first one to obtain M message records, and the message bodies of these M message records are extracted and spliced to obtain the final first input data.
[0141] It should be noted that on the simulation platform corresponding to the autonomous driving system, a playback processing flow identical to the above step 2 is established, and then the task log list collected in the above step 1, as well as the message queues, message pointer queues, and hash tables of each working module, are copied to the simulation platform, so that the task log list can be simulated and played back on the platform, and corresponding simulation tests can also be executed based on the playback result of the task log list.
[0142] Figure 2 It is a schematic structural diagram of an electronic device provided by the second embodiment of the present invention. This electronic device can be the aforementioned terminal device or server, or can be a terminal device or server connected to the aforementioned terminal device or server to implement the method embodiment of the present invention. As Figure 2 shown, this electronic device may include: a processor 301 (such as a CPU), a memory 302, and a transceiver 303; the transceiver 303 is coupled to the processor 301, and the processor 301 controls the transceiver actions of the transceiver 303. Various instructions can be stored in the memory 302 to be used to complete various processing functions and implement the processing steps described in the foregoing method embodiments. Preferably, the electronic device involved in the embodiment of the present invention further includes: a power supply 304, a system bus 305, and a communication port 306. The system bus 305 is used to implement communication connections between components. The above communication port 306 is used for the electronic device to connect and communicate with other peripherals.
[0143] In Figure 2The system bus 305 mentioned above can be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The system bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 2 it is only represented by a thick line in [document], but it does not mean that there is only one bus or one type of bus. The communication interface is used to implement communication between the database access device and other devices (such as clients, read-write libraries, and read-only libraries). The memory may include Random Access Memory (RAM), and may also include non-volatile memory, such as at least one disk memory.
[0144] The above-mentioned processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), a Graphics Processing Unit (GPU), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0145] It should be noted that the embodiment of the present invention also provides a computer-readable storage medium, in which instructions are stored. When it runs on a computer, the computer is made to execute the methods and processing procedures provided in the above embodiments.
[0146] The embodiment of the present invention also provides a chip for running instructions, and the chip is used to execute the processing steps described in the foregoing method embodiments.
[0147] An embodiment of the present invention provides a method, an electronic device, and a computer-readable storage medium for a playback process of collected data by an autonomous driving system. On the one hand, during the operation of the autonomous driving system, the execution tasks of the system are collected to obtain a corresponding task log list, and at the same time, the output data of each working module, that is, production data, is asynchronously collected by the production data collection module to obtain the collection data sources of each working module. The collection data source of each working module consists of a corresponding set of message queues, message pointer queues, and hash tables. On the other hand, an association relationship between the task log and the collection data sources (hash tables, message pointer queues, and message queues) of each working module is established based on the matching relationship between the data identifier and the message identifier, thus laying the implementation foundation for the task playback of a single task log. On the third hand, three task playback modes are also provided (full task playback mode, specified module task playback mode, and single log playback mode). In the full task playback mode, all task logs in the task log list are played back one by one. In the specified module task playback mode, the task logs in the task log list that meet the specified module name and specified time period are played back one by one. In the single log playback mode, the task log with the specified task identifier in the task log list is played back individually. Through the present invention, not only the problem that a conventional autonomous driving system cannot perform scenario playback based on the collected data precipitated by itself is solved, but also a variety of flexible playback means are provided for scenario playback. In addition, providing the collected task log list and the collection data sources (hash tables, message pointer queues, and message queues) of each working module to the simulation platform can quickly establish corresponding simulation tasks, thereby further expanding the applicable scope of the collected data and reducing the simulation test workload of the autonomous driving system.
[0148] Those skilled in the art should also be able to further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0149] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented by hardware, software modules executed by a processor, or a combination of the two. The software modules can be placed in a random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the technical field.
[0150] The specific embodiments described above further elaborate on the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only for the specific embodiments of the present invention and is not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A processing method for playing back collected data by an autonomous driving system, characterized in that, The method includes: Before the autonomous driving system replays the collected data, it pre-collects the tasks executed by the system to generate a corresponding task log list; and pre-assigns corresponding message queues, message pointer queues, and hash tables to each working module in the system; and collects the production data of each working module through the corresponding message queues, message pointer queues, and hash tables; the task log list includes multiple task logs; When the autonomous driving system replays the collected data, it selects the corresponding task logs from the task log list according to a preset replay mode to form a replay task sequence; and executes each task log of the replay task sequence according to the hash table, message pointer queue, and message queue corresponding to each working module to generate a corresponding task replay report; the replay mode includes a full-task replay mode, a specified-module task replay mode, and a single-log replay mode; Among them, the task log includes a task identifier, a task timestamp, a task module name, a task function name, and a list of task data groups; the list of task data groups includes one or more task data groups; the task data group includes a data module name and a data identifier; The message queue includes multiple message records; the message record includes a module name, a message identifier, a message record length, a message timestamp, and a message body, and the message record length is the data length of the message record; The message pointer queue includes multiple message pointer records; the message pointer record includes the number of message records and the message record address; The hash table includes multiple key-value pair records; the key-value pair record includes a keyword name and a keyword attribute; The collecting of the production data of each working module through the corresponding message queues, message pointer queues, and hash tables specifically includes: The production data collection module of the autonomous driving system listens for instructions from each working module; When the production data collection module listens to a message publishing instruction sent by any working module, it extracts an aggregation quantity N from the message publishing instruction of the current working module, where N≥1; And receives the production data sent by the current working module according to the aggregation quantity N to obtain a corresponding first set of message records; And calculates the time difference between each message timestamp in the first set of message records and the current system time to generate a corresponding first time difference; If all the obtained first time differences meet the preset delay requirements, the first set of message records is written into the message queue corresponding to the current working module according to the aggregation quantity N and a corresponding first record address is obtained; And constructs a message pointer record according to the aggregation quantity N and the first record address to generate a corresponding first message pointer record; the number of message records of the first message pointer record is the aggregation quantity N, and the message record address of the first message pointer record is the first record address; And write the first message pointer record into the message pointer queue corresponding to the current working module as the latest message pointer record of the queue, and extract the storage address of the latest message pointer record as the corresponding second record address; And construct a key-value pair record according to the first record address and the second record address to generate a corresponding first key-value pair record; the keyword name of the first key-value pair record is the first record address, and the keyword attribute of the first key-value pair record is the second record address; And write the first key-value pair record into the hash table corresponding to the current working module as the latest key-value pair record of the queue; And send a message publishing success receipt back to the current working module when the writing of the latest key-value pair record is successful; The method of selecting the corresponding task logs from the task log list according to a preset playback mode specifically includes: When the playback mode is the full task playback mode, extract all the task logs in the task log list and sort them in the order of the task timestamps to form the corresponding playback task sequence; When the playback mode is the specified module task playback mode, sort the task logs in the task log list whose task module name matches the specified module name in the order of the task timestamps to obtain a corresponding first task log sequence; and intercept a subsequence of the task timestamps that meet the specified time period from the first task log sequence as the corresponding playback task sequence; When the playback mode is the single log playback mode, extract the task logs in the task log list corresponding to the specified task identifier as the corresponding playback task sequence.
2. The method for processing the playback of the collected data by the autonomous driving system according to claim 1, wherein The working module at least includes an ultrasonic sensor module, a lidar sensor module, a millimeter wave sensor module, an inertial measurement unit sensor module, a global positioning system sensor module, a camera module, a vehicle chassis module, a perception module, a prediction module, a planning module, and a control module.
3. The method for processing the replay of the collected data by the autonomous driving system according to claim 2, wherein, The method for collecting the tasks executed by the system to generate a corresponding task log list specifically includes: Collect information about the latest task executed by the autonomous driving system to generate the corresponding task log; and form the corresponding task log list from all the obtained task logs.
4. The method for processing the replay of the collected data by the automatic driving system according to claim 3, wherein The method for collecting information about the latest task executed by the autonomous driving system to generate the corresponding task log specifically includes: Collect the unique identifier assigned by the autonomous driving system for the latest task as the corresponding task identifier; Collect the execution time of the latest task as the corresponding task timestamp; Collect the name of the working module that starts the latest task as the corresponding task module name; Collect the name of the system function executed by the latest task as the corresponding task function name; Collect the function parameter list of the system function as the corresponding task data group list; the function parameter list includes multiple function parameters; the function parameters are composed of multiple parameter attributes, including a parameter module attribute and a parameter identification attribute; each task data group in the task data group list corresponds to one function parameter; the data module name in the task data group is the parameter module attribute of the corresponding function parameter, and the data identification in the task data group is the parameter identification attribute of the corresponding function parameter; The task log corresponding to the latest task is composed of the collected task identifier, task timestamp, task module name, task function name, and task data group list.
5. The method for processing the replay of the collected data by the autonomous driving system according to claim 1, wherein, The receiving of the production data sent by the current working module according to the aggregation quantity N to obtain the corresponding first message record set specifically includes: When the aggregation quantity N is 1, receive the production data sent by the current working module; and extract the production data length from the production data as the corresponding message record length, extract the working module name as the corresponding module name, extract the production data identifier as the corresponding message identifier, extract the production data timestamp as the corresponding message timestamp, and extract the production data content as the corresponding message body; and the first message record composed of the module name, the message identifier, the message record length, the message timestamp, and the message body constitutes the first message record set; When the aggregation quantity N is greater than 1, receive the N production data sent by the current working module one by one; for each received production data, extract the production data length, the working module name, the production data identifier, the production data timestamp, and the production data content from the current production data as the corresponding message record length, module name, message identifier, message timestamp, and message body to form the corresponding first message record; and the N first message records obtained constitute the corresponding first message record set.
6. The method for processing the replay of the collected data by the automatic driving system according to claim 1, wherein The writing of the first message record set into the message queue corresponding to the current working module according to the aggregation quantity N and obtaining the corresponding first record address specifically includes: Use the message queue corresponding to the current working module as the current message queue; If the aggregation quantity N is 1, write the only first message record in the first message record set into the current message queue as the latest message record of the queue; and extract the storage address of the latest message record as the corresponding first record address; If the aggregation quantity N is greater than 1, write the N first message records in the first message record set into the current message queue in sequence; and extract the storage address of the first first message record written into the current message queue as the corresponding first record address.
7. The method for processing the playback of the collected data by the automatic driving system according to claim 1, wherein Performing task-by-task execution on the task logs of the replay task sequence according to the hash tables, the message pointer queues, and the message queues corresponding to the respective working modules to generate corresponding task replay reports specifically includes: Traversing the task logs of the replay task sequence; during traversal, taking the currently traversed task log as the first task log; taking the working module corresponding to the task module name of the first task log as the first working module, taking the system function corresponding to the task function name of the first task log as the first system function, and taking the task data group list of the first task log as the first task data group list; and according to the hash tables, the message pointer queues, and the message queues corresponding to the respective working modules, obtaining the real data content corresponding to each task data group of the first task data group list to generate a corresponding first input data sequence; and calling the first working module to input the first input data sequence into the first system function for function operation to obtain a corresponding first function operation result; and forming a corresponding task replay record from the first task log, the first input data sequence, and the first function operation result; When the traversal ends, sorting all the obtained task replay records to obtain the corresponding task replay report.
8. The method for processing the replay of the collected data by the autonomous driving system according to claim 7, wherein The obtaining of the real data content corresponding to each task data group of the first task data group list according to the hash tables, the message pointer queues, and the message queues corresponding to the respective working modules to generate a corresponding first input data sequence specifically includes: Traversing each task data group of the first task data group list; during traversal, taking the currently traversed task data group as the first task data group; taking the working module corresponding to the data module name of the first task data group as the second working module, and taking the data identifier of the first task data group as the corresponding first data identifier; and denoting the hash table, the message pointer queue, and the message queue corresponding to the second working module as the first hash table, the first message pointer queue, and the first message queue; and querying the first hash table and the first message queue according to the first data identifier to obtain a corresponding third record address; and reading out the message pointer record corresponding to the third record address in the first message pointer queue as the corresponding second message pointer record; and reading message records from the first message queue according to the second message pointer record and extracting message bodies from the read results to obtain corresponding first input data; When the traversal ends, sorting all the obtained first input data to obtain the corresponding first input data sequence.
9. The method for processing the playback of the collected data by the automatic driving system according to claim 8, wherein The querying of the first hash table and the first message queue according to the first data identifier to obtain a corresponding third record address specifically includes: Poll each key-value pair record in the first hash table, and use the currently polled key-value pair record as the current key-value pair record; use the keyword name of the current key-value pair record as the current message record address; use the message record corresponding to the current message record address in the first message queue as the current message record; read the message identifier of the current message record as the corresponding current message identifier; confirm whether the current message identifier matches the first data identifier; if the confirmation is not a match, go to the next key-value pair record and continue polling until the polling of the last key-value pair record ends; if the confirmation is a match, stop polling and extract the keyword attribute of the current key-value pair record as the corresponding third record address.
10. The method for processing the replay of the collected data by the automatic driving system according to claim 8, wherein, The reading of message records from the first message queue according to the second message pointer record and the extraction of the message body from the reading result to obtain the corresponding first input data specifically includes: Extract the number of message records of the second message pointer record as the corresponding aggregation quantity M; If the aggregation quantity M is 1, read the message record corresponding to the message record address of the second message pointer record in the first message queue as the corresponding third message record, and extract the message body of the third message record as the corresponding first input data; If the aggregation quantity M is greater than 1, read the message record corresponding to the message record address in the first message queue as the first fourth message record, and extract the message body of the first fourth message record as the first sub-input data; read the next message record of the first fourth message record as the second fourth message record, and extract the message body of the second fourth message record as the second sub-input data; and so on, until the next message record of the (M - 1)th fourth message record is read as the Mth fourth message record, and the message body of the Mth fourth message record is extracted as the Mth sub-input data; and sequentially splice the first to Mth sub-input data to obtain the corresponding first input data.
11. An electronic device, characterized in that, Comprising: A memory, a processor, and a transceiver; The processor is used to be coupled with the memory, read and execute instructions in the memory to implement the method according to any one of claims 1-10; The transceiver is coupled with the processor, and the processor controls the transceiver to perform message sending and receiving.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a computer, the computer is caused to execute the method according to any one of claims 1-10.
Citation Information
Patent Citations
System and method for carrying out recording and playback on uplink data of network ports
CN107704375A
Method for multi-cycle storage and playback of aircraft simulation data of flight simulator
CN109557937A