Data recording control method and device and data playback control method and device
By generating and processing vehicle events and generating event tags, the problem of difficulty in data search in recording and replay of sensor data in autonomous driving systems is solved, and rapid search and replay are achieved, improving efficiency and accuracy.
Patent Information
- Application Number
- CN202411285932.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2024-12-13
AI Technical Summary
In autonomous driving systems, during the recording and playback of sensor data, traditional methods lead to scattered data distribution, making it difficult to quickly find and reproduce specific data states or time points, resulting in high time costs.
By performing label generation processing on vehicle events, event tags are generated, which are used to establish the relationship between data and events during data recording, and then quickly find and playback data in recorded files.
It improves data search efficiency, saves resources and costs, enhances data analysis and system algorithm development efficiency, and ensures rapid reproduction and accuracy of data.
Smart Images

Figure CN119127814A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of sensor data recording, and in particular relates to a data recording control method, a data playback control method and a device. Background Art
[0002] In the design of autonomous driving system algorithms, a large amount of vehicle sensor data is required to train and verify the algorithms. By recording sensor data, data in different driving scenarios can be collected to develop and improve perception, positioning, decision-making, and control algorithms. By replaying sensor data, autonomous driving algorithms can be tested in a simulated environment to test and verify the performance of the system. In particular, when an autonomous driving car fails or has an accident, the sensor data can be replayed to analyze the cause and help improve system design and safety.
[0003] Autonomous driving scenarios involve multi-source heterogeneous sensors, with numerous sensor types and huge amounts of data. Sensor data fusion and algorithm iteration are inseparable from data recording and playback. Traditional data recording control methods exist. In the recording files obtained by the traditional data recording and playback implementation method, the data is scattered, and the time cost of finding valid data and key data is high. It is impossible to quickly reproduce the data state of the vehicle at a specific state or a specific time point during recording.
[0004] Therefore, there is an urgent need for a method that can quickly find the required data and quickly reproduce and replay it. Summary of the invention
[0005] In order to solve the above technical problems, the present invention provides a data recording control method, a data playback control method and a device.
[0006] In one aspect, the present invention provides a data recording control method, the data recording control method comprising: obtaining a file to be written, data to be recorded, and a vehicle event; the vehicle event is an event indicating that the vehicle is in a specific state or at a specific time point;
[0007] Performing label generation processing on the vehicle event to obtain an event label of the vehicle event; the event label of the vehicle event is used to search for data to be replayed, and the event label of the vehicle event carries content information and time information of the vehicle event;
[0008] Performing data recording processing based on the event tag of the vehicle event, the data to be recorded and the file to be written to generate a recorded file; the recorded file is used to determine the data to be played back according to the event tag of the vehicle event;
[0009] The data to be recorded is all the data currently to be recorded.
[0010] In some possible implementations, the step of performing label generation processing on the vehicle event to obtain an event label for the vehicle event includes:
[0011] Performing a label type analysis on the vehicle event to determine that the label of the vehicle event is a first type label; the first type label corresponds to a first vehicle event, and the first vehicle event is an event indicating that the vehicle is at a specific time node;
[0012] When it is determined that the label of the vehicle event is a first type label, performing label number generation processing on the vehicle event to obtain a first label number of the vehicle event;
[0013] Acquire a preset data extension time; the preset data extension time is less than a preset time threshold;
[0014] Performing an occurrence time extraction process on the vehicle event to obtain a first occurrence time;
[0015] Perform a first time interval analysis according to the first occurrence time and the preset data extension time to obtain a first time interval;
[0016] The first label number, the first occurrence time and the first time interval are subjected to label generation processing to obtain an event label of the vehicle event.
[0017] In some possible implementations, the step of performing label generation processing on the vehicle event to obtain an event label for the vehicle event includes:
[0018] Performing a label type analysis on the vehicle event, determining that the label of the vehicle event is a second type label; the second type label corresponds to a second vehicle event; and the second vehicle event is an event indicating that the vehicle is in a specific state;
[0019] Performing label number generation processing on the vehicle event to obtain a second label number of the vehicle event;
[0020] Acquire a first trigger time and a second trigger time of the vehicle event; the first trigger time is earlier than the second trigger time; the first trigger time is the start time of the specific state, and the second trigger time is the end time of the specific state;
[0021] Using the first trigger time and the second trigger time as the start time and end time of the time interval respectively, to obtain a second time interval;
[0022] A label generation process is performed based on the second label number, the first trigger time, the second trigger time and the second time interval to obtain an event label of the vehicle event.
[0023] In some possible implementations, the number of the files to be written is at least two, and the data recording process is performed based on the event tag of the vehicle event, the data to be recorded, and the files to be written to generate a recorded file, including:
[0024] Determine any file to be written in the list of files to be written as the current file, and write the data to be recorded into the current file;
[0025] Generate an event tag mapping table based on the event tag of the vehicle event;
[0026] Acquire the write time, and when the write time is equal to the first preset write time, terminate the data writing to the current file; the write time is the time elapsed for the data writing operation starting from the recording start time of the current file;
[0027] Deleting the current file in the list of files to be written;
[0028] Create a new file to be written, and update the list of files to be written;
[0029] Repeat the steps of obtaining any one of the files to be written in the to-be-written file table as the current file and updating the to-be-written file list until all the data to be recorded are recorded, thereby generating a plurality of recorded files;
[0030] File information recording processing is performed based on the plurality of recorded files to obtain a file information mapping table.
[0031] In some possible implementations, the data recording control method further includes:
[0032] Acquire the event label mapping table and the file information mapping table; the file information mapping table records the recording time interval of the recorded file; the event label mapping table records a plurality of time intervals, and the plurality of time intervals respectively correspond to each vehicle event;
[0033] When the total recording time is greater than or equal to the second preset time, unknown end time detection is performed on a plurality of the time intervals to obtain a detection result; the total recording time refers to the accumulated data recording time from the start time of the recording process, and the unknown end time refers to the second trigger time to be determined in the second time interval;
[0034] Perform reference time interval analysis according to the detection results to determine the reference time interval;
[0035] Compare and analyze the reference time interval with a plurality of the time intervals, and determine useless data files from a plurality of the recorded files;
[0036] Deleting the useless data files;
[0037] The useless data file is a recorded file whose reference time interval has no intersection with a plurality of the time intervals.
[0038] In some possible implementations, performing reference time interval analysis according to the detection result to determine the reference time interval includes:
[0039] When the detection result indicates that the unknown end time does not exist, taking the preset interval end value as the end value of the reference time interval;
[0040] The recording process start time is used as the start value of the reference time interval to determine the reference time interval; the reference time interval is used to determine the useless data file.
[0041] In some possible implementations, performing time interval analysis according to the detection result to determine the reference time interval includes:
[0042] When the detection result indicates that the unknown end time exists, obtaining a first trigger time of the time interval in which the unknown end time exists;
[0043] Performing numerical analysis based on the first trigger time in the time interval where the unknown end time is located to determine a first limit value, wherein the first limit value is less than a preset time threshold;
[0044] Comparing the first limit value with the preset interval endpoint value, and taking the first limit value or the preset interval endpoint value as the endpoint value of the reference time interval according to the comparison result;
[0045] The recording process start time is used as the start value of the reference time interval to determine the reference time interval; the reference time interval is used to determine the useless data file.
[0046] In some possible implementations, after generating the recorded file, the data recording control method further includes:
[0047] Record the end time of recording;
[0048] Obtaining the unknown end time in the recorded file;
[0049] The unknown end time in the recorded file is replaced with the recording end time.
[0050] On the other hand, the present application further provides a data playback control method. After the data recording control method, the data playback control method includes:
[0051] Determine a to-be-replayed event tag from the event tags of the vehicle event;
[0052] Data search is performed in the recorded file according to the identification information of the event tag to be replayed, the data to be replayed corresponding to the event tag to be replayed is determined, and the data to be replayed is replayed.
[0053] In some possible implementations, searching for data in the recorded file according to the identification information of the event tag to be replayed, determining the data to be replayed corresponding to the event tag to be replayed, and replaying the data to be replayed includes:
[0054] Based on the identification information of the event tag to be replayed, data is searched in the recorded file to obtain the data to be replayed corresponding to the event tag to be replayed;
[0055] Performing a recording time interval analysis on the data to be played back to obtain a recording time interval;
[0056] The data to be replayed is replayed using the recording time interval as the replay time interval until all the data to be replayed is played back.
[0057] On the other hand, an embodiment of the present invention provides a data recording control device, the data recording control device comprising:
[0058] An acquisition module, used to acquire files to be written, data to be recorded, and vehicle events; the vehicle events are events indicating that the vehicle is in a specific state or at a specific time point;
[0059] A label generation module is used to perform label generation processing on the vehicle event to obtain an event label of the vehicle event; the event label of the vehicle event is used to search for data to be replayed, and the event label of the vehicle event carries content information and time information of the vehicle event;
[0060] The data recording module is used to perform data recording processing based on the event tag of the vehicle event, the data to be recorded and the file to be written to generate a recorded file; the recorded file is used to determine the data to be played back according to the event tag of the vehicle event.
[0061] On the other hand, an embodiment of the present invention provides a data playback control device, the data playback control device comprising:
[0062] A tag selection module, used to determine the event tag to be replayed from the event tags of the vehicle event;
[0063] The data playback module is used to search for data in the recorded file according to the identification information of the event tag to be played back, determine the data to be played back corresponding to the event tag to be played back, and play back the data to be played back.
[0064] The data recording control method, data playback control method and device provided in the embodiments of the present invention have the following beneficial effects:
[0065] The embodiment of the present invention can establish a relationship between the data of the vehicle event and the event label by performing label generation processing on the vehicle event while recording the data. The event label can be used to find the to-be-played data of the corresponding vehicle event in the recorded file, thereby performing targeted search and playback on the to-be-played data, saving resources and costs for searching data, improving the efficiency of data search, and helping to improve the efficiency of data analysis. It can search through the identification information of the event label and quickly reproduce the data situation of the vehicle event corresponding to the event label, which helps to improve the efficiency of system algorithm development. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0067] Figure 1 It is a software architecture diagram of a data recording control method provided by an embodiment of the present invention;
[0068] Figure 2 is a flow chart of a data recording control method provided by an embodiment of the present invention;
[0069] Figure 3 A logic diagram of a data recording control method provided by an embodiment of the present invention Figure 1 ;
[0070] Figure 4 A logic diagram of a data recording control method provided by an embodiment of the present invention Figure 2 ;
[0071] Figure 5 is a block diagram of a data recording control device provided by an embodiment of the present invention;
[0072] Figure 6 The present invention provides a block diagram of a data playback control device. DETAILED DESCRIPTION
[0073] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0074] It should be noted that the terms "first", "second", etc. in the specification and claims of the embodiments of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, the meaning of "multiple" is two or more. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0075] In order to make the purpose, technical solution and advantages disclosed in the embodiments of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the embodiments of the present invention and are not used to limit the embodiments of the present invention.
[0076] See also Figure 1 , Figure 1 This is a software architecture diagram of a data recording control method provided by an embodiment of the present invention. As shown in the figure, optionally, the software architecture of the data recording control method can be implemented based on a software development kit. The software architecture includes three parts: a daemon process, a control process, and a class library. Users can implement data recording and playback by using a software development kit.
[0077] Optionally, a daemon is a special process running in the background, which is independent of the control terminal and periodically performs certain tasks or waits for certain events to occur, such as periodically writing time and deleting useless data files. The control process is used to manage the start and end of the process, such as controlling the start and stop of data recording and playback.
[0078] A class library is a set of reusable functions or tools. Applications implement corresponding functions by calling them. For example, if a class library has the function of creating a file, then the class library is called to create the file. Users call the class library through the application program interface. The class library establishes communication with the daemon process through the socket and registers data topics with the daemon process. Optionally, the socket is an application program interface for network communication. The control process establishes communication with the daemon process through the socket.
[0079] The above software architecture can support multiple users to issue recording and playback start and stop control commands at the same time, register multiple event tag information at the same time, and record and play back multiple topic data at the same time. Among them, the number of daemon processes running in the same domain is unique, and the number of control processes and class libraries running is unlimited. It supports multiple user processes calling class libraries and recording different topic data at the same time. It supports multiple users to call the control process at the same time to label the topic data, thereby realizing fast, efficient, and concurrent generation of event tags.
[0080] It should be noted that the data recording control method and data playback control method provided in the embodiments of the present invention can be applied in a variety of scenarios. To help understand the present technical solution, this specification takes the recording and playback of sensor data in a vehicle as an example for explanation.
[0081] Figure 2 is a flow chart of a data recording control method provided by an embodiment of the present invention. The method can be used for Figure 1 In the software architecture in. This specification provides the method operation steps as described in the embodiments or flowcharts, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiments is only one way of executing the steps among many orders, and does not represent the only order of execution. When the actual system or server product is executed, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel (for example, in a parallel processor or multi-threaded processing environment).
[0082] Specific as Figure 2 As shown, the method may include:
[0083] In one aspect, the present invention provides a data recording control method, the data recording control method comprising:
[0084] S101: Acquire files to be written, data to be recorded, and vehicle events.
[0085] Optionally, the file to be written is a file used to record and store the data to be recorded, and the data to be recorded is all data currently to be recorded. Optionally, the data to be recorded can be part of the data or all of the data in a topic folder, and the topic can be a device that generates the data to be recorded, such as a sensor.
[0086] Optionally, the vehicle event is an event indicating that the vehicle is in a specific state, or indicating that the vehicle is at a specific time point.
[0087] S103: performing label generation processing on the vehicle event to obtain an event label of the vehicle event.
[0088] Optionally, the label generation process refers to extracting attribute information of a vehicle event based on preset elements of the label. An event label is a mark used to record attribute information of a vehicle event. The attribute information of a vehicle event is information obtained based on a vehicle event, such as the type of vehicle event, the time of occurrence, the time interval, etc. There is a one-to-one correspondence between an event label and a vehicle event. The event label of a vehicle event carries content information and time information of the vehicle event. The event label of a vehicle event is used to search for data to be replayed. The data to be replayed can be data of one vehicle event or data of multiple vehicle events. Each event label can be used to search for data of a corresponding vehicle event.
[0089] It should be noted that during the data recording process, there are several vehicle events, and label generation processing is performed on the several vehicle events respectively, and finally several event labels are obtained. The several event labels correspond to the several vehicle events respectively, and each vehicle event has a unique event label.
[0090] S105: Perform data recording processing based on the event tag of the vehicle event, the data to be recorded and the file to be written to generate a recorded file.
[0091] Optionally, the recorded file is used to determine the data to be played back according to the event tag of the vehicle event.
[0092] The embodiment of the present invention can establish a relationship between the data of the vehicle event and the event label by performing label generation processing on the vehicle event while recording the data. The event label can be used to find the to-be-played data of the corresponding vehicle event in the recorded file, thereby performing targeted search and playback on the to-be-played data, saving resources and costs for searching data, improving the efficiency of data search, and helping to improve the efficiency of data analysis. It can search through the identification information of the event label and quickly reproduce the data situation of the vehicle event corresponding to the event label, which helps to improve the efficiency of system algorithm development.
[0093] In some possible embodiments, the step of performing label generation processing on the vehicle event to obtain an event label of the vehicle event includes:
[0094] A label type analysis is performed on the vehicle event to determine that the label of the vehicle event is a first type label.
[0095] Optionally, label type analysis refers to analyzing vehicle events and determining the type of event labels according to the nature of the vehicle events. The nature of vehicle events can be divided into two types: one is a vehicle event indicating that the vehicle is at a specific time node, and the other is a vehicle event indicating that the vehicle is in a specific state.
[0096] Furthermore, the first type tag corresponds to a first vehicle event, and the first vehicle event is an event indicating that the vehicle is at a specific time node.
[0097] When it is determined that the label of the vehicle event is a first type label, a label number generation process is performed on the vehicle event to obtain a first label number of the vehicle event.
[0098] Optionally, the first tag number is the identification information of the first type of tag, and the numbering method of the first tag number can be flexibly set according to needs, for example, numbering by event name plus occurrence time, or by occurrence date plus event name. Each vehicle event has a unique first tag number.
[0099] Obtain a preset data extension time; the preset data extension time is less than a preset time threshold.
[0100] Optionally, the preset data expansion time T1 is a preset time for increasing the amount of event data. Event data refers to data corresponding to a vehicle event. The preset data expansion time determines the deviation between the first occurrence time and the start time and end time of the first time interval, and determines the amount of data to be analyzed. The preset data expansion time T1 can be flexibly set within a range less than a preset time threshold. The longer the preset data expansion time T1 is, the larger the amount of event data is, and vice versa. For example, the preset time threshold can be 1-30 minutes. Preferably, the preset time threshold is 10 minutes, and the preset data expansion time T1 is less than 10 minutes.
[0101] An occurrence time extraction process is performed on the vehicle event to obtain a first occurrence time.
[0102] Optionally, the first occurrence time is the time when the vehicle event occurs. For example, if the vehicle event is an abnormality in lane line recognition, the instantaneous time when the abnormality in lane line recognition occurs is extracted as the first occurrence time.
[0103] A first time interval analysis is performed according to the first occurrence time and the preset data extension time T1 to obtain a first time interval.
[0104] Optionally, the first time interval analysis refers to the analysis based on the first occurrence time T recv The start time and the end time of the first time interval are determined by the preset data extension time T1.
[0105] Optionally, the first time interval [T recv -T1, T recv +T1] is used to determine the event data of the first type of event, and the start time of the first time interval is the first occurrence time T recv The difference between the preset data extension time T1 and the end time of the first time interval is the first occurrence time T recv For example, if the first occurrence time is 18:00 and the preset data extension time T1 is 10 minutes, the start time of the first time interval is 17:50 and the end time is 18:10, and the first time interval is [17:50, 18:10].
[0106] The first label number, the first occurrence time and the first time interval are subjected to label generation processing to obtain an event label of the vehicle event.
[0107] The embodiment of the present invention performs a label type analysis on the vehicle event, and when it is determined that the label type of the vehicle event is a first type label, obtains attribute information corresponding to the vehicle event, and obtains the first type label corresponding to the first vehicle event. This can be used to search for corresponding data for a specific vehicle event during subsequent data playback, thereby improving the efficiency of data search.
[0108] In some possible embodiments, the step of performing label generation processing on the vehicle event to obtain an event label of the vehicle event includes:
[0109] A label type analysis is performed on the vehicle event to determine that the label of the vehicle event is a second type label.
[0110] Optionally, the second type label corresponds to a second vehicle event; the second vehicle event is an event indicating that the vehicle is in a specific state, and the second type label corresponds to a vehicle event indicating that the vehicle is in a specific state; when it is determined that the vehicle event indicates that the vehicle is in a specific state, it can be determined that the label of the vehicle event is the second type label.
[0111] A label number generation process is performed on the vehicle event to obtain a second label number of the vehicle event.
[0112] Optionally, the second tag number is identification information of the second type of tag, and a numbering method of the second tag number is similar to a numbering method of the first tag number, which will not be described in detail here.
[0113] A first trigger time and a second trigger time of the vehicle event are obtained.
[0114] Optionally, the first trigger time T1 recv Earlier than the second trigger time T2 recvThe first trigger time is the start time of a specific state, and the second trigger time is the end time of a specific state. For example, the vehicle event content is that the vehicle is at a traffic light intersection. This event is persistent and is a vehicle event indicating that the vehicle is in a specific state. Since the vehicle enters the traffic light intersection first and leaves the traffic light intersection later, the time when the vehicle enters the traffic light intersection is the first trigger time T1. recv The time when the vehicle leaves the traffic light intersection is the second trigger time T2 recv .
[0115] The first trigger time and the second trigger time are respectively used as the start time and the end time of the time interval to obtain a second time interval.
[0116] Optionally, the first trigger time T1 recv As the starting point of the time interval, the second trigger time T2 recv As the interval end point, the second time interval [T1 recv , T2 recv ].
[0117] Optionally, the first trigger time T1 recv Indicates the time when the vehicle enters a specific state, the second trigger time T1 recv Indicates the time when the specific state of the vehicle ends. The second time interval [T1 recv , T2 recv ] can represent the whole process of the vehicle being in this specific state.
[0118] A label generation process is performed based on the second label number, the first trigger time, the second trigger time and the second time interval to obtain an event label of the vehicle event.
[0119] The embodiment of the present invention performs a label type analysis on the vehicle event, and when it is determined that the label type of the vehicle event is a second type label, obtains attribute information corresponding to the vehicle event, especially the first trigger time and the second trigger time, to determine the second time interval, and obtains the second type label corresponding to the second vehicle event, which can be used to search for corresponding data for a specific vehicle event during subsequent data playback, thereby improving the efficiency of data search.
[0120] In some possible embodiments, the number of the files to be written is at least two, and the data recording process is performed based on the event tag of the vehicle event, the data to be recorded, and the files to be written to generate a recorded file, including:
[0121] Any file to be written in the list of files to be written is determined as a current file, and the data to be recorded is written into the current file.
[0122] Optionally, the file to be written refers to a file waiting for the data to be recorded to be written. The class library can be called to create the file to be written in the topic folder. At least two files to be written can be set in each topic folder to write the same topic data into different files to be written. The current file refers to the current file to be written for which data is to be recorded. The user can record multiple topics at the same time by calling multiple class libraries, that is, write data to the files to be written in multiple topic folders at the same time.
[0123] An event tag mapping table is generated based on the event tags of the vehicle events.
[0124] Optionally, the event tag mapping table records the event tag of each vehicle event, including identification information of the event tag and a time interval of the event tag.
[0125] A write time is obtained, and when the write time is equal to a first preset write time, data writing to the current file is terminated.
[0126] Optionally, the write time is the time taken for the data write operation starting from the recording start time of the current file. The first preset write time is the duration of data recording for each current file. Exemplarily, the first preset write time is 0.5*T max , T max =10, the first current file is written from 12:00, the first preset writing time is 5 minutes, after 5 minutes, the second current file is written, and after 5 minutes, the third current file is written.
[0127] Deleting the current file in the list of files to be written;
[0128] Create a new file to be written, and update the list of files to be written.
[0129] Optionally, each time the first preset writing time passes, the current file is deleted from the list of files to be written, a new file to be written is created, and the new file to be written is added to the list of files to be written. For example, the recorded file list contains recorded file 1, recorded file 2, and recorded file 3, and the list of files to be written contains file 4 and file 5 to be written. The current file is file 4 to be written. After the first preset writing time passes, file 4 to be written is added to the list of recorded files, and the list of recorded files becomes recorded file 1, recorded file 2, recorded file 3, and recorded file 4, and the list of files to be written becomes file 5 to be written. After the new file to be written 6 is created, the list of files to be written becomes file 5 to be written and file 6 to be written.
[0130] Optionally, each time a new file to be written is created, the class library writes file summary information into the new file to be written, including file version, file sequence, topic name, system byte order, creation time, sensor type and compression level, etc., for checking the correctness of the file when replaying the file later.
[0131] Repeat the steps of obtaining any one of the files to be written in the to-be-written file table as the current file and updating the to-be-written file list until all the data to be recorded are recorded, thereby generating a plurality of recorded files.
[0132] Optionally, the recorded file refers to a file to be written in which the data to be recorded has been written.
[0133] Furthermore, file 5 to be written in the list of files to be written is written as the current file, and each frame of data and the timestamp of recording each frame of data are written into the current file. After the first preset writing time, file 5 to be written is added to the list of recorded files, and the list of recorded files becomes recorded file 1, recorded file 2, recorded file 3, recorded file 4, recorded file 5, and the list of files to be written becomes file 6 to be written. After creating a new file to be written 7, the list of files to be written becomes file 6 to be written and file 7 to be written, and so on, until all the data to be recorded is recorded and several recorded files are obtained.
[0134] File information recording processing is performed based on the plurality of recorded files to obtain a file information mapping table.
[0135] Optionally, the file information mapping table records the file information of each recorded file, including the file name, the recording start time and the recording end time of the file information.
[0136] The embodiment of the present invention designs a file creation process in a master-slave mode when recording the data to be recorded in a certain topic folder, and writes the data to be recorded in the same topic folder into different files to be written, thereby avoiding the risk of data of the same topic accumulating or even being lost in the memory due to file switching, improving program reliability, and ensuring the integrity and security of the recorded data.
[0137] Due to limited disk space, recording time is restricted. In order to save disk space, it is necessary to delete useless data files after a period of data recording. Useless data files are recorded files whose recording time is within the reference time interval and whose recording time has no intersection with several time intervals.
[0138] In some possible embodiments, the data recording control method further includes:
[0139] The event tag mapping table and the file information mapping table are obtained.
[0140] Optionally, the file information mapping table records the recording time interval of the recorded file, and the recording time interval refers to the time interval between the recording start time and the recording end time of the recorded file. The event label mapping table records several time intervals, and the several time intervals correspond to each vehicle event respectively.
[0141] Optionally, the file information mapping table is created by the daemon process to record the identification information of each recorded file, the recording start time, the recording end time, and whether the file is hit by an event tag. Create an event tag mapping table to record the event tag number and time interval.
[0142] When the total recording time is greater than or equal to the second preset time, unknown end time detection is performed on a plurality of the time intervals to obtain a detection result.
[0143] It should be noted that the unknown end time T unkown It is an important sign of the second type of tag. The second type of tag needs to obtain the first trigger time T1 recv and the second trigger time T2 recv If the time interval has an unknown end time, it means that the time interval has not yet obtained the second trigger time T2 recv Therefore, based on the detection results, it is necessary to filter out the ones that may still receive the second trigger time T2 recv time interval to exclude it from the deletable time interval.
[0144] Optionally, the second preset time is a threshold time for deleting useless data files, which can be 1.5*T max The total recording time refers to the accumulated data recording time from the start time of the recording process, and the unknown end time T unkown Refers to the second trigger time to be determined in the second time interval.
[0145] Furthermore, when the total recording time T all When the time is greater than or equal to the second preset time, the useless data files are deleted. The step of deleting the useless data files depends on the detection result of the unknown end time.
[0146] A reference time interval analysis is performed according to the detection result to determine the reference time interval.
[0147] Optionally, the reference time interval is used to determine the range of recorded files that are allowed to be deleted. Recorded files outside the reference time interval cannot be deleted. If the recording time interval of a recorded file is within the reference time interval, it is a recorded file that is allowed to be deleted.
[0148] The reference time interval is compared and analyzed with a plurality of the time intervals, and useless data files are determined from the plurality of recorded files.
[0149] Optionally, vehicle events correspond to event tags one by one, and the data in the time interval corresponding to the event tag is of great significance for analyzing the corresponding vehicle event. If the recording time has no intersection with several time intervals, it means that the recorded file does not have useful data that can be used to analyze the vehicle event, and it is determined to be a useless data file.
[0150] Delete the useless data files.
[0151] The embodiment of the present invention detects an unknown end time, determines a reference time interval based on the detection result, and determines the range of recorded files that are allowed to be deleted through the reference time interval, thereby avoiding accidental deletion of useful data files, improving the accuracy of deleting files, reducing the physical space occupied by the disk, and at the same time increasing the update frequency of the available disk space, thereby improving the effectiveness of disk space utilization.
[0152] In some possible embodiments, performing reference time interval analysis according to the detection result to determine the reference time interval includes:
[0153] When the detection result indicates that the unknown end time does not exist, the preset interval end value is used as the end value of the reference time interval.
[0154] Optionally, if there is no unknown end time, it means that the event tag corresponding to the recorded file does not exist and the second trigger time T2 has not been received. recv The second type of tag does not need to be reserved to obtain the second trigger time T2 recv Therefore, the preset interval end value is directly used as the end value of the reference time interval.
[0155] The recording process start time is used as the start value of the reference time interval to determine the reference time interval.
[0156] Optionally, the reference time interval is used to determine the range of recorded files that are allowed to be deleted, and further used to determine useless data files. The recording process start time refers to the time when data recording starts for the first file to be written.
[0157] In some possible embodiments, performing time interval analysis according to the detection result to determine the reference time interval includes:
[0158] When the detection result indicates that the unknown end time exists, a first trigger time of the time interval where the unknown end time is located is obtained.
[0159] It should be noted that for the second type of tag, based on the first trigger time T1 recv and the second trigger time T2 recv Determine the second time interval [T1 recv , T2 recv ]. Because the first trigger time T1 is obtained recv And get the second trigger time T2 recv There is a certain time interval between them. When deleting useless data files, there is a first trigger time T1 that has been obtained. recv But the second trigger time T2 is not obtained recv In the case of recv and the second trigger time T2 recv The second time interval determined has not yet been generated at this time. If the reference time interval covers the first trigger time T1 of the time interval where the unknown end time is located recv , which may lead to accidental deletion of useful data files.
[0160] A numerical analysis is performed based on the first trigger time in the time interval where the unknown end time is located to determine a first limit value, where the first limit value is less than a preset time threshold.
[0161] Optionally, avoid not receiving the second trigger time T2 recv Previously, useful data files were mistakenly deleted. If there are multiple unknown end times, the first trigger time T1 in the time interval of multiple unknown end times is used. recv In the above example, we determine a first limit value T Switch , the first limit value is a plurality of first triggering times T1 recv The preset time threshold is a reference value used to determine the minimum first trigger time.
[0162] The first limit value is compared with the preset interval end value, and the first limit value or the preset interval end value is used as the end value of the reference time interval according to the comparison result.
[0163] Optionally, the first limit value T Switch and the preset interval end value (T all -T max ) is determined as the end point value T of the reference time interval. delete , it can be ensured that the reference time interval and the unknown second time interval [T1 recv , T2 recv ] does not generate an intersection, which will not lead to the accidental deletion of useful data files. The unknown second time interval refers to the undetermined second time interval with an unknown end time [T1 recv , T unkown], the second time interval is to be determined to obtain the second trigger time T2 recv After that, the unknown end time is replaced by the second trigger time T2 recv , the second time interval to be determined becomes the second time interval with a determined start value and end value [T1 recv , T2 recv ].
[0164] The recording process start time is used as the start value of the reference time interval to determine the reference time interval; the reference time interval is used to determine the useless data file.
[0165] The embodiment of the present invention determines a first limit value based on a first trigger time of a time interval in which an unknown end time is located when it is determined that a detection result indicates that there is an unknown end time, thereby shortening the interval length of a reference time interval, avoiding accidental deletion of useful data files, enhancing the security and reliability of deleting useless data files, and improving data security.
[0166] In some possible embodiments, after generating the recorded file, the data recording control method further includes:
[0167] Record the end time of the recording.
[0168] Optionally, the user calls the control process and control parameters to specify that certain topic data stops recording, and the end time at this moment is recorded as T stop .
[0169] Gets the unknown end time of the recorded file.
[0170] Optionally, the control daemon obtains the unknown end time T in all current time intervals unkown , T stop Write the to-be-written file that has been written with data as the file end time, and delete the blank to-be-written file that has not been written with data.
[0171] The unknown end time in the recorded file is replaced with the recording end time.
[0172] Optionally, set all unknown end times T unkown Replaced with the recording end time T stop It should be noted that for the second type of tag, it is necessary to obtain the first trigger time and the second trigger time. In some cases, until the end of recording, only the first trigger time is obtained, and the second trigger time is not obtained. In order to close the time interval of the event tag, the recording end time is used as the second trigger time, so that the second type of tag has a complete second time interval.
[0173] Query the event tag mapping table and file information mapping table, delete the file sequence that is not hit by the event tag, and write the event tag mapping table and file information mapping table into the file.
[0174] The embodiment of the present invention records the recording end time when the control recording process is terminated, replaces the unknown end time in the time interval with the recording end time, and makes the second trigger time a known time. The second time interval has a complete time interval, which is convenient for analyzing the event data corresponding to the event tag.
[0175] In addition, the present application also provides a data playback control method. After the data recording control method, the data playback control method further includes:
[0176] The event tag to be replayed is determined from the event tags of the vehicle event.
[0177] Optionally, the event tag to be replayed refers to the event tag of the vehicle event to be replayed, and the vehicle event to be replayed is the vehicle event corresponding to the data to be replayed. Since each vehicle event has a unique corresponding event tag, in order to obtain the event data of a certain vehicle event for analysis, the event tag to be replayed needs to be determined. It should be noted that the event tags of all vehicle events have been obtained based on the recording process, so the event tag to be replayed must exist in the event tags of all vehicle events.
[0178] Data search is performed in the recorded file according to the identification information of the event tag to be replayed, the data to be replayed corresponding to the event tag to be replayed is determined, and the data to be replayed is replayed.
[0179] Optionally, the identification information of the event tag to be replayed is information used to identify the event tag, which may be the number of the event tag. If the event tag to be replayed is a first type tag, the identification information is the first tag number; if it is a second type tag, the identification information is the second tag number.
[0180] Optionally, the event tag to be replayed is found in the event tag mapping table according to the identification information of the event tag to be replayed, and the time interval of the event tag to be replayed is obtained from the event tag to be replayed. If the event tag to be replayed is a first type of tag, the time interval is the first time interval; if it is a second type of tag, the time interval is the second time interval.
[0181] Further, based on the first time interval or the second time interval, a corresponding time interval is searched in the recorded file, data in the corresponding time interval is used as data to be played back, and data playback is performed on the data to be played back.
[0182] The embodiment of the present invention determines the tag of the event to be replayed, searches and determines the data to be replayed from the recorded files, and can accurately find the required data according to the needs of data analysis, thereby improving the efficiency of finding data and saving resources and costs for finding data. By replaying the data to be replayed, key data can be replayed and viewed according to the needs of data analysis, thereby improving the pertinence and efficiency of data analysis.
[0183] In some possible embodiments, searching for data in the recorded file according to the identification information of the event tag to be replayed, determining the data to be replayed corresponding to the event tag to be replayed, and replaying the data to be replayed includes:
[0184] Based on the identification information of the event tag to be replayed, data is searched in the recorded file to obtain the data to be replayed corresponding to the event tag to be replayed.
[0185] Optionally, the control daemon process queries the system process list to determine whether the daemon process is unique. If it is unique, it starts normally, otherwise it exits.
[0186] Further, the control process is called to select the topic folder and the identification information of the event tag. Optionally, the topic folder stores the recorded files of the same topic and the management file of the recorded files of the same topic, and the management file is written based on the event tag mapping table and the file information mapping table.
[0187] Optionally, the daemon process consults the management file and obtains the time interval of the event tag to be replayed according to the identification information of the event tag to be replayed, determines the recorded file where the data to be replayed is located according to the time interval, and if there are multiple event tags to be replayed, takes the union of the time intervals of the multiple event tags. The daemon process sends the obtained time interval and the file name of the recorded file where the data to be replayed is located to the class library.
[0188] Furthermore, the class library verifies the file information of the recorded file to verify whether the file version, file sequence, topic name, system byte order and other information are correct. After confirming that the file information is correct, the data to be played back is determined from the recorded file according to the time interval, and the data to be played back is obtained into the memory and provided to the user process for easy playback.
[0189] Performing a recording time interval analysis on the data to be played back to obtain a recording time interval;
[0190] Optionally, the recording time interval refers to a difference between recording times of two adjacent frames of data when recording the data to be recorded.
[0191] The data to be replayed is replayed using the recording time interval as the replay time interval until all the data to be replayed is played back.
[0192] Optionally, the playback time interval refers to the difference between the playback times of two adjacent frames of data when playing back the data to be played back.
[0193] It should be noted that the recording time intervals between different adjacent frames of data may be different. Using the recording time interval as the playback time interval means that the recording time interval between two adjacent frames of data is played back as the same playback time interval between two adjacent frames of data, so as to ensure that the playback is performed at the speed of the topic data recording. Taking the three adjacent data a, b, and c in the data to be played back as an example, the time interval between data a and data b is 2ms, and the time interval between data b and data c is 4ms. When playing back data a, b, and c, after playing back data a, play back data b after an interval of 2ms, and after playing back data b, play the next frame of data after an interval of 4ms, and so on.
[0194] Optionally, a timer may be used to calculate the recording time interval between two adjacent frames of data, and the recording time interval is recorded as time T. diff , the recording time interval T diff The same two adjacent frames of data are played back as the playback time interval, and then the timer is cleared, and then the timer is counted again to obtain the next recording time interval, and so on.
[0195] The embodiment of the present invention analyzes the recording time of the data to be replayed to obtain the recording time interval between two adjacent frames of data, and uses the recording time interval as the playback time interval between the same two frames of data. The data to be replayed is played back at the recording speed, which is beneficial to restoring the conditions in which the data was generated, and is more beneficial to performing data analysis on a certain vehicle event, thereby improving the accuracy of the analysis.
[0196] See also Figure 3 , Figure 3 A logic diagram of a data recording control method provided by an embodiment of the present invention Figure 1 ,The logic of data recording is as follows: ,Complete the preliminary preparations, which include checking whether the daemon process is unique, ,starting the daemon process, and calling the control process to issue ,control instructions.
[0197] (1) The control library starts recording, the daemon creates a file information mapping table, the library creates a topic folder and a file to be written, records the data to be recorded, enters the data to be recorded into the current file, and determines whether the write time is greater than or equal to the first preset write time. If so, the library creates a new file to be written and redetermines the current file. At the same time, the daemon updates the file information mapping table and determines whether the total recording time is greater than or equal to the second preset time. If so, the daemon starts to delete useless data files. If not, it continues to determine whether the write time is greater than or equal to the first preset write time.
[0198] (2) The control daemon process generates event tags and updates the event tag mapping table based on the event tags.
[0199] (3) Control to stop recording, the daemon process updates the file information mapping table, the event label mapping table, deletes useless data files, and writes the file information mapping table and the event label mapping table into a file.
[0200] See also Figure 4 , Figure 4 A logic diagram of a data recording control method provided by an embodiment of the present invention Figure 2 The logic of data playback is as follows: complete preliminary preparations, start the daemon process, call the control process to issue control instructions, the daemon process finds the data to be played back, the class library verifies the correctness of the file, and performs recording time interval analysis. If the file is correct, the data to be played back is played back according to the recording time interval, and it is determined whether the data to be played back has been played back. If so, the playback ends. If not, the playback continues, or the control process issues a stop playback instruction to end the playback.
[0201] Implementing the technical solution of the present invention has the following beneficial effects:
[0202] 1. The embodiment of the present invention can establish a relationship between the data of the vehicle event and the event label by performing label generation processing on the vehicle event while recording the data. The event label can be used to find the to-be-played data corresponding to the vehicle event in the recorded file, thereby performing targeted search and playback on the to-be-played data, saving resources and costs for searching data, improving the efficiency of data search, and helping to improve the efficiency of data analysis. It can search through the identification information of the event label and quickly reproduce the data situation of the vehicle event corresponding to the event label, which helps to improve the efficiency of system algorithm development.
[0203] 2. The embodiment of the present invention performs a label type analysis on the vehicle event, and when it is determined that the label type of the vehicle event is a first type label, obtains attribute information corresponding to the vehicle event, and obtains a first type label corresponding to the first vehicle event, which can be used to search for corresponding data for a specific vehicle event during subsequent data playback, thereby improving the efficiency of data search.
[0204] 3. The embodiment of the present invention performs label type analysis on vehicle events, and when determining that the label type of the vehicle event is a second type label, obtains attribute information corresponding to the vehicle event, especially the first trigger time and the second trigger time, to determine the second time interval, and obtains the second type label corresponding to the second vehicle event, which can be used to search for corresponding data for a specific vehicle event during subsequent data playback, thereby improving the efficiency of data search.
[0205] 4. The embodiment of the present invention designs a file creation process in a master-slave mode when recording the data to be recorded in a certain topic folder, and writes the data to be recorded in the same topic folder into different files to be written, thereby avoiding the risk of data of the same topic accumulating or even being lost in the memory due to file switching, thereby improving program reliability and ensuring the integrity and security of the recorded data.
[0206] 5. The embodiment of the present invention detects the unknown end time, determines the reference time interval according to the detection result, and determines the range of recorded files that are allowed to be deleted through the reference time interval, thereby avoiding accidental deletion of useful data files, improving the accuracy of deleting files, reducing the physical space occupied by the disk, and at the same time increasing the update frequency of the available disk space, thereby improving the effectiveness of disk space utilization.
[0207] 6. In the embodiment of the present invention, when it is determined that the detection result indicates that there is an unknown end time, the first limit value is determined based on the first trigger time of the time interval in which the unknown end time is located, thereby shortening the interval length of the reference time interval, avoiding accidental deletion of useful data files, enhancing the security and reliability of deleting useless data files, and improving data security.
[0208] 7. The embodiment of the present invention records the recording end time when the recording process is terminated, replaces the unknown end time in the time interval with the recording end time, and makes the second trigger time a known time. The second time interval has a complete time interval, which is convenient for analyzing the event data corresponding to the event tag.
[0209] 8. The embodiment of the present invention determines the tag of the event to be replayed, searches and determines the data to be replayed from the recorded files, and can accurately find the required data according to the needs of data analysis, thereby improving the efficiency of searching for data and saving resources and costs for searching data. By replaying the data to be replayed, it is possible to replay and view key data according to the needs of data analysis, thereby improving the pertinence and efficiency of data analysis.
[0210] 9. The embodiment of the present invention obtains the recording time interval between two adjacent frames of data by analyzing the recording time of the data to be replayed, and uses the recording time interval as the replay time interval between the same two frames of data. The data to be replayed is replayed at the recording speed, which is beneficial to restoring the conditions in which the data was generated, and is more beneficial to data analysis for a certain vehicle event, thereby improving the accuracy of the analysis.
[0211] See also Figure 5 , Figure 5 FIG. 1 is a block diagram of a data recording control device provided by an embodiment of the present invention. Figure 5 As shown, the data recording control device may at least include:
[0212] The acquisition module 201 is used to acquire files to be written, data to be recorded, and vehicle events; the vehicle events are events indicating that the vehicle is in a specific state or at a specific time point;
[0213] The tag generation module 203 is used to perform tag generation processing on the vehicle event to obtain an event tag of the vehicle event; the event tag of the vehicle event is used to search for data to be played back, and the event tag of the vehicle event carries content information and time information of the vehicle event;
[0214] The data recording module 205 is used to perform data recording processing based on the event tag of the vehicle event, the data to be recorded and the file to be written to generate a recorded file; the recorded file is used to determine the data to be played back according to the event tag of the vehicle event.
[0215] See also Figure 6 , Figure 6 is a block diagram of a data playback control device provided by an embodiment of the present invention, such as Figure 6 As shown, the data playback control device at least includes:
[0216] The tag selection module 301 is used to determine the event tag to be replayed from the event tags of the vehicle event;
[0217] The data playback module 303 is used to search for data in the recorded file according to the identification information of the event tag to be played back, determine the data to be played back corresponding to the event tag to be played back, and play back the data to be played back.
[0218] In some embodiments, the label generation module includes:
[0219] A first type analysis unit is used to perform a label type analysis on the vehicle event to determine that the label of the vehicle event is a first type label; the first type label corresponds to a first vehicle event, and the first vehicle event is an event indicating that the vehicle is at a specific time node;
[0220] A first number generating unit is used to perform a label number generating process on the vehicle event to obtain a first label number of the vehicle event when it is determined that the label of the vehicle event is a first type label;
[0221] A time acquisition unit, used to acquire a preset data extension time; the preset data extension time is less than a preset time threshold;
[0222] A time extraction unit, used for performing an occurrence time extraction process on the vehicle event to obtain a first occurrence time;
[0223] A first interval analysis unit, configured to perform a first time interval analysis according to the first occurrence time and the preset data extension time to obtain a first time interval;
[0224] The first label generation unit is used to perform label generation processing on the first label number, the first occurrence time and the first time interval to obtain an event label of the vehicle event.
[0225] In some embodiments, the label generation module includes:
[0226] A second type analysis unit is used to perform a label type analysis on the vehicle event to determine that the label of the vehicle event is a second type label; the second type label corresponds to a second vehicle event; the second vehicle event is an event indicating that the vehicle is in a specific state;
[0227] A second number generating unit, configured to perform label number generating processing on the vehicle event to obtain a second label number of the vehicle event;
[0228] A trigger time acquisition unit, used to acquire a first trigger time and a second trigger time of the vehicle event; the first trigger time is earlier than the second trigger time; the first trigger time is the start time of the specific state, and the second trigger time is the end time of the specific state;
[0229] A second interval analysis unit, configured to use the first trigger time and the second trigger time as the start time and the end time of the time interval respectively, to obtain a second time interval;
[0230] The second label generation unit is used to perform label generation processing based on the second label number, the first trigger time, the second trigger time and the second time interval to obtain an event label of the vehicle event.
[0231] In some embodiments, the data recording module includes:
[0232] A writing unit, used for determining any one of the to-be-written files in the list as a current file, and writing the to-be-recorded data into the current file;
[0233] A first mapping table generating unit, configured to generate an event tag mapping table based on the event tag of the vehicle event;
[0234] a termination writing unit, used for acquiring a writing time, and terminating data writing to the current file when the writing time is equal to a first preset writing time; the writing time is the time elapsed for the data writing operation starting from the recording start time of the current file;
[0235] A first list updating unit, used for deleting the current file in the list of files to be written;
[0236] A second list updating unit, used for creating a new file to be written and updating the list of files to be written;
[0237] a repeating unit, used for repeating the steps of obtaining any one of the to-be-written files in the to-be-written file table as the current file and updating the to-be-written file list until all the data to be recorded are recorded, thereby generating a plurality of the recorded files;
[0238] The second mapping table generating unit is used to perform file information recording processing based on a plurality of recorded files to obtain a file information mapping table.
[0239] In some embodiments, the data recording and playback control device further includes:
[0240] A mapping table acquisition module, used to acquire the event label mapping table and the file information mapping table; the file information mapping table records the recording time interval of the recorded file; the event label mapping table records a plurality of time intervals, and the plurality of time intervals respectively correspond to each vehicle event;
[0241] Detection module, used to record the total
[0242] When the time is greater than or equal to the second preset time, unknown end time detection is performed on a plurality of the time intervals to obtain a detection result; the total recording time refers to the accumulated data recording time from the start time of the recording process, and the unknown end time refers to the second trigger time to be determined in the second time interval;
[0243] A detection and analysis module, used to perform reference time interval analysis based on the detection results and determine the reference time interval;
[0244] A comparison and analysis module, used for comparing and analyzing the reference time interval with a plurality of the time intervals, and determining useless data files from a plurality of the recorded files;
[0245] A file deletion module, used to delete the useless data files;
[0246] The useless data file is a recorded file whose reference time interval has no intersection with a plurality of the time intervals.
[0247] In some embodiments, the detection and analysis module includes:
[0248] A first endpoint value setting unit, configured to use a preset interval endpoint value as an endpoint value of a reference time interval when the detection result indicates that the unknown end time does not exist;
[0249] The first interval determination unit is used to determine the reference time interval by taking the start time of the recording process as the start value of the reference time interval; the reference time interval is used to determine the useless data file.
[0250] In some embodiments, the detection and analysis module includes:
[0251] A first trigger time acquisition unit, configured to acquire a first trigger time of a time interval in which the unknown end time exists when the detection result indicates that the unknown end time exists;
[0252] A trigger time analysis unit, configured to perform a numerical analysis based on a first trigger time in a time interval where the unknown end time is located, and determine a first limit value, wherein the first limit value is less than a preset time threshold;
[0253] A second endpoint value setting unit, configured to compare the first limit value with a preset interval endpoint value, and use the first limit value or the preset interval endpoint value as an endpoint value of a reference time interval according to a comparison result;
[0254] The second interval determination unit is used to determine the reference time interval by taking the start time of the recording process as the start value of the reference time interval; the reference time interval is used to determine the useless data file.
[0255] In some embodiments, the data recording and playback control device further includes:
[0256] End time recording module, used to record the end time of recording;
[0257] A time acquisition module, used to acquire the unknown end time in the recorded file;
[0258] The time replacement module is used to replace the unknown end time in the recorded file with the recording end time.
[0259] In some embodiments, the data playback module includes:
[0260] A data search unit, configured to search for data in the recorded file based on the identification information of the event tag to be replayed, and obtain the data to be replayed corresponding to the event tag to be replayed;
[0261] A recording time interval analysis unit, used for analyzing the recording time interval of the data to be played back to obtain the recording time interval;
[0262] The data playback unit is used to play back the data to be played back by taking the recording time interval as the playback time interval until all the data to be played back are played back.
[0263] It should be noted that the device embodiment provided in the embodiment of the present invention and the above method embodiment are based on the same inventive concept.
[0264] It should be noted that the sequence of the embodiments of the present invention described above is for description only and does not represent the advantages and disadvantages of the embodiments. The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0265] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and server embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0266] A person skilled in the art will appreciate that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0267] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A data recording control method, characterized in that: The data recording control method comprises: Obtaining files to be written, data to be recorded, and vehicle events; the vehicle events are events indicating that the vehicle is in a specific state or at a specific time point; Performing label generation processing on the vehicle event to obtain an event label of the vehicle event; the event label of the vehicle event is used to search for data to be replayed, and the event label of the vehicle event carries content information and time information of the vehicle event; Performing data recording processing based on the event tag of the vehicle event, the data to be recorded and the file to be written to generate a recorded file; the recorded file is used to determine the data to be played back according to the event tag of the vehicle event; The data to be recorded is all the data currently to be recorded.
2. The data recording control method according to claim 1, characterized in that: The step of performing label generation processing on the vehicle event to obtain an event label of the vehicle event includes: Performing a label type analysis on the vehicle event to determine that the label of the vehicle event is a first type label; the first type label corresponds to a first vehicle event, and the first vehicle event is an event indicating that the vehicle is at a specific time node; When it is determined that the label of the vehicle event is a first type label, performing label number generation processing on the vehicle event to obtain a first label number of the vehicle event; Acquire a preset data extension time; the preset data extension time is less than a preset time threshold; Performing an occurrence time extraction process on the vehicle event to obtain a first occurrence time; Perform a first time interval analysis according to the first occurrence time and the preset data extension time to obtain a first time interval; The first label number, the first occurrence time and the first time interval are subjected to label generation processing to obtain an event label of the vehicle event.
3. The data recording control method according to claim 1, characterized in that: The step of performing label generation processing on the vehicle event to obtain an event label of the vehicle event includes: Performing a label type analysis on the vehicle event, determining that the label of the vehicle event is a second type label; the second type label corresponds to a second vehicle event; and the second vehicle event is an event indicating that the vehicle is in a specific state; Performing label number generation processing on the vehicle event to obtain a second label number of the vehicle event; Acquire a first trigger time and a second trigger time of the vehicle event; the first trigger time is earlier than the second trigger time; the first trigger time is the start time of the specific state, and the second trigger time is the end time of the specific state; Using the first trigger time and the second trigger time as the start time and end time of the time interval respectively, to obtain a second time interval; A label generation process is performed based on the second label number, the first trigger time, the second trigger time and the second time interval to obtain an event label of the vehicle event.
4. The data recording control method according to claim 1, characterized in that: The number of the files to be written is at least two, and the data recording process is performed based on the event tag of the vehicle event, the data to be recorded, and the files to be written to generate a recorded file, including: Determine any file to be written in the list of files to be written as a current file, and write the data to be recorded into the current file; Generate an event tag mapping table based on the event tag of the vehicle event; Acquire the write time, and when the write time is equal to the first preset write time, terminate the data writing to the current file; the write time is the time elapsed for the data writing operation starting from the recording start time of the current file; Deleting the current file in the list of files to be written; Create a new file to be written, and update the list of files to be written; Repeat the steps of obtaining any one of the files to be written in the to-be-written file table as the current file and updating the to-be-written file list until all the data to be recorded are recorded, thereby generating a plurality of recorded files; File information recording processing is performed based on the plurality of recorded files to obtain a file information mapping table.
5. The data recording control method according to claim 4, characterized in that: The data recording control method further includes: Acquire the event label mapping table and the file information mapping table; the file information mapping table records the recording time interval of the recorded file; the event label mapping table records a plurality of time intervals, and the plurality of time intervals respectively correspond to each vehicle event; When the total recording time is greater than or equal to the second preset time, unknown end time detection is performed on a plurality of the time intervals to obtain a detection result; the total recording time refers to the accumulated data recording time from the start time of the recording process, and the unknown end time refers to the second trigger time to be determined in the second time interval; Perform reference time interval analysis according to the detection results to determine the reference time interval; Compare and analyze the reference time interval with a plurality of the time intervals, and determine useless data files from a plurality of the recorded files; Deleting the useless data files; The useless data file is a recorded file whose reference time interval has no intersection with a plurality of the time intervals.
6. The data recording control method according to claim 5, characterized in that: The performing reference time interval analysis according to the detection result to determine the reference time interval includes: When the detection result indicates that the unknown end time does not exist, taking the preset interval end value as the end value of the reference time interval; The recording process start time is used as the start value of the reference time interval to determine the reference time interval; the reference time interval is used to determine the useless data file.
7. The data recording control method according to claim 5, characterized in that: The performing reference time interval analysis according to the detection result to determine the reference time interval includes: When the detection result indicates that the unknown end time exists, obtaining a first trigger time of the time interval in which the unknown end time exists; Performing numerical analysis based on the first trigger time in the time interval where the unknown end time is located to determine a first limit value, wherein the first limit value is less than a preset time threshold; Comparing the first limit value with the preset interval endpoint value, and taking the first limit value or the preset interval endpoint value as the endpoint value of the reference time interval according to the comparison result; The recording process start time is used as the start value of the reference time interval to determine the reference time interval; the reference time interval is used to determine the useless data file.
8. The data recording control method according to claim 7, characterized in that: After generating the recorded file, the data recording control method further includes: Record the end time of recording; Obtaining the unknown end time in the recorded file; The unknown end time in the recorded file is replaced with the recording end time.
9. A data playback control method, characterized in that: After the data recording control method according to any one of claims 1 to 8, the data playback control method comprises: Determine a to-be-replayed event tag from the event tags of the vehicle event; Data search is performed in the recorded file according to the identification information of the event tag to be replayed, the data to be replayed corresponding to the event tag to be replayed is determined, and the data to be replayed is replayed.
10. The data playback control method according to claim 9, characterized in that: The step of searching for data in the recorded file according to the identification information of the event tag to be replayed, determining the data to be replayed corresponding to the event tag to be replayed, and replaying the data to be replayed includes: Based on the identification information of the event tag to be replayed, data is searched in the recorded file to obtain the data to be replayed corresponding to the event tag to be replayed; Performing a recording time interval analysis on the data to be played back to obtain a recording time interval; The data to be replayed is replayed using the recording time interval as the replay time interval until all the data to be replayed is played back.
11. A data recording control device, characterized in that: The data recording control device comprises: An acquisition module, used to acquire files to be written, data to be recorded, and vehicle events; the vehicle events are events indicating that the vehicle is in a specific state or at a specific time point; A label generation module is used to perform label generation processing on the vehicle event to obtain an event label of the vehicle event; the event label of the vehicle event is used to search for data to be replayed, and the event label of the vehicle event carries content information and time information of the vehicle event; The data recording module is used to perform data recording processing based on the event tag of the vehicle event, the data to be recorded and the file to be written to generate a recorded file; the recorded file is used to determine the data to be played back according to the event tag of the vehicle event.
12. A data playback control device, characterized in that: The data playback control device comprises: A tag selection module, used to determine the event tag to be replayed from the event tags of the vehicle event; The data playback module is used to search for data in the recorded file according to the identification information of the event tag to be played back, determine the data to be played back corresponding to the event tag to be played back, and play back the data to be played back.
Citation Information
Patent Citations
Intelligent driving software / hardware-in-the-loop automatic simulation test system
CN114896176A
Vehicle driving data processing method, device, equipment, medium and system
CN115712765A
Data recording and playback method and device, electronic equipment and storage medium
CN118296080A
Vehicle control system
US20210171059A1
