A data compression storage method and device for a vehicle automatic driving system
By using Io_uring technology and QAT chips for data compression and storage in the vehicle's autonomous driving system, the problem of limited CPU resources is solved, the efficiency of data compression and storage is significantly improved, and faster data processing is achieved.
Patent Information
- Application Number
- CN202111306515.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-05
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2041-11-05
AI Technical Summary
During the data compression and storage process of the vehicle autonomous driving system, CPU resources are limited. Traditional compression methods are slow and occupy a large amount of CPU resources, resulting in low efficiency.
Io_uring technology is used to build a shared memory ring queue between the Linux kernel and user programs, QAT chips are used for data compression and storage, and DMA technology is used to optimize data transmission, reduce CPU overhead and increase calculation speed.
Through Io_uring technology, the system overhead of data reading and writing is reduced, and the parallel computing power of the QAT chip is used to significantly increase the data compression speed, save CPU resources, and improve the efficiency of data compression and storage.
Smart Images

Figure CN114153383B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of autonomous driving technology, and in particular to a data compression and storage method and device for a vehicle autonomous driving system. Background Art
[0002] The vehicle's autonomous driving system is equipped with a large number of sensors including cameras and lidar. During the operation of the autonomous driving system, these sensors need to collect and process massive amounts of data in real time to help the autonomous driving system perceive its real-time environment and make normal decisions. At the same time, we need to store these large amounts of data, including logs generated during system operation, for subsequent data training or system analysis.
[0003] Due to the limited storage space on the vehicle, we need to copy and transfer this data from the vehicle platform regularly. Since the amount of data is very large, in order to improve the efficiency of transmission and copying and save space, the data needs to be compressed first. However, the CPU computing resources of the vehicle's autonomous driving system are limited, so it is crucial to effectively use the CPU and bus bandwidth for data compression and storage.
[0004] At present, the more common compression method is to use CPU calculation, using the more common compression formats such as gzip, 7z, zstd, etc. The CPU uses traditional reading and writing methods, such as using pread and pwrite interfaces to read and write disks. After the calculation and compression are completed, the compressed files are written to the disk. Using the above method to compress and store data, the CPU compression method will occupy a lot of CPU resources and is slow. Summary of the invention
[0005] The embodiments of the present application provide a data compression and storage method and device for a vehicle autonomous driving system, which can improve the compression and storage speed of vehicle autonomous driving data.
[0006] To solve the above problems, an embodiment of the present invention provides a data compression and storage method for an automatic driving system of a vehicle, comprising:
[0007] A shared memory circular queue is constructed between the Linux kernel running space and the user program running space, and a read request for the disk is submitted to the circular queue, so that the Linux kernel obtains the read request from the circular queue and reads the data to be compressed from the disk according to the request;
[0008] Compressing the data to be compressed by using a QAT chip to obtain compressed data;
[0009] Submitting a write request to the disk to a circular queue, so that the Linux kernel obtains the write request from the circular queue and stores the compressed data in the disk according to the write request.
[0010] Further, the ring queue includes: a submission queue and a completion queue;
[0011] Submitting the read request to the disk to the circular queue so that the Linux kernel obtains the read request from the circular queue and reads the data to be compressed from the disk according to the request, specifically includes:
[0012] The queue items of the circular queue are processed simultaneously in a lock-free manner through the Linux kernel running space and the user program running space. When the queue items of the circular queue are processed, a read request for the disk is submitted to the submission queue, so that the Linux kernel obtains the read request from the submission queue and reads the data to be compressed from the disk according to the request, and then after completing the reading of the data to be compressed, the read completion status information is fed back to the completion queue.
[0013] Furthermore, after reading the data to be compressed from the disk, the method further includes: writing the data to be compressed into a memory, so that the QAT chip reads the data to be compressed from the memory through a DMA technology.
[0014] Furthermore, after obtaining the compressed data, it also includes: writing the compressed data into the memory through DMA technology, and then reading the compressed data from the memory through DMA technology before storing the compressed data into the disk.
[0015] Further, compressing the data to be compressed by the QAT chip specifically includes:
[0016] According to the data volume of the data to be compressed, the configuration parameters of the large memory page during compression are determined; and the data to be compressed is compressed according to the determined configuration parameters of the large memory page.
[0017] Furthermore, it also includes: obtaining vehicle hardware configuration information, and determining whether the vehicle supports Io_uring technology and whether it is equipped with a QAT chip according to the vehicle hardware configuration information;
[0018] If it is determined according to the vehicle hardware configuration information that the vehicle does not support Io_uring technology and is not equipped with a QAT chip, the data to be compressed is read from the disk through the pread interface and the data to be compressed is compressed through the CPU to obtain compressed data; the compressed data is stored in the disk through the pwrite interface;
[0019] If it is determined according to the vehicle hardware configuration information that the vehicle does not support Io_uring technology and is equipped with a QAT chip, the data to be compressed is read from the disk through the pread interface and the data to be compressed is compressed through the QAT chip to obtain compressed data; the compressed data is stored in the disk through the pwrite interface;
[0020] If it is determined according to the vehicle hardware configuration information that the vehicle supports Io_uring technology and is not equipped with a QAT chip, a shared memory circular queue is constructed between the Linux kernel running space and the user program running space, and a read request to the disk is submitted to the circular queue, so that the Linux kernel obtains the read request from the circular queue and reads the data to be compressed from the disk according to the request; the data to be compressed is compressed by the CPU to obtain compressed data; a write request to the disk is submitted to the circular queue, so that the Linux kernel obtains the write request from the circular queue and stores the compressed data in the disk according to the write request;
[0021] If it is determined based on the vehicle hardware configuration information that the vehicle supports Io_uring technology and is equipped with a QAT chip, a shared memory circular queue is constructed between the Linux kernel running space and the user program running space, and a read request for the disk is submitted to the circular queue, so that the Linux kernel obtains the read request from the circular queue and reads the data to be compressed from the disk accordingly; the data to be compressed is compressed by the QAT chip to obtain compressed data; and a write request to the disk is submitted to the circular queue, so that the Linux kernel obtains the write request from the circular queue and stores the compressed data in the disk according to the write request.
[0022] Based on the above method embodiment, the present invention provides a corresponding device embodiment;
[0023] An embodiment of the present invention provides a data compression storage device for a vehicle automatic driving system, comprising: a data reading module, a data compression module and a data storage module;
[0024] Data reading module, data compression module and data storage module;
[0025] The data reading module is used to construct a shared memory circular queue between the Linux kernel running space and the user program running space, and submit a read request for the disk to the circular queue, so that the Linux kernel obtains the read request from the circular queue and reads the data to be compressed from the disk according to the request;
[0026] The data compression module is used to compress the data to be compressed through the QAT chip to obtain compressed data;
[0027] The data storage module is used to submit a write request to the disk to the circular queue, so that the Linux kernel obtains the write request from the circular queue and stores the compressed data in the disk according to the write request.
[0028] Furthermore, it also includes a memory processing module; the memory processing module is used to write the data to be compressed into the memory after reading the data to be compressed from the disk, so that the QAT chip reads the data to be compressed from the memory through the DMA technology.
[0029] Furthermore, the memory processing module is also used to write the compressed data into the memory through DMA technology after obtaining the compressed data, and then read the compressed data from the memory through DMA technology before storing the compressed data to the disk.
[0030] Furthermore, it also includes a data processing module; the data processing module obtains the vehicle hardware configuration information, and determines whether the vehicle supports Io_uring technology and whether it is equipped with a QAT chip according to the vehicle hardware configuration information;
[0031] If it is determined according to the vehicle hardware configuration information that the vehicle does not support Io_uring technology and is not equipped with a QAT chip, the data to be compressed is read from the disk through the preadv interface and the data to be compressed is compressed by the CPU to obtain compressed data; the compressed data is stored in the disk through the pwritev interface;
[0032] If it is determined according to the vehicle hardware configuration information that the vehicle does not support Io_uring technology and is equipped with a QAT chip, the data to be compressed is read from the disk through the preadv interface and the data to be compressed is compressed through the QAT chip to obtain compressed data; the compressed data is stored in the disk through the pwritev interface;
[0033] If it is determined according to the vehicle hardware configuration information that the vehicle supports Io_uring technology and is not equipped with a QAT chip, a shared memory circular queue is constructed between the Linux kernel running space and the user program running space, and a read request to the disk is submitted to the circular queue, so that the Linux kernel obtains the read request from the circular queue and reads the data to be compressed from the disk according to the request; the data to be compressed is compressed by the CPU to obtain compressed data; a write request to the disk is submitted to the circular queue, so that the Linux kernel obtains the write request from the circular queue and stores the compressed data in the disk according to the write request;
[0034] If it is determined based on the vehicle hardware configuration information that the vehicle supports Io_uring technology and is equipped with a QAT chip, a shared memory circular queue is constructed between the Linux kernel running space and the user program running space, and a read request for the disk is submitted to the circular queue, so that the Linux kernel obtains the read request from the circular queue and reads the data to be compressed from the disk accordingly; the data to be compressed is compressed by the QAT chip to obtain compressed data; and a write request to the disk is submitted to the circular queue, so that the Linux kernel obtains the write request from the circular queue and stores the compressed data in the disk according to the write request.
[0035] Implementing the embodiments of the present invention has the following beneficial effects:
[0036] The embodiment of the present invention provides a data compression and storage method and device for a vehicle automatic driving system. The method constructs a shared memory circular queue between the Linux kernel running space and the user program running space based on the Io_uring technology, and then reads the data to be compressed in the disk based on the constructed circular queue; the Io_uring technology is an asynchronous disk read and write technology for the Linux system, which can effectively reduce the system overhead of reading and writing, and improve the speed. Then, when it is determined that the vehicle is equipped with a QAT chip according to the vehicle hardware configuration information, the QAT chip is used to compress the data, and finally the write request to the disk is submitted to the circular queue, so that the Linux kernel obtains the write request from the circular queue and stores the compressed data in the disk according to the write request. The QAT chip is a chip of Intel, which can realize the parallel optimization function of intensive computing based on the QAT technology and improve the computing speed. Compared with the prior art, the present invention uses the Io_uring technology to read and write data, which reduces the system overhead. In addition, the dedicated QAT chip is used to replace the CPU to compress the data, which effectively saves the CPU overhead in the compression process, and due to the parallel computing capability of the QAT chip, the speed of data compression is significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a flowchart of a data compression and storage method of a vehicle automatic driving system provided by one embodiment of the present invention;
[0038] Figure 2 It is a structural schematic diagram of a data compression storage device of a vehicle automatic driving system provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0040] like Figure 1 As shown, an embodiment of the present invention discloses a data compression and storage method for a vehicle automatic driving system, which at least includes the following steps:
[0041] Step S101: construct a shared memory circular queue between the Linux kernel running space and the user program running space, submit a read request for the disk to the circular queue, so that the Linux kernel obtains the read request from the circular queue and reads the data to be compressed from the disk accordingly.
[0042] Step S102: compressing the data to be compressed by using a QAT chip to obtain compressed data.
[0043] Step S103: submitting a write request to the disk to a circular queue, so that the Linux kernel obtains the write request from the circular queue and stores the compressed data in the disk according to the write request.
[0044] For step S101, in a preferred embodiment, the circular queue includes: a submission queue and a completion queue; submitting the read request to the disk to the circular queue so that the Linux kernel obtains the read request from the circular queue and reads the data to be compressed from the disk according to the request, specifically includes:
[0045] The queue items of the circular queue are processed simultaneously in a lock-free manner through the Linux kernel running space and the user program running space. When the queue items of the circular queue are processed, a read request for the disk is submitted to the submission queue, so that the Linux kernel obtains the read request from the submission queue and reads the data to be compressed from the disk according to the request, and then after completing the reading of the data to be compressed, the read completion status information is fed back to the completion queue.
[0046] Io_uring is a faster IO method supported after Linux 5.10. It forms a shared circular queue between the system Kernel and User Space through mmap. The circular queue is divided into a submission queue and a completion queue, which are responsible for submitting IO requests and receiving completion results respectively. Because the queue is circular, the Kernel and User Space can each keep a pointer to the location of their own work. This mechanism ensures that the Kernel and User Space can process the items in the queue without locks, greatly improving the efficiency of communication between users and the Kernel. Users submit IO requests to the submission queue, and the Kernel obtains the IO tasks to be performed from the queue. After completion, they are put into the completion queue, and the user finally obtains the execution results from the queue. At the same time, compared with the traditional IO method, users need system calls to switch between the Kernel and User Space, and copy IO data between the Kernel and User Space. Io_uring bypasses system calls and does not require copying (zero copy) through shared memory. Users can communicate directly with the Kernel through shared queues, greatly reducing the overhead of the entire process. Through the disk read and write functions supported by Io_uring, the data to be compressed is read from the disk, and the compressed data after subsequent compression is written to the disk, thereby speeding up the reading and writing process.
[0047] In a preferred embodiment, after reading the data to be compressed from the disk, the method further includes: writing the data to be compressed into a memory, so that the QAT chip reads the data to be compressed from the memory through DMA technology.
[0048] For step S102, in a preferred embodiment, compressing the data to be compressed by the QAT chip specifically includes: determining the configuration parameters of the huge page during compression according to the data amount of the data to be compressed; and compressing the data to be compressed according to the determined huge page configuration parameters.
[0049] In a preferred embodiment, after acquiring the compressed data, it also includes: writing the compressed data into the memory through DMA technology, and then reading the compressed data from the memory through DMA technology before storing the compressed data to the disk.
[0050] Indicatively, the configuration parameters of the above-mentioned large memory page include: the size of the large memory page (i.e., hugepage size), the QAT chip reads the data to be compressed from the memory through DMA technology, and then determines the hugepage size during compression according to the amount of data to be compressed, so that the hugepage size is greater than or equal to 10% of the amount of data to be compressed, and then compresses the data to be compressed according to the determined large memory page size, and writes the compressed data into the memory after compression through DMA technology. The QAT chip interacts directly with the memory through DMA technology, avoiding data copying and improving speed. At the same time, compression through the QAT dedicated chip and the chip's parallel computing capabilities can greatly improve the speed of the compression process and reduce the CPU's computing load.
[0051] For step S103, specifically, the stored compressed data is read from the memory and then based on the Io_uring technology, the write request to the disk is submitted to the ring queue, so that the Linux kernel obtains the write request from the ring queue and stores the compressed data in the disk according to the write request.
[0052] In a preferred embodiment, the method further includes: obtaining vehicle hardware configuration information, and determining whether the vehicle supports Io_uring technology and whether the vehicle is equipped with a QAT chip according to the vehicle hardware configuration information;
[0053] If it is determined according to the vehicle hardware configuration information that the vehicle does not support Io_uring technology and is not equipped with a QAT chip, the data to be compressed is read from the disk through the pread interface and the data to be compressed is compressed through the CPU to obtain compressed data; the compressed data is stored in the disk through the pwrite interface;
[0054] If it is determined according to the vehicle hardware configuration information that the vehicle does not support Io_uring technology and is equipped with a QAT chip, the data to be compressed is read from the disk through the pread interface and the data to be compressed is compressed through the QAT chip to obtain compressed data; the compressed data is stored in the disk through the pwrite interface;
[0055] If it is determined according to the vehicle hardware configuration information that the vehicle supports Io_uring technology and is not equipped with a QAT chip, a shared memory circular queue is constructed between the Linux kernel running space and the user program running space, and a read request to the disk is submitted to the circular queue, so that the Linux kernel obtains the read request from the circular queue and reads the data to be compressed from the disk according to the request; the data to be compressed is compressed by the CPU to obtain compressed data; a write request to the disk is submitted to the circular queue, so that the Linux kernel obtains the write request from the circular queue and stores the compressed data in the disk according to the write request;
[0056] If it is determined based on the vehicle hardware configuration information that the vehicle supports Io_uring technology and is equipped with a QAT chip, a shared memory circular queue is constructed between the Linux kernel running space and the user program running space, and a read request for the disk is submitted to the circular queue, so that the Linux kernel obtains the read request from the circular queue and reads the data to be compressed from the disk accordingly; the data to be compressed is compressed by the QAT chip to obtain compressed data; and a write request to the disk is submitted to the circular queue, so that the Linux kernel obtains the write request from the circular queue and stores the compressed data in the disk according to the write request.
[0057] Specifically, the configuration information of the hardware carried by the vehicle's automatic driving system is read to obtain the above-mentioned vehicle hardware configuration information; the preferred vehicle hardware configuration information includes: the Linux kernel version and the configuration information of the QAT chip (used to identify whether the vehicle is equipped with a QAT chip); if the read Linux kernel version is greater than version 5.10, it is determined that the vehicle supports Io_uring technology at this time, and then the data to be compressed in the disk is read through the above-mentioned Io_uring technology. If it is determined through the QAT chip configuration information that the vehicle is equipped with a QAT chip, the data to be compressed is compressed through the QAT chip, and the compressed data is stored in the memory.
[0058] Indicatively, if the Linux kernel version read is not greater than version 5.10, it is determined that the vehicle does not support Io_uring technology, and the data to be compressed in the disk is read in a traditional manner, such as using the preadv interface to read the data to be compressed from the disk; if the QAT chip configuration information determines that the vehicle is not equipped with a QAT chip, the CPU uses the more common gzip, 7z, zstd and other compression algorithms for compression. Thus, the data compression storage method of the vehicle automatic driving system disclosed in the present invention can be compatible with vehicles with different configurations.
[0059] Based on the above method embodiment, the present invention provides a corresponding device embodiment;
[0060] like Figure 2 As shown, an embodiment of the present invention provides a data compression storage device for a vehicle automatic driving system, comprising: a data reading module, a data compression module and a data storage module;
[0061] The data reading module is used to construct a shared memory circular queue between the Linux kernel running space and the user program running space, and submit a read request for the disk to the circular queue, so that the Linux kernel obtains the read request from the circular queue and reads the data to be compressed from the disk according to the request;
[0062] The data compression module is used to compress the data to be compressed through the QAT chip to obtain compressed data;
[0063] The data storage module is used to submit a write request to the disk to the circular queue, so that the Linux kernel obtains the write request from the circular queue and stores the compressed data in the disk according to the write request.
[0064] In a preferred embodiment, it also includes a memory processing module; the memory processing module is used to write the data to be compressed into the memory after reading the data to be compressed from the disk, so that the QAT chip reads the data to be compressed from the memory through DMA technology.
[0065] In a preferred embodiment, the memory processing module is also used to write the compressed data into the memory through DMA technology after obtaining the compressed data, and then read the compressed data from the memory through DMA technology before storing the compressed data to the disk.
[0066] In a preferred embodiment, it further includes a data processing module; the data processing module obtains vehicle hardware configuration information, and determines whether the vehicle supports Io_uring technology and whether it is equipped with a QAT chip according to the vehicle hardware configuration information;
[0067] If it is determined according to the vehicle hardware configuration information that the vehicle does not support Io_uring technology and is not equipped with a QAT chip, the data to be compressed is read from the disk through the preadv interface and the data to be compressed is compressed by the CPU to obtain compressed data; the compressed data is stored in the disk through the pwritev interface;
[0068] If it is determined according to the vehicle hardware configuration information that the vehicle does not support Io_uring technology and is equipped with a QAT chip, the data to be compressed is read from the disk through the preadv interface and the data to be compressed is compressed through the QAT chip to obtain compressed data; the compressed data is stored in the disk through the pwritev interface;
[0069] If it is determined according to the vehicle hardware configuration information that the vehicle supports Io_uring technology and is not equipped with a QAT chip, a shared memory circular queue is constructed between the Linux kernel running space and the user program running space, and a read request to the disk is submitted to the circular queue, so that the Linux kernel obtains the read request from the circular queue and reads the data to be compressed from the disk according to the request; the data to be compressed is compressed by the CPU to obtain compressed data; a write request to the disk is submitted to the circular queue, so that the Linux kernel obtains the write request from the circular queue and stores the compressed data in the disk according to the write request;
[0070] If it is determined based on the vehicle hardware configuration information that the vehicle supports Io_uring technology and is equipped with a QAT chip, a shared memory circular queue is constructed between the Linux kernel running space and the user program running space, and a read request for the disk is submitted to the circular queue, so that the Linux kernel obtains the read request from the circular queue and reads the data to be compressed from the disk accordingly; the data to be compressed is compressed by the QAT chip to obtain compressed data; and a write request to the disk is submitted to the circular queue, so that the Linux kernel obtains the write request from the circular queue and stores the compressed data in the disk according to the write request.
[0071] It should be noted that the above-mentioned device item embodiment corresponds to the method item embodiment of the present invention, which can implement the data compression storage method of the vehicle automatic driving system provided by any device item embodiment of the present invention. In addition, the device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiment provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines. Ordinary technicians in this field can understand and implement it without paying creative labor. The schematic diagram is only an example of a data compression storage device for a vehicle automatic driving system, and does not constitute a limitation on the data compression storage device for a vehicle automatic driving system. It may include more or fewer components than shown in the figure, or combine certain components, or different components.
[0072] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications are also considered to be within the scope of protection of the present application.
Claims
1. A data compression and storage method for a vehicle automatic driving system, characterized in that: include: A shared memory circular queue is constructed between the Linux kernel running space and the user program running space, and a read request for a disk is submitted to the circular queue, so that the Linux kernel obtains the read request from the circular queue and reads the data to be compressed from the disk according to the read request; wherein the circular queue includes a submission queue and a completion queue; reading the data to be compressed from the disk specifically includes: processing queue items of the circular queue simultaneously in a lock-free manner through the Linux kernel running space and the user program running space, and when processing the queue items of the circular queue, submitting the read request for the disk to the submission queue, so that the Linux kernel obtains the read request from the submission queue and reads the data to be compressed from the disk according to the submission, and then after completing the reading of the data to be compressed, feeding back the read completion status information to the completion queue; The data to be compressed is compressed by the QAT chip to obtain the compressed data, specifically: obtaining the vehicle hardware configuration information, judging whether the vehicle supports the Io_uring technology and whether it is equipped with the QAT chip according to the vehicle hardware configuration information; if it is judged that the vehicle does not support the Io_uring technology and is equipped with the QAT chip according to the vehicle hardware configuration information, reading the data to be compressed from the disk through the pread interface and compressing the data to be compressed through the QAT chip to obtain the compressed data; storing the compressed data in the disk through the pwrite interface; if it is judged that the vehicle supports the Io_uring technology and is equipped with the QAT chip according to the vehicle hardware configuration information, then in Linux A shared memory circular queue is constructed between the kernel running space and the user program running space, and a read request for the disk is submitted to the circular queue, so that the Linux kernel obtains the read request from the circular queue and reads the data to be compressed from the disk according to the request; the data to be compressed is compressed by the QAT chip to obtain the compressed data; a write request for the disk is submitted to the circular queue, so that the Linux kernel obtains the write request from the circular queue and stores the compressed data in the disk according to the write request; wherein, when the QAT chip compresses the data to be compressed, the configuration parameters of the large memory page during compression are determined according to the data amount of the data to be compressed; the data to be compressed is compressed according to the determined configuration parameters of the large memory page; Submitting a write request to the disk to a circular queue, so that the Linux kernel obtains the write request from the circular queue and stores the compressed data in the disk according to the write request.
2. The data compression and storage method of the vehicle automatic driving system according to claim 1, characterized in that: After reading the data to be compressed from disk, it also includes: The data to be compressed is written into a memory, so that the QAT chip reads the data to be compressed from the memory through a DMA technology.
3. The data compression and storage method of the vehicle automatic driving system according to claim 2, characterized in that: After obtaining the compressed data, the method further includes: The compressed data is written into the memory by using the DMA technology, and then before the compressed data is stored in the disk, the compressed data is read from the memory by using the DMA technology.
4. The data compression and storage method of the vehicle automatic driving system according to any one of claims 1 to 3, characterized in that: Also includes: If it is determined according to the vehicle hardware configuration information that the vehicle does not support Io_uring technology and is not equipped with a QAT chip, the data to be compressed is read from the disk through a pread interface and the data to be compressed is compressed by a CPU to obtain compressed data; The compressed data is stored in the disk through the pwrite interface; If it is determined according to the vehicle hardware configuration information that the vehicle supports Io_uring technology and is not equipped with a QAT chip, a shared memory circular queue is constructed between the Linux kernel running space and the user program running space, and a read request to the disk is submitted to the circular queue, so that the Linux kernel obtains the read request from the circular queue and reads the data to be compressed from the disk according to the request; Compressing the data to be compressed by the CPU to obtain compressed data; Submitting a write request to the disk to a circular queue, so that the Linux kernel obtains the write request from the circular queue and stores the compressed data in the disk according to the write request.
5. A data compression storage device for a vehicle automatic driving system, characterized in that: include: Data reading module, data compression module and data storage module; The data reading module is used to build a shared memory circular queue between the Linux kernel running space and the user program running space, and submit a read request for the disk to the circular queue, so that the Linux kernel obtains the read request from the circular queue and reads the data to be compressed from the disk according to the read request; wherein the circular queue includes a submission queue and a completion queue; reading the data to be compressed from the disk specifically includes: processing the queue items of the circular queue simultaneously in a lock-free manner through the Linux kernel running space and the user program running space, and when processing the queue items of the circular queue, submitting the read request for the disk to the submission queue, so that the Linux kernel obtains the read request from the submission queue and reads the data to be compressed from the disk according to the submission, and then after completing the reading of the data to be compressed, feeding back the reading completion status information to the completion queue; The data compression module is used to compress the data to be compressed through the QAT chip to obtain compressed data, specifically: if it is determined according to the vehicle hardware configuration information that the vehicle supports Io_uring technology and is equipped with a QAT chip, then a shared memory circular queue is constructed between the Linux kernel running space and the user program running space, and a read request for the disk is submitted to the circular queue, so that the Linux kernel obtains the read request from the circular queue and reads the data to be compressed from the disk accordingly; the data to be compressed is compressed through the QAT chip to obtain compressed data; a write request for the disk is submitted to the circular queue, so that the Linux kernel obtains the write request from the circular queue and stores the compressed data in the disk according to the write request; wherein, when the QAT chip compresses the data to be compressed, the configuration parameters of the large memory page during compression are determined according to the data amount of the data to be compressed; the data to be compressed is compressed according to the determined configuration parameters of the large memory page; The data storage module is used to submit a write request to the disk to the circular queue, so that the Linux kernel obtains the write request from the circular queue and stores the compressed data in the disk according to the write request.
6. The data compression storage device of the vehicle automatic driving system according to claim 5, characterized in that: Also includes a memory processing module; The memory processing module is used to write the data to be compressed into the memory after reading the data to be compressed from the disk, so that the QAT chip reads the data to be compressed from the memory through the DMA technology.
7. The data compression storage device of the vehicle automatic driving system according to claim 6, characterized in that: The memory processing module is further used to write the compressed data into the memory through DMA technology after obtaining the compressed data, and then read the compressed data from the memory through DMA technology before storing the compressed data in the disk.
8. The data compression storage device of the vehicle automatic driving system according to any one of claims 5 to 7, characterized in that: Also includes a data processing module; The data processing module, if it is determined according to the vehicle hardware configuration information that the vehicle supports Io_uring technology and is not equipped with a QAT chip, constructs a shared memory circular queue between the Linux kernel running space and the user program running space, and submits a read request to the disk to the circular queue, so that the Linux kernel obtains the read request from the circular queue and reads the data to be compressed from the disk according to the request; Compressing the data to be compressed by the CPU to obtain compressed data; Submitting a write request to the disk to a circular queue, so that the Linux kernel obtains the write request from the circular queue and stores the compressed data in the disk according to the write request.
