Data encoding method, decoding method, device, storage medium and computer device

By encoding point cloud data into point groups and constructing context point groups, and using an entropy encoder to capture the correlation between point cloud data, the problems of large data storage space and low transmission efficiency in point cloud data are solved, thus optimizing storage space and improving transmission efficiency.

CN120017836BActive Publication Date: 2026-03-24PENG CHENG LAB
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Point cloud data consumes a lot of storage space and has low transmission efficiency. Existing compression schemes cannot effectively capture the correlation between points, resulting in a lot of redundant information.

Method used

By dividing the point cloud data into encoded point groups, a context point group is constructed, and an entropy encoder is used to capture the correlation between point data to generate an attribute code stream.

Benefits of technology

While preserving the original attribute information of point cloud data, storage space usage is reduced and transmission efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120017836B_ABST
    Figure CN120017836B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a data encoding method, a decoding method, a device, a storage medium and a computer device, point cloud data is acquired, point data thereof is encoded point group division, and a plurality of encoded point groups are obtained. Then, a context point group is constructed for each encoded point group. For a first encoded point group with a serial number of one, attribute values of point data in the first encoded point group are encoded, and a first sub-attribute code stream is obtained. For a second encoded point group with a serial number not equal to one, attribute value probability distribution is determined according to point data of the second encoded point group and point data in the context point group, and then the second encoded point group is input into an entropy encoder to obtain a second sub-attribute code stream. Finally, the first and second sub-attribute code streams are integrated into an attribute code stream of the point cloud data. Through the above operation, redundancy can be reduced or avoided, storage space occupation can be reduced, and data transmission efficiency can be improved. On the basis of reserving original attribute information of massive point cloud data, redundancy can be reduced or avoided, storage space occupation can be reduced, and transmission efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, and in particular to a data encoding method, decoding method, apparatus, storage medium, and computer equipment. Background Technology

[0002] Point clouds are a commonly used form of 3D data representation, widely applied in fields such as computer vision, autonomous driving, and robotics. Point cloud representations preserve the original geometric information in 3D space, thus playing a crucial role in scene understanding applications. In recent years, with the development of deep learning technology, point cloud processing methods have also made significant progress.

[0003] In related technologies, point clouds require a large amount of storage space and have high transmission costs. Compared with traditional image and video data, point clouds exhibit highly irregular structures with varying densities and scales. Common attribute compression schemes cannot effectively capture the correlation between points, resulting in redundant attribute information in the compressed point cloud data, occupying a large amount of storage space, and the transmission efficiency is also reduced due to the redundancy. Summary of the Invention

[0004] The main objective of this application is to provide a data encoding method, decoding method, apparatus, storage medium, and computer equipment, aiming to offer a novel attribute compression scheme that effectively captures the correlation between points, reduces or avoids redundancy while preserving the original attribute information of massive point cloud data, reduces storage space usage, and improves transmission efficiency. The technical solution is as follows:

[0005] In a first aspect, embodiments of this application provide a data encoding method, including:

[0006] Acquire point cloud data, and divide multiple point data in the point cloud data into coded point groups to form multiple coded point groups;

[0007] Based on each of the coded point groups, a context point group is constructed for multiple point data in the point cloud data to obtain the context point group corresponding to each of the coded point groups;

[0008] Encode the attribute values ​​of the data points in the first coding point group with sequence number 1 to obtain the first sub-attribute code stream;

[0009] For each second coding point group whose sequence number is not one, the probability distribution of the attribute values ​​of each second coding point group is determined based on the point data in each second coding point group and the point data in the corresponding context point group.

[0010] The probability distribution of each attribute value is input to the entropy encoder to obtain the second sub-attribute code stream corresponding to each second coding point group, thereby obtaining the attribute code stream of the point cloud data. The attribute code stream includes the first sub-attribute code stream and the second sub-attribute code stream.

[0011] Secondly, embodiments of this application provide a data decoding method, including:

[0012] Obtain the attribute code stream of point cloud data;

[0013] The point cloud data is divided into multiple decoding point groups.

[0014] Based on each of the decoding point groups, a context point group is constructed for multiple point data in the point cloud data to obtain the context point group corresponding to each of the decoding point groups;

[0015] Decode the attribute value of the data point in the first encoded point group with sequence number one from the attribute bitstream to obtain the reconstructed value of the data point in the first encoded point group.

[0016] For each second coding point group whose sequence number is not one, the probability distribution of the attribute values ​​of each second coding point group is determined based on the point data in each second coding point group and the point data in the corresponding context point group.

[0017] The probability distribution of each attribute value and the corresponding attribute bitstream are input into the entropy decoder to obtain the attribute reconstruction value of the midpoint data of the second coding point group corresponding to each second coding point group.

[0018] Thirdly, embodiments of this application provide a data encoding apparatus, including:

[0019] The first partitioning unit is used to acquire point cloud data and divide multiple point data in the point cloud data into coded point groups to divide multiple coded point groups.

[0020] The first construction unit is used to construct a context point group based on each of the coded point groups for multiple point data in the point cloud data, so as to obtain the context point group corresponding to each of the constructed coded point groups.

[0021] The encoding unit is used to encode the attribute values ​​of the point data in the first encoding point group with sequence number one to obtain the first sub-attribute code stream;

[0022] The first determining unit is used to determine the probability distribution of attribute values ​​for each second coding point group whose sequence number is not one, based on the point data in each second coding point group and the point data in the corresponding context point group.

[0023] The first input unit is used to input the probability distribution of each attribute value to the entropy encoder to obtain the second sub-attribute code stream corresponding to each second coding point group, thereby obtaining the attribute code stream of the point cloud data. The attribute code stream includes the first sub-attribute code stream and the second sub-attribute code stream.

[0024] Fourthly, embodiments of this application provide a data decoding apparatus, including:

[0025] The acquisition unit is used to acquire the attribute code stream of point cloud data;

[0026] The second partitioning unit is used to partition multiple point data in the point cloud data into multiple decoding point groups.

[0027] The second construction unit is used to construct a context point group based on each of the decoding point groups for multiple point data in the point cloud data, so as to obtain the context point group corresponding to each of the constructed decoding point groups.

[0028] The decoding unit is used to decode the attribute value of the point data in the first coding point group with sequence number one from the attribute code stream to obtain the reconstructed value of the point data in the first coding point group.

[0029] The second determining unit is used to determine the probability distribution of attribute values ​​for each second coding point group whose sequence number is not one, based on the point data in each second coding point group and the point data in the corresponding context point group.

[0030] The second input unit is used to input the probability distribution of each attribute value and the corresponding attribute code stream to the entropy decoder to obtain the attribute reconstruction value of the midpoint data of the second coding point group corresponding to each second coding point group.

[0031] Fifthly, embodiments of this application provide a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute the data encoding method or data decoding method as described above.

[0032] In a sixth aspect, embodiments of this application provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the data encoding method or data decoding method as described above.

[0033] In this embodiment, point cloud data is acquired, and multiple point data points in the point cloud data are divided into coded point groups. Context point groups are constructed based on each coded point group, resulting in a context point group corresponding to each coded point group. The attribute values ​​of the point data in the first coded point group (with an index of 1) are encoded to obtain a first sub-attribute codestream. For each second coded point group (with an index other than 1), the attribute value probability distribution of each second coded point group is determined based on the point data in each second coded point group and the point data in the corresponding context point group. Each attribute value probability distribution is input to an entropy encoder to obtain a second sub-attribute codestream corresponding to each second coded point group, thus obtaining the attribute codestream of the point cloud data. The attribute codestream includes both the first and second sub-attribute codestreams. In this way, by dividing the acquired point cloud data into coded point groups, the point cloud data is divided into multiple coded point groups. This grouping method can place points with similar features or spatially close locations in the same group, facilitating subsequent processing. When constructing context point groups based on each coded point group, it is possible to better consider the local information around each point, effectively capture the correlation between point data, reduce or avoid redundancy while retaining the original attribute information of massive point cloud data, reduce storage space occupation, and improve transmission efficiency. Attached Figure Description

[0034] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0035] Figure 1 This is a flowchart illustrating the data encoding method provided in an embodiment of this application.

[0036] Figure 2 This is a schematic diagram of the coding point group and the corresponding context point group provided in the embodiments of this application.

[0037] Figure 3 This is a schematic diagram of the structure of the attention network provided in an embodiment of this application.

[0038] Figure 4 This is a flowchart illustrating the data decoding method provided in an embodiment of this application.

[0039] Figure 5 This is a schematic diagram of the structure of the data encoding device provided in the embodiments of this application.

[0040] Figure 6This is a schematic diagram of the structure of the data decoding device provided in the embodiments of this application.

[0041] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0042] To enable those skilled in the art to better understand the solutions of this application, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0043] It should be noted that while some processes described in the specification, claims, and accompanying drawings contain multiple steps that appear in a specific order, it should be clearly understood that these steps may not be performed in the order they appear herein, or may be performed in parallel. The step numbers are merely used to distinguish different steps and do not represent any particular order of execution. Furthermore, descriptions such as "first," "second," or "objective" in this document are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0044] Before providing a further detailed description of the embodiments of this disclosure, the terms and concepts used in these embodiments are explained, and they are subject to the following interpretations:

[0045] Point cloud data is a data format used to represent surface information of objects or scenes in three-dimensional space.

[0046] The data composition of point cloud data includes:

[0047] 1. Spatial Coordinate Information: The most basic is three-dimensional spatial coordinates containing a large number of points, usually represented in the form of (X, Y, Z). These coordinate points can depict the geometry of an object or scene in three-dimensional space. For example, when scanning a building, the position coordinates of various points on the building's outer surface are obtained through a laser scanning device, and these coordinates are combined to outline the building's approximate shape. For some applications, higher-dimensional spatial representations may also be involved. For example, in Geographic Information System (GIS) applications, coordinate information under a geospatial reference coordinate system may also be included for precise positioning.

[0048] 2. Attribute Information: Besides coordinates, point cloud data can also contain other attributes for each point. Color (RGB) is a common attribute, allowing point clouds to appear more realistic during visualization. For example, in 3D reconstruction, assigning color attributes to point clouds makes it easier to distinguish different parts of an object. Normal vectors are also important attributes. They represent the direction of light on the point cloud surface at that point and are crucial for tasks such as lighting calculations and surface reconstruction. For example, in computer graphics, the normal vectors of point clouds can accurately simulate the reflection and scattering effects of light on an object's surface. Reflectance intensity records the intensity of the reflected signal at each point, which is common in methods like laser scanning. It is related to factors such as the material and roughness of the object's surface. For example, smooth metal surfaces have high reflection intensity, while rough fabric surfaces have low reflection intensity.

[0049] Currently, considering coding performance and computational efficiency, the traditional Point Cloud Attribute Coding (PCAC) scheme, specifically the Moving Picture Experts Group Geometry-based Point Cloud Compression (MPEG G-PCC) reference software TMC13, includes Pred-Lifting (PLT) as its attribute coding tool. PLT is an enhanced lifting framework built on a Level of Detail (LoD) structure. The LoD structure used in G-PCC relies on Euclidean distance calculations, resulting in high computational complexity, and the point-to-point autoregressive coding process limits the efficiency of parallel computation. Furthermore, manually designed methods have several drawbacks: they rely on manually designed graphics and transformation matrices, failing to fully capture complex and diverse geometries; moreover, they make strong assumptions about the high correlation between geometry and attributes, a condition that may not always hold true in the real world.

[0050] This deep learning-based approach employs an end-to-end cloud attribute combination framework, extending the multi-scale structure of Sparse Point Cloud Attribute Encoding (SparsePCGC). It uses a sparse CNN to estimate the Laplacian distribution parameters to derive attribute probabilities. However, existing deep learning-based PCAC methods have several limitations. One key issue is their poor generalization ability to point clouds with different attributes, geometric scales, and densities. Furthermore, most of these methods rely on autoregressive background models, resulting in high time complexity.

[0051] To address the aforementioned problems, this application proposes a method that involves acquiring point cloud data, dividing it into multiple coded point groups, and then constructing context point groups based on each coded point group. The method further involves encoding the attribute values ​​of the point data in the first coded point group (with an index of 1) to obtain a first sub-attribute codestream. For each second coded point group (with an index other than 1), the method determines the attribute value probability distribution based on the point data in each second coded point group and the corresponding point data in the context point group. This probability distribution is then input to an entropy encoder to obtain a second sub-attribute codestream corresponding to each second coded point group, resulting in an attribute codestream for the point cloud data. This attribute codestream includes both the first and second sub-attribute codestreams. By dividing the acquired point cloud data into coded point groups, the point cloud data is divided into multiple coded point groups. This grouping method allows points with similar features or spatially close proximity to be grouped together, facilitating subsequent processing. When constructing context point groups based on each coded point group, the local information around each point can be better considered, effectively capturing the correlation between point data. This reduces or avoids redundancy while preserving the original attribute information of massive point cloud data, thereby reducing storage space usage and improving transmission efficiency. Please refer to the specific embodiments below for details.

[0052] Please see Figure 1 , Figure 1 A flowchart illustrating the data encoding method provided in this application embodiment. The data encoding method includes:

[0053] In step 201, point cloud data is acquired, and multiple point data in the point cloud data are divided into coded point groups to form multiple coded point groups.

[0054] Point cloud data is obtained by dividing all collected point data into slices. Slice division usually refers to dividing a dataset (such as an array, matrix, point cloud, etc.) into multiple smaller parts according to certain rules. These smaller parts are called "slices".

[0055] For example, spatial partitioning in point cloud data encoding: In point cloud data encoding, "slice partitioning" may be used to divide the point cloud according to its spatial location. For instance, a point cloud in three-dimensional space can be divided into multiple horizontal "slices" according to the coordinate axis direction (such as the Z-axis). Each "slice" contains points within that specific height range, which allows for convenient individual processing of point clouds at different height levels. For example, in topographic mapping, it is possible to analyze the topographic features at different altitudes separately.

[0056] Specifically, after obtaining multiple slices, a level-of-detail (LoD) structure is quickly generated for the point cloud data in each slice. Each LoD structure corresponds to an encoded point group and a context point group.

[0057] The point cloud data is divided into multiple coded point groups. For example, it can be divided into coded point groups R1, R2, ..., R... L .

[0058] In some implementations, the step of dividing the multiple point data in the point cloud data into coded point groups, resulting in multiple coded point groups, includes:

[0059] (1) Obtain the sorting code corresponding to each point data in each point cloud data respectively, and sort each point data in each point cloud data in ascending order of the sorting code to obtain a candidate point dataset. The sorting code is a Morton code or a Hilbert code.

[0060] (2) Obtain the preset number of data points for each group of encoded points to be written;

[0061] (3) Based on the number of real-time point data in the candidate point dataset and the number of each preset point data, the multiple point data in the point cloud data are divided into coded point groups to form multiple coded point groups.

[0062] In this process, the sorting code for each point data point can be either a Morton code or a Hilbert code. When the sorting code is a Hilbert code, it is determined by the Hilbert curve. In point cloud data processing, points in 3D space are indexed according to the order of the Hilbert curve. First, the spatial range of the 3D point cloud data needs to be divided into a 3D grid (similar to small cube units in 3D space). Then, these grid units are traversed according to the rules of the Hilbert curve, and each unit is assigned an index value. When a point in the point cloud data falls into a certain grid unit, these points inherit the index of that unit, thus achieving indexing of all points. In this way, the points in the point cloud data have a certain order in the index, which reflects the relative positional relationship of the points in 3D space.

[0063] After obtaining the sort code for each point data, the point data is sorted according to the sort code to obtain the candidate point dataset.

[0064] For example, a point cloud containing N points is defined as P = {p1, ..., p...} N}, a list of unselected points, denoted as P. ns P ns This is the candidate point dataset. Initially set to P. ns=P. During the process of dividing the coding point groups, P ns The point data in the array are arranged in order of their Hilbert sort codes, when P ns When it becomes empty, the construction is complete.

[0065] For each LoD layer and its corresponding set of encoded points to be written, a pre-defined number of data points is set, specifically {n1,…,n...}. L For example, the number of preset data points for the code point group to be written in the first LoD layer is n1 = 16, and the number of preset data points for the code point group to be written in the second LoD layer is n2 = 32, etc., where n l =2×n l-1 That is, the number of preset point data for the current LoD layer corresponding to the coding point group to be written is twice the number of preset point data for the previous LoD layer corresponding to the coding point group to be written. During the partitioning process, based on the number of real-time point data in the candidate point dataset and the number of each preset point data, the point data to be written to each coding point group is determined sequentially from the candidate point dataset, resulting in multiple coding point groups.

[0066] In some implementations, the step of dividing multiple point data in the point cloud data into coded point groups based on the number of real-time point data in the candidate point dataset and the number of each preset point data includes:

[0067] (1.1) Determine the number of preset point data in the target coding point group to be written, and determine the number of real-time point data in the candidate point dataset;

[0068] (1.2) When the target coding point group is not the last coding point group to be added, the point data of the candidate point dataset is divided according to the preset number of point data and the real-time number of point data to obtain multiple candidate point data subsets.

[0069] (1.3) Extract one point data from each candidate point data subset in sequence and put it into the target coding point group to obtain the initially divided coding point group;

[0070] (1.4) When the next group of coding points to be added is not the last group of coding points to be added, the next group of coding points to be added is determined as the target group of coding points, and the steps of determining the preset number of point data of the target group of coding points and determining the number of real-time point data in the candidate point dataset are returned to be executed until the target group of coding points is the last group of coding points to be added, so as to obtain multiple initially divided groups of coding points.

[0071] (1.5) Put the remaining point data in the candidate point dataset into the last group of coding points to be added to obtain the initial division of coding point groups;

[0072] (1.6) When the number of target point data in each of the initially divided coding point groups is less than or equal to the first point number threshold, each of the initially divided coding point groups is determined as the divided coding point group.

[0073] The process of dividing the coding point group is as follows:

[0074] Determine the target encoding point group R to be written. l The number of preset point data n l And determine the candidate point dataset P ns The number of real-time point data in R; l Not the last group of coding points to be added, R L Then, based on the preset number of point data R l and the number of real-time point data | P ns |, for candidate point dataset P ns The point data is divided into multiple candidate point data subsets; one point data is uniformly selected and extracted from each candidate point data subset and added to the target coding point group to obtain the initially divided coding point group; after the current target coding point group to be written is completed, if the next coding point group to be added R is... l+1 Not for the last code point group R to be added L When the next set of coding points to be added is determined as the target coding point set, the process is repeated. It should be noted that the candidate point dataset P... ns The number of candidate point data in the data will gradually decrease with each extraction, resulting in a decrease in the number of real-time point data |P ns The iteration gradually decreases, and the loop terminates when the target coding point group is the last coding point group to be added. This yields the initial coding point groups from the added coding point group corresponding to the first LoD layer to the (L-1)th LoD layer. For the coding point group R to be added corresponding to the Lth LoD layer... L The point data from the candidate point dataset is placed into the last group of encoded points to be added, i.e., R. L = Current P ns The initial division of the coding point group R is obtained. L .

[0075] Among them, the first point quantity threshold M is set. r This limits the maximum number of data points in each LoD layer's corresponding coding point group. If the number of target data points in each initially divided coding point group is less than or equal to the first threshold, it means that the initially divided coding point group has not exceeded the first threshold, and each initially divided coding point group is then determined as the divided coding point group.

[0076] In some embodiments, the method further includes:

[0077] (1.1) When there is a group of coding points to be divided in each of the initially divided coding point groups where the number of corresponding target point data is greater than the first point number threshold, the group of coding points to be divided is divided according to the first point number threshold to obtain the divided coding point groups.

[0078] (1.2) Other initially divided coding point groups besides the coding point group to be divided are determined as the divided coding point groups.

[0079] Among them, for each initially divided coding point group R l Let l∈1,…,L, obtain the number of target point data in each initially divided coding point group |R l If the number of target point data points is R l | Less than or equal to the first point quantity threshold M r Then, the preliminarily divided coding point groups whose corresponding target point data quantity is less than or equal to the first point quantity threshold are determined as the divided coding point groups; if the target point data quantity |R l | Greater than the first threshold M r That is, from multiple initially divided coding point groups, select the coding point groups whose corresponding target point data quantity is greater than the first point quantity threshold, and then divide them according to the first point quantity threshold M. r The group of coding points to be divided is divided to obtain the divided group of coding points.

[0080] For example, the number of target point data |R4| in the initially divided coding point group R4 is 8, and the first point number threshold M r If the value is 4, then the initially divided coding point group R4 is divided according to 4, resulting in R... 4,1 and R 4,2 There are two coding point groups, and the number of data points in each coding point group is 4.

[0081] Based on the number of target point data in each initially divided coding point group and the first point number threshold, at least one initially divided coding point group is divided to obtain the divided coding point group.

[0082] In some implementations, the step of dividing the candidate point dataset into multiple candidate point data subsets based on the preset number of point data and the real-time number of point data includes:

[0083] (1.1) Calculate the ratio of the number of real-time point data to the number of preset point data to obtain the number of divisions;

[0084] (1.2) Divide the point data of the candidate point dataset according to the number of divisions to obtain multiple candidate point data subsets.

[0085] The specific method for dividing the point data of the candidate point dataset into multiple candidate point data subsets is as follows:

[0086] Calculate the number of real-time point data points | P ns | Number of preset point data R l The ratio of the values ​​yields the number of partitions K. l That is, the interval length in the candidate point dataset, after obtaining the number of partitions K l Then, according to the number of divisions K l For candidate point dataset P ns The point data is evenly divided to obtain multiple candidate point data subsets.

[0087] In step 202, a context point group is constructed for multiple point data in the point cloud data based on each of the coded point groups, so as to obtain the context point group corresponding to each of the coded point groups.

[0088] In step 201, after determining the coding point group corresponding to each LoD layer, a context point group is constructed for multiple point data in the point cloud data based on each coding point group, so as to obtain the context point group corresponding to each coding point group.

[0089] In some implementations, the step of constructing context point groups for multiple point data in the point cloud data based on each of the coded point groups, to obtain a context point group corresponding to each of the constructed coded point groups, includes:

[0090] (1) Obtain the sequence number of each context point group, and obtain the sequence number of each of the coding point groups;

[0091] (2) Set the context point group with the sequence number one to empty;

[0092] (3) For each context point group whose sequence number is not one, obtain the corresponding target sequence number;

[0093] (4) Obtain the total number of point data for each coded point group whose sequence number is from one to the target sequence number;

[0094] (5) Compare the total quantity with the second point quantity threshold to obtain the comparison result;

[0095] (6) Based on the comparison results, determine the target point data of the context point group of the target number;

[0096] (7) Write the target point data into the context point group of the target sequence number to obtain the context point group corresponding to each of the constructed coded point groups.

[0097] Since each LoD layer corresponds to a group of encoding points and a group of context points, the encoding point groups and context point groups are corresponding. Therefore, the sequence number of each context point group and the sequence number of each encoding point group are obtained. For the context point group C1 with a sequence number of one, it is treated as an empty set; for the context point groups C2, ..., C with sequence numbers other than one... L Determine the corresponding target sequence number, and obtain the total number of point data for each encoded point group with sequence number from one to the target sequence number; set a second point quantity threshold M. C To limit the size of each context point group, the total number is compared with the second point number threshold to obtain the comparison result. Based on the comparison result, the target point data of the context point group of the target sequence number is determined. The target point data is written into the context point group of the target sequence number to obtain the context point group corresponding to each of the constructed coded point groups.

[0098] In some implementations, determining the target point data of the context point group of the target sequence number based on the comparison result includes:

[0099] (1.1) If the comparison result indicates that the total number is less than or equal to the second point number threshold, then the point data of each coded point group with the sequence number from one to the target sequence number is determined as the target point data of the context point group of the target sequence number.

[0100] (1.2) If the comparison result indicates that the total number is greater than the second point number threshold, then obtain the average index value of each point data in the coded point group of the target sequence number;

[0101] (1.3) Calculate the index distance between the index value of each point data and the average index value;

[0102] (1.4) Arrange each point data in ascending order of index distance to obtain the point data sequence;

[0103] (1.5) Select the point data of the second point quantity threshold from the point data sequence in the order of front to back, and determine the selected point data as the target point data of the context point group of the target sequence number.

[0104] If the comparison result indicates that the total number is less than or equal to the second point number threshold, it means that the number of points in the context point group that will be used as the target number has not exceeded the second point number threshold. In this case, the point data of each encoded point group with the number from one to the target number is determined as the target point data of the context point group of the target number.

[0105] If the comparison result indicates that the total number of points is greater than the second point quantity threshold, it means that the number of points in the context point group that will be used as the target sequence number exceeds the second point quantity threshold. Then, the average index value of each point data in the coded point group of the target sequence number is obtained, and the index distance between the index value of each point data and the average index value is calculated. Each point data is arranged in ascending order of index distance to obtain a point data sequence. Point data that meet the second point quantity threshold are selected from the point data sequence in the order from front to back, and the selected point data is determined as the target point data of the context point group of the target sequence number.

[0106] For example, if the target index is l, it will be used as the context point group C. l The number of points exceeds the second point number threshold M. C When calculating the code point group R with sequence number l. l The average index value of each data point is used, and the nearest M is selected based on the index distance between each data point and the average index value. C Each data point is used as context point group C. l The number of target points.

[0107] The specific method for determining the context point group can be found using the following formula:

[0108]

[0109] For details, please refer to Figure 2 , Figure 2 This is a schematic diagram of the coding point group and the corresponding context point group provided in the embodiments of this application.

[0110] The point cloud data consists of 15 points arranged in Hilbert order, with Hilbert index values ​​being subscript numbers. The LoD structure has four layers, with the fourth layer containing more than M points. r =4, so it is refined into two sub-layers. After constructing the encoding point group, the corresponding context point group is constructed. Initialized C 4,2 The number of points contained is greater than M C =8, calculate R 4,2 The average Hilbert index size is 9.25. Then, the 8 closest points are selected based on index distance, resulting in C. 4,2 .

[0111] In step 203, the attribute values ​​of the point data in the first coding point group with sequence number one are encoded to obtain the first sub-attribute code stream.

[0112] Since the context point group C1 corresponding to the first LoD layer is an empty set, the attributes of the corresponding coding point group R1 are directly saved, and the attribute values ​​of the point data in the first coding point group with the sequence number one are encoded to obtain the first sub-attribute bitstream.

[0113] In step 204, for each second coding point group whose sequence number is not one, the probability distribution of the attribute value of each second coding point group is determined based on the point data in each second coding point group and the point data in the corresponding context point group.

[0114] Specifically, for each second coding point group R2,…,R whose sequence number is not one... L Based on each second coding point group R l The point data and the corresponding context point group C l The point data in the data determines each second coded point group R. l The probability distribution of attribute values.

[0115] In some implementations, determining the attribute value probability distribution of each second encoded point group based on the point data in each second encoded point group and the point data in the corresponding context point group includes:

[0116] (1) For each first point data in each second coding point group, a first preset number of candidate point data with smaller distances are selected from the corresponding target context point group based on a preset nearest neighbor algorithm;

[0117] (2) Sort each candidate point data according to Euclidean distance to obtain the corresponding sub-context point group;

[0118] (3) Based on the coordinates of the first point data and the attribute values ​​and coordinates of the first preset number of candidate point data in the corresponding sub-context point group, determine the preliminary estimated value of the first point data;

[0119] (4) The point data in the first second preset number of the corresponding sub-context point group are identified as neighboring point data, forming a neighboring point data set;

[0120] (5) Filter out a third preset number of second point data that are close to each of the neighboring point data from the sub-context point group to obtain the second point data set corresponding to each of the neighboring point data;

[0121] (6) Input the attribute value and coordinates of each second point data in the second point data set into the first attention network to obtain the output local region features;

[0122] (7) Input the local region features and the neighboring point data in the neighboring point data set into the second attention network to obtain the feature vector of the first point data output;

[0123] (8) Input the feature vector into a multilayer perceptron to obtain the predicted value of the first point data and the corresponding scale parameter;

[0124] (9) Calculate the sum of the preliminary estimated value and the corresponding predicted value of the first point data to obtain the distribution parameters of the first point data;

[0125] (10) Based on the distribution parameters and corresponding scale parameters of the first point data, the attribute value probability distribution of each first point data in the second coding point group is calculated to obtain the attribute value probability distribution of each first point data.

[0126] (11) Perform a multiplication of the probability distribution of the attribute values ​​of each of the first point data in the second coding point group to obtain the probability distribution of the attribute values ​​of each of the second coding point groups.

[0127] For the Lod layer where l>1, for each corresponding second coding point group R l Each first point data p in m (Subscript l omitted), the k-nearest neighbor (KNN) algorithm is used to select from the corresponding context point group C. l Find the first preset number K candidate points that are closest to the data, and sort them by Euclidean distance to form a sub-context point group S. m .

[0128] In obtaining the sub-context point group S m Then, a preliminary prediction method based on interpolation is used to estimate p. m The attribute value, i.e., the preliminary estimate. The specific method for calculating the preliminary estimate is to determine the preliminary estimate of the first point data based on the coordinates of the first point data and the coordinates of the first preset number of candidate point data in the corresponding sub-context point group.

[0129] Among them, the preliminary estimate The determination method can refer to the following formula:

[0130]

[0131] Where, p j For the sub-context point group S m The candidate point data of the first preset number (e.g., the first three) in the data, x j For candidate point data p j The corresponding attribute value. mj For attribute value x j The corresponding weights can be determined using the following formula:

[0132]

[0133] Among them, z j For candidate point data pj The corresponding coordinates, z m For the first data point p m The coordinates.

[0134] After that, the sub-context point group S m The first K1 (second preset number) data points are designated as the first data point p. m The set of nearest neighbor data is called S′. mk ={p mk}, where k = 1, ..., K1. For each neighboring point data p mk Find it in the context point group S m The nearest K2 (third preset number) data points, i.e., the second data points, are used to form the neighboring data p. nk The corresponding second data set S″ mk ,Right now Where t = 1, ..., K2.

[0135] Specifically, after obtaining the second data set S″ mk Then, each second point data in the second point data set... attribute values and coordinates Input is fed into the first attention network. The first attention network first selects each second point of data... coordinates and the corresponding attribute values Normalization is performed to obtain normalized coordinates. and normalized attribute values

[0136] Normalized coordinates The determination method can refer to the following formula:

[0137]

[0138] in, For the first and second data points The corresponding coordinates The second data point being calculated. The corresponding coordinates To calculate the coordinates of each second point data point from 2 to K2 and the first second point data point. Corresponding coordinates The maximum distance value among the distances is used to calculate the ratio, thus obtaining the data for each second point. Normalized coordinates The first attention network is mainly used to determine each second point of data. Corresponding sub-local region features and the corresponding attention score And for multiple second-point data The corresponding sub-local region features and their corresponding attention scores are weighted and summed to obtain the final output local region feature f. mk .

[0139] Normalized attribute values The determination method can refer to the following formula:

[0140]

[0141] Among them, MAX attri The maximum attribute value. For the second point of data The corresponding attribute values. For color attributes, compression calculations are performed in the YCoCg color space, with a maximum luminance of 56 and a maximum chromaticity of 512. Coordinate normalization ensures that S″... mk The location of a point within the neighborhood is determined by the neighboring point data p. mk Centered on the first data point p, the role of attribute normalization is to use the first data point p as the reference. m Centered on this, attribute value normalization can be viewed as a form of residual learning, enabling explicit modeling of attribute residuals. Experimental results confirm that the loss converges faster.

[0142] Among them, attention score It can be determined using the following formula:

[0143]

[0144] This formula represents the attention mechanism proposed in PTv2, which incorporates positional embeddings and subtraction relationships. For the first and second data points The corresponding sub-local region features, δ mul () is used for normalized coordinates Perform some multiplication-related transformation operation. This can be a linear or nonlinear operation on the input coordinates, such as scaling, weighting, or other multiplicative forms, ψ. key () and ψ query These two functions are typically used to convert input feature vectors into "key" and "query" vectors for attention calculations. Their input is a feature vector, such as... And convert it into a form suitable for calculating relevance or match. δ bias () is used to process input Perform bias-related operations to further adjust the coordinate information or add bias information to affect the final attention score.

[0145] Specifically, after obtaining the local region features f mk Then, the local region features f mk and the coordinates of each second point data The input is fed into the second attention network, where the coordinates are also normalized to make the first point data p... m Centered on. If the features of the first stage of the first attention network have already been defined using the first point data p m Since it is centered, no additional attribute value normalization is needed, and the query value in the attention score formula should be set to zero. Finally, the first data point p is obtained. m eigenvector f m .

[0146] To estimate each first point data p m The location of the Laplace distribution (μ) m ), that is, the predicted value and scale parameter (σ) of the first data point. m The features obtained from the attention module are fed into a multilayer perceptron (MLP). Due to residual learning, it is necessary to add the predicted values ​​back, as follows:

[0147] (μ′ m ,σ m ) = MLP(f m ),

[0148]

[0149] Where, μ′ m This is the predicted value of the first data point, μ. m This refers to the distribution parameters of the first data point.

[0150] Specifically, the probability distribution P is simulated using a hierarchical attention network. θ The model uses a layer-by-layer autoregressive encoding process to estimate the true distribution P(X). Compared with point-by-point encoding methods, this model utilizes shared context point groups to achieve parallel processing of points within the same Lod level. The mathematical expression is:

[0151]

[0152] Where, x i For the currently processed point data p i The corresponding attribute value, C l and The x-coordinate represents the spatial coordinates of the context point group and the target point group. lm and z lm These represent the attributes and spatial coordinates of the m-th point in the l-th target group, respectively.

[0153] When l is greater than 1, the probability distribution of the attribute x is modeled using the Laplace distribution L. i By parameter μ i and σ i These two parameters are estimated from the network gθ(), which is an attention network including the first and second attention networks. The estimated value of the l-th layer is expressed as:

[0154]

[0155] Among them, the attribute values ​​of each point data are within a specific range. The integral is calculated and the results are multiplied together to obtain the attribute value probability distribution of the corresponding coding point group in the l-th layer. In this way, the attribute value probability distribution of the corresponding coding point group in each LOD layer is calculated sequentially.

[0156] During training, the loss function is the total number of bits encoding all attribute values, as shown in the following formula:

[0157]

[0158] This formula is a loss function used to measure model performance. It is commonly used when training deep learning models to quantify the difference between the model's predictions and the actual results. In this specific formula, it is based on the probability distribution P. θ (x i ) or P θ (x lm The loss is calculated using bits(x). This loss function optimizes the model's parameters so that the model's predicted probability distribution is as close as possible to the true distribution. In this process, minimizing the loss function helps the model better fit the data. i ) represents the encoding x i The number of bits required. In information theory, based on the concept of information entropy, the number of bits required to encode an event is related to the probability of the event occurring; the higher the probability, the fewer bits are required, and vice versa.

[0159] Please see Figure 3 , Figure 3 This is a schematic diagram of the attention network structure provided in the embodiments of this application, showing the data of each second point. Corresponding attribute value Input the value into the attribute value normalization module to obtain the normalized attribute value. Normalize attribute values The input is fed into the encoder to obtain the corresponding sub-local region features. The first attention network, which employs an attention mechanism, calculates the features of each sub-local region. Attention score After weighted summation, the final output local region feature f is obtained. mk ; take each second point data Corresponding coordinates Inputting the coordinates into the coordinate normalization module yields normalized coordinates. The obtained local region features f mk and normalized coordinates The data is input into the second attention network of the attention mechanism to obtain the final first point data p. m eigenvector f m The eigenvector f m The input is fed into a multilayer perceptron to obtain μ′. m and scale parameter σ m Combined with preliminary estimates Calculate the first data point p m The distribution parameter μ m .

[0160] In step 205, the probability distribution of each attribute value is input to the entropy encoder to obtain the second sub-attribute code stream corresponding to each second coding point group, thereby obtaining the attribute code stream of the point cloud data. The attribute code stream includes the first sub-attribute code stream and the second sub-attribute code stream.

[0161] In this process, the probability distribution of attribute values ​​in each second coding point group is used as the input parameter of the entropy encoder (such as the commonly used arithmetic entropy encoder, adaptive entropy encoder, etc.). The entropy encoder encodes the attribute values ​​according to its own coding rules based on the probability distribution.

[0162] For example, the arithmetic entropy encoder constructs probability intervals based on probability distributions, maps attribute values ​​to corresponding intervals, continuously subdivides intervals and generates corresponding codes, and finally outputs the second sub-attribute code stream corresponding to each second coding point group. Then, the first sub-attribute code stream and all second sub-attribute code streams are integrated together to obtain the attribute code stream of the complete point cloud data.

[0163] By leveraging the characteristic of entropy encoders to encode based on the probability distribution of attribute values, efficient compression of the second group of encoded points is achieved, reducing the amount of data. Finally, all encoding results are integrated to form an attribute code stream, completing the encoding and compression of the attribute part of the entire point cloud data. This achieves the goal of reducing data storage space and improving transmission efficiency while retaining the original attribute information.

[0164] Please see Figure 4 , Figure 4 This is a flowchart illustrating the data decoding method provided in an embodiment of this application.

[0165] In step S301, the attribute code stream of the point cloud data is obtained.

[0166] In the process of obtaining the encoded attribute bitstream of the point cloud data, the coordinates of each point in the point cloud data are also obtained for subsequent attribute value decoding.

[0167] In step S302, the multiple point data in the point cloud data are divided into decoding point groups to form multiple decoding point groups.

[0168] In this process, multiple point data in multiple point cloud data are divided into coded point groups in the same way as the encoding process.

[0169] In step S303, a context point group is constructed for multiple point data in the point cloud data based on each of the decoding point groups to obtain the context point group corresponding to each of the decoded point groups;

[0170] Following the same method as the encoding process, context point groups are constructed for multiple points in the point cloud data based on each encoded point group, resulting in a context point group corresponding to each encoded point group. It should be noted that before decoding the attribute value bitstream, the encoded point groups and context point groups only have coordinates and no attribute values; the attribute values ​​are updated and obtained during the decoding process.

[0171] In step S304, the attribute value of the midpoint data of the first encoded point group with sequence number one is decoded from the attribute code stream to obtain the reconstructed value of the midpoint data of the first encoded point group.

[0172] Specifically, the attribute values ​​of points in the first encoded point group R1 are decoded from the attribute code stream, and the attribute values ​​of points in C1 are updated based on the attribute values ​​of points in R1.

[0173] In step S305, for each second coding point group whose sequence number is not one, the probability distribution of the attribute value of each second coding point group is determined based on the point data in each second coding point group and the point data in the corresponding context point group.

[0174] For each second coding point group whose sequence number is not one, i.e., R2,…,R L The attributes are decoded sequentially. The attention network structure takes R as input. l The coordinates of the midpoint, C l The spatial coordinates and attribute information of the midpoint are used to obtain R. l The probability distribution of attribute values ​​at the midpoint.

[0175] In step S306, the probability distribution of each attribute value and the corresponding attribute bitstream are input to the entropy decoder to obtain the attribute reconstruction value of the midpoint data in the second coding point group corresponding to each second coding point group.

[0176] The attribute value probability distribution and the corresponding attribute code stream are fed into the entropy decoder to obtain the decompressed R. l Reconstruct the attribute values ​​of the midpoint. Also update C. l+1 The attribute reconstruction values ​​at the midpoint. This ultimately yields R1 to R... L Reconstruct the attribute value of the midpoint.

[0177] As described above, this embodiment of the application acquires point cloud data, divides multiple point data in the point cloud data into coded point groups, and then constructs context point groups based on each coded point group, obtaining a context point group corresponding to each coded point group. The attribute values ​​of the point data in the first coded point group with an index of one are encoded to obtain a first sub-attribute code stream. For each second coded point group with an index other than one, the attribute value probability distribution of each second coded point group is determined based on the point data in each second coded point group and the point data in the corresponding context point group. Each attribute value probability distribution is input to an entropy encoder to obtain a second sub-attribute code stream corresponding to each second coded point group, thus obtaining the attribute code stream of the point cloud data, which includes the first sub-attribute code stream and the second sub-attribute code stream. In this way, by dividing the acquired point cloud data into coded point groups, the point cloud data is divided into multiple coded point groups. This grouping method can place points with similar features or spatially close locations in the same group, facilitating subsequent processing. When constructing context point groups based on each coded point group, it is possible to better consider the local information around each point, effectively capture the correlation between point data, reduce or avoid redundancy while retaining the original attribute information of massive point cloud data, reduce storage space occupation, and improve transmission efficiency.

[0178] For details on the implementation of each of the above steps, please refer to the previous examples, which will not be repeated here.

[0179] To facilitate better implementation of the data transmission method provided in the embodiments of this application, the embodiments of this application also provide an apparatus based on the above data transmission method. The meanings of the terms used are the same as in the above data transmission method, and specific implementation details can be found in the descriptions in the method embodiments.

[0180] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of a data encoding device provided in an embodiment of this application. The data encoding device is applied to a verification device. The data transmission method device may include a first partitioning unit 601, a first construction unit 602, an encoding unit 603, a first determination unit 604, and a first input unit 605, etc.

[0181] The first division unit 601 is used to acquire point cloud data and divide multiple point data in the point cloud data into coded point groups to divide multiple coded point groups.

[0182] The first construction unit 602 is used to construct a context point group based on each of the coded point groups for multiple point data in the point cloud data, so as to obtain a context point group corresponding to each of the constructed coded point groups.

[0183] Encoding unit 603 is used to encode the attribute values ​​of the point data in the first encoding point group with sequence number one to obtain the first sub-attribute code stream;

[0184] The first determining unit 604 is used to determine the probability distribution of attribute values ​​of each second coding point group based on the point data in each second coding point group and the point data in the corresponding context point group for each second coding point group whose sequence number is not one.

[0185] The first input unit 605 is used to input the probability distribution of each attribute value to the entropy encoder to obtain the second sub-attribute code stream corresponding to each second coding point group, thereby obtaining the attribute code stream of the point cloud data. The attribute code stream includes the first sub-attribute code stream and the second sub-attribute code stream.

[0186] In some embodiments, the first partitioning unit 601 includes:

[0187] The first sorting subunit is used to obtain the corresponding sorting code of each point data in each point cloud data, and sort each point data in each point cloud data in ascending order of the sorting code to obtain a candidate point dataset. The sorting code is a Morton code or a Hilbert code.

[0188] The first acquisition subunit is used to acquire the preset number of data points for each group of encoded points to be written;

[0189] The sub-unit is used to divide multiple point data in the point cloud data into coded point groups based on the number of real-time point data in the candidate point dataset and the number of each preset point data.

[0190] In some embodiments, dividing into sub-units is used for:

[0191] Determine the preset number of target encoded point data to be written, and determine the number of real-time point data in the candidate point dataset;

[0192] When the target coding point group is not the last coding point group to be added, the point data of the candidate point dataset is divided according to the preset number of point data and the real-time number of point data to obtain multiple candidate point data subsets.

[0193] One point data is extracted from each of the candidate point data subsets and placed into the target coded point group in turn to obtain the initially divided coded point group;

[0194] When the next group of coding points to be added is not the last group of coding points to be added, the next group of coding points to be added is determined as the target group of coding points. The process returns to the steps of determining the preset number of data points for the target group of coding points and determining the number of real-time data points in the candidate data set, until the target group of coding points is the last group of coding points to be added, thus obtaining multiple initially divided groups of coding points.

[0195] The remaining points in the candidate point dataset are placed into the last group of coding points to be added, resulting in the initial group of coding points.

[0196] When the number of target point data in each of the initially divided coding point groups is less than or equal to the first point number threshold, each of the initially divided coding point groups is determined as a divided coding point group.

[0197] In some embodiments, dividing into subunits is further used for:

[0198] When there is a group of coding points to be divided in each of the initially divided coding point groups where the number of corresponding target point data is greater than the first point number threshold, the group of coding points to be divided is divided according to the first point number threshold to obtain the divided coding point groups.

[0199] Other initially divided coding point groups besides the coding point group to be divided are determined as the divided coding point groups.

[0200] In some embodiments, dividing into sub-units is specifically used for:

[0201] Calculate the ratio of the number of real-time point data points to the number of preset point data points to obtain the number of divisions;

[0202] The candidate point dataset is divided into multiple candidate point data subsets according to the specified number of divisions.

[0203] In some embodiments, the first building unit 602 includes:

[0204] The second acquisition subunit is used to acquire the sequence number of each context point group and the sequence number of each of the coding point groups;

[0205] Set a sub-unit to set the context point group with the sequence number one to empty;

[0206] The third acquisition subunit is used to acquire the corresponding target sequence number for each context point group whose sequence number is not one;

[0207] The fourth acquisition subunit is used to acquire the total number of point data for each coded point group with a sequence number from one to the target sequence number;

[0208] A comparison sub-unit is used to compare the total quantity with the second point quantity threshold to obtain a comparison result;

[0209] The first determining subunit is used to determine the target point data of the context point group of the target sequence number based on the comparison result;

[0210] The writing subunit is used to write the target point data into the context point group of the target sequence number, so as to obtain the context point group corresponding to each of the constructed coded point groups.

[0211] In some embodiments, the comparison subunit is used for:

[0212] If the comparison result indicates that the total number is less than or equal to the second point number threshold, then the point data of each coded point group with the sequence number from one to the target sequence number is determined as the target point data of the context point group of the target sequence number.

[0213] If the comparison result indicates that the total number is greater than the second point number threshold, then the average index value of each point data in the coded point group of the target sequence number is obtained;

[0214] Calculate the index distance between the index value of each data point and the average index value;

[0215] Arrange each point data in ascending order of index distance to obtain a point data sequence;

[0216] The point data that meets the second point quantity threshold is selected from the point data sequence in chronological order, and the selected point data is determined as the target point data of the context point group of the target sequence number.

[0217] In some embodiments, the first determining unit 604 includes:

[0218] The first filtering subunit is used to filter out a first preset number of candidate point data with smaller distances from the corresponding target context point group for each first point data in each second coding point group based on a preset nearest neighbor algorithm;

[0219] The second sorting subunit is used to sort each candidate point data according to Euclidean distance to obtain the corresponding sub-context point group;

[0220] The second determining subunit is used to determine the preliminary estimated value of the first point data based on the coordinates of the first point data and the attribute values ​​and coordinates of the first preset number of candidate point data in the corresponding sub-context point group.

[0221] The third determining subunit is used to determine the point data in the first second preset number of the corresponding sub-context point group as neighboring point data, forming a neighboring point data set.

[0222] The second filtering subunit is used to filter out a third preset number of second point data that are close to each of the neighboring point data from the sub-context point group, so as to obtain a set of second point data corresponding to each of the neighboring point data.

[0223] The first input sub-unit is used to input the attribute value and coordinates of each second point data in the second point data set into the first attention network to obtain the output local region features;

[0224] The second input subunit is used to input the local region features and the coordinates of each second point data into the second attention network to obtain the feature vector of the output first point data;

[0225] The third input subunit is used to input the feature vector into the multilayer perceptron to obtain the predicted value of the first point data and the corresponding scale parameter;

[0226] The first calculation subunit is used to calculate the sum of the preliminary estimated value and the corresponding predicted value of the first point data to obtain the distribution parameters of the first point data.

[0227] The second calculation subunit is used to calculate the attribute value probability distribution of each first point data in the second coding point group based on the distribution parameters and corresponding scale parameters of the first point data, so as to obtain the attribute value probability distribution of each first point data.

[0228] The third calculation subunit is used to perform a multiplication calculation on the probability distribution of the attribute values ​​of each of the first point data in the second coding point group to obtain the probability distribution of the attribute values ​​of each of the second coding point groups.

[0229] The specific implementation of each of the above units can be found in the previous embodiments, and will not be repeated here.

[0230] As described above, in this embodiment, the first partitioning unit 601 acquires point cloud data and partitions multiple point data in the point cloud data into coded point groups, resulting in multiple coded point groups. The first construction unit 602 constructs context point groups based on each coded point group, obtaining a context point group corresponding to each constructed coded point group. The encoding unit 603 encodes the attribute values ​​of the point data in the first coded point group with an index of one, obtaining a first sub-attribute code stream. The first determining unit 604 determines the attribute value probability distribution of each second coded point group with an index other than one, based on the point data in each second coded point group and the point data in the corresponding context point group. The first input unit 605 inputs the probability distribution of each attribute value to the entropy encoder, obtaining a second sub-attribute code stream corresponding to each second coded point group, thus obtaining the attribute code stream of the point cloud data. The attribute code stream includes the first sub-attribute code stream and the second sub-attribute code stream. Therefore, by partitioning the acquired point cloud data into coded point groups, the point cloud data is divided into multiple coded point groups. This grouping method can place points with similar characteristics or spatial proximity in the same group, facilitating subsequent processing. When constructing context point groups based on each coded point group, it can better consider the local information around each point, effectively capture the correlation between point data, reduce or avoid redundancy while retaining the original attribute information of massive point cloud data, reduce storage space occupation, and improve transmission efficiency.

[0231] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a data encoding device provided in an embodiment of this application. The data encoding device is applied to a verification device. The data transmission method device may include an acquisition unit 701, a second division unit 702, a second construction unit 703, a decoding unit 704, a second determination unit 705, and a second input unit 706, etc.

[0232] Acquisition unit 701 is used to acquire the attribute code stream of point cloud data;

[0233] The second partitioning unit 702 is used to partition multiple point data in the point cloud data into multiple decoding point groups.

[0234] The second construction unit 703 is used to construct a context point group based on each of the decoding point groups for multiple point data in the point cloud data, so as to obtain the context point group corresponding to each of the constructed decoding point groups.

[0235] Decoding unit 704 is used to decode the attribute value of the midpoint data of the first coding point group with sequence number one from the attribute code stream to obtain the reconstructed value of the midpoint data of the first coding point group.

[0236] The second determining unit 705 is used to determine the attribute value probability distribution of each second coding point group based on the point data in each second coding point group and the point data in the corresponding context point group for each second coding point group whose sequence number is not one.

[0237] The second input unit 706 is used to input the probability distribution of each attribute value and the corresponding attribute code stream to the entropy decoder to obtain the attribute reconstruction value of the midpoint data of the second coding point group corresponding to each second coding point group.

[0238] The specific implementation of each of the above units can be found in the previous embodiments, and will not be repeated here.

[0239] Reference Figure 7 , Figure 7 This is a partial structural block diagram of a computer device 110 implementing an embodiment of the present disclosure. The computer device 110 can vary significantly due to different configurations or performance characteristics, and may include one or more central processing units (CPUs) 622 (e.g., one or more processors) and a memory 632, and one or more storage media 630 (e.g., one or more mass storage devices) storing application programs 642 or data 644. The memory 632 and storage media 630 may be temporary or persistent storage. The program stored in the storage media 630 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the server 600. Furthermore, the CPU 622 may be configured to communicate with the storage media 630 and execute the series of instruction operations in the storage media 630 on the server 600.

[0240] Computer device 110 may also include one or more power supplies 626, one or more wired or wireless network interfaces 650, one or more input / output interfaces 658, and / or one or more operating systems 641, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0241] The central processing unit 622 in the computer device 110 can be used to execute the data encoding method of the embodiments of this disclosure, for example:

[0242] Acquire point cloud data, and divide multiple point data in the point cloud data into coded point groups to form multiple coded point groups;

[0243] Based on each of the coded point groups, a context point group is constructed for multiple point data in the point cloud data to obtain the context point group corresponding to each of the coded point groups;

[0244] Encode the attribute values ​​of the data points in the first coding point group with sequence number 1 to obtain the first sub-attribute code stream;

[0245] For each second coding point group whose sequence number is not one, the probability distribution of the attribute values ​​of each second coding point group is determined based on the point data in each second coding point group and the point data in the corresponding context point group.

[0246] The probability distribution of each attribute value is input to the entropy encoder to obtain the second sub-attribute code stream corresponding to each second coding point group, thereby obtaining the attribute code stream of the point cloud data. The attribute code stream includes the first sub-attribute code stream and the second sub-attribute code stream.

[0247] The central processing unit 622 in the computer device 110 can be used to execute the data decoding method of the embodiments of this disclosure, for example:

[0248] Obtain the attribute code stream of point cloud data;

[0249] The point cloud data is divided into multiple decoding point groups.

[0250] Based on each of the decoding point groups, a context point group is constructed for multiple point data in the point cloud data to obtain the context point group corresponding to each of the decoding point groups;

[0251] Decode the attribute value of the data point in the first encoded point group with sequence number one from the attribute bitstream to obtain the reconstructed value of the data point in the first encoded point group.

[0252] For each second coding point group whose sequence number is not one, the probability distribution of the attribute values ​​of each second coding point group is determined based on the point data in each second coding point group and the point data in the corresponding context point group.

[0253] The probability distribution of each attribute value and the corresponding attribute bitstream are input into the entropy decoder to obtain the attribute reconstruction value of the midpoint data of the second coding point group corresponding to each second coding point group.

[0254] This disclosure also provides a computer-readable storage medium for storing program code for executing the data encoding methods of the foregoing embodiments.

[0255] This disclosure also provides a computer program product comprising a computer program. A processor of a computer device reads and executes the computer program, causing it to perform the data encoding method described above when the computer device is an encoding device. For example:

[0256] Acquire point cloud data, and divide multiple point data in the point cloud data into coded point groups to form multiple coded point groups;

[0257] Based on each of the coded point groups, a context point group is constructed for multiple point data in the point cloud data to obtain the context point group corresponding to each of the coded point groups;

[0258] Encode the attribute values ​​of the data points in the first coding point group with sequence number 1 to obtain the first sub-attribute code stream;

[0259] For each second coding point group whose sequence number is not one, the probability distribution of the attribute values ​​of each second coding point group is determined based on the point data in each second coding point group and the point data in the corresponding context point group.

[0260] The probability distribution of each attribute value is input to the entropy encoder to obtain the second sub-attribute code stream corresponding to each second coding point group, thereby obtaining the attribute code stream of the point cloud data. The attribute code stream includes the first sub-attribute code stream and the second sub-attribute code stream.

[0261] The processor of the computer device reads and executes the computer program, causing the data decoding method described above to be implemented when the computer device is a decoding device. For example:

[0262] Obtain the attribute code stream of point cloud data;

[0263] The point cloud data is divided into multiple decoding point groups.

[0264] Based on each of the decoding point groups, a context point group is constructed for multiple point data in the point cloud data to obtain the context point group corresponding to each of the decoding point groups;

[0265] Decode the attribute value of the data point in the first encoded point group with sequence number one from the attribute bitstream to obtain the reconstructed value of the data point in the first encoded point group.

[0266] For each second coding point group whose sequence number is not one, the probability distribution of the attribute values ​​of each second coding point group is determined based on the point data in each second coding point group and the point data in the corresponding context point group.

[0267] The probability distribution of each attribute value and the corresponding attribute bitstream are input into the entropy decoder to obtain the attribute reconstruction value of the midpoint data of the second coding point group corresponding to each second coding point group.

[0268] Furthermore, the terms “comprising” and “including”, and any variations thereof, are intended to cover non-exclusive inclusion, such that a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or apparatus.

[0269] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0270] It should be understood that in the description of the embodiments of this application, "multiple" means two or more, "greater than", "less than", "exceeding" etc. are understood to exclude the number itself, and "above", "below", "within" etc. are understood to include the number itself.

[0271] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.

[0272] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0273] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0274] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0275] It should also be understood that the various implementation methods provided in this application can be combined arbitrarily to achieve different technical effects.

[0276] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0277] The above is a detailed description of the embodiments of this application. However, this application is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this application. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.

Claims

1. A data encoding method, characterized in that, include: Acquire point cloud data, and divide multiple point data in the point cloud data into coded point groups to form multiple coded point groups; Based on each of the coded point groups, a context point group is constructed for multiple point data in the point cloud data to obtain the context point group corresponding to each of the coded point groups; Encode the attribute values ​​of the data points in the first coding point group with sequence number 1 to obtain the first sub-attribute code stream; For each second coding point group whose sequence number is not one, the probability distribution of the attribute values ​​of each second coding point group is determined based on the point data in each second coding point group and the point data in the corresponding context point group. The probability distribution of each attribute value is input to the entropy encoder to obtain the second sub-attribute code stream corresponding to each second coding point group, thereby obtaining the attribute code stream of the point cloud data. The attribute code stream includes the first sub-attribute code stream and the second sub-attribute code stream.

2. The data encoding method according to claim 1, characterized in that, The step of dividing multiple point data in the point cloud data into coded point groups, resulting in multiple coded point groups, includes: Obtain the sort code corresponding to each point data in each of the point cloud data, and sort each point data in each of the point cloud data in ascending order of the sort code to obtain a candidate point dataset; Get the preset number of data points for each group of encoded data points to be written; Based on the number of real-time point data in the candidate point dataset and the number of each preset point data, the multiple point data in the point cloud data are divided into coded point groups, resulting in multiple coded point groups.

3. The data encoding method according to claim 2, characterized in that, The step involves dividing multiple point data in the point cloud data into coded point groups based on the number of real-time point data in the candidate point dataset and the number of each preset point data, including: Determine the preset number of target encoded point data to be written, and determine the number of real-time point data in the candidate point dataset; When the target coding point group is not the last coding point group to be added, the point data of the candidate point dataset is divided according to the preset number of point data and the real-time number of point data to obtain multiple candidate point data subsets. One point data is extracted from each of the candidate point data subsets and placed into the target coded point group in turn to obtain the initially divided coded point group; When the next group of coding points to be added is not the last group of coding points to be added, the next group of coding points to be added is determined as the target group of coding points. The process returns to the steps of determining the preset number of data points for the target group of coding points and determining the number of real-time data points in the candidate data set, until the target group of coding points is the last group of coding points to be added, thus obtaining multiple initially divided groups of coding points. The remaining points in the candidate point dataset are placed into the last group of coding points to be added, resulting in the initial group of coding points. When the number of target point data in each of the initially divided coding point groups is less than or equal to the first point number threshold, each of the initially divided coding point groups is determined as a divided coding point group.

4. The data encoding method according to claim 3, characterized in that, The method further includes: When there is a group of coding points to be divided in each of the initially divided coding point groups where the number of corresponding target point data is greater than the first point number threshold, the group of coding points to be divided is divided according to the first point number threshold to obtain the divided coding point groups. Other initially divided coding point groups besides the coding point group to be divided are determined as the divided coding point groups.

5. The data encoding method according to claim 3, characterized in that, The step involves dividing the candidate point dataset into multiple subsets based on the preset number of point data and the real-time number of point data, including: Calculate the ratio of the number of real-time point data points to the number of preset point data points to obtain the number of divisions; The candidate point dataset is divided into multiple candidate point data subsets according to the specified number of divisions.

6. The data encoding method according to claim 1, characterized in that, The step of constructing context point groups for multiple point data in the point cloud data based on each of the coded point groups, to obtain the context point group corresponding to each of the constructed coded point groups, includes: Obtain the sequence number of each context point group, and obtain the sequence number of each of the encoded point groups; Set the context point group with the sequence number one to empty; For each context point group whose sequence number is not one, obtain the corresponding target sequence number; Obtain the total number of point data for each coded point group whose sequence number is from one to the target sequence number; The total quantity is compared with the second-point quantity threshold to obtain the comparison result; Based on the comparison results, the target point data of the context point group of the target sequence number is determined; The target point data is written into the context point group of the target sequence number to obtain the context point group corresponding to each of the constructed coded point groups.

7. The data encoding method according to claim 6, characterized in that, The step of determining the target point data of the context point group for the target sequence number based on the comparison result includes: If the comparison result indicates that the total number is less than or equal to the second point number threshold, then the point data of each coded point group with the sequence number from one to the target sequence number is determined as the target point data of the context point group of the target sequence number. If the comparison result indicates that the total number is greater than the second point number threshold, then the average index value of each point data in the coded point group of the target sequence number is obtained; Calculate the index distance between the index value of each data point and the average index value; Arrange each point data in ascending order of index distance to obtain a point data sequence; The point data that meets the second point quantity threshold is selected from the point data sequence in chronological order, and the selected point data is determined as the target point data of the context point group of the target sequence number.

8. The data encoding method according to claim 1, characterized in that, The step of determining the attribute value probability distribution of each second encoded point group based on the point data in each second encoded point group and the point data in the corresponding context point group includes: For each first point data in each of the second coding point groups, a first preset number of candidate point data with smaller distances are selected from the corresponding target context point group based on a preset nearest neighbor algorithm; The candidate point data are sorted according to Euclidean distance to obtain the corresponding sub-context point group; Based on the coordinates of the first point data and the attribute values ​​and coordinates of the first preset number of candidate point data in the corresponding sub-context point group, a preliminary estimated value of the first point data is determined. The point data in the first second preset number of the corresponding sub-context point group are identified as neighboring point data, forming a neighboring point data set; From the sub-context point group, a third preset number of second point data that are close to each of the neighboring point data are selected to obtain the second point data set corresponding to each of the neighboring point data; The attribute value and coordinates of each second point data in the second point data set are input into the first attention network to obtain the output local region features; The local region features and the coordinates of each second point data are input into the second attention network to obtain the feature vector of the first point data output. The feature vector is input into a multilayer perceptron to obtain the predicted value of the first point data and the corresponding scale parameter. Calculate the sum of the preliminary estimate and the corresponding predicted value of the first data point to obtain the distribution parameters of the first data point; Based on the distribution parameters and corresponding scale parameters of the first point data, the attribute value probability distribution of each first point data in the second coding point group is calculated to obtain the attribute value probability distribution of each first point data. The probability distribution of attribute values ​​of each of the first point data in the second coding point group is multiplied together to obtain the probability distribution of attribute values ​​of each of the second coding point groups.

9. A data decoding method, characterized in that, include: Obtain the attribute code stream of point cloud data; The point cloud data is divided into multiple decoding point groups. Based on each of the decoding point groups, a context point group is constructed for multiple point data in the point cloud data to obtain the context point group corresponding to each of the decoding point groups; Decode the attribute value of the data point in the first encoded point group with sequence number one from the attribute bitstream to obtain the reconstructed value of the data point in the first encoded point group. For each second coding point group whose sequence number is not one, the probability distribution of the attribute values ​​of each second coding point group is determined based on the point data in each second coding point group and the point data in the corresponding context point group. The probability distribution of each attribute value and the corresponding attribute bitstream are input into the entropy decoder to obtain the attribute reconstruction value of the midpoint data of the second coding point group corresponding to each second coding point group.

10. A data encoding device, comprising: The first partitioning unit is used to acquire point cloud data and divide multiple point data in the point cloud data into coded point groups to divide multiple coded point groups. The first construction unit is used to construct a context point group based on each of the coded point groups for multiple point data in the point cloud data, so as to obtain the context point group corresponding to each of the constructed coded point groups. The encoding unit is used to encode the attribute values ​​of the point data in the first encoding point group with sequence number one to obtain the first sub-attribute code stream; The first determining unit is used to determine the probability distribution of attribute values ​​for each second coding point group whose sequence number is not one, based on the point data in each second coding point group and the point data in the corresponding context point group. The first input unit is used to input the probability distribution of each attribute value to the entropy encoder to obtain the second sub-attribute code stream corresponding to each second coding point group, thereby obtaining the attribute code stream of the point cloud data. The attribute code stream includes the first sub-attribute code stream and the second sub-attribute code stream.

11. A data decoding apparatus, comprising: The acquisition unit is used to acquire the attribute code stream of point cloud data; The second partitioning unit is used to partition multiple point data in the point cloud data into multiple decoding point groups. The second construction unit is used to construct a context point group based on each of the decoding point groups for multiple point data in the point cloud data, so as to obtain the context point group corresponding to each of the constructed decoding point groups. The decoding unit is used to decode the attribute value of the point data in the first coding point group with sequence number one from the attribute code stream to obtain the reconstructed value of the point data in the first coding point group. The second determining unit is used to determine the probability distribution of attribute values ​​for each second coding point group whose sequence number is not one, based on the point data in each second coding point group and the point data in the corresponding context point group. The second input unit is used to input the probability distribution of each attribute value and the corresponding attribute code stream to the entropy decoder to obtain the attribute reconstruction value of the midpoint data of the second coding point group corresponding to each second coding point group.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to execute the data encoding method of any one of claims 1 to 8 or the data decoding method of claim 9.

13. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the data encoding method according to any one of claims 1 to 8 or the data decoding method according to claim 9.

Citation Information

Patent Citations

  • Method and device for encoding and decoding data, and system

    CN111641826A

  • Point cloud attribute coding method, point cloud attribute decoding method and storage medium

    CN115278269A