CN-121979841-A - Vehicle data processing method and device, vehicle and electronic equipment
Abstract
The application relates to a vehicle data processing method, a device, a vehicle and electronic equipment, wherein the method comprises the steps of obtaining a data file of the vehicle; the method comprises the steps of reading all binary files in a data file in parallel through a plurality of reading threads to obtain data of each binary file, writing the data into a memory, distributing the data of each binary file to an analysis thread pool, analyzing the corresponding data by the analysis thread pool to obtain various structured data, performing time alignment on the various structured data to obtain combined frame data, and serializing the combined frame data into a playable file. According to the application, the data are read through a plurality of threads, and the data are analyzed in parallel through a plurality of analysis thread pools, so that different types of data are uniformly processed, the efficiency of obtaining the playable file is improved, and the problem of low efficiency of obtaining the playable file according to the vehicle data is solved.
Inventors
- TAO JI
- DONG YIJIANG
- CONG WEILUN
- JIANG HAO
- LI ZHIHAO
- WANG HAO
Assignees
- 重庆长安汽车股份有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260407
Claims (10)
- 1. A method of processing vehicle data, comprising: acquiring a data file of a vehicle, wherein the data file is a file obtained by packaging vehicle data, and the vehicle data is data acquired by a sensor in the vehicle; Reading all binary files in the data file in parallel through a plurality of reading threads to obtain the data of each binary file, and writing the data into a memory; determining a memory block in which data belonging to the same binary file in the memory is located by reading the topic data of the binary file in the proto file of the data file, and distributing the memory block to an analysis thread pool; Analyzing the corresponding data by the analysis thread pool to obtain various structured data; time alignment is carried out on the multiple structured data to obtain combined frame data; the combined frame data is serialized into a playable file.
- 2. The method of claim 1, wherein prior to reading all binary files in the data file in parallel by a plurality of read threads, the method further comprises: Reading metadata of a file system, wherein the metadata of the file system are recorded metadata by calling the file system in the process of packaging the vehicle data into a data file, and the metadata at least comprise file sizes of binary files in the data file; And distributing each binary file in the data files to one of the plurality of reading threads according to the metadata.
- 3. The method of claim 1, wherein parsing the respective data by the parsing thread pool to obtain a plurality of structured data comprises: If the data is the data of the video type, calling a video decoder by using an analysis thread pool to analyze the data into a video format file, wherein a video frame in the video format file is provided with a time stamp; If the data is radar point cloud type data, the data is resolved into drc files by using a resolution thread Chi Diaoyong radar decoder, and the data in the drc files are provided with time stamps.
- 4. The method of claim 3, wherein time-aligning the plurality of structured data to obtain combined frame data comprises: Determining a plurality of target time stamps by taking the time stamps of the video frames as references; searching data of which the time interval is within a preset interval from the time interval of the time stamp and the target time stamp from the data in the drc file in each target time stamp; Taking the searched data and the video frame of the target time stamp as a frame combination frame; And acquiring a combined frame of each target time stamp to obtain the combined frame data.
- 5. The method of claim 4, wherein after time-aligning the plurality of structured data to obtain combined frame data, the method further comprises: generating a two-dimensional point for each field in each frame of data in the combined frame of data according to the target timestamp; And generating a field curve according to the two-dimensional points.
- 6. The method of claim 5, wherein after serializing the combined frame data into a playable file, the method further comprises: and respectively adopting different threads to upload the playable file, the field curve, the video format file and the drc file to a server in parallel.
- 7. A processing apparatus for vehicle data, comprising: The acquisition module is used for acquiring a data file of the vehicle, wherein the data file is a file obtained by packaging vehicle data, and the vehicle data is acquired by a sensor in the vehicle; The reading module is used for reading all binary files in the data files in parallel through a plurality of reading threads to obtain the data of each binary file, and writing the data into the memory; The allocation module is used for allocating different analysis thread pools for the data belonging to different binary files in the memory according to the types of the binary files; the analysis module is used for analyzing the corresponding data by the analysis thread pool to obtain various structured data; the alignment module is used for carrying out time alignment on the plurality of structured data to obtain combined frame data; And the processing module is used for serializing the combined frame data into a playable file.
- 8. The apparatus of claim 7, wherein the parsing module comprises: And the analyzing unit is used for calling a video decoder to analyze the data into a video format file by using an analyzing thread pool if the data is the data of the video type, wherein a video frame in the video format file is provided with a time stamp, and analyzing the data into a drc file by using an analyzing thread Chi Diaoyong radar decoder if the data is the data of the radar point cloud type, and the data in the drc file is provided with the time stamp.
- 9. A vehicle, characterized by comprising: The sensor is used for collecting vehicle data; further comprising a processing device for vehicle data according to claim 8.
- 10. The vehicle data processing device is characterized by comprising at least one communication interface, at least one bus connected with the at least one communication interface, at least one processor connected with the at least one bus, at least one memory connected with the at least one bus, wherein the processor is configured to acquire a vehicle data file, the vehicle data is a file obtained by packaging vehicle data, the vehicle data is data acquired by a sensor in the vehicle, all binary files in the data file are read in parallel through a plurality of reading threads to obtain the data of each binary file, the data are written into a memory, different analysis thread pools are allocated to the data belonging to different binary files in the memory according to the types of the binary files, the corresponding data are analyzed by the analysis thread pools to obtain various structured data, the various structured data are time aligned to obtain combined frame data, and the combined frame data are sequenced into playable files.
Description
Vehicle data processing method and device, vehicle and electronic equipment Technical Field The invention relates to the technical field of automobiles, in particular to a vehicle data processing method and device, a vehicle and electronic equipment. Background When the vehicle is tested or used, data can be collected through sensors on the vehicle, the collected data is used for uploading to a server, and the server analyzes the state of the vehicle so as to monitor or control the vehicle. The data collected by the sensors may be referred to as vehicle data. When uploading the vehicle data to the server, the vehicle data are collected by different sensors and relate to data in different aspects, so that when uploading the vehicle data to the server, the vehicle data need to be processed separately and then aligned, and then the synchronous playable file can be obtained. Therefore, the process of obtaining the playable file from the vehicle data is complicated, resulting in low efficiency of obtaining the playable file from the vehicle data. Disclosure of Invention The application provides a vehicle data processing method and device, a vehicle and electronic equipment, and aims to solve the problem of low efficiency in acquiring playable files according to vehicle data. The application provides a vehicle data processing method, which comprises the steps of obtaining a vehicle data file, wherein the data file is a file obtained by packaging vehicle data, the vehicle data is data acquired by a sensor in the vehicle, reading all binary files in the data file in parallel through a plurality of reading threads to obtain data of each binary file, writing the data into a memory, determining a memory block in which the data belonging to the same binary file in the memory is located through reading the topic data of the binary file in the proto file of the data file, distributing the memory block to an analysis thread pool, analyzing the corresponding data through the analysis thread pool to obtain various structured data, performing time alignment on the various structured data to obtain combined frame data, and serializing the combined frame data into a playable file. The method further comprises the step of reading metadata of a file system before all binary files in the data files are read in parallel through a plurality of reading threads, wherein the metadata of the file system are metadata recorded through calling the file system in the process of packaging vehicle data into the data files, the metadata at least comprise file sizes of the binary files in the data files, and each binary file in the data files is distributed to one reading thread in the plurality of reading threads according to the metadata. According to the method and the device, the plurality of binary files are distributed to the plurality of reading threads according to the file sizes of the binary files in the metadata of the file system, so that the balanced distribution of the reading tasks of the binary files is realized, and the efficiency of the plurality of reading threads for reading the plurality of binary files in parallel is further improved. The parsing thread pool is used for parsing corresponding data to obtain various structured data, wherein the various structured data comprise that if the data are data of a video type, a video decoder is called by using the parsing thread pool to parse the data into a video format file, a video frame in the video format file is provided with a time stamp, and if the data are data of a radar point cloud type, the data are parsed by using a parsing thread Chi Diaoyong radar decoder into a drc file, and the data in a drc file are provided with the time stamp. According to the application, the binary byte stream is analyzed by adopting different thread pools according to different data types, so that the binary byte stream of a specific type can be analyzed by dividing the specific thread pool, and the analysis efficiency of the binary byte stream is improved. The method comprises the steps of carrying out time alignment on multiple structured data to obtain combined frame data, wherein the time alignment is carried out on the multiple structured data, the combined frame data comprises the steps of determining multiple target time stamps by taking time stamps of video frames as references, searching data, in which time intervals of the time stamps and the target time stamps are within preset intervals, from data in drc files in each target time stamp, taking the searched data and the video frames of the target time stamps as a frame of combined frame, and obtaining the combined frame of each target time stamp to obtain combined frame data. According to the method and the device for processing the vehicle data, the target time stamp is determined, so that the video frame is aligned with the radar point cloud data in the drc file in time, the effect of combining the structured data into the align