Data playback method, device, storage medium and electronic device
By performing data storage and reading operations in parallel in the autonomous driving system, the problem of long-term data acquisition in the prior art is solved, and the efficiency of system debugging is improved.
Patent Information
- Application Number
- CN202111136343.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-27
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2041-09-27
AI Technical Summary
During the debugging process of autonomous driving systems, the existing technology requires downloading complete operating data from the server, which makes the data acquisition time longer and reduces the efficiency of system debugging.
By responding to data playback instructions, the target running data is obtained from the server and stored in a preset queue, and parallel operations of data storage and reading are realized, thereby shortening the time-consuming data acquisition.
By performing data storage and reading operations in parallel, the time-consuming data acquisition is shortened and the debugging efficiency of the autonomous driving system is improved.
Smart Images

Figure CN113961539B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of data processing, and in particular, to a data playback method, apparatus, storage medium, and electronic device. Background Art
[0002] An autonomous vehicle mainly relies on an on-vehicle autonomous driving system mainly composed of a computer system to achieve driverless driving. It senses the surrounding environment of the vehicle through on-vehicle sensors, automatically plans a driving route, and controls the vehicle to reach a predetermined target.
[0003] During the research and development process of an autonomous driving system, it is often necessary to debug the autonomous driving system through the operation data of the autonomous vehicle. In the related art, after the operation data of the autonomous vehicle is uploaded to the server, the complete operation data is obtained from the server, and the situation of the vehicle itself and the surrounding environment during the vehicle driving process is reproduced through the operation data. However, this method takes a long time to obtain data, resulting in low efficiency of system debugging. Summary of the Invention
[0004] The purpose of the present disclosure is to provide a data playback method, apparatus, storage medium, and electronic device to partially solve the above problems existing in the related art.
[0005] In a first aspect, the present disclosure provides a data playback method, the method comprising:
[0006] In response to receiving a data playback instruction, sequentially obtain a plurality of target operation data from the historical operation data of the vehicle stored in the server according to a specified order, where the historical operation data includes the operation data of the vehicle during a historical time period;
[0007] Execute a data storage operation and a data reading operation in parallel, where the data storage operation includes sequentially storing the target operation data in a preset queue according to the specified order, and the data reading operation includes reading the target operation data from the preset queue;
[0008] Play back the read target operation data.
[0009] Optionally, the data playback instruction includes a target data type and a target historical time period, and the step of in response to receiving a data playback instruction, sequentially obtain a plurality of target operation data from the historical operation data of the vehicle stored in the server according to a specified order includes:
[0010] Sequentially obtain the plurality of target operation data within the target historical time period from the historical operation data stored in the server, where the data type of the target operation data is the target data type.
[0011] Optionally, the reading of the target operation data from the preset queue includes:
[0012] When the number of the target operation data stored in the preset queue is greater than or equal to a preset quantity threshold, the target operation data is sequentially read from the preset queue at preset time intervals.
[0013] Optionally, before obtaining multiple pieces of target operation data from the historical operation data of the vehicle stored in the server in the specified order, the method further includes:
[0014] Creating a first sub-thread and a second sub-thread through the main thread;
[0015] The obtaining of multiple pieces of target operation data from the historical operation data of the vehicle stored in the server in the specified order includes:
[0016] Through the first sub-thread, obtaining multiple pieces of the target operation data from the historical operation data of the vehicle stored in the server in the specified order.
[0017] Optionally, before performing the data storage operation and the data reading operation in parallel, the method further includes:
[0018] Through the first sub-thread, sending the target operation data to the main thread in the specified order;
[0019] Through the main thread, sending the target operation data to the second sub-thread in the specified order;
[0020] The performing of the data storage operation and the data reading operation in parallel includes:
[0021] Through the second sub-thread, performing the data storage operation and the data reading operation in parallel.
[0022] Optionally, before playing back the read target operation data, the method further includes:
[0023] Through the second sub-thread, sending the read target operation data to the main thread;
[0024] The playing back of the read target operation data includes:
[0025] Through the main thread, playing back the target operation data.
[0026] Optionally, the playing back of the read target operation data includes:
[0027] Performing rendering processing according to the target operation data to play back the operation scenario of the vehicle.
[0028] In a second aspect, the present disclosure provides a data playback device, the device comprising:
[0029] a data acquisition module, configured to, in response to receiving a data playback instruction, sequentially obtain a plurality of target operation data from the historical operation data of the vehicle stored in the server in a specified order, where the historical operation data includes the operation data of the vehicle within a historical time period;
[0030] an operation execution module, configured to perform a data storage operation and a data reading operation in parallel, where the data storage operation includes sequentially storing the target operation data in a preset queue in the specified order, and the data reading operation includes reading the target operation data from the preset queue;
[0031] a data playback module, configured to playback the read target operation data.
[0032] Optionally, the data playback instruction includes a target data type and a target historical time period, and the data acquisition module is further configured to:
[0033] sequentially obtain the plurality of target operation data within the target historical time period from the historical operation data stored in the server in the specified order, where the data type of the target operation data is the target data type.
[0034] Optionally, the operation execution module is further configured to:
[0035] when the number of the target operation data stored in the preset queue is greater than or equal to a preset quantity threshold, sequentially read the target operation data from the preset queue at preset time intervals.
[0036] Optionally, the device further comprises:
[0037] a thread creation module, configured to create a first sub-thread and a second sub-thread through the main thread;
[0038] the data acquisition module is further configured to:
[0039] sequentially obtain the plurality of target operation data from the historical operation data of the vehicle stored in the server in the specified order through the first sub-thread.
[0040] Optionally, the device further comprises:
[0041] a first data sending module, configured to sequentially send the target operation data to the main thread in the specified order through the first sub-thread;
[0042] A second data sending module, configured to send the target operation data to the second sub-thread through the main thread in the specified order;
[0043] The operation execution module is further configured to:
[0044] Parallelly execute the data storage operation and the data reading operation through the second sub-thread.
[0045] Optionally, the device further includes:
[0046] A third data sending module, configured to send the read target operation data to the main thread through the second sub-thread;
[0047] The data playback module is further configured to:
[0048] Play back the target operation data through the main thread.
[0049] Optionally, the data playback module is further configured to:
[0050] Perform rendering processing according to the target operation data to play back the operation scenario of the vehicle.
[0051] In a third aspect, the present disclosure provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the method described in the first aspect of the present disclosure are implemented.
[0052] In a fourth aspect, the present disclosure provides an electronic device, including:
[0053] A memory, on which a computer program is stored;
[0054] A processor, configured to execute the computer program in the memory to implement the steps of the method described in the first aspect of the present disclosure.
[0055] Through the above technical solution, in response to receiving a data playback instruction, a plurality of target operation data are sequentially obtained from the historical operation data of the vehicle stored in the server in a specified order, where the historical operation data includes the operation data of the vehicle within a historical time period; the data storage operation and the data reading operation are executed in parallel, the data storage operation includes sequentially storing the target operation data in a preset queue in the specified order, and the data reading operation includes reading the target operation data from the preset queue; the read target operation data is played back. That is to say, when the present disclosure stores the target operation data obtained from the server in the preset queue, the target operation data can be read from the preset queue in parallel, and the read target operation data is played back. In this way, the time consumption for obtaining data can be shortened, thereby improving the efficiency of system debugging.
[0056] Other features and advantages of the present disclosure will be described in detail in the following specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings are used to provide a further understanding of the present disclosure, and constitute a part of the specification. Together with the following specific implementation, they are used to explain the present disclosure, but do not constitute a limitation to the present disclosure. In the accompanying drawings:
[0058] Figure 1 is a flowchart of a data playback method shown according to an exemplary embodiment of the present disclosure;
[0059] Figure 2 is a flowchart of another data playback method shown according to an exemplary embodiment of the present disclosure;
[0060] Figure 3 is a block diagram of a data playback device shown according to an exemplary embodiment of the present disclosure;
[0061] Figure 4 is a block diagram of a second data playback device shown according to an exemplary embodiment of the present disclosure;
[0062] Figure 5 is a block diagram of a third data playback device shown according to an exemplary embodiment of the present disclosure;
[0063] Figure 6 is a block diagram of a fourth data playback device shown according to an exemplary embodiment of the present disclosure;
[0064] Figure 7 is a block diagram of an electronic device shown according to an exemplary embodiment of the present disclosure. SPECIFIC IMPLEMENTATION
[0065] The following describes in detail the specific implementation of the present disclosure in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.
[0066] First, the application scenario of the present disclosure will be described. The present disclosure can be applied to an autonomous driving system. After the autonomous driving vehicle has completed its operation, the situation of the vehicle itself and the surrounding environment during the vehicle driving process can be reproduced by playing back the operation data of the vehicle to debug the autonomous driving system. In the related art, after the autonomous driving vehicle stops running, the operation data is sent to the server. The R & D personnel can download all the operation data to the local memory from the server and then play back the operation data locally. However, due to the large amount of operation data, it takes a long time to download all the operation data, resulting in low efficiency of system debugging.
[0067] To solve the above problems, the present disclosure provides a data playback method, apparatus, storage medium, and electronic device. During the process of storing the target operation data obtained from the server in a preset queue, the target operation data can be read from the preset queue in parallel, and the read target operation data can be played back. In this way, the time consumption for obtaining data can be shortened, thereby improving the efficiency of system debugging.
[0068] The present disclosure will be described below in conjunction with specific embodiments.
[0069] Figure 1 is a flowchart of a data playback method shown according to an exemplary embodiment of the present disclosure, as Figure 1 shown, the method may include:
[0070] S101. In response to receiving a data playback instruction, obtain a plurality of target operation data from the historical operation data of the vehicle stored in the server in a specified order.
[0071] Among them, the historical operation data includes the operation data of the vehicle within a historical time period. The operation data may include multiple pieces, and each operation data is the operation data of different devices of the vehicle at different time points. For example, the operation data may be the GPS (Global Positioning System) data of the vehicle at the first moment, or the sensor data of the vehicle at the first moment, or the GPS data of the vehicle at the second moment; the specified order may be the chronological order in which the vehicle obtains the target operation data.
[0072] In this step, after the vehicle stops running and sends all the operation data to the server, the user can trigger the data playback instruction through the data playback platform. After the data playback platform receives the data playback instruction, it can obtain a plurality of target operation data from the server in the specified order. For example, a preset number of target operation data can be obtained each time. The preset number can be determined according to the size of the target operation data. When the target operation data is large, the preset number can be 800. When the target operation data is small, the preset number can be 1000. The present disclosure does not limit the preset number.
[0073] In a possible implementation, the data playback instruction may include a target data type and a target historical time period. Multiple target operation data within the target historical time period can be sequentially obtained from the historical operation data stored in the server in the specified order, and the data type of the target operation data is the target data type. The target data type may include a sensor data type, a GPS data type, a driving speed data type, etc. The target historical time period may be the same as the historical time period or a partial time period within the historical time period. The data playback platform may generate the data playback instruction according to the target data type and the target historical time period. Then, according to the data playback instruction, the pending historical operation data corresponding to the target historical time period can be determined from the historical operation data, and then multiple target operation data can be determined from the pending historical operation data according to the target data type. After determining the multiple target operation data, the multiple target operation data can be sequentially obtained from the server in the specified order.
[0074] Exemplarily, the user can select the target data type and the target historical time period corresponding to the operation data to be played back through the data playback platform. For example, the target data type may be the GPS data type, and the target historical time period may be the historical time period. After the data playback platform selects the target data type and the target historical time period according to the user, the data playback instruction can be generated. Then, according to the data playback instruction, the pending historical operation data of the GPS data type can be searched in the historical operation data. The pending historical operation data includes all the GPS data types of the vehicle within the historical time period. Finally, the target GPS data whose acquisition time is within the target historical time period can be searched and obtained from the pending historical operation data, and the target GPS data is the target operation data.
[0075] It should be noted that the data playback platform can also determine the pending historical operation data corresponding to the target data type from the historical operation data according to the data playback instruction, and then determine multiple target operation data from the pending historical operation data according to the target historical time period.
[0076] S102. Execute the data storage operation and the data reading operation in parallel.
[0077] Among them, the data storage operation includes sequentially storing the target operation data in a preset queue in the specified order, and the data reading operation includes reading the target operation data from the preset queue.
[0078] In this step, during the process of obtaining multiple pieces of target operation data, the target operation data obtained each time can be stored in the preset queue. For example, if 1000 pieces of target operation data are obtained each time, the 1000 pieces of target operation data can be stored in the preset queue in the specified order in sequence. During the process of storing the target operation data, the preset queue can be periodically detected. If it is detected that the preset queue contains the stored target operation data, the target operation data is read from the preset queue.
[0079] It should be noted that during the process of performing this data reading operation, if the speed of reading data is slow, it may cause a lag phenomenon when playing back the data. In a possible implementation manner, when the number of target operation data stored in the preset queue is greater than or equal to a preset quantity threshold, the target operation data is read from the preset queue at preset time intervals in sequence, where the preset time interval can be determined according to the speed of data playback. For example, in the case of a faster data playback speed, a smaller preset time interval can be set. For example, the preset time interval can be 50 ms. In the case of a slower data playback speed, a larger preset time interval can be set. For example, the preset time interval can be 100 ms. The present disclosure does not limit this. The preset quantity threshold can be set in advance according to the experiment. For example, the preset quantity threshold can be 1000.
[0080] S103. Play back the read target operation data.
[0081] In this step, after the target operation data is read from the preset queue, the read target operation data can be directly played back.
[0082] By using the above method, during the process of storing the target operation data obtained from the server in the preset queue, the target operation data can be read from the preset queue in parallel, and the read target operation data is played back. In this way, the time consumption for obtaining data can be shortened, thereby improving the efficiency of system debugging.
[0083] Figure 2 is a flowchart of another data playback method shown according to an exemplary embodiment of the present disclosure. As Figure 2 shown, the method may include:
[0084] S201. In response to receiving a data playback instruction, create a first sub-thread and a second sub-thread through the main thread.
[0085] Among them, the main thread can be created when the client that responds to the data playback instruction is started. For example, in the case where the client is a data playback platform, when the data playback platform is started, the main thread can be created.
[0086] In this step, when the client responding to the data playback instruction is the data playback platform, the main thread can be created when the data playback platform starts. The main thread is used to receive instructions triggered by the user. After the main thread receives the data playback instruction triggered by the user, the first sub-thread and the second sub-thread can be created first.
[0087] S202. Through the first sub-thread, obtain multiple target operation data from the historical operation data of the vehicle stored in the server in the specified order.
[0088] Wherein, the specified order can be the chronological order in which the vehicle obtains the target operation data.
[0089] In this step, after the main thread creates the first sub-thread, a data reading instruction can be sent to the first sub-thread. The data reading instruction can include URL (Uniform Resource Locator) parameter information. After receiving the data reading instruction, the first sub-thread can obtain multiple target operation data from the historical operation data of the vehicle stored in the server in the specified order according to the URL parameter information in the data reading instruction.
[0090] S203. Through the first sub-thread, send the target operation data to the main thread in the specified order.
[0091] In this step, during the process of the first sub-thread obtaining multiple target operation data from the server, the target operation data obtained each time can be sent to the main thread in the specified order. For example, if the first sub-thread obtains 1000 target operation data each time, after obtaining the 1000 target operation data, the first sub-thread can send the 1000 target operation data to the main thread in the specified order.
[0092] It should be noted that before the vehicle sends the historical operation data to the server, the historical operation data can be compressed to reduce the data transmission time between the vehicle and the server and improve the data transmission efficiency. In this way, the target operation data obtained by the first sub-thread from the server is the compressed historical operation data. In a possible implementation manner, after the first sub-thread obtains multiple target operation data, the target operation data can be processed in a preset format conversion manner, and the target operation data after format processing can be sent to the main thread. Wherein, the preset format conversion manner can be determined according to the processing manner of the vehicle for the historical operation data. For example, if the vehicle converts the historical operation data into binary data and then sends it to the server, the preset format conversion manner can be to convert the binary data into operation data.
[0093] S204. Through this main thread, send the target operation data to the second sub-thread in the specified order.
[0094] In this step, after receiving the target operation data sent by the first sub-thread, the main thread can send the received target operation data to the second sub-thread. For example, if the main thread receives 1000 pieces of target operation data sent by the first sub-thread, the main thread can send the 1000 pieces of target operation data to the second sub-thread in the specified order.
[0095] S205. Through the second sub-thread, perform the data storage operation and the data reading operation in parallel.
[0096] Among them, the data storage operation includes storing the target operation data in a preset queue in the specified order in sequence, and the data reading operation includes reading the target operation data from the preset queue.
[0097] In this step, after receiving the target operation data sent by the main thread, the second sub-thread can store the target operation data in the preset queue in the specified order in sequence. And during the process of the second sub-thread storing the target operation data, it can periodically detect the preset queue. When it detects that there is target operation data stored in the preset queue, it can read the target operation data from the preset queue at preset time intervals in sequence.
[0098] In order to avoid jamming during data playback, the second sub-thread can periodically obtain the quantity of the target operation data in the preset queue. When the quantity of the target operation data is greater than or equal to a preset quantity threshold, read the target operation data from the preset queue.
[0099] S206. Through the second sub-thread, send the read target operation data to the main thread.
[0100] S207. Through the main thread, playback the target operation data.
[0101] In this step, after receiving the target operation data sent by the second sub-thread, the main thread can perform rendering processing based on the target operation data and playback the target operation data. For example, when the client responding to the data playback instruction is a data playback platform, the main thread of the data playback platform can update the data of the corresponding module according to the target operation data. For example, if the target operation data is GPS data, it can update the data of the GPS module according to the target operation data. Then, perform rendering processing through the rendering method of the existing technology to reproduce the running scene of the vehicle in 3D form.
[0102] Using the above method, the target operation data is obtained from the server through the first sub-thread, stored in a preset queue through the second sub-thread, and the target operation data is read from the preset queue in parallel and sent to the main thread for playback. In this way, the time-consuming for obtaining data can be shortened, thereby improving the efficiency of system debugging.
[0103] Figure 3 FIG. is a block diagram of a data playback device according to an exemplary embodiment of the present disclosure, as Figure 3 shown, the device may include:
[0104] A data acquisition module 301, configured to, in response to receiving a data playback instruction, sequentially obtain a plurality of target operation data from the historical operation data of the vehicle stored in the server in a specified order, where the historical operation data includes the operation data of the vehicle within a historical time period;
[0105] An operation execution module 302, configured to perform a data storage operation and a data reading operation in parallel, where the data storage operation includes sequentially storing the target operation data in a preset queue in the specified order, and the data reading operation includes reading the target operation data from the preset queue;
[0106] A data playback module 303, configured to playback the read target operation data.
[0107] Optionally, the data playback instruction includes a target data type and a target historical time period, and the data acquisition module 301 is further configured to:
[0108] Sequentially obtain a plurality of the target operation data within the target historical time period from the historical operation data stored in the server, where the data type of the target operation data is the target data type.
[0109] Optionally, the operation execution module 302 is further configured to:
[0110] When the number of the target operation data stored in the preset queue is greater than or equal to a preset quantity threshold, sequentially read the target operation data from the preset queue at a preset time interval.
[0111] Optionally, Figure 4 FIG. is a block diagram of a second data playback device according to an exemplary embodiment of the present disclosure, as Figure 4 shown, the device further includes:
[0112] A thread creation module 304, configured to create a first sub-thread and a second sub-thread through the main thread;
[0113] The data acquisition module 301 is further configured to:
[0114] Through the first sub-thread, sequentially obtain multiple pieces of the target operation data from the historical operation data of the vehicle stored in the server according to the specified order.
[0115] Optionally, Figure 5 is a block diagram of a third data playback device shown according to an exemplary embodiment of the present disclosure. As Figure 5 shown, the device further includes:
[0116] A first data sending module 305, configured to send the target operation data to the main thread through the first sub-thread according to the specified order;
[0117] A second data sending module 306, configured to send the target operation data to the second sub-thread through the main thread according to the specified order;
[0118] The operation execution module 302 is further configured to:
[0119] Parallelly execute the data storage operation and the data reading operation through the second sub-thread.
[0120] Optionally, Figure 6 is a block diagram of a fourth data playback device shown according to an exemplary embodiment of the present disclosure. As Figure 6 shown, the device further includes:
[0121] A third data sending module 307, configured to send the read target operation data to the main thread through the second sub-thread;
[0122] The data playback module 303 is further configured to:
[0123] Play back the target operation data through the main thread.
[0124] Optionally, the data playback module 303 is further configured to:
[0125] Perform rendering processing according to the target operation data to play back the operation scenario of the vehicle.
[0126] Through the above device, when storing the target operation data obtained from the server in the preset queue, the target operation data can be read from the preset queue in parallel, and the read target operation data can be played back. In this way, the time consumption for obtaining data can be shortened, thereby improving the efficiency of system debugging.
[0127] Regarding the device in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method, and will not be elaborated here.
[0128] Figure 7 is a block diagram of an electronic device 700 shown according to an exemplary embodiment of the present disclosure. As Figure 7 shown, the electronic device 700 may include: a processor 701, a memory 702. The electronic device 700 may further include one or more of a multimedia component 703, an input / output (I / O) interface 704, and a communication component 705.
[0129] Among them, the processor 701 is used to control the overall operation of the electronic device 700 to complete all or part of the steps in the above data playback method. The memory 702 is used to store various types of data to support the operation of the electronic device 700. Such data may include, for example, instructions for any application or method operating on the electronic device 700, as well as application-related data, such as contact data, received and sent messages, pictures, audio, video, and so on. The memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disc. The multimedia component 703 may include a screen and an audio component. The screen can be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal can be further stored in the memory 702 or sent through the communication component 705. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 704 provides an interface between the processor 701 and other interface modules, and the above other interface modules can be a keyboard, a mouse, buttons, etc. These buttons can be virtual buttons or physical buttons. The communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them is not limited herein. Therefore, the corresponding communication component 705 may include: a Wi-Fi module, a Bluetooth module, an NFC module, and so on.
[0130] In an exemplary embodiment, the electronic device 700 can be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components, and is used to execute the above data playback method.
[0131] In another exemplary embodiment, a computer-readable storage medium including program instructions is further provided. When the program instructions are executed by a processor, the steps of the above data playback method are implemented. For example, the computer-readable storage medium can be the above memory 702 including program instructions, and the above program instructions can be executed by the processor 701 of the electronic device 700 to complete the above data playback method.
[0132] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program that can be executed by a programmable device, and the computer program has a code portion for executing the above data playback method when executed by the programmable device.
[0133] The preferred embodiments of the present disclosure have been described in detail above with reference to the accompanying drawings. However, the present disclosure is not limited to the specific details in the above embodiments. Within the scope of the technical concept of the present disclosure, various simple modifications can be made to the technical solutions of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure. Additionally, it should be noted that, in the above specific embodiments, the various specific technical features described can be combined in any suitable manner without conflict. To avoid unnecessary repetition, the present disclosure does not separately describe various possible combination manners.
[0134] In addition, any combination can be made between various different embodiments of the present disclosure as long as it does not violate the idea of the present disclosure, and it should also be regarded as the content disclosed by the present disclosure.
Claims
1. A data playback method, characterized in that, the method includes: in response to receiving a data playback instruction, sequentially obtaining a plurality of target operation data from the historical operation data of an autonomous vehicle stored in a server in a specified order, where the historical operation data includes the operation data of the autonomous vehicle within a historical time period; performing a data storage operation and a data read operation in parallel, where the data storage operation includes sequentially storing the target operation data in a preset queue in the specified order, and the data read operation includes reading the target operation data from the preset queue; performing a rendering process according to the target operation data to playback the operation scenario of the autonomous vehicle, where the target operation data at least includes a sensor data type, a GPS data type, and a driving speed data type; the data playback instruction includes a target data type and a target historical time period, and the step of in response to receiving a data playback instruction, sequentially obtaining a plurality of target operation data from the historical operation data of an autonomous vehicle stored in a server in a specified order includes: sequentially obtaining a plurality of the target operation data within the target historical time period from the historical operation data stored in the server in the specified order, where the data type of the target operation data is the target data type; before sequentially obtaining a plurality of target operation data from the historical operation data of an autonomous vehicle stored in a server in a specified order, the method further includes: creating a first sub-thread and a second sub-thread through a main thread; and the step of sequentially obtaining a plurality of target operation data from the historical operation data of an autonomous vehicle stored in a server in a specified order includes: sequentially obtaining a plurality of the target operation data from the historical operation data of the autonomous vehicle stored in the server in the specified order through the first sub-thread; the step of reading the target operation data from the preset queue includes: in a case where the number of the target operation data stored in the preset queue is greater than or equal to a preset quantity threshold, sequentially reading the target operation data from the preset queue at preset time intervals; before performing the data storage operation and the data read operation in parallel, the method further includes: sending the target operation data to the main thread in the specified order through the first sub-thread; sending the target operation data to the second sub-thread in the specified order through the main thread; and the step of performing the data storage operation and the data read operation in parallel includes: performing the data storage operation and the data read operation in parallel through the second sub-thread.
2. The method according to claim 1, characterized in that, before playing back the read target operation data, the method further includes: sending the read target operation data to the main thread through the second sub-thread; and the step of playing back the read target operation data includes: playing back the target operation data through the main thread.
3. A data playback device, characterized in that, The device includes: a data acquisition module, configured to, in response to receiving a data playback instruction, sequentially obtain a plurality of target operation data from the historical operation data of an autonomous vehicle stored in a server in a specified order. The historical operation data includes the operation data of the autonomous vehicle within a historical time period. Before sequentially obtaining the plurality of target operation data from the historical operation data of the autonomous vehicle stored in the server in the specified order, it further includes: creating a first sub-thread and a second sub-thread through the main thread; the sequentially obtaining the plurality of target operation data from the historical operation data of the autonomous vehicle stored in the server in the specified order includes: through the first sub-thread, sequentially obtaining the plurality of target operation data from the historical operation data of the autonomous vehicle stored in the server in the specified order; an operation execution module, configured to perform a data storage operation and a data read operation in parallel. The data storage operation includes sequentially storing the target operation data in a preset queue in the specified order, and the data read operation includes reading the target operation data from the preset queue; a data playback module, configured to perform rendering processing based on the target operation data to playback the operation scenario of the autonomous vehicle. The target operation data at least includes a sensor data type, a GPS data type, and a driving speed data type; The data playback instruction includes a target data type and a target historical time period. The sequentially obtaining a plurality of target operation data from the historical operation data of the autonomous vehicle stored in the server in a specified order in response to receiving the data playback instruction includes: sequentially obtaining the plurality of target operation data within the target historical time period from the historical operation data stored in the server in the specified order, and the data type of the target operation data is the target data type; The reading the target operation data from the preset queue includes: when the number of the target operation data stored in the preset queue is greater than or equal to a preset quantity threshold, sequentially reading the target operation data from the preset queue at preset time intervals; Before performing the data storage operation and the data read operation in parallel, it further includes: through the first sub-thread, sending the target operation data to the main thread in the specified order; through the main thread, sending the target operation data to the second sub-thread in the specified order; the performing the data storage operation and the data read operation in parallel includes: through the second sub-thread, performing the data storage operation and the data read operation in parallel.
4. A computer-readable storage medium, on which a computer program is stored, characterized in that, when the program is executed by a processor, it implements the steps of the method according to any one of claims 1-2.
5. An electronic device, characterized in that, it includes: a memory, on which a computer program is stored; a processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1-2.
Citation Information
Patent Citations
Method and system for replaying vehicle historical traveling track
CN103927795A
Data reading and writing method and device based on asynchronous annular buffer area
CN110704335A