Data compression method and apparatus, and device and medium
By calculating the encoding and transmission method of the residual matrix and distance matrix of the LiDAR scanner, the problem of low transmission efficiency caused by the large amount of data in the LiDAR scanner is solved, and timely adjustment of vehicle speed and direction in autonomous driving system is realized.
Patent Information
- Application Number
- PCT/CN2024/092454
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-22
- Filing Date
- 2024-05-10
- Publication Date
- 2024-11-28
AI Technical Summary
The large amount of data obtained by LiDAR scanners in autonomous driving systems, coupled with low transmission efficiency, leads to untimely adjustments in vehicle direction and speed.
By obtaining the pose matrix and distance matrix at the current moment, the residual matrix is calculated, and after encoding it with the distance matrix, it is transmitted to the decoding end. The decoding end obtains the pose matrix and distance matrix at the current moment based on the residual matrix and the pose matrix at the previous moment.
This greatly reduces the amount of data transmitted, improves transmission efficiency, and ensures that vehicles can adjust their speed and direction in a timely manner.
Smart Images

Figure CN2024092454_28112024_PF_FP_ABST
Abstract
Description
Data compression method, device, equipment and medium
[0001] This disclosure claims priority to Chinese patent application number 202310596477X, filed with the China Patent Office on May 22, 2023, and entitled “Data Compression Method, Device, Equipment and Medium,” the entire contents of which are incorporated herein by reference. Technical Field
[0002] The present disclosure relates to the field of artificial intelligence, and in particular to a data compression method, apparatus, device, and medium. Background Art
[0003] In an autonomous driving system, a lidar scanner scans the surrounding environment, providing important data for the autonomous driving system's perception, and transmits the scanned data to the control end of the autonomous driving system. The control end adjusts the vehicle's driving direction and speed based on the data scanned by the lidar scanner.
[0004] Currently, the data obtained by laser radar scanners is similar to image data. The data volume is large and the transmission efficiency is low, which makes it difficult for the autonomous driving system to adjust the direction and speed of the vehicle in a timely manner.
[0005] Summary of the Invention
[0006] The present disclosure provides a data compression method, apparatus, device and medium, which compress and transmit the residual matrix of the lidar scanner and the distance matrix between the surrounding environment and the lidar scanner in an autonomous driving system. Since the transmitted data is matrix data, the amount of transmitted data is greatly reduced, thereby improving transmission efficiency.
[0007] In one aspect, the present disclosure provides a data compression method, comprising:
[0008] Obtaining a pose matrix and a distance matrix at the current moment, wherein the pose matrix represents the rotation angle and position of the laser radar scanner, and the distance matrix represents the distance value between the spatial point scanned by the laser radar scanner and the laser radar scanner;
[0009] Retrieving the pose matrix of the previous moment from the historical pose matrix stored at the decoding end, and calculating the difference between the pose matrix at the current moment and the pose matrix at the previous moment to obtain a residual matrix;
[0010] The residual matrix and the distance matrix at the current moment are encoded and transmitted to the decoding end, so that the decoding end obtains the posture matrix at the current moment based on the residual matrix and the posture matrix at the previous moment, and stores the posture matrix and distance matrix at the current moment.
[0011] In another aspect, the present disclosure provides a data compression device, comprising:
[0012] An acquisition module, configured to acquire a pose matrix and a distance matrix at a current moment, wherein the pose matrix represents the rotation angle and position of the laser radar scanner, and the distance matrix represents the distance value between a spatial point scanned by the laser radar scanner and the laser radar scanner;
[0013] A processing module is used to retrieve the pose matrix of the previous moment from the historical pose matrix stored at the decoding end, and calculate the difference between the pose matrix at the current moment and the pose matrix at the previous moment to obtain a residual matrix;
[0014] A transmission module is used to encode the residual matrix and the distance matrix at the current moment and transmit them to the decoding end, so that the decoding end obtains the posture matrix at the current moment based on the residual matrix and the posture matrix at the previous moment, and stores the posture matrix and distance matrix at the current moment.
[0015] In yet another aspect, the present disclosure provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0016] The memory stores computer-executable instructions;
[0017] The processor executes the computer-executable instructions stored in the memory to implement the method as described in any one of the preceding items.
[0018] On the other hand, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method as described in any of the above items.
[0019] The data compression method, device, equipment and medium provided by the present disclosure first obtain the pose matrix and distance matrix at the current moment, wherein the pose matrix represents the rotation angle and position of the laser radar scanner, and the distance matrix represents the distance value between the spatial point scanned by the laser radar scanner and the laser radar scanner; the pose matrix of the previous moment is retrieved from the historical pose matrix stored at the decoding end, and the difference between the pose matrix at the current moment and the pose matrix at the previous moment is calculated to obtain a residual matrix; the residual matrix and the distance matrix at the current moment are encoded and transmitted to the decoding end, so that the decoding end obtains the pose matrix at the current moment based on the residual matrix and the pose matrix at the previous moment, and stores the pose matrix and distance matrix at the current moment. The present disclosure is based on compressing and transmitting the residual matrix of the laser radar scanner in the autonomous driving system and the distance matrix between the surrounding environment and the laser radar scanner. Since the transmitted data is matrix data, the amount of transmitted data is greatly reduced, thereby improving transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the embodiments of the present disclosure.
[0021] FIG1 is a schematic diagram of an application scenario of an example of the present disclosure;
[0022] FIG2 is a flow chart of a data compression method provided in the first embodiment of the present disclosure;
[0023] FIG3 is a flow chart of another data compression method provided in the first embodiment of the present disclosure;
[0024] FIG4 is a flow chart of another data compression method provided in the first embodiment of the present disclosure;
[0025] FIG5 is a flow chart of another data compression method provided in the first embodiment of the present disclosure;
[0026] FIG6 is a flow chart of another data compression method provided in the first embodiment of the present disclosure;
[0027] FIG7 is a flow chart of another data compression method provided in the first embodiment of the present disclosure;
[0028] FIG8 is a schematic structural diagram of a data compression device provided in a second embodiment of the present disclosure;
[0029] FIG9 is a flow chart of a data compression system provided in a third embodiment of the present disclosure;
[0030] FIG10 is a schematic structural diagram of an electronic device provided in a fourth embodiment of the present disclosure.
[0031] The above drawings illustrate specific embodiments of the present disclosure, which will be described in more detail below. These drawings and textual descriptions are not intended to limit the scope of the present disclosure in any way, but rather to illustrate the concepts of the present disclosure to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0032] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0033] Figure 1 is a schematic diagram of an application scenario for an example of the present disclosure. In an autonomous driving system, a LiDAR scanner is used to scan the surrounding environment and transmit the resulting data to a parser. The parser analyzes the data, and the control terminal adjusts the vehicle's direction and speed based on the data from the parser. However, the data currently obtained by LiDAR scanners is similar to image data, resulting in large amounts of data and low transmission efficiency, making it difficult for the autonomous driving system to adjust the vehicle's direction and speed in a timely manner.
[0034] The present disclosure is based on compressing and transmitting the residual matrix of the lidar scanner and the distance matrix between the surrounding environment and the lidar scanner in an autonomous driving system. Since the transmitted data is matrix data, the amount of transmitted data is greatly reduced, thereby improving the transmission efficiency.
[0035] It should be noted that the brief descriptions of terms in this disclosure are only for the purpose of facilitating the understanding of the embodiments described below, and are not intended to limit the embodiments of this disclosure. Unless otherwise specified, these terms should be understood according to their ordinary and usual meanings.
[0036] The technical solutions of the present disclosure and the technical solutions of the present disclosure are described in detail below with reference to specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. In the description of the present disclosure, unless otherwise clearly specified and limited, each term should be understood in a broad sense in the art. The embodiments of the present disclosure will be described below in conjunction with the accompanying drawings.
[0037] Example 1
[0038] FIG2 is a flow chart of a data compression method provided in the first embodiment of the present disclosure. As shown in FIG2 , the method includes:
[0039] Step 201: Obtain a pose matrix and a distance matrix at the current moment, wherein the pose matrix represents the rotation angle and position of the laser radar scanner, and the distance matrix represents the distance value between the spatial point scanned by the laser radar scanner and the laser radar scanner;
[0040] Step 202: retrieve the pose matrix of the previous moment from the historical pose matrix stored at the decoding end, and calculate the difference between the pose matrix at the current moment and the pose matrix at the previous moment to obtain a residual matrix;
[0041] Step 203: Encode the residual matrix and the distance matrix at the current moment and transmit them to the decoding end, so that the decoding end obtains the posture matrix at the current moment based on the residual matrix and the posture matrix at the previous moment, and stores the posture matrix and distance matrix at the current moment.
[0042] The executor of this embodiment is a data compression device, which can be implemented through a computer program, such as application software, etc.; or, it can also be implemented as a medium storing relevant computer programs, such as a USB flash drive, a cloud disk, etc.; or, it can also be implemented through a physical device integrated or installed with relevant computer programs, such as a chip, etc.
[0043] In conjunction with the scenario example, during the operation of a vehicle using an autonomous driving system, the vehicle relies on the scanning of a laser radar scanner to obtain relevant data about the surrounding environment. During the operation of the vehicle, since the relative position of the vehicle and the ground is constantly changing, the relative position between the laser radar scanner and the ground is also constantly changing. Specifically, a pose matrix can be selected to represent the relative position between the laser radar scanner and the ground and the rotation angle of the laser radar scanner. The laser radar scanner scans the environmental information in the front direction. Specifically, the environmental information in the front direction of the laser radar scanner can be recorded in a distance matrix, which includes the distance between each point of all objects in the space in the front direction of the laser radar scanner and the laser radar scanner.
[0044] When a vehicle is driving, how to determine the speed and direction of the vehicle at the next moment? First, obtain the LiDAR scanner's pose matrix and distance matrix at the current moment. Then, retrieve the LiDAR scanner's pose matrix at the previous moment from the decoding end. Based on the pose matrices of the LiDAR scanner at the current moment and the previous moment, the residual matrix of the LiDAR scanner can be obtained. Specifically, the residual matrix of the LiDAR scanner can be obtained by subtracting the pose matrix of the LiDAR scanner at the previous moment from the pose matrix of the LiDAR scanner at the current moment. The residual matrix represents the changes of the LiDAR scanner, including changes in position and rotation angle. Then the residual matrix and distance matrix at the current moment are encoded and transmitted to the decoding end, and the decoding end can obtain the residual matrix and distance matrix, and add the residual matrix to the posture matrix at the previous moment to obtain the posture matrix at the current moment, and store the posture matrix and distance matrix of the lidar scanner at the current moment. At the same time, the posture matrix and distance matrix of the lidar scanner at the current moment are transmitted to the control end, so that the control end can make timely adjustments to the vehicle's driving speed and direction according to the posture matrix and the distance matrix at the current moment.
[0045] The data compression method provided in this example first obtains the pose matrix and distance matrix at the current moment, wherein the pose matrix represents the rotation angle and position of the laser radar scanner, and the distance matrix represents the distance value between the spatial point scanned by the laser radar scanner and the laser radar scanner; the pose matrix of the previous moment is retrieved from the historical pose matrix stored at the decoding end, and the difference between the pose matrix at the current moment and the pose matrix at the previous moment is calculated to obtain a residual matrix; the residual matrix and the distance matrix at the current moment are encoded and transmitted to the decoding end, so that the decoding end obtains the pose matrix at the current moment based on the residual matrix and the pose matrix at the previous moment, and stores the pose matrix and distance matrix at the current moment. Based on the method provided in this example, the residual matrix of the laser radar scanner in the autonomous driving system and the distance matrix between the surrounding environment and the laser radar scanner are compressed and transmitted. Since the transmitted data is matrix data, the amount of transmitted data is greatly reduced, thereby improving transmission efficiency.
[0046] Optionally, FIG3 is a flow chart of another data compression method provided in the first embodiment of the present disclosure. As shown in FIG3 , in step 201, obtaining the pose matrix at the current moment includes:
[0047] Step 301: retrieve the distance matrix and the pose matrix of the previous moment;
[0048] Step 302: Based on the distance matrix and the pose matrix at the previous moment, predict and obtain multiple sets of predicted pose matrices at the current moment, and obtain multiple sets of pose transformation matrices based on the multiple sets of predicted pose matrices and the pose matrix at the previous moment;
[0049] Step 303: obtaining multiple sets of predicted distance matrices based on the distance matrix at the previous moment and the internal parameters set by the laser radar scanner;
[0050] Step 304: Compare the multiple groups of predicted distance matrices with the distance matrices at the current moment respectively to determine the optimal predicted distance matrix, and use the posture transformation matrix corresponding to the optimal predicted distance matrix as the optimal posture transformation matrix, and determine the predicted posture matrix corresponding to the optimal posture transformation matrix as the posture matrix at the current moment.
[0051] In a scenario example, while a vehicle is driving, the LiDAR scanner's pose matrix can first be predicted based on the distance matrix and pose matrix at the previous moment, resulting in multiple sets of predicted pose matrices at the current moment. Each predicted pose matrix represents the possible position and rotation angle of the LiDAR scanner at the current moment. Multiple sets of predicted pose transformation matrices are then obtained by subtracting the pose matrix at the previous moment from the multiple sets of predicted pose matrices. The distance matrix at the previous moment is retrieved from the decoding end, and the pose matrix at the previous moment can be used to obtain the internal parameters of the LiDAR scanner at the previous moment. These internal parameters refer to the internal parameters of the LiDAR scanner. The spatial coordinates of objects in the surrounding environment in the previous moment's spatial coordinate system can be calculated based on the internal parameters set by the LiDAR scanner and the distance matrix at the previous moment. The spatial coordinates of the objects in the surrounding environment in the previous moment's spatial coordinate system are then multiplied by the multiple sets of pose transformation matrices to obtain multiple sets of spatial coordinates of the objects in the surrounding environment in the current moment's spatial coordinate system. Multiple sets of predicted distance matrices are then obtained using the LiDAR scanner's internal parameters. The predicted distance matrix is a prediction of the distance matrix at the current moment, so the distance matrix actually collected by the lidar scanner at the current moment is compared with the predicted distance matrix to obtain the most accurate predicted distance matrix, and the most accurate predicted distance matrix is used as the optimal predicted distance matrix. Since there is a one-to-one correspondence between multiple groups of predicted distance matrices and multiple groups of predicted posture transformation matrices, the optimal posture transformation matrix can be determined based on the optimal predicted distance matrix. Similarly, the predicted posture transformation matrix corresponds one-to-one with multiple groups of predicted posture matrices at the current moment, so the optimal predicted posture matrix can be determined based on the optimal posture transformation matrix, and the optimal predicted posture matrix is used as the posture matrix at the current moment. This example predicts multiple groups of posture matrices at the current moment to obtain multiple groups of posture transformation matrices and multiple groups of predicted distance matrices, and determines the posture matrix at the current moment by selecting the optimal predicted distance matrix.
[0052] Optionally, FIG4 is a flow chart of another data compression method provided in the first embodiment of the present disclosure. As shown in FIG4 , in step 304, the steps of comparing the multiple sets of predicted distance matrices with the distance matrices at the current moment to determine the optimal predicted distance matrix include:
[0053] Step 401: Convert the multiple groups of predicted distance matrices into multiple predicted 3D point cloud images respectively, and convert the distance matrix at the current moment into a first 3D point cloud image;
[0054] Step 402: Compare the positions of the spatial points in the first 3D point cloud image with the positions of the spatial points in the multiple predicted 3D point cloud images, determine the predicted 3D point cloud image that has the most identical spatial positions with the first 3D point cloud image as the optimal predicted 3D point cloud image, and determine the predicted distance matrix corresponding to the optimal predicted 3D point cloud image as the optimal predicted distance matrix;
[0055] In combination with the scenario example, after obtaining multiple sets of predicted distance matrices, the distance values recorded in each set of predicted distance matrices can be converted into corresponding 3D point cloud images to obtain multiple sets of predicted 3D point cloud images. At the same time, the corresponding distance matrix at the current moment is converted into a first 3D point cloud image. The information in the 3D point cloud image mainly includes the spatial position coordinates of each point scanned by the laser radar scanner at the current moment. The position coordinates represented in each set of predicted 3D point cloud images are then compared with the position coordinates represented by the first 3D point cloud image, and the position coordinates that are the same as the first 3D point cloud image in each set of predicted 3D point cloud images are observed. The predicted 3D point cloud image with the largest number of position coordinates that are the same as the first 3D point cloud image is determined as the optimal predicted 3D point cloud image. The predicted distance matrix corresponding to the optimal predicted 3D point cloud image is then determined as the optimal predicted distance matrix, the pose transformation matrix corresponding to the optimal predicted distance matrix is then determined as the optimal pose transformation matrix, the predicted pose matrix corresponding to the optimal pose transformation matrix is then determined as the optimal predicted pose matrix, and the optimal predicted pose matrix is determined as the corresponding pose matrix at the current moment.
[0056] Optionally, FIG5 is a flow chart of another data compression method provided in the first embodiment of the present disclosure. As shown in FIG5 , the method further includes:
[0057] Step 501: Determine a plurality of first representative surfaces based on the positions of spatial points in the first 3D point cloud image, and for each predicted 3D point cloud image, determine a second representative surface corresponding to each first representative surface in the predicted 3D point cloud image based on the positions of spatial points in the predicted 3D point cloud image, and compare whether the plurality of first representative surfaces overlap with the corresponding second representative surface in each predicted 3D point cloud image.
[0058] Step 502: Determine the predicted 3D point cloud image that has the most overlapping representative surfaces with the first 3D point cloud image as the optimal predicted 3D point cloud image, and determine the predicted distance matrix corresponding to the optimal predicted 3D point cloud image as the optimal predicted distance matrix.
[0059] In combination with the scene example, the optimal predicted 3D point cloud map can be determined from the multiple groups of predicted 3D point cloud maps by observing the number of representative surfaces with the same direction between the multiple groups of predicted 3D point cloud maps and the first 3D point cloud map, and determining the predicted 3D point cloud map with the most representative surfaces with the same direction as the first 3D point cloud map as the optimal predicted 3D point cloud map. Specifically, first determine a plurality of first representative surfaces based on the spatial position coordinates of each point in the first 3D point cloud map, and then determine the second representative surfaces corresponding to each first representative surface on each group of predicted 3D point cloud maps, and determine the direction between each first representative surface and its corresponding second representative surface. If the directions are the same, determine that each first representative surface coincides with its corresponding second representative surface. After comparing the representative surfaces of the first 3D point cloud map with each group of predicted 3D point cloud maps in turn, the predicted 3D point cloud map with the most representative surfaces with the same direction as the first 3D point cloud map is determined as the optimal predicted 3D point cloud map. Then, the predicted distance matrix corresponding to the optimal predicted 3D point cloud image is determined as the optimal predicted distance matrix, and the posture transformation matrix corresponding to the optimal predicted distance matrix is determined as the optimal posture transformation matrix. Then, the predicted posture matrix corresponding to the optimal posture transformation matrix is determined as the optimal predicted posture matrix, and the optimal predicted posture matrix is determined as the corresponding posture matrix at the current moment.
[0060] Optionally, FIG6 is a flow chart of another data compression method provided in Embodiment 1 of the present disclosure. As shown in FIG6 , in step 203, encoding the residual matrix and the distance matrix at the current moment and transmitting them to the decoding end includes:
[0061] Step 601: Divide the distance matrix at the current moment using a VVC-type coding partitioning technique to obtain a plurality of sub-distance matrices;
[0062] Step 602: For each sub-distance matrix, determine whether the spatial positions corresponding to the non-zero elements in the sub-distance matrix and the optimal predicted distance matrix are located on any first representative plane. If the spatial positions corresponding to the non-zero elements are located on any first representative plane, perform coplanar coefficient encoding on the non-zero elements. If the spatial positions corresponding to the non-zero elements are not located on any first representative plane, perform scatter point encoding on the non-zero elements to obtain the encoded distance matrix at the current moment.
[0063] Step 603: Transmit the encoded distance matrix at the current moment to the decoding end.
[0064] In combination with the scenario example, before the residual matrix and the distance matrix corresponding to the current moment are transmitted to the decoding end, the residual matrix and the distance matrix at the current moment need to be encoded first. Specifically, for the distance matrix at the current moment, you can choose to use the coding division technology of the Versatile Video Coding (VVC) type for encoding. First, divide the distance matrix at the current moment into 128x128, and then perform quadtree division on each 128x128 block in turn, and then continue to divide the leaf node blocks into binary trees and ternary trees to obtain multiple logical small blocks, that is, divide the distance matrix at the current moment into multiple sub-distance matrices, and finally encode all the divided small blocks within 128x128 in the Z scan order, and perform posture encoding on the residual matrix. Before encoding the small blocks divided by the distance matrix at the current moment using the VVC type coding division technology, non-zero elements are first screened for the distance values in each divided small block, and the positions corresponding to the non-zero elements are positionally encoded. The position encoding includes two parts of information: one is the encoding method number, and the other is the encoding of the non-zero pixel position using the corresponding coding technology, which can be fixed-length coding, run-length coding, coordinate coding, etc. It is also determined whether the corresponding spatial position of the position corresponding to the non-zero element in the first 3D point cloud image and the corresponding spatial position in the optimal predicted distance matrix are located on any first representative surface. Among all non-zero elements, the non-zero elements whose corresponding spatial positions in the first 3D point cloud image are located on any first representative surface are encoded using the coplanar coefficient, and the remaining non-zero elements are scatter-coded. Each divided small block is encoded in turn according to the coplanar coefficient coding and scatter-coding methods to obtain the encoded distance matrix at the current moment. Finally, the encoded residual matrix and the distance matrix at the current moment are respectively transmitted to the decoding end. According to the method provided in this example, the residual matrix and the distance matrix at the current moment can be encoded effectively and quickly, which greatly reduces the amount of transmitted data and thus improves transmission efficiency.
[0065] Optionally, FIG7 is a flow chart of another data compression method provided in the first embodiment of the present disclosure. As shown in FIG7 , in step 602, determining whether the spatial positions corresponding to the non-zero elements in the sub-distance matrix and the optimal predicted distance matrix in the first 3D point cloud image are located on any first representative surface includes:
[0066] Step 701: Determine a coplanarity coefficient corresponding to each first representative surface based on the pose matrix at the current moment, where the coplanarity coefficient includes a first coefficient value, a second coefficient value, and a third coefficient value;
[0067] Step 702: Obtain the spatial coordinates of the spatial point corresponding to the non-zero element in the first 3D point cloud image, where the spatial coordinates include abscissa, ordinate, and vertical coordinates;
[0068] Step 703: For each first representative surface, multiply a first coefficient value in the coplanarity coefficient corresponding to the first representative surface by the ordinate to obtain a first product, multiply a second coefficient value in the coplanarity coefficient corresponding to the first representative surface by the ordinate to obtain a second product, and add the ordinate, the first product, the second product, and the third coefficient value to obtain a first result corresponding to the first representative surface.
[0069] Step 704: Compare the first result corresponding to the first representative surface with a set error threshold. If the first result is smaller than the error threshold, determine that the non-zero element is located on the first representative surface.
[0070] In combination with the scenario example, for the spatial position of the non-zero elements in the distance matrix corresponding to the current moment in the corresponding first 3D point cloud image, to determine whether it is located on any first representative surface, the coplanarity coefficient of each first representative surface in the first 3D point cloud image can be first determined by the pose matrix at the current moment, and the coplanarity coefficient includes a first coefficient value, a second coefficient value, and a third coefficient value. For example, the position of the lidar scanner can be selected as the center of the circle, the direction of the vehicle form as the positive direction of the horizontal axis, and the direction of the horizontal axis is used as the reference. The direction of the 90° counterclockwise rotation is used as the positive direction of the vertical axis, and the direction perpendicular to the ground is used as the positive direction of the axis to establish a spatial rectangular coordinate system. In addition, for each non-zero element in the distance matrix corresponding to the current moment, the spatial coordinates in the corresponding first 3D point cloud image include a horizontal coordinate, a vertical coordinate, and a vertical coordinate. For each first representative surface, the first coefficient value in the coplanarity coefficient corresponding to the first representative surface is multiplied by the vertical coordinate to obtain a first product, the second coefficient value in the coplanarity coefficient corresponding to the first representative surface is multiplied by the vertical coordinate to obtain a second product, and the horizontal coordinate, the first product, the second product, and the third coefficient value are added to obtain a first result corresponding to the first representative surface. For example, if the coplanarity coefficients of one of the first representative surfaces include the first coefficient value, the second coefficient value, and the third coefficient value, respectively, a, b, and c, and a non-zero element in the distance matrix corresponding to the current moment has the horizontal coordinate, the vertical coordinate, and the vertical coordinate in the spatial coordinates in the corresponding first 3D point cloud image, respectively, x, y, and z, the formula for calculating the first result is: x+ay+bz-c. An error value is pre-set for the first result, and the error value may be ε. When the absolute value of the first result is not greater than the error value, it can be determined that the spatial position in the spatial coordinates of the first 3D point cloud image corresponding to the calculated non-zero element is located on the selected first representative surface.
[0071] Optionally, after obtaining the pose matrix and distance matrix at the current moment, the following is also included:
[0072] If the pose matrix of the previous moment does not exist in the historical pose matrix, the pose matrix and distance matrix at the current moment are encoded and transmitted to the decoding end.
[0073] In this scenario example, if the vehicle is running at the first moment of startup, the decoder may not have the pose matrix from the previous moment, and therefore the residual matrix from the first moment. Therefore, when transmitting to the decoder, if the pose matrix from the previous moment does not exist at the decoder, the pose matrix and distance matrix at the current moment are encoded and transmitted to the decoder. If the pose matrix from the previous moment exists at the decoder, the residual matrix and distance matrix corresponding to the current moment are encoded and transmitted to the decoder.
[0074] The data compression method provided in this embodiment first obtains the pose matrix and distance matrix at the current moment, wherein the pose matrix represents the rotation angle and position of the laser radar scanner, and the distance matrix represents the distance value between the spatial point scanned by the laser radar scanner and the laser radar scanner; the pose matrix of the previous moment is retrieved from the historical pose matrix stored at the decoding end, and the difference between the pose matrix at the current moment and the pose matrix at the previous moment is calculated to obtain a residual matrix; the residual matrix and the distance matrix at the current moment are encoded and transmitted to the decoding end, so that the decoding end obtains the pose matrix at the current moment based on the residual matrix and the pose matrix at the previous moment, and stores the pose matrix and distance matrix at the current moment. Based on the method provided in this embodiment, the residual matrix of the laser radar scanner in the autonomous driving system and the distance matrix between the surrounding environment and the laser radar scanner are compressed and transmitted. Since the transmitted data is matrix data, the amount of transmitted data is greatly reduced, thereby improving transmission efficiency.
[0075] Example 2
[0076] FIG8 is a schematic diagram of the structure of a data compression device provided in the second embodiment of the present disclosure. As shown in FIG8 , the device includes:
[0077] An acquisition module 81 is configured to acquire a pose matrix and a distance matrix at a current moment, wherein the pose matrix represents the rotation angle and position of the laser radar scanner, and the distance matrix represents the distance between a spatial point scanned by the laser radar scanner and the laser radar scanner;
[0078] The processing module 82 is configured to retrieve the pose matrix of the previous moment from the historical pose matrix stored at the decoding end, and calculate the difference between the pose matrix at the current moment and the pose matrix at the previous moment to obtain a residual matrix;
[0079] The transmission module 83 is used to encode the residual matrix and the distance matrix at the current moment and transmit them to the decoding end, so that the decoding end obtains the posture matrix at the current moment based on the residual matrix and the posture matrix at the previous moment, and stores the posture matrix and distance matrix at the current moment.
[0080] The executor of this embodiment is a data compression device, which can be implemented through a computer program, such as application software, etc.; or, it can also be implemented as a medium storing relevant computer programs, such as a USB flash drive, a cloud disk, etc.; or, it can also be implemented through a physical device integrated or installed with relevant computer programs, such as a chip, etc.
[0081] In conjunction with the scenario example, during the operation of a vehicle using an autonomous driving system, the vehicle relies on the scanning of a laser radar scanner to obtain relevant data about the surrounding environment. During the operation of the vehicle, since the relative position of the vehicle and the ground is constantly changing, the relative position between the laser radar scanner and the ground is also constantly changing. Specifically, a pose matrix can be selected to represent the relative position between the laser radar scanner and the ground and the rotation angle of the laser radar scanner. The laser radar scanner scans the environmental information in the front direction. Specifically, the environmental information in the front direction of the laser radar scanner can be recorded in a distance matrix, which includes the distance between each point of all objects in the space in the front direction of the laser radar scanner and the laser radar scanner.
[0082] During the vehicle's driving process, how to determine the vehicle's speed and direction at the next moment? First, the acquisition module 81 obtains the laser radar scanner's pose matrix and distance matrix at the current moment. Then, the processing module 82 retrieves the laser radar scanner's pose matrix at the previous moment from the decoding end. Based on the pose matrices of the laser radar scanner at the current moment and the previous moment, the residual matrix of the laser radar scanner can be obtained. Specifically, the residual matrix of the laser radar scanner can be obtained by subtracting the pose matrix of the laser radar scanner at the previous moment from the pose matrix of the laser radar scanner at the current moment. The residual matrix represents the changes of the laser radar scanner, including changes in position and rotation angle. Then the transmission module 83 encodes the residual matrix and distance matrix at the current moment and transmits them to the decoding end. The decoding end can obtain the residual matrix and distance matrix, and add the residual matrix to the posture matrix at the previous moment to obtain the posture matrix at the current moment, and store the posture matrix and distance matrix of the lidar scanner at the current moment. At the same time, the posture matrix and distance matrix of the lidar scanner at the current moment are transmitted to the control end, so that the control end can make timely adjustments to the vehicle's driving speed and direction according to the posture matrix and the distance matrix at the current moment.
[0083] The data compression device provided in this example first obtains the pose matrix and distance matrix at the current moment by an acquisition module 81, wherein the pose matrix represents the rotation angle and position of the laser radar scanner, and the distance matrix represents the distance value between the spatial point scanned by the laser radar scanner and the laser radar scanner; the processing module 82 retrieves the pose matrix of the previous moment from the historical pose matrix stored at the decoding end, and calculates the difference between the pose matrix at the current moment and the pose matrix at the previous moment to obtain a residual matrix; the transmission module 83 encodes the residual matrix and the distance matrix at the current moment and transmits them to the decoding end, so that the decoding end obtains the pose matrix at the current moment based on the residual matrix and the pose matrix at the previous moment, and stores the pose matrix and distance matrix at the current moment. Based on the device provided in this example, the residual matrix of the laser radar scanner in the autonomous driving system and the distance matrix between the surrounding environment and the laser radar scanner are compressed and transmitted. Since the transmitted data is matrix data, the amount of transmitted data is greatly reduced, thereby improving transmission efficiency.
[0084] Optionally, an acquisition module 81 is specifically used to retrieve the distance matrix and the pose matrix of the previous moment;
[0085] The acquisition module 81 is further configured to predict and obtain multiple sets of predicted pose matrices at the current moment based on the distance matrix at the previous moment and the pose matrix at the previous moment, and obtain multiple sets of pose transformation matrices based on the multiple sets of predicted pose matrices and the pose matrix at the previous moment;
[0086] The acquisition module 81 is further configured to obtain multiple sets of predicted distance matrices based on the distance matrix at the previous moment and the internal parameters set by the laser radar scanner;
[0087] The acquisition module 81 is specifically used to compare the multiple groups of predicted distance matrices with the distance matrices at the current moment, determine the optimal predicted distance matrix, and use the posture transformation matrix corresponding to the optimal predicted distance matrix as the optimal posture transformation matrix, and determine the predicted posture matrix corresponding to the optimal posture transformation matrix as the posture matrix at the current moment.
[0088] In combination with the scenario example, when the vehicle is driving, the pose matrix of the lidar scanner can first make multiple sets of predictions based on the distance matrix at the previous moment and the pose matrix at the current moment, and obtain multiple sets of predicted pose matrices at the current moment. Each set of predicted pose matrices respectively represents the position and rotation angle that the lidar scanner may have at the current moment, and then the pose matrix at the previous moment is subtracted from the multiple sets of predicted pose matrices to obtain multiple sets of predicted pose transformation matrices. The acquisition module 81 retrieves the distance matrix at the previous moment from the decoding end, and according to the pose matrix at the previous moment, the internal parameters set by the lidar scanner at the previous moment can be obtained. The internal parameters refer to the internal parameters of the lidar scanner. The spatial coordinates of objects in the surrounding environment at the previous moment can be calculated based on the distance matrix of the previous moment set by the internal parameters of the laser radar scanner, and then the spatial coordinates of the objects in the surrounding environment at the previous moment in the spatial coordinate system are multiplied by the multiple sets of posture transformation matrices to obtain multiple sets of spatial coordinates of objects in the surrounding environment in the spatial coordinate system at the current moment, and then multiple sets of predicted distance matrices are obtained through the internal parameters of the laser radar scanner. The predicted distance matrix is a prediction of the distance matrix at the current moment, so the acquisition module 81 compares the distance matrix actually collected by the laser radar scanner at the current moment with the predicted distance matrix to obtain the most accurate predicted distance matrix. The acquisition module 81 uses the most accurate predicted distance matrix as the optimal predicted distance matrix. Since there is a one-to-one correspondence between multiple groups of predicted distance matrices and multiple groups of predicted posture transformation matrices, the acquisition module 81 can determine the optimal posture transformation matrix based on the optimal predicted distance matrix. Similarly, the predicted posture transformation matrix corresponds one-to-one with multiple groups of predicted posture matrices at the current moment, so the acquisition module 81 can determine the optimal predicted posture matrix based on the optimal posture transformation matrix and use the optimal predicted posture matrix as the posture matrix at the current moment. In this example, the acquisition module 81 predicts multiple groups of posture matrices at the current moment, obtains multiple groups of posture transformation matrices and multiple groups of predicted distance matrices, and determines the posture matrix at the current moment by selecting the optimal predicted distance matrix.
[0089] Optionally, the acquisition module 81 is further configured to convert the plurality of predicted distance matrices into a plurality of predicted 3D point cloud images, and convert the distance matrix at the current moment into a first 3D point cloud image;
[0090] The acquisition module 81 is further configured to compare the positions of the spatial points in the first 3D point cloud image with the positions of the spatial points in the plurality of predicted 3D point cloud images, determine the predicted 3D point cloud image having the most identical spatial positions with the first 3D point cloud image as the optimal predicted 3D point cloud image, and determine the predicted distance matrix corresponding to the optimal predicted 3D point cloud image as the optimal predicted distance matrix;
[0091] In conjunction with the scenario example, after obtaining multiple sets of predicted distance matrices, the acquisition module 81 can convert the distance values recorded in each set of predicted distance matrices into corresponding 3D point cloud images to obtain multiple sets of predicted 3D point cloud images, and at the same time convert the distance matrix corresponding to the current moment into a first 3D point cloud image. The information in the 3D point cloud image mainly includes the spatial position coordinates of each point scanned by the laser radar scanner at the current moment. The acquisition module 81 then compares the position coordinates represented in each set of predicted 3D point cloud images with the position coordinates represented in the first 3D point cloud image, observes the position coordinates that are the same as the first 3D point cloud image in each set of predicted 3D point cloud images, and determines the predicted 3D point cloud image with the largest number of position coordinates that are the same as the first 3D point cloud image as the optimal predicted 3D point cloud image. The predicted distance matrix corresponding to the optimal predicted 3D point cloud image is then determined as the optimal predicted distance matrix, the pose transformation matrix corresponding to the optimal predicted distance matrix is then determined as the optimal pose transformation matrix, the predicted pose matrix corresponding to the optimal pose transformation matrix is then determined as the optimal predicted pose matrix, and the optimal predicted pose matrix is determined as the pose matrix corresponding to the current moment.
[0092] Optionally, the acquisition module 81 is further configured to determine a plurality of first representative surfaces based on positions of spatial points in the first 3D point cloud image, and for each predicted 3D point cloud image, determine a second representative surface corresponding to each first representative surface in the predicted 3D point cloud image based on positions of spatial points in the predicted 3D point cloud image, and compare whether the plurality of first representative surfaces overlap with the corresponding second representative surface in each predicted 3D point cloud image;
[0093] The acquisition module 81 is specifically further used to determine the predicted 3D point cloud image with the most overlapping representative surfaces with the first 3D point cloud image as the optimal predicted 3D point cloud image, and determine the predicted distance matrix corresponding to the optimal predicted 3D point cloud image as the optimal predicted distance matrix.
[0094] In combination with the scene example, the acquisition module 81 can determine the optimal predicted 3D point cloud map from the multiple groups of predicted 3D point cloud maps by observing the number of representative surfaces with the same direction between the multiple groups of predicted 3D point cloud maps and the first 3D point cloud map, and determine the predicted 3D point cloud map with the most representative surfaces with the same direction as the first 3D point cloud map as the optimal predicted 3D point cloud map. Specifically, the acquisition module 81 first determines multiple first representative surfaces based on the spatial position coordinates of each point in the first 3D point cloud map, and then the acquisition module 81 determines the second representative surface corresponding to each first representative surface on each group of predicted 3D point cloud maps, and determines the direction between each first representative surface and its corresponding second representative surface. If the directions are the same, it is determined that each first representative surface coincides with its corresponding second representative surface. After the acquisition module 81 compares the representative surfaces between the first 3D point cloud map and each group of predicted 3D point cloud maps in turn, the predicted 3D point cloud map with the most representative surfaces with the same direction as the first 3D point cloud map is determined as the optimal predicted 3D point cloud map. Then the acquisition module 81 determines the predicted distance matrix corresponding to the optimal predicted 3D point cloud image as the optimal predicted distance matrix, and then determines the posture transformation matrix corresponding to the optimal predicted distance matrix as the optimal posture transformation matrix, and then determines the predicted posture matrix corresponding to the optimal posture transformation matrix as the optimal predicted posture matrix, and determines the optimal predicted posture matrix as the corresponding posture matrix at the current moment.
[0095] Optionally, a transmission module 83 is specifically configured to divide the distance matrix at the current moment by using a VVC type coding division technology to obtain a plurality of sub-distance matrices;
[0096] The transmission module 83 is further configured to determine, for each sub-distance matrix, whether the spatial positions corresponding to the non-zero elements in the sub-distance matrix and the optimal predicted distance matrix in the first 3D point cloud image are located on any first representative plane; if the spatial positions corresponding to the non-zero elements are located on any first representative plane, perform coplanar coefficient encoding on the non-zero elements; if the spatial positions corresponding to the non-zero elements are not located on any first representative plane, perform scatter point encoding on the non-zero elements to obtain the encoded distance matrix at the current moment;
[0097] The transmission module 83 is further configured to transmit the encoded distance matrix at the current moment to the decoding end.
[0098] In combination with the scenario example, before transmitting the residual matrix and the distance matrix corresponding to the current moment to the decoding end, it is necessary to first encode the residual matrix and the distance matrix at the current moment. Specifically, the transmission module 83 can choose to use the VVC type coding division technology to encode the distance matrix at the current moment, first divide the distance matrix at the current moment into 128x128, and then the transmission module 83 performs quadtree division on each 128x128 block in turn, and then continues to divide the leaf node blocks into binary trees and ternary trees to obtain multiple logical small blocks, that is, the distance matrix at the current moment is divided into multiple sub-distance matrices, and finally all the divided small blocks within 128x128 are encoded in the Z scanning order, and the residual matrix is pose encoded. Before encoding the small blocks divided by the distance matrix at the current moment using VVC-type coding division techniques, the transmission module 83 first screens for non-zero elements in the distance values of each divided block and performs position coding on the positions corresponding to the non-zero elements. The position coding includes two pieces of information: the encoding method number and the encoding of the non-zero pixel positions using the corresponding coding technique, which can be fixed-length coding, run-length coding, coordinate coding, etc. A determination is then made as to whether the spatial positions corresponding to the positions of the non-zero elements in the first 3D point cloud image and the corresponding spatial positions in the optimal predicted distance matrix are located on any first representative plane. Among all non-zero elements, the non-zero elements whose corresponding spatial positions in the first 3D point cloud image are located on any first representative plane are coded using coplanar coefficients, while the remaining non-zero elements are coded using scatter point coding. The transmission module 83 encodes each divided block in sequence using the coplanar coefficient coding and scatter point coding methods to obtain the encoded distance matrix at the current moment. Finally, the transmission module 83 transmits the encoded residual matrix and the distance matrix at the current moment to the decoding end respectively. According to the method provided in this example, the residual matrix and the distance matrix at the current moment can be encoded effectively and quickly, which greatly reduces the amount of transmitted data and thus improves the transmission efficiency.
[0099] Optionally, the transmission module 83 is further configured to determine a coplanarity coefficient corresponding to each first representative surface based on the pose matrix at the current moment, where the coplanarity coefficient includes a first coefficient value, a second coefficient value, and a third coefficient value;
[0100] The transmission module 83 is further configured to obtain the spatial coordinates of the spatial point corresponding to the non-zero element in the first 3D point cloud image, where the spatial coordinates include a horizontal coordinate, a vertical coordinate, and a vertical coordinate;
[0101] The transmission module 83 is further configured to, for each first representative surface, multiply a first coefficient value in the coplanarity coefficient corresponding to the first representative surface by the ordinate to obtain a first product, multiply a second coefficient value in the coplanarity coefficient corresponding to the first representative surface by the ordinate to obtain a second product, and add the ordinate, the first product, the second product, and the third coefficient value to obtain a first result corresponding to the first representative surface;
[0102] The transmission module 83 is further configured to compare the first result corresponding to the first representative surface with a set error threshold, and if the first result is smaller than the error threshold, determine that the non-zero element is located on the first representative surface.
[0103] In conjunction with the scenario example, for the spatial position of the non-zero elements in the distance matrix corresponding to the current moment in the corresponding first 3D point cloud image, it is determined whether they are located on any first representative surface. The transmission module 83 can first determine the coplanarity coefficient of each first representative surface in the first 3D point cloud image through the pose matrix at the current moment, and the coplanarity coefficient includes a first coefficient value, a second coefficient value, and a third coefficient value. For example, the position of the laser radar scanner can be selected as the center of the circle, the direction of the vehicle form as the positive direction of the horizontal axis, and the direction of the horizontal axis is used as the reference. The direction of the 90° counterclockwise rotation is used as the positive direction of the vertical axis, and the direction perpendicular to the ground is used as the positive direction of the axis to establish a spatial rectangular coordinate system. In addition, for each non-zero element in the distance matrix corresponding to the current moment, the spatial coordinates in the corresponding first 3D point cloud image include a horizontal coordinate, a vertical coordinate, and a vertical coordinate. For each first representative surface, the transmission module 83 multiplies the first coefficient value in the coplanarity coefficient corresponding to the first representative surface by the vertical coordinate to obtain a first product, multiplies the second coefficient value in the coplanarity coefficient corresponding to the first representative surface by the vertical coordinate to obtain a second product, and adds the horizontal coordinate, the first product, the second product, and the third coefficient value to obtain a first result corresponding to the first representative surface. For example, if the coplanarity coefficient of one of the first representative surfaces includes the first coefficient value, the second coefficient value, and the third coefficient value, respectively, and the non-zero element in the distance matrix corresponding to the current moment has the horizontal coordinate, the vertical coordinate, and the vertical coordinate in the spatial coordinates in the corresponding first 3D point cloud image, respectively, x, y, z, the formula for calculating the first result is: x+ay+bz-c. An error value is pre-set for the first result, and the error value may be ε. When the absolute value of the first result is not greater than the error value, it can be determined that the spatial position in the spatial coordinates of the first 3D point cloud image corresponding to the calculated non-zero element is located on the selected first representative surface.
[0104] Optionally, the transmission module 83 is further used to encode the posture matrix and distance matrix at the current moment and transmit the posture matrix and distance matrix at the current moment to the decoding end if the posture matrix of the previous moment does not exist in the historical posture matrix.
[0105] In this scenario example, if the vehicle is running at the first moment of startup, the decoder may not have the pose matrix of the previous moment, so the residual matrix of the first moment does not exist. Therefore, when transmitting to the decoder, if the pose matrix of the previous moment does not exist at the decoder, the transmission module 83 will encode the pose matrix and distance matrix at the current moment and transmit them to the decoder. If the pose matrix of the previous moment exists at the decoder, the transmission module 83 will encode the residual matrix and distance matrix corresponding to the current moment and transmit them to the decoder.
[0106] The data compression device provided by this embodiment first obtains the pose matrix and distance matrix at the current moment by an acquisition module, wherein the pose matrix represents the rotation angle and position of the laser radar scanner, and the distance matrix represents the distance value between the spatial point scanned by the laser radar scanner and the laser radar scanner; the processing module retrieves the pose matrix of the previous moment from the historical pose matrix stored at the decoding end, and calculates the difference between the pose matrix at the current moment and the pose matrix at the previous moment to obtain a residual matrix; the transmission module encodes the residual matrix and the distance matrix at the current moment and transmits them to the decoding end, so that the decoding end obtains the pose matrix at the current moment based on the residual matrix and the pose matrix at the previous moment, and stores the pose matrix and distance matrix at the current moment. Based on the device provided by this embodiment, the residual matrix of the laser radar scanner in the autonomous driving system and the distance matrix between the surrounding environment and the laser radar scanner are compressed and transmitted. Since the transmitted data is matrix data, the amount of transmitted data is greatly reduced, thereby improving transmission efficiency.
[0107] Example 3
[0108] FIG9 is a flow chart of a data compression system provided in a third embodiment of the present disclosure. As shown in FIG9 , the system includes an encoder and a decoder. At the encoder, the current moment's pose matrix is first predicted based on the pose matrices at the previous moment and the previous moment to obtain multiple sets of predicted pose matrices, and the optimal predicted pose matrix is determined. The optimal predicted pose matrix is determined as the pose matrix at the current moment, and the residual matrix is obtained by subtracting it from the pose matrix at the previous moment, and pose encoding is performed on the residual matrix. The distance matrix at the current moment is divided into multiple coding blocks using a VVC-type coding partitioning technique, and the non-zero elements in each coding block are screened. The position encoding of each non-zero element corresponding to the position in the first 3D point cloud image is performed, and it is determined whether each non-zero element is located on any representative surface of the first 3D point cloud image. The non-zero elements located on any representative surface of the first 3D point cloud image are coplanar coefficient encoded, and the non-zero elements not located on any representative surface of the first 3D point cloud image are scatter-coded. The position encoding, coplanar coefficient encoding, and scatter-coded content are then transmitted to the decoder. The decoding end then performs position decoding on the content after position encoding, coplanar coefficient encoding, and scatter point encoding. The coplanar coefficient decoding and scatter point decoding obtain a residual matrix and a distance matrix at the current moment. The pose matrix at the current moment is obtained based on the residual matrix and the pose matrix at the previous moment. Based on the device provided by this embodiment, the residual matrix of the lidar scanner in the autonomous driving system and the distance matrix between the surrounding environment and the lidar scanner are compressed and transmitted. Since the transmitted data is matrix data, the amount of data transmitted is greatly reduced, thereby improving transmission efficiency.
[0109] Example 4
[0110] FIG10 is a schematic structural diagram of an electronic device provided in a fourth embodiment of the present disclosure. As shown in FIG10 , the electronic device includes:
[0111] The electronic device includes a processor 291 and a memory 292; a communication interface 293, and a bus 294. The processor 291, memory 292, and communication interface 293 can communicate with each other via bus 294. The communication interface 293 can be used for information transmission. The processor 291 can invoke logic instructions in the memory 292 to execute the method of the first embodiment described above.
[0112] In addition, the logic instructions in the memory 292 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
[0113] Memory 292, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of the present disclosure. Processor 291 executes the software programs, instructions, and modules stored in memory 292 to perform functional applications and data processing, thereby implementing the method of the first embodiment described above.
[0114] Memory 292 may include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data generated based on the use of the terminal device. Memory 292 may also include high-speed random access memory and non-volatile memory.
[0115] An embodiment of the present disclosure provides a non-transitory computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are executed by a processor, they are used to implement the method described in the above embodiment.
[0116] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the inventions claimed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not claimed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0117] The foregoing may be better understood in light of the following terms:
[0118] Item A1, a data compression method, comprising:
[0119] Obtaining a pose matrix and a distance matrix at the current moment, wherein the pose matrix represents the rotation angle and position of the laser radar scanner, and the distance matrix represents the distance value between the spatial point scanned by the laser radar scanner and the laser radar scanner;
[0120] Retrieving the pose matrix of the previous moment from the historical pose matrix stored at the decoding end, and calculating the difference between the pose matrix at the current moment and the pose matrix at the previous moment to obtain a residual matrix;
[0121] The residual matrix and the distance matrix at the current moment are encoded and transmitted to the decoding end, so that the decoding end obtains the posture matrix at the current moment based on the residual matrix and the posture matrix at the previous moment, and stores the posture matrix and distance matrix at the current moment.
[0122] Clause A2, according to the method described in Clause A1., obtaining the pose matrix at the current moment includes:
[0123] Retrieve the distance matrix and pose matrix of the previous moment;
[0124] Based on the distance matrix at the previous moment and the pose matrix at the previous moment, predicting and obtaining multiple sets of predicted pose matrices at the current moment, and obtaining multiple sets of pose transformation matrices based on the multiple sets of predicted pose matrices and the pose matrix at the previous moment;
[0125] Based on the distance matrix at the previous moment and the internal parameters set by the laser radar scanner, multiple sets of predicted distance matrices are obtained;
[0126] The multiple groups of predicted distance matrices are compared with the distance matrices at the current moment respectively to determine the optimal predicted distance matrix, and the posture transformation matrix corresponding to the optimal predicted distance matrix is used as the optimal posture transformation matrix, and the predicted posture matrix corresponding to the optimal posture transformation matrix is determined as the posture matrix at the current moment.
[0127] Clause A3, according to the method of clause A2, wherein the comparing the multiple sets of predicted distance matrices with the distance matrix at the current moment to determine the optimal predicted distance matrix comprises:
[0128] Converting the multiple sets of predicted distance matrices into multiple predicted 3D point cloud images respectively, and converting the distance matrix at the current moment into a first 3D point cloud image;
[0129] The positions of the spatial points in the first 3D point cloud image are compared with the positions of the spatial points in the multiple predicted 3D point cloud images respectively, and the predicted 3D point cloud image with the most identical spatial positions with the first 3D point cloud image is determined as the optimal predicted 3D point cloud image, and the predicted distance matrix corresponding to the optimal predicted 3D point cloud image is determined as the optimal predicted distance matrix.
[0130] Clause A4. The method according to clause A3, further comprising:
[0131] determining a plurality of first representative surfaces based on positions of spatial points in the first 3D point cloud image, and determining, for each predicted 3D point cloud image, a second representative surface corresponding to each first representative surface in the predicted 3D point cloud image based on positions of spatial points in the predicted 3D point cloud image, and comparing whether the plurality of first representative surfaces overlap with the corresponding second representative surface in each predicted 3D point cloud image;
[0132] The predicted 3D point cloud image having the most overlapping representative surfaces with the first 3D point cloud image is determined as the optimal predicted 3D point cloud image, and the predicted distance matrix corresponding to the optimal predicted 3D point cloud image is determined as the optimal predicted distance matrix.
[0133] Clause A5, according to the method of clause A1, encoding the residual matrix and the distance matrix at the current moment and transmitting them to the decoding end, comprises:
[0134] Dividing the distance matrix at the current moment by using a VVC-type coding partitioning technique to obtain a plurality of sub-distance matrices;
[0135] For each sub-distance matrix, determine whether the spatial positions corresponding to the non-zero elements in the sub-distance matrix and the optimal predicted distance matrix are located on any first representative plane; if the spatial positions corresponding to the non-zero elements are located on any first representative plane, perform coplanar coefficient encoding on the non-zero elements; if the spatial positions corresponding to the non-zero elements are not located on any first representative plane, perform scatter point encoding on the non-zero elements to obtain the encoded distance matrix at the current moment;
[0136] The encoded distance matrix at the current moment is transmitted to the decoding end.
[0137] Clause A6, according to the method of clause A5, the determining whether the spatial positions corresponding to the non-zero elements in the sub-distance matrix and the optimal predicted distance matrix in the first 3D point cloud image are located on any first representative plane comprises:
[0138] Determine, based on the pose matrix at the current moment, a coplanarity coefficient corresponding to each first representative surface, the coplanarity coefficient including a first coefficient value, a second coefficient value, and a third coefficient value;
[0139] Obtaining spatial coordinates of a spatial point corresponding to the non-zero element in the first 3D point cloud image, where the spatial coordinates include a horizontal coordinate, a vertical coordinate, and a vertical coordinate;
[0140] For each first representative surface, multiplying a first coefficient value in the coplanarity coefficient corresponding to the first representative surface by the ordinate to obtain a first product, multiplying a second coefficient value in the coplanarity coefficient corresponding to the first representative surface by the ordinate to obtain a second product, and adding the ordinate, the first product, the second product, and the third coefficient value to obtain a first result corresponding to the first representative surface;
[0141] The first result corresponding to the first representative surface is compared with a set error threshold. If the first result is smaller than the error threshold, it is determined that the non-zero element is located on the first representative surface.
[0142] Clause A7: The method according to any one of clauses A1-A6, after obtaining the pose matrix and distance matrix at the current moment, further comprising:
[0143] If the pose matrix of the previous moment does not exist in the historical pose matrix, the pose matrix and distance matrix at the current moment are encoded and transmitted to the decoding end.
[0144] Item B1, a data compression device comprising:
[0145] An acquisition module, configured to acquire a pose matrix and a distance matrix at a current moment, wherein the pose matrix represents the rotation angle and position of the laser radar scanner, and the distance matrix represents the distance value between a spatial point scanned by the laser radar scanner and the laser radar scanner;
[0146] A processing module is used to retrieve the pose matrix of the previous moment from the historical pose matrix stored at the decoding end, and calculate the difference between the pose matrix at the current moment and the pose matrix at the previous moment to obtain a residual matrix;
[0147] A transmission module is used to encode the residual matrix and the distance matrix at the current moment and transmit them to the decoding end, so that the decoding end obtains the posture matrix at the current moment based on the residual matrix and the posture matrix at the previous moment, and stores the posture matrix and distance matrix at the current moment.
[0148] Clause B2. A device according to clause B1,
[0149] The acquisition module is specifically used to retrieve the distance matrix and the pose matrix of the previous moment;
[0150] The acquisition module is further configured to predict and obtain multiple sets of predicted pose matrices at the current moment based on the distance matrix at the previous moment and the pose matrix at the previous moment, and obtain multiple sets of pose transformation matrices based on the multiple sets of predicted pose matrices and the pose matrix at the previous moment;
[0151] The acquisition module is further configured to obtain multiple sets of predicted distance matrices based on the distance matrix at the previous moment and the internal parameters set by the laser radar scanner;
[0152] The acquisition module is specifically used to compare the multiple groups of predicted distance matrices with the distance matrices at the current moment, determine the optimal predicted distance matrix, and use the posture transformation matrix corresponding to the optimal predicted distance matrix as the optimal posture transformation matrix, and determine the predicted posture matrix corresponding to the optimal posture transformation matrix as the posture matrix at the current moment.
[0153] Clause B3. A device according to clause B2,
[0154] The acquisition module is further configured to convert the plurality of predicted distance matrices into a plurality of predicted 3D point cloud images, and convert the distance matrix at the current moment into a first 3D point cloud image;
[0155] The acquisition module is specifically further used to compare the positions of the spatial points in the first 3D point cloud image with the positions of the spatial points in the multiple predicted 3D point cloud images, determine the predicted 3D point cloud image that has the most identical spatial positions with the first 3D point cloud image as the optimal predicted 3D point cloud image, and determine the predicted distance matrix corresponding to the optimal predicted 3D point cloud image as the optimal predicted distance matrix.
[0156] Clause B4. A device according to clause B3,
[0157] The acquisition module is further configured to determine a plurality of first representative surfaces based on positions of spatial points in the first 3D point cloud image, and for each predicted 3D point cloud image, determine a second representative surface corresponding to each first representative surface in the predicted 3D point cloud image based on positions of spatial points in the predicted 3D point cloud image, and compare whether the plurality of first representative surfaces overlap with the corresponding second representative surface in each predicted 3D point cloud image;
[0158] The acquisition module is specifically further used to determine the predicted 3D point cloud image with the most overlapping representative surfaces with the first 3D point cloud image as the optimal predicted 3D point cloud image, and determine the predicted distance matrix corresponding to the optimal predicted 3D point cloud image as the optimal predicted distance matrix.
[0159] Clause B5. Apparatus according to clause B1.
[0160] The transmission module is specifically configured to divide the distance matrix at the current moment by using a VVC type coding division technology to obtain a plurality of sub-distance matrices;
[0161] The transmission module is further configured to determine, for each sub-distance matrix, whether the spatial positions corresponding to the non-zero elements in the sub-distance matrix and the optimal predicted distance matrix in the first 3D point cloud image are located on any first representative plane; if the spatial positions corresponding to the non-zero elements are located on any first representative plane, perform coplanar coefficient encoding on the non-zero elements; if the spatial positions corresponding to the non-zero elements are not located on any first representative plane, perform scatter point encoding on the non-zero elements to obtain the encoded distance matrix at the current moment;
[0162] The transmission module is further configured to transmit the encoded distance matrix at the current moment to the decoding end.
[0163] Clause B6. A device according to clause B5,
[0164] The transmission module is further configured to determine a coplanarity coefficient corresponding to each first representative surface based on the pose matrix at the current moment, wherein the coplanarity coefficient includes a first coefficient value, a second coefficient value, and a third coefficient value;
[0165] The transmission module is further configured to obtain spatial coordinates of a spatial point corresponding to the non-zero element in the first 3D point cloud image, where the spatial coordinates include a horizontal coordinate, a vertical coordinate, and a vertical coordinate;
[0166] The transmission module is further configured to, for each first representative surface, multiply a first coefficient value in the coplanarity coefficient corresponding to the first representative surface by the ordinate to obtain a first product, multiply a second coefficient value in the coplanarity coefficient corresponding to the first representative surface by the ordinate to obtain a second product, and add the abscissa, the first product, the second product, and the third coefficient value to obtain a first result corresponding to the first representative surface;
[0167] The transmission module is further configured to compare a first result corresponding to the first representative surface with a set error threshold, and if the first result is smaller than the error threshold, determine that the non-zero element is located on the first representative surface.
[0168] Clause B7. A device according to any one of clauses B1 to B6,
[0169] The transmission module is specifically used to encode the posture matrix and distance matrix at the current moment and transmit the posture matrix and distance matrix at the current moment to the decoding end if the posture matrix of the previous moment does not exist in the historical posture matrix.
[0170] Clause C1, an electronic device comprising: a processor, and a memory communicatively connected to the processor;
[0171] The memory stores computer-executable instructions;
[0172] The processor executes the computer-executable instructions stored in the memory to implement the method as described in any one of the preceding items.
[0173] Item D1, a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method as described in any of the preceding items.
[0174] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A data compression method, It is characterized in that include: Obtaining a pose matrix and a distance matrix at the current moment, wherein the pose matrix represents the rotation angle and position of the laser radar scanner, and the distance matrix represents the distance value between the spatial point scanned by the laser radar scanner and the laser radar scanner; Retrieving the posture matrix of the previous moment from the historical posture matrix stored at the decoding end, and calculating the difference between the posture matrix at the current moment and the posture matrix at the previous moment to obtain a residual matrix; The residual matrix and the distance matrix at the current moment are encoded and transmitted to the decoding end, so that the decoding end obtains the posture matrix at the current moment based on the residual matrix and the posture matrix at the previous moment, and stores the posture matrix and distance matrix at the current moment.
2. The method according to claim 1, It is characterized in that The obtaining of the pose matrix at the current moment includes: Retrieve the distance matrix and the pose matrix of the previous moment; Based on the distance matrix at the previous moment and the posture matrix at the previous moment, predict and obtain multiple groups of predicted posture matrices at the current moment, and obtain multiple groups of posture transformation matrices based on the multiple groups of predicted posture matrices and the posture matrix at the previous moment; Based on the distance matrix at the previous moment and the internal parameters set by the laser radar scanner, multiple sets of predicted distance matrices are obtained; The multiple groups of predicted distance matrices are compared with the distance matrices at the current moment respectively to determine the optimal predicted distance matrix, and the posture transformation matrix corresponding to the optimal predicted distance matrix is used as the optimal posture transformation matrix, and the predicted posture matrix corresponding to the optimal posture transformation matrix is determined as the posture matrix at the current moment.
3. The method according to claim 2, It is characterized in that The step of comparing the multiple groups of predicted distance matrices with the distance matrix at the current moment to determine the optimal predicted distance matrix includes: Converting the multiple groups of predicted distance matrices into multiple predicted 3D point cloud images respectively, and converting the distance matrix at the current moment into a first 3D point cloud image; The positions of spatial points in the first 3D point cloud image are compared with the positions of spatial points in the multiple predicted 3D point cloud images respectively, and the predicted 3D point cloud image that has the most identical spatial positions with the first 3D point cloud image is determined as the optimal predicted 3D point cloud image, and the predicted distance matrix corresponding to the optimal predicted 3D point cloud image is determined as the optimal predicted distance matrix.
4. The method according to claim 3, It is characterized in that The method further comprises: Determine a plurality of first representative surfaces based on positions of spatial points in the first 3D point cloud image, and for each predicted 3D point cloud image, determine a second representative surface corresponding to each first representative surface in the predicted 3D point cloud image based on positions of spatial points in the predicted 3D point cloud image, and compare whether the plurality of first representative surfaces overlap with the corresponding second representative surface in each predicted 3D point cloud image; The predicted 3D point cloud image having the most overlapping representative surfaces with the first 3D point cloud image is determined as the optimal predicted 3D point cloud image, and the predicted distance matrix corresponding to the optimal predicted 3D point cloud image is determined as the optimal predicted distance matrix.
5. The method according to claim 1, It is characterized in that The encoding of the residual matrix and the distance matrix at the current moment and transmitting them to the decoding end includes: The distance matrix at the current moment is divided by using a VVC type coding division technology to obtain a plurality of sub-distance matrices; For each sub-distance matrix, determine whether the spatial positions corresponding to the non-zero elements in the sub-distance matrix and the optimal prediction distance matrix are located on any first representative plane; if the spatial positions corresponding to the non-zero elements are located on any first representative plane, perform coplanar coefficient encoding on the non-zero elements; if the spatial positions corresponding to the non-zero elements are not located on any first representative plane, perform scatter point encoding on the non-zero elements to obtain the encoded distance matrix at the current moment; The encoded distance matrix at the current moment is transmitted to the decoding end.
6. The method according to claim 5, It is characterized in that The step of determining whether the non-zero elements in the sub-distance matrix and the optimal prediction distance matrix are located at spatial positions corresponding to the first 3D point cloud image on any first representative plane includes: Determine, based on the pose matrix at the current moment, a coplanar coefficient corresponding to each first representative surface, wherein the coplanar coefficient includes a first coefficient value, a second coefficient value, and a third coefficient value; Obtaining spatial coordinates of a spatial point corresponding to the non-zero element in the first 3D point cloud image, wherein the spatial coordinates include a horizontal coordinate, a vertical coordinate, and a vertical coordinate; For each first representative surface, multiply a first coefficient value in the coplanar coefficient corresponding to the first representative surface by the ordinate to obtain a first product, multiply a second coefficient value in the coplanar coefficient corresponding to the first representative surface by the ordinate to obtain a second product, and add the abscissa, the first product, the second product, and the third coefficient value to obtain a first result corresponding to the first representative surface; The first result corresponding to the first representative surface is compared with a set error threshold, and if the first result is smaller than the error threshold, it is determined that the non-zero element is located on the first representative surface.
7. The method according to any one of claims 1 to 6, It is characterized in that After obtaining the pose matrix and distance matrix at the current moment, it also includes: If the posture matrix of the previous moment does not exist in the historical posture matrix, the posture matrix and distance matrix at the current moment are encoded and transmitted to the decoding end.
8. A data compression device, It is characterized in that include: An acquisition module, used to acquire a pose matrix and a distance matrix at a current moment, wherein the pose matrix represents the rotation angle and position of the laser radar scanner, and the distance matrix represents the distance value between a spatial point scanned by the laser radar scanner and the laser radar scanner; A processing module, used to retrieve the posture matrix of the previous moment from the historical posture matrix stored at the decoding end, and calculate the difference between the posture matrix at the current moment and the posture matrix at the previous moment to obtain a residual matrix; A transmission module is used to encode the residual matrix and the distance matrix at the current moment and transmit them to the decoding end, so that the decoding end obtains the posture matrix at the current moment based on the residual matrix and the posture matrix at the previous moment, and stores the posture matrix and distance matrix at the current moment.
9. The device according to claim 8, It is characterized in that The acquisition module is specifically used to retrieve the distance matrix and the posture matrix of the previous moment; The acquisition module is further configured to predict and obtain multiple groups of predicted pose matrices at the current moment based on the distance matrix at the previous moment and the pose matrix at the previous moment, and obtain multiple groups of pose transformation matrices based on the multiple groups of predicted pose matrices and the pose matrix at the previous moment; The acquisition module is further configured to obtain multiple sets of predicted distance matrices based on the distance matrix at the previous moment and the internal parameters set by the laser radar scanner; The acquisition module is specifically used to compare the multiple groups of predicted distance matrices with the distance matrices at the current moment, determine the optimal predicted distance matrix, and use the posture transformation matrix corresponding to the optimal predicted distance matrix as the optimal posture transformation matrix, and determine the predicted posture matrix corresponding to the optimal posture transformation matrix as the posture matrix at the current moment.
10. The device according to claim 9, It is characterized in that The acquisition module is further configured to convert the multiple groups of predicted distance matrices into multiple predicted 3D point cloud images respectively, and convert the distance matrix at the current moment into a first 3D point cloud image; The acquisition module is specifically used to compare the positions of spatial points in the first 3D point cloud image with the positions of spatial points in the multiple predicted 3D point cloud images, determine the predicted 3D point cloud image that has the most identical spatial positions with the first 3D point cloud image as the optimal predicted 3D point cloud image, and determine the predicted distance matrix corresponding to the optimal predicted 3D point cloud image as the optimal predicted distance matrix.
11. The device according to claim 10, It is characterized in that The acquisition module is further configured to determine a plurality of first representative surfaces based on the positions of the spatial points in the first 3D point cloud image, and for each predicted 3D point cloud image, determine a second representative surface corresponding to each first representative surface in the predicted 3D point cloud image based on the positions of the spatial points in the predicted 3D point cloud image, and compare whether the plurality of first representative surfaces overlap with the corresponding second representative surface in each predicted 3D point cloud image; The acquisition module is specifically used to determine the predicted 3D point cloud image that has the most overlapping representative surfaces with the first 3D point cloud image as the optimal predicted 3D point cloud image, and determine the predicted distance matrix corresponding to the optimal predicted 3D point cloud image as the optimal predicted distance matrix.
12. The device according to claim 8, It is characterized in that The transmission module is specifically used to divide the distance matrix at the current moment by using a VVC type coding division technology to obtain a plurality of sub-distance matrices; The transmission module is further specifically used to determine, for each sub-distance matrix, whether the spatial position corresponding to the non-zero element in the sub-distance matrix and the optimal prediction distance matrix is located on any first representative plane, if the spatial position corresponding to the non-zero element is located on any first representative plane, then the non-zero element is encoded with a coplanar coefficient, if the spatial position corresponding to the non-zero element is not located on any first representative plane, then the non-zero element is scatter-coded to obtain the encoded distance matrix at the current moment; The transmission module is further specifically used to transmit the encoded distance matrix at the current moment to the decoding end.
13. The device according to claim 12, It is characterized in that The transmission module is further configured to determine, based on the pose matrix at the current moment, a coplanar coefficient corresponding to each first representative surface, wherein the coplanar coefficient includes a first coefficient value, a second coefficient value, and a third coefficient value; The transmission module is further configured to obtain the spatial coordinates of the spatial point corresponding to the non-zero element in the first 3D point cloud image, wherein the spatial coordinates include a horizontal coordinate, a vertical coordinate and a vertical coordinate; The transmission module is further configured to, for each first representative surface, multiply a first coefficient value in the coplanar coefficient corresponding to the first representative surface by the ordinate to obtain a first product, multiply a second coefficient value in the coplanar coefficient corresponding to the first representative surface by the ordinate to obtain a second product, and add the abscissa, the first product, the second product, and the third coefficient value to obtain a first result corresponding to the first representative surface; The transmission module is further configured to compare a first result corresponding to the first representative surface with a set error threshold, and if the first result is smaller than the error threshold, determine that the non-zero element is located on the first representative surface.
14. The device according to any one of claims 8 to 13, It is characterized in that The transmission module is specifically used to encode the posture matrix and distance matrix at the current moment, and then transmit the posture matrix and distance matrix at the current moment to the decoding end if the posture matrix at the previous moment does not exist in the historical posture matrix.
15. An electronic device, It is characterized in that include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.
16. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
Citation Information
Patent Citations
Data compression method and device, equipment and medium
CN119001760A
Kalman filtering based attitude control method and device
CN107272718A
Radar data compression method based on autoregressive model frame prediction
CN108390871A
Method for improving data transmission speed of laser radar and laser radar
CN111736114A
Radar data compression method and device
CN114244907A
