A point cloud data encoding method, device, storage medium and equipment

CN116781919BActive Publication Date: 2026-10-27TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210243095.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-11
Publication Date
2026-10-27
Estimated Expiration
2042-03-11

AI Technical Summary

Benefits of technology

[0121]本申请实施例中,当需要对点云数据进行解码时,消费侧设备可以获取点云数据中待解码的目标数据块对应的M个编码数据,以及该M个编码数据的信号解码顺序,该目标数据块可以是指点云数据中任一待解码的数据块。进一步,消费侧设备可以根据该信号解码顺序,对该目标数据块对应的M个编码数据进行交替解码,得到该目标数据块的解码信号,该解码信号用于反映该目标数据块的原始媒体属性;M为大于1的正整数。这里的交替解码可以是指解码完一个目标数据块的M个编码数据后,对另一个目标数据块的M个编码数据进行解码,或者,这里的交替解码可以是指并行对多个目标数据块的M个编码数据进行编码。可见,不需要等待所有目标数据块的一类原始媒体属性对应的编码数据解码完成后,才对各个目标数据块的另一类原始媒体属性对应的编码数据进行解码,可降低解码时延,提高对点云数据中的数据块的解码效率;也不需要将所有目标数据块的另一类原始媒体属性对应的编码数据缓存至解码缓存中,并降低缓存压力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116781919B_ABST
    Figure CN116781919B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a point cloud data encoding method and device, a storage medium and equipment, and can be applied to cloud technology, intelligent transportation, auxiliary driving and the like. The method comprises: obtaining M pieces of encoding data corresponding to a target data block to be decoded in point cloud data and a signal decoding order of the M pieces of encoding data; M is a positive integer greater than 1; and the M pieces of encoding data corresponding to the target data block are alternately decoded according to the signal decoding order to obtain M pieces of decoding signals of the target data block, the decoding signals being used to reflect original media attributes of the target data block. Through the present application, the decoding efficiency of the data block in the point cloud data is 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 technology, and more particularly to a point cloud data encoding method, apparatus, storage medium and device. Background Technology

[0002] Point cloud data refers to a massive collection of points obtained by scanning the surface attributes of a target object. A single point or group of points in a point cloud can be called a data block. Typically, each data block in a point cloud includes multiple attributes such as the geometric information, color, and reflectivity of the target object. Furthermore, the number of data blocks in a point cloud is quite large, indicating that the amount of data contained in point cloud data is enormous. Therefore, it is necessary to encode the original media attributes of the data blocks in the point cloud data to obtain a bitstream. Transmitting this bitstream can improve the transmission efficiency of point cloud data. However, during the decoding process of the bitstream of the data blocks in the point cloud data at the decoding end, there is a problem of large decoding latency, resulting in low decoding efficiency. Summary of the Invention

[0003] The technical problem to be solved by the embodiments of this application is to provide a point cloud data encoding method, apparatus, storage medium and device, which can improve the decoding efficiency of point cloud data blocks.

[0004] One embodiment of this application provides a point cloud data decoding method, including:

[0005] Obtain the M encoded data corresponding to the target data block to be decoded in the point cloud data, and the signal decoding order of the M encoded data; M is a positive integer greater than 1;

[0006] According to the signal decoding order, the M encoded data corresponding to the target data block are decoded alternately to obtain the M decoded signals of the target data block. The decoded signals are used to reflect the original media attributes of the target data block.

[0007] One embodiment of this application provides a point cloud data encoding method, including:

[0008] Obtain M signals to be encoded from the target data block in the point cloud data, and the signal encoding order of the M signals to be encoded; M is a positive integer greater than 1; the signals to be encoded are used to reflect the original media attributes of the target data block;

[0009] Based on the signal encoding order of the M signals to be encoded, the M signals to be encoded in the target data block are alternately encoded to obtain the encoded data of the target data block.

[0010] One embodiment of this application provides a point cloud data decoding device, including:

[0011] The first acquisition module is used to acquire M encoded data corresponding to the target data block to be decoded in the point cloud data, and the signal decoding order of the M encoded data; M is a positive integer greater than 1;

[0012] The alternating decoding module is used to alternately decode the M encoded data corresponding to the target data block according to the signal decoding order, so as to obtain M decoded signals of the target data block. The decoded signals are used to reflect the original media attributes of the target data block.

[0013] The number of target data blocks is at least two, and the at least two target data blocks include a first target data block and a second target data block;

[0014] The alternating decoding module is used for:

[0015] According to the signal decoding order, the M encoded data of the first target data block are decoded alternately. After the first target data block is decoded alternately, the M encoded data of the second target data block are decoded alternately.

[0016] Obtain M decoded signals of the first target data block obtained by alternately decoding M encoded data of the first target data block, and obtain M decoded signals of the second target data block obtained by alternately decoding M encoded data of the second target data block.

[0017] The number of target data blocks is at least two, and the at least two target data blocks include a first target data block and a second target data block;

[0018] The alternating decoding module is used for:

[0019] According to the signal decoding order, the M encoded data of the first target data block and the M encoded data of the second target data block are alternately encoded in parallel to obtain the M decoded signals of the first target data block and the M decoded signals of the second target data block.

[0020] The encoded data corresponding to the first target data block includes a first encoded value and a second encoded value; the signal decoding order of the first encoded value is before the signal decoding order of the second encoded value.

[0021] The alternating decoding module is used for:

[0022] Decode the first encoded value of the first target data block;

[0023] If the first encoded value of the first target data block has been decoded, then the second encoded value of the first target data block is decoded.

[0024] If the second encoded value of the first target data block has been decoded, then the first target data block is determined to be decoded alternately, and the M signals to be encoded in the second target data block are decoded alternately.

[0025] The decoding method for the first encoded value is run-length decoding; the first encoded value of the first target data block includes a first signal encoded value and a first length encoded value.

[0026] The alternating decoding module is used for:

[0027] The first length encoding value corresponding to the first target data block is decoded to obtain the first run length corresponding to the first data block; the first run length is used to reflect the number of first data blocks; the first data block is a continuous adjacent data block in the point cloud data whose block encoding order is located before the block encoding order of the first target data block and has a first decoded signal of the second signal type;

[0028] Based on the first stroke length, the first signal encoding value corresponding to the first target data block is decoded to obtain the first decoded signal of the first target data block.

[0029] The alternating decoding module is used for:

[0030] The F data blocks to be decoded in the point cloud data whose block decoding order is after the block decoding order of the already decoded data blocks are determined as the first data block; F is the same as the first run length.

[0031] The decoding signal of the second signal type is determined as the first decoding signal of the first data block;

[0032] The data block to be decoded that is in the decoding order of the first data block in the point cloud data is identified as the first target data block;

[0033] The first signal encoding value corresponding to the first target data block is decoded to obtain the first decoded signal of the first target data block.

[0034] The decoding method for the first encoded value is non-run-time decoding; the first encoded value corresponding to the first decoded signal of the first target data block includes the first signal encoded value;

[0035] The alternating decoding module is used for:

[0036] The data block to be decoded in the point cloud data whose block decoding order is after the block decoding order of the already decoded data blocks is determined as the first target data block;

[0037] The first signal encoding value is decoded to obtain the first decoded signal of the first target data block.

[0038] The first target data block includes a first sub-data block and a second sub-data block;

[0039] The first decoded signal of the first target data block is used to reflect the original media properties of the first sub-data block;

[0040] The second decoding signal of the first target data block is used to reflect the original media attributes of the second sub-data block. The second decoding signal of the first target data block is obtained by decoding the second encoding value of the first target data block.

[0041] One embodiment of this application provides a point cloud data encoding device, including:

[0042] The second acquisition module is used to acquire M signals to be encoded from the target data block in the point cloud data, and the signal encoding order of the M signals to be encoded; M is a positive integer greater than 1; the signals to be encoded are used to reflect the original media attributes of the target data block;

[0043] The alternating encoding module is used to alternately encode the M signals to be encoded in the target data block according to the signal encoding order of the M signals to be encoded, so as to obtain the encoded data of the target data block.

[0044] The number of target data blocks is at least two, and the at least two target data blocks include a first target data block and a second target data block;

[0045] The alternating encoding module is used for:

[0046] Based on the signal encoding order of the M signals to be encoded, the M signals to be encoded in the first target data block are alternately encoded;

[0047] After the first target data block is alternately encoded, the S signals to be encoded in the second target data block are alternately encoded; S is a positive integer less than or equal to M.

[0048] Obtain the encoded data of the first target data block obtained by alternating encoding of M signals to be encoded, and obtain the encoded data of the second target data block obtained by alternating encoding of S signals to be encoded.

[0049] The alternating encoding module is used for:

[0050] The number of target data blocks is at least two, and the at least two target data blocks include a first target data block and a second target data block;

[0051] Based on the signal encoding order of the M signals to be encoded, the M signals to be encoded in the target data block are alternately encoded to obtain the encoded data of the target data block, including:

[0052] According to the signal encoding order of the M signals to be encoded, the M signals to be encoded in the first target data block are alternately encoded in parallel, and the M signals to be encoded in the second target data block are alternately encoded to obtain the encoded data of the first target data block and the encoded data of the second target data block.

[0053] The alternating encoding module is used for:

[0054] The M signals to be encoded include a first signal to be encoded and a second signal to be encoded, wherein the signal encoding order of the first signal to be encoded is before the signal encoding order of the second signal to be encoded.

[0055] Based on the signal encoding order of the M signals to be encoded, the M signals to be encoded in the first target data block are alternately encoded. After the first target data block is alternately encoded, the S signals to be encoded in the second target data block are alternately encoded, including:

[0056] Encode the first signal to be encoded in the first target data block;

[0057] If the first signal to be encoded in the first target data block has been encoded, then the second signal to be encoded in the first target data block is encoded.

[0058] If the second signal to be encoded in the first target data block has been encoded, then the first target data block is determined to be encoded alternately, and the S signals to be encoded in the second target data block are encoded alternately.

[0059] Among them, the M signals to be encoded include a first signal to be encoded and a second signal to be encoded; the signal encoding order of the first signal to be encoded is before the signal encoding order of the second signal to be encoded; the encoding method of the second signal to be encoded is run-length encoding, and the signal type of the second signal to be encoded in the first target data block is the second signal type;

[0060] The alternating encoding module is used for:

[0061] Encode the first signal to be encoded in the first target data block;

[0062] If the first signal to be encoded in the first target data block has been encoded, then the first target data block is determined to be encoded alternately, and the S signals to be encoded in the second target data block are encoded alternately.

[0063] The first signal to be encoded is encoded using run-length encoding.

[0064] The alternating encoding module is used for:

[0065] According to the block encoding order, the data blocks to be encoded in the candidate data block set are traversed sequentially; the candidate data block set includes the data blocks to be encoded in the point cloud data whose block encoding order is after the block encoding order of the already encoded data blocks.

[0066] If a data block to be encoded with a first signal of the first signal type is found in the candidate data block set, then the data block to be encoded found is determined as the first target data block.

[0067] Run-length encoding is performed on the first signal to be encoded in the first target data block to obtain the first encoded value corresponding to the first signal to be encoded in the first target data block.

[0068] The alternating encoding module is used for:

[0069] The data block to be encoded in the candidate data block set whose block encoding order is after the first target data block is determined as the second target data block;

[0070] After the second target data block is alternately encoded, the first and second target data blocks are updated to the encoded data blocks. The initial set of data blocks consisting of the data blocks to be encoded in the point cloud data whose block encoding order is after that of the second target data block is updated to the candidate data block set.

[0071] The alternating encoding module is used for:

[0072] The first signal to be encoded of the first target data block is encoded to obtain the first signal encoding value of the first signal to be encoded of the first target data block.

[0073] The first stroke length is length encoded to obtain a first length encoded value; the first stroke length is used to reflect the number of first data blocks; the first data block is a series of adjacent data blocks in the point cloud data whose block encoding order is before the block encoding order of the first target data block and which have a second signal type; the first length encoded value is used to reflect the signal encoding value of the first signal to be encoded in the first data block;

[0074] The first signal encoding value and the first length encoding value are determined as the first encoding value corresponding to the first signal to be encoded in the first target data block.

[0075] The first signal to be encoded is encoded using a non-run-length encoding method.

[0076] The alternating encoding module is used for:

[0077] The data block to be encoded with the smallest difference between the block encoding order in the point cloud data and the block encoding order of the already encoded data blocks is taken as the first target data block;

[0078] The first signal to be encoded of the first target data block is encoded to obtain the first signal encoding value of the first signal to be encoded of the first target data block.

[0079] The first signal encoding value is determined as the first encoding value corresponding to the first signal to be encoded in the first target data block.

[0080] The alternating encoding module is used for:

[0081] The data block to be encoded in the candidate data block set whose block encoding order is after the first target data block is determined as the second target data block;

[0082] When the second target data block is completed, the first target data block and the second target data block are updated to the encoded data blocks.

[0083] The second signal to be encoded is encoded using run-length encoding.

[0084] The alternating encoding module is used for:

[0085] If the first signal to be encoded in the first target data block has been encoded, and the signal type of the second signal to be encoded in the first target data block is the first signal type, then the second signal to be encoded in the first target data block is signal encoded to obtain the second signal encoded value of the second signal to be encoded in the first target data block.

[0086] The second stroke length is length encoded to obtain a second length encoded value; the second stroke length is used to reflect the number of second data blocks; the second data block is a consecutive adjacent data block of the second signal to be encoded in the point cloud data whose block encoding order is before the block encoding order of the first target data block and has a second signal type; the second length encoded value is used to reflect the signal encoding value of the second signal to be encoded in the second data block;

[0087] The second signal encoding value and the second length encoding value are determined as the second encoding value corresponding to the second signal to be encoded in the first target data block.

[0088] The second signal to be encoded is encoded using a non-run-length encoding method.

[0089] The alternating encoding module is used for:

[0090] If the first signal to be encoded in the first target data block has been encoded, then the second signal to be encoded in the first target data block is signal encoded to obtain the second signal encoded value of the second signal to be encoded in the first target data block.

[0091] The second signal encoding value is determined as the second encoding value corresponding to the second signal to be encoded in the first target data block.

[0092] Wherein, the encoding method of the first signal to be encoded is run-length encoding, the encoding method of the second signal to be encoded is run-length encoding, and the signal type of the second signal to be encoded in the first target data block is the first signal type;

[0093] When the first target data block's second signal to be encoded is encoded, it is stored in the encoding buffer. The encoding buffer also includes the second signal to be encoded of the third data block. The third data block has a second signal to be encoded of the first signal type and a first signal to be encoded of the second signal type, and the block encoding order is the same as the block encoding order of the first target data block.

[0094] The alternating encoding module is used for:

[0095] If the first signal to be encoded in the first target data block has been encoded, then the second signal to be encoded in the third data block is read from the encoding buffer.

[0096] Run-length encoding is performed on the second signal to be encoded in the third data block to obtain the third encoded value corresponding to the second signal to be encoded in the third data block. The encoding time of the second signal to be encoded in the third data block is earlier than the encoding time of the second signal to be encoded in the first target data block.

[0097] The first signal to be encoded is encoded using a run-length encoding method, and the second signal to be encoded is encoded using a non-run-length encoding method.

[0098] The second signal to be encoded of the first target data block is stored in the encoding buffer when the first signal to be encoded of the first target data block is encoded; the encoding buffer also includes the second signal to be encoded of the fourth data block, the fourth data block having the first signal to be encoded of the second signal type, and the block encoding order of the fourth data block being the block encoding order of the first target data block.

[0099] The alternating encoding module is used for:

[0100] If the first signal to be encoded in the first target data block has been encoded, then the second signal to be encoded in the fourth data block is read from the encoding buffer.

[0101] The second signal to be encoded in the fourth data block is encoded to obtain the fourth signal encoding value corresponding to the second signal to be encoded in the fourth data block. The encoding time of the second signal to be encoded in the fourth data block is earlier than the encoding time of the second signal to be encoded in the first target data block.

[0102] The alternating encoding module is used for:

[0103] If the first signals to be encoded for all data blocks within the detection period of the first target data block have been encoded, then the second signal to be encoded for the fifth data block is read from the encoding buffer; the fifth data block includes the data blocks within the detection period of the first target data block.

[0104] The second signal to be encoded in the fifth data block is encoded to obtain the fifth encoded value corresponding to the second signal to be encoded in the fifth data block.

[0105] Remove the fifth data block from the encoding cache.

[0106] If the capacity of the encoding buffer is less than the first capacity threshold, the detection period includes L1 data blocks. The first capacity threshold is determined based on the signal quantity of the second signal to be encoded in the L1 data blocks.

[0107] If the capacity of the encoding buffer is less than the second capacity threshold, the detection period includes data blocks within L2 data block groups. The second capacity threshold is determined based on the signal quantity of the second signal to be encoded within the data blocks of the L2 data block groups.

[0108] Among them, the M signals to be encoded in the target data block include the attribute prediction residuals corresponding to the M types of original media attributes of the target data block respectively; the attribute prediction residual corresponding to the first type of original media attribute is obtained by subtracting the first type of original media attribute and the first type of predicted media attribute corresponding to the first type of original media attribute. The first type of predicted media attribute is obtained by attribute prediction based on the first type of original media attribute of the reference data block of the target data block. The first type of original media attribute belongs to the M types of original media attributes.

[0109] Among them, the reference data block refers to the data block in the point cloud data whose positional distance from the target data block is less than or equal to the distance threshold. The distance threshold is determined based on the positional distance between the candidate reference data block and the target data block. The candidate reference data block refers to the data block in the point cloud data other than the target data block.

[0110] The first type of predicted media attribute is obtained by weighting the first type of original media attributes of the reference data block based on the weight parameters, which are determined according to the positional distance between the reference data block and the target data block.

[0111] Wherein, a target data block includes at least two sub-data blocks in a target data block group, and the M signals to be encoded in the target data block include the first transform coefficient and the second transform coefficient corresponding to the P-class original media attributes of the target data block, respectively. The P-class original media attributes of the target data block are determined based on the P-class sub-original media attributes corresponding to the at least two sub-data blocks in the target data block group, respectively; M is greater than P, and P is a positive integer greater than or equal to 1.

[0112] Among them, the P-class original media attributes of the target data block include the second type of original media attributes. The first transformation coefficient and the second transformation coefficient corresponding to the second type of original media attributes are obtained by transforming the second type of original media attributes using a transformation matrix. The transformation matrix is ​​determined according to the number of sub-data blocks in the target data block group.

[0113] Among them, the P-class original media attributes of the target data block include the second type of original media attributes. The first transformation coefficient and the second transformation coefficient corresponding to the second type of original media attributes are obtained by transforming the attribute prediction residuals corresponding to the second type of original media attributes using a transformation matrix. The transformation matrix is ​​determined according to the number of sub-data blocks in the target data block group.

[0114] Among them, the sub-data blocks in the target data block group have the same Hilbert transform code. The Hilbert transform code of each sub-data block is obtained by performing a Hilbert transform on the position of each sub-data block in the point cloud data.

[0115] The number of sub-data blocks in the target data block group is less than the data block limit. The data block limit is determined based on the number of sub-data blocks in adjacent data block groups. The sub-data blocks in adjacent data block groups are adjacent to the sub-data blocks in the target data block group.

[0116] Among them, the attribute prediction residual corresponding to the second type of original media attribute is obtained by subtracting the second type of original media attribute and the second type of predicted media attribute corresponding to the second type of original media attribute. The second type of predicted media attribute is predicted based on the second type of sub-original media attribute of at least two sub-data blocks within the target data block group.

[0117] One embodiment of this application provides a computer device, including: a processor and a memory;

[0118] The processor is connected to a memory, which stores a computer program. When the computer program is executed by the processor, it causes the computer device to perform the method provided in the embodiments of this application.

[0119] One aspect of this application provides a computer-readable storage medium storing a computer program adapted to be loaded and executed by a processor, so that a computer device having the processor performs the method provided in this application.

[0120] One embodiment of this application provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method provided in this application embodiment.

[0121] In this embodiment, when point cloud data needs to be decoded, the consumer-side device can obtain M encoded data corresponding to the target data block to be decoded in the point cloud data, and the signal decoding order of the M encoded data. The target data block can refer to any data block to be decoded in the point cloud data. Further, the consumer-side device can alternately decode the M encoded data corresponding to the target data block according to the signal decoding order to obtain the decoded signal of the target data block. This decoded signal reflects the original media attributes of the target data block; M is a positive integer greater than 1. Alternating decoding here can refer to decoding the M encoded data of one target data block and then decoding the M encoded data of another target data block, or it can refer to encoding the M encoded data of multiple target data blocks in parallel. It is evident that by eliminating the need to wait for the encoded data corresponding to one type of original media attribute of all target data blocks to be decoded before decoding the encoded data corresponding to another type of original media attribute of each target data block, decoding latency can be reduced and decoding efficiency of data blocks in point cloud data can be improved. Furthermore, it is not necessary to cache the encoded data corresponding to the other type of original media attribute of all target data blocks in the decoding cache, thus reducing cache pressure. Attached Figure Description

[0122] To more clearly illustrate the technical solutions in the embodiments of the present invention 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 the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0123] Figure 1 This is a schematic diagram of a point cloud data processing process provided in an embodiment of this application;

[0124] Figure 2 This is a schematic diagram illustrating the encoding process of point cloud data provided in an embodiment of this application;

[0125] Figure 3 This is a flowchart illustrating a point cloud data encoding method provided in an embodiment of this application;

[0126] Figure 4This is a schematic diagram of an adjacent parent block of a parent data block of a target data block provided in an embodiment of this application;

[0127] Figure 5 This is a schematic diagram of an encoding method for a signal to be encoded provided in an embodiment of this application;

[0128] Figure 6 This is a schematic diagram of an encoding method for a signal to be encoded provided in an embodiment of this application;

[0129] Figure 7 This is a schematic diagram illustrating the clearing of the encoding cache provided in an embodiment of this application;

[0130] Figure 8 This application provides a point cloud data decoding method.

[0131] Figure 9 This is a schematic diagram of an encoded data decoding method provided in an embodiment of this application;

[0132] Figure 10 This is a schematic diagram of an encoded data decoding method provided in an embodiment of this application;

[0133] Figure 11 This is a schematic diagram of the structure of a point cloud data decoding device provided in an embodiment of this application;

[0134] Figure 12 This is a schematic diagram of the structure of a point cloud data encoding device provided in an embodiment of this application;

[0135] Figure 13 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application;

[0136] Figure 14 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0137] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0138] This application relates to the field of cloud technology. Specifically, it relates to cloud computing, a computing model that distributes computing tasks across a resource pool composed of numerous computers, enabling various application systems to access computing power, storage space, and information services as needed. The network providing these resources is called the "cloud." Resources in the "cloud" appear infinitely scalable to the user and can be accessed, used on demand, and expanded at any time. This application utilizes cloud computing to encode and decode target data blocks from multiple point cloud datasets.

[0139] This application's embodiments relate to point cloud data processing technology, primarily involving point cloud data encoding and decoding, such as... Figure 1 As shown, Figure 1 This is a schematic diagram of point cloud data processing provided in an embodiment of this application. The point cloud data processing process can be described as follows: Figure 1 As shown, it can specifically include: point cloud data acquisition, point cloud data preprocessing, point cloud data encoding, point cloud data quantization, point cloud data entropy encoding, and point cloud data decoding.

[0140] Point cloud data: Point cloud data is a set of discrete points in space that are randomly distributed and represent the spatial structure and surface properties of a three-dimensional object or scene. Each point in point cloud data has at least three-dimensional position information, and depending on the application scenario, it may also have color, material, or other original media attributes. Typically, each point in point cloud data has the same number of original media attributes. In this application, a single point or a group of points in point cloud data can be referred to as a data block.

[0141] Point cloud data is primarily acquired through the following methods: computer generation, 3D laser scanning, and 3D photogrammetry. Computers can generate point cloud data for virtual 3D objects and scenes. 3D scanning can obtain point cloud data for static real-world 3D objects or scenes, acquiring millions of points per second. 3D photography can obtain point cloud data for dynamic real-world 3D objects or scenes, acquiring tens of millions of points per second. With the continuous accumulation of large-scale point cloud data, efficient storage, transmission, publishing, sharing, and standardization of point cloud data have become crucial for point cloud applications.

[0142] Point cloud data preprocessing: Preprocessing of point cloud data in 3D space includes coordinate transformation and voxelization. Coordinate transformation refers to converting the coordinate system of points in the point cloud data into a target coordinate system (such as the world coordinate system) through scaling and translation. Voxelization involves quantizing the coordinates of points in the point cloud data, deleting duplicate points, and assigning attributes. All points within the same voxel are quantized to the voxel center, and the attribute combination of all points within the voxel is assigned to that voxel center, which is then designated as the new point. In this way, through scaling and translation operations, the point cloud data in 3D space is converted into integer form, and its smallest geometric position is moved to the origin.

[0143] Point cloud data encoding refers to encoding data blocks within point cloud data, including both geometric information encoding and attribute information encoding. Geometric information encoding encodes the geometric position information of points to obtain a geometric code stream. Geometric encoding can include the following two modes: (a) Octree-based geometric encoding: An octree is a tree-like data structure. In 3D space partitioning, the bounding box of the point cloud (i.e., the smallest cube containing all points) is uniformly divided, with each node having eight child nodes. By using "1" and "0" to indicate whether each child node in the octree is occupied, occupancy code information is obtained, and this occupancy code information is used as the point cloud geometric information code stream. (b) Trisoup-based geometric encoding: The point cloud is divided into blocks of a certain size. The intersection points of the point cloud surface with the edges of the blocks are located and triangles are constructed. The point cloud geometric information code stream is obtained by encoding the intersection point positions. Attribute information encoding refers to encoding the attribute information of points to obtain an attribute code stream.

[0144] Quantization of point cloud data: For the geometric and attribute bitstreams of points, further lossy quantization is performed, losing some information to make the quantized bitstream more suitable for compression. Point cloud data quantization can include geometric quantization and attribute quantization. For example, geometric quantization refers to quantizing the bitstream of point cloud geometric information, quantizing the encoded values ​​within a target range into the same encoded value. The fineness of quantization is usually determined by the quantization parameter (QP). A larger QP value means that coefficients with a larger range of values ​​will be quantized into the same output, thus usually resulting in greater distortion and a lower bitrate. Conversely, a smaller QP value means that coefficients with a smaller range of values ​​will be quantized into the same output, thus usually resulting in less distortion and a higher bitrate. In point cloud encoding, quantization is performed directly on the coordinate information of the points. Attribute quantization refers to quantizing the bitstream of point cloud attribute information, quantizing the encoded values ​​within a target range into the same encoded value. The fineness of quantization is usually determined by the quantization parameter (QP). In predictive coding, attribute residuals are quantized; in transform coding, transform coefficients are quantized.

[0145] Entropy coding or statistical coding of point cloud data: After quantization, the bitstream is statistically compressed based on the frequency of each value, finally outputting a binary (0 or 1) compressed bitstream. Entropy coding includes geometric entropy coding and attribute entropy coding. Geometric entropy coding refers to statistically compressing the bitstream of point cloud geometric information, finally outputting a binary (0 or 1) compressed bitstream, such as statistically compressing the occupancy code information of an octree. Statistical coding is a lossless coding method that can effectively reduce the bit rate required to express the same signal. A commonly used statistical coding method is context-based binary arithmetic coding. Attribute information entropy coding refers to statistically compressing the quantized attribute residuals or transform coefficients, finally outputting a binary (0 or 1) compressed bitstream. Run-length coding and arithmetic coding are generally used to achieve the final compression of the quantized attribute residuals or transform coefficients. The corresponding coding mode, quantization parameters, and other information are also encoded using an entropy encoder.

[0146] Decoding of point cloud data: At the decoding end, after the decoder obtains the compressed bitstream of the point cloud data, it first performs entropy decoding on the compressed code to obtain quantized geometric information and quantized attribute information. First, the geometric information undergoes dequantization to obtain the position information of the reconstructed points. On the other hand, the quantized attribute information undergoes dequantization to obtain attribute residuals, and the reference signal is confirmed according to the encoding mode used to obtain the reconstructed attribute information. These are then matched one-to-one with the geometric information in sequence to generate the output reconstructed point cloud data.

[0147] Specifically, such as Figure 2 As shown, Figure 2 This is a schematic diagram of a point cloud encoding process provided in an embodiment of this application, such as... Figure 2 As shown, after acquiring the geometric position and attribute information of data blocks in the point cloud data, the encoder can perform coordinate transformation on the geometric position information, converting the coordinate system corresponding to the point cloud data acquisition device to the target coordinate system (such as the world coordinate system). Simultaneously, it scales and translates the geometric position information of the points and rounds the geometric coordinates. Further, the encoder can voxelize the coordinate-transformed geometric position information, quantize the position of the data block's geometric coordinates, and remove duplicate points to obtain the position information of the reconstructed data block. Further, the encoder can use an octree to geometrically encode the position information of the reconstructed points, obtaining the bitstream of the geometric information of the reconstructed points. The encoder analyzes the positional association information between the reconstructed data blocks (such as the surface accuracy between the reconstructed data blocks) and uses a compression algorithm to compress the bitstream of the geometric information of the reconstructed points and the positional association information between the reconstructed points. Compression encoding yields the geometric bitstream of the point cloud data. Additionally, the encoder can perform color transformation on the attribute information of data blocks in the point cloud data, converting the color attributes of the data blocks from RGB space to YUV space. Further, based on the geometric position information of the data blocks in the point cloud data and the position information of the reconstructed data blocks, the encoder can perform attribute interpolation on the reconstructed data blocks to obtain the attribute information of each reconstructed data block. The encoder can then perform attribute encoding on the attribute information of each reconstructed data block to obtain the attribute prediction value of each reconstructed data block. Based on the attribute prediction value and the original attribute value of each reconstructed data block, the encoder determines the attribute residual between the attribute prediction value and the original attribute value of each reconstructed data block. Further, the encoder can quantize the attribute residual to obtain the quantized attribute residual, and then perform entropy encoding on the quantized attribute residual to obtain the attribute bitstream of the point cloud data.

[0148] After encoding the point cloud data, the encoded compressed bitstream needs to be encapsulated and transmitted to the decoding end. The decoding end can decode the compressed bitstream of the point cloud data to reconstruct the point cloud data. As can be seen from the above encoding process, at the decoding end, after the decoder obtains the compressed bitstream, it can perform entropy decoding on the compressed bitstream to obtain various mode information and the quantized bitstream, such as the quantized geometric encoding information and the quantized transform coefficients or attribute residuals. Further, the quantized geometric encoding information is dequantized to obtain the position information of the data blocks. By dequantizing and inverse transforming the quantized transform coefficients, the residual signal is obtained; or, the quantized attribute residual is dequantized to obtain the residual signal. On the other hand, using the known encoding mode information, the corresponding prediction signal can be obtained. By adding the prediction signal and the residual signal, the attribute information of each data block can be obtained. Based on the position information and attribute information of each data block, the point cloud data is reconstructed.

[0149] In this application embodiment, a data block can be a single point in the aforementioned point cloud data, or a group of at least two points in the point cloud data. The point cloud data encoding method in this application mainly targets the encoding of attribute information of data blocks in the point cloud data. For example... Figure 3 As shown, Figure 3 This is a schematic diagram of a point cloud data encoding process provided in an embodiment of this application. The following is in conjunction with... Figure 3 This application provides a detailed description of a point cloud data encoding method proposed in its embodiments. This point cloud data encoding method can be executed by any consumer-side device consuming media content. It is understood that the consumer-side device includes the terminal device (or server) where the user consuming the media content is located. Figure 3 As shown, the method may specifically include, but is not limited to, the following steps:

[0150] S101, acquire M signals to be encoded from the target data block in the point cloud data, and the signal encoding order of the M signals to be encoded.

[0151] Specifically, the target data block can be any single point or a group of at least two points in the point cloud data. The consumer-side device can acquire M signals to be encoded from the target data block in the point cloud data, as well as the signal encoding order of the M signals to be encoded. These signals to be encoded reflect the original media attributes of the target data block. These original media attributes can refer to attribute signals of the target data block, such as color, reflectivity, classification value, intensity value, time, material properties, and texture information. M is a positive integer greater than 1, such as 2, 3, 4, etc. The signals to be encoded can be obtained by predicting or transforming the original media attributes of the target data block, such as attribute residual signals or transformation coefficients.

[0152] Optionally, the M signals to be encoded for the target data block can refer to attribute predictions obtained from the original media attributes of the target data block. Specifically, the M signals to be encoded for the target data block include the attribute prediction residuals corresponding to the M types of original media attributes of the target data block, i.e., one type of original media attribute corresponds to one attribute prediction residual. For example, if one type of original media attribute of the target data block is color, then the signals to be encoded for the target data block can refer to the attribute prediction residual corresponding to the color attribute. Similarly, if another type of original media attribute of the target data block is reflectance, then the signals to be encoded for the target data block can refer to the attribute prediction residual corresponding to the reflectance attribute. The attribute prediction residual corresponding to the first type of original media attribute is obtained by subtracting the first type of original media attribute and the first type of predicted media attribute corresponding to the first type of original media attribute. The first type of predicted media attribute is obtained by attribute prediction based on the first type of original media attribute of the reference data block of the target data block. For example, when the first type of original media attribute is color attribute, the color attribute prediction residual is obtained by subtracting the original color media attribute and the predicted color media attribute. The predicted color media attribute can be obtained by predicting the original color media attribute of the reference data block of the target data block, such as by taking a weighted average of the original color media attribute of the reference data block to obtain the predicted color media attribute of the target data block.

[0153] Optionally, the reference data block of the target data block can be a data block in the point cloud data whose positional distance from the target data block is less than or equal to a distance threshold. The distance threshold is determined based on the positional distance between the candidate reference data block and the target data block. The candidate reference data block refers to a data block in the point cloud data frame other than the target data block.

[0154] Specifically, the consumer-side device can acquire the coordinate information of each data block in the point cloud data. This coordinate information can refer to three-dimensional coordinate information (X, Y, Z). The device then performs Morton coding on the coordinate information of each data block to obtain its Morton code. Alternatively, the consumer-side device can perform Hilbert coding on the coordinate information of each data block to obtain its Hilbert code. Furthermore, the consumer-side device can sort the Morton codes or Hilbert codes corresponding to each data block in ascending order to obtain the Morton order or Hilbert order.

[0155] For example, taking Morton coding for each data block as an example, the coordinate information of each data block can be represented as three-dimensional Cartesian coordinates (X, Y, Z), using N bits to represent each coordinate value. Wherein, the coordinates (X, Y, Z) of data block k... k ,Y k Z k X in ) kIt can be expressed as the following formula (1):

[0156]

[0157] Wherein, the coordinates of point k (X k ,Y k Z k Y in ) k It can be expressed as the following formula (2):

[0158]

[0159] Wherein, the coordinates of point k (X k ,Y k Z k Z in ) k It can be expressed as the following formula (3):

[0160]

[0161] Bit N is an abbreviation for binary digit, used to represent the smallest unit of information. It is the information contained in one bit of a binary number or the amount of information required by specifying one of the two options.

[0162] Furthermore, the Morton code corresponding to data block k can be represented as:

[0163]

[0164] Represent each set of three bits using an octal number, i.e. The Morton code corresponding to data block k can be represented as:

[0165]

[0166] Furthermore, the consumer-side device can determine the reference data block of the target data block based on the Morton order or Hilbert order corresponding to all data blocks in the point cloud data. Optionally, the consumer-side device can determine the reference data block of the target data block based on the positional distance between each data block, or the consumer-side device can determine the reference data block of the target data block based on the positional distance between each data block and the spatial relationship between each data block.

[0167] Optionally, when determining the reference data block for the target data block based on the positional distance between various data blocks, the consumer-side device can obtain the first Q data blocks, sorted before the target data block in either the Morton order or the Hilbert order, as Q candidate data blocks. Further, the consumer-side device can calculate the positional distance between the coordinates of each of the Q candidate data blocks and the coordinates of the target data block. This positional distance can refer to the Manhattan distance. For example, if the coordinates of candidate data block 1 are (x1, y1, z1) and the coordinates of the target data block are (x, y, z), then the Manhattan distance between the target data block and candidate data block 1 is: d = |x - x1| + |y - y1| + |z - z1|. Further, the consumer-side device can determine the reference data block for the target data block from the Q candidate data blocks in two ways, as shown in Method 1 and Method 2.

[0168] Method 1: The consumer-side device can sort the Q candidate data blocks from smallest to largest according to the positional distance between each candidate data block and the target data block, and obtain the sorted Q candidate data blocks. The first K candidate data blocks are determined as the reference data blocks of the target data block, that is, the neighbors of the target data block.

[0169] Method 2: The consumer-side device can sort the positional distances between each candidate data block and the target data block from smallest to largest, obtain the sorted positional distances, obtain the first K positional distances, and take the maximum distance value among these K positional distances as the distance threshold. Among the Q candidate data blocks, those with positional distances less than or equal to the distance threshold are determined as reference data blocks for the target data block. Since multiple candidate data blocks have the same positional distance, the number of reference data blocks is greater than or equal to K.

[0170] Optionally, when determining the reference data block for the target data block based on the positional distance and spatial relationship between data blocks, the consumer-side device can determine the initial right shift range of the target data block, i.e., determine the initial right shift number N0, where N0+3 is the initial right shift number of the parent data block corresponding to the target data block. All data blocks in the point cloud data are traversed in a certain order (such as a preset traversal order). When the target data block is reached, the reference data block can be determined from the parent data block of the target data block, and from the data blocks within the range of parent blocks that are coplanar, collinear, or concentric with the parent data block. For example, data blocks within the range of adjacent parent blocks that are coplanar, collinear, or concentric with the parent data block, whose positional distance to the target data block is less than a distance threshold, are determined as reference data blocks for the target data block. Adjacent parent blocks refer to data blocks that are at the same level as the parent data block corresponding to the target data block and are adjacent to the parent data block of the target data block, with the block size being the same as the block size of the parent data block of the target data block. If a reference data block for the target data block cannot be found within the parent data block of the target data block, or within the parent block that is coplanar, collinear, or intersecting with the parent data block, then the reference data block for the target data block is determined based on the positional distance between the various data blocks as described above.

[0171] like Figure 4 As shown, Figure 4 This is a schematic diagram of an adjacent parent block of a parent data block of a target data block provided in an embodiment of this application, as shown below. Figure 4 As shown, the target data block can be point 50a, and the parent data block of point 50a is the parent data block 50b. For example... Figure 4 As shown, the adjacent parent block of parent data block 50b can refer to data block 50c, which is located directly below parent data block 50b and is coplanar, points-in-point, and collinear with parent data block 50b. For example... Figure 4 As shown, the adjacent parent block of parent data block 50b can refer to data block 50d, which is located to the upper left of parent data block 50b and is coplanar, points-in-aspect, and collinear with parent data block 50b. Figure 4 As shown, the adjacent parent block of parent data block 50b can refer to data block 50e, which is located to the lower left of parent data block 50b and shares a point and line with parent data block 50b. Figure 4 As shown, the adjacent parent block of parent data block 50b can refer to data block 50f, which is located directly in front of parent data block 50b and is coplanar, points-in-point, and collinear with parent data block 50b. For example... Figure 4 As shown, the adjacent parent block of parent data block 50b can refer to data block 50g, which is located below and before parent data block 50b, and shares a point and is collinear with parent data block 50b. For example... Figure 4As shown, the adjacent parent block of parent data block 50b can refer to data block 50h, which is located to the upper left of parent data block 50b and shares a point with parent data block 50b. For example... Figure 4 As shown, the adjacent parent block of parent data block 50b can be data block 50i, which is located to the lower left of parent data block 50b and shares a point with parent data block 50b.

[0172] Optionally, after the consumer-side device determines the reference data block of the target data block, it can perform a weighted average of the first type of original media attributes of the reference data block based on the weight parameters to obtain the first type of predicted media attributes. The weight parameters can be determined by the positional distance between the reference data block and the target data block. For example, the reciprocal of the Manhattan distance between the reference data block and the target data block can be used as the weight parameter for the weighted average of the first type of media attributes of the reference data block.

[0173] For example, when the first type of original media attribute is color, if the geometric coordinates of the target data block are (x... i ,y i ,z i The geometric coordinates of reference data block j are (x...). ij ,y ij ,z ij If j = 1, 2, ..., K, then the weight parameters of the reference data block j can be expressed by the following formula (4):

[0174]

[0175] Let the first type of original media attribute of reference data block j be... Then the first type of predicted media attribute A′ of the target data block i The calculation formula is shown in formula (5) below:

[0176]

[0177] Optionally, when the first type of original media attribute is a color attribute, different weight parameters a, b, and c can be used for the components in the x, y, and z directions when calculating the weight parameters. The weight parameters of each reference data block are calculated as shown in the following formula (6):

[0178]

[0179] Optionally, the target data block may consist of at least two sub-data blocks in the target data block group. The M signals to be encoded in the target data block may include first transform coefficients and second transform coefficients corresponding to the S types of original media attributes of the target data block, respectively. One type of original media attribute corresponds to one first transform coefficient and multiple second transform coefficients. The number of multiple second transform coefficients is determined by the number of at least two sub-data blocks, that is, the number of multiple second transform coefficients is the number of at least two sub-data blocks minus one. For example, if the number of two sub-data blocks is 5, then the number of multiple second transform coefficients is 5-1=4. The S types of original media attributes of the target data block are determined based on the S types of sub-original media attributes corresponding to the at least two sub-data blocks in the target data block group. M is a positive integer greater than S, and S is a positive integer greater than or equal to 1. The S types of original media attributes of the target data block may refer to the combination of the S types of sub-original media attributes corresponding to the at least two sub-data blocks in the target data block group. For example, if the target data block includes four sub-data blocks in the target data block group, and the color attributes (i.e., sub-raw media attributes) of the four sub-data blocks are A1, A2, A3 and A4 respectively, then the color attributes (i.e., raw media attributes) of the target data block can be a combination of the color attributes corresponding to the four sub-data blocks respectively, i.e. {A1, A2, A3, A4}.

[0180] Optionally, the first transformation coefficient and the second transformation coefficient corresponding to the S-class original media attributes of the target data block can be obtained by performing attribute transformations on the S-class original media attributes respectively, or they can be obtained by performing attribute transformations on the attribute prediction residuals corresponding to the S-class original media attributes respectively.

[0181] Specifically, the first and second transformation coefficients corresponding to the S-type original media attributes of the target data block can be obtained by performing attribute transformations on the S-type original media attributes respectively. The S-type original media attributes of the target data block include second-type original media attributes, and the first and second transformation coefficients corresponding to the second-type original media attributes are obtained by performing attribute transformations on the second-type original media attributes using a transformation matrix. The transformation matrix is ​​determined based on the number of sub-data blocks in the target data block group. The target number of transformation matrices can be obtained from the set of transformation matrices based on the target number of sub-data blocks in the target data block group. The consumer-side device performs transformation processing on the S-type original media attributes of the target data block respectively to obtain one first transformation coefficient (i.e., DC component coefficient) and multiple second transformation coefficients (i.e., AC component coefficients) corresponding to each of the S-type original media attributes.

[0182] For example, if the target data block group contains at least four sub-data blocks, and the primary media attribute of the target data block is color (i.e., the primary media attribute of each of the four sub-data blocks is color), then transformation matrices can be used to transform the primary media attributes of the four sub-data blocks, resulting in one first transformation coefficient and three second transformation coefficients. For instance, if the color attributes (primary media attributes) of the four sub-data blocks are A1, A2, A3, and A4, then the color attributes (primary media attributes) of the target data block are {A1, A2, A3, A4}. Using four transformation matrices B1, B2, B3, and B4, the color attributes (primary media attributes) of the four sub-data blocks A1, A2, A3, and A4 are transformed, resulting in one first transformation coefficient A1B1 and three second transformation coefficients A2B2, A3B3, and A3B3.

[0183] Specifically, the second and first transformation coefficients corresponding to the S-class original media attributes of the target data block can be obtained by transforming the attribute prediction residuals corresponding to the S-class original media attributes. The S-class original media attributes of the target data block include second-class original media attributes, and the second and first transformation coefficients corresponding to the second-class original media attributes are obtained by transforming the attribute prediction residuals corresponding to the second-class original media attributes using a transformation matrix. Similarly, the transformation matrix is ​​determined based on the number of sub-data blocks in the target data block group.

[0184] Optionally, the attribute prediction residual corresponding to the second type of original media attribute is obtained by subtracting the second type of original media attribute from the second type of predicted media attribute corresponding to the second type of original media attribute. The second type of predicted media attribute is predicted based on the second type of sub-original media attributes of at least two sub-data blocks within the target data block group. The second type of predicted media attribute of the target data block is obtained based on the second type of sub-predicted media attributes corresponding to at least two sub-data blocks within the target data block group. These second type of sub-predicted media attributes are obtained by predicting the second type of original media attributes corresponding to at least two sub-data blocks. Specifically, the second type of original media attribute of the target data block can refer to a combination of the second type of sub-original media attributes corresponding to at least two sub-data blocks within the target data block group, and the second type of predicted media attribute of the target data block can refer to a combination of the second type of sub-predicted media attributes corresponding to at least two sub-data blocks within the target data block group. The attribute prediction residual corresponding to the second type of original media attribute of the target data block can refer to a combination of the attribute prediction residuals corresponding to at least two sub-data blocks.

[0185] Optionally, the second type of sub-predicted media attributes of each sub-data block can be obtained by attribute prediction based on the second type of sub-predicted media attributes of the reference data block for each sub-data block, referring to the method described above for obtaining the first type of predicted media data of the target data block. Alternatively, the second type of sub-predicted media attributes of a sub-data block can be determined based on the second type of sub-predicted media attributes of other sub-data blocks in its data block group. For example, the second type of sub-predicted media attributes of the first-ranked sub-data block in the target data block group can be determined as the second type of sub-predicted media attributes of other sub-data blocks in the target data block group. After obtaining the second type of sub-predicted media attributes corresponding to each sub-data block in the target data block group, the consumer-side device can perform a K_i-ary DCT transformation (K_i = 2…8, where i is the number of sub-data blocks in the target data block group) on the prediction residuals of the second type of sub-attributes corresponding to each sub-data block in the target data block group to obtain the first and second transformation coefficients corresponding to the second type of original media attributes of the target data block. Optionally, if the target data block is a sub-data block in a target data block group, then when K_i=1, no transformation calculation is performed, and the attribute prediction residual of the sub-data block is directly quantized and entropy encoded.

[0186] The formula for the K_i-ary DCT transform can be shown in the following formula (7):

[0187] Y = AX (7)

[0188] Where X is the attribute prediction residual corresponding to the second type of original media attribute of the target data block, Y is the first transformation coefficient and the second transformation coefficient corresponding to the second type of original media attribute, and A is the K_i-ary DCT transformation matrix. For example, when the number of sub-data blocks in the target data block group is 4, the quaternary DCT transformation matrix is ​​A={{256,256,256,256},{256,256,-256,-256},{256,-256,-256,256},{256,-256,-256,256}}. When X={-2,-3,-17,-16}, then Y={-9728,7168,512,0}. Where Y(0)=-9728 is the first transformation coefficient, and the other 3 are the second transformation coefficients.

[0189] Optionally, the sub-data blocks in the target data block group have the same Hilbert transform code, and the Hilbert transform code of each sub-data block is obtained by performing a Hilbert transform on the position of each sub-data block in the point cloud data.

[0190] Specifically, the consumer-side device can acquire the geometric coordinates of all data blocks in the point cloud data that have undergone color space transformation and recoloring. It then performs Hilbert encoding on these coordinates to obtain the Hilbert codes for each data block. These Hilbert codes are then sorted in ascending order to obtain the sorted Hilbert order. The consumer-side device can group the data blocks in the point cloud data sequentially based on the order of the space-filling curves. Data blocks with the same first L bits of their Hilbert codes are grouped together, resulting in data block groups. A single data block group can be used as the target data block, where L is a positive integer.

[0191] Optionally, the number of sub-data blocks in the target data block group is less than the data block limit. The data block limit is determined based on the number of sub-data blocks in adjacent data block groups. The sub-data blocks in adjacent data block groups are adjacent to the sub-data blocks in the target data block group.

[0192] Specifically, data blocks with the same first L bits of their Hilbert code are grouped together to obtain initial data block groups. It can also be checked whether the number of data blocks contained in each initial data block group is greater than or equal to the data block limit. If the number of data blocks in an initial data block group is greater than or equal to the data block limit, the initial data block group is further subdivided into smaller data block groups, ensuring that the number of data blocks in each data block group is less than the data block limit. For example, grouping 8 data blocks with the same first L bits of their Hilbert code into an initial data block group, if the data block limit is 5, the initial data block group can be regrouped according to the data block limit, resulting in two data block groups, each containing 4 data blocks. The data block limit can be preset by the administrator or determined by the number of sub-data blocks within adjacent data block groups. Adjacent data block groups can refer to data block groups whose grouping time precedes that of the target data block group. For example, if the number of sub-data blocks in adjacent data block groups is less than 8, the data block limit can be set to 8.

[0193] S102, according to the signal encoding order of the M signals to be encoded, the M signals to be encoded of the target data block are alternately encoded to obtain the encoded data of the target data block.

[0194] Specifically, after the consumer-side device acquires the M signals to be encoded from the target data block and their signal encoding order, it can alternately encode the M signals according to their signal encoding order to obtain the encoded data of the target data block. Alternating encoding can refer to encoding the first signal to be encoded first, followed by encoding the second signal to be encoded. The first and second signals belong to the M signals to be encoded in the target data block. The signal encoding order of the first signal to be encoded precedes that of the second signal to be encoded, and the difference between their signal encoding orders is less than the difference between the signal encoding orders of the first and second signals to be encoded. In other words, the difference between their signal encoding orders is minimized.

[0195] Optionally, if the M signals to be encoded include signals Mi and Mj, and they are both non-run-code signals, and signals Mi and Mj are sequentially adjacent, with Mi preceding Mj, then during the alternating encoding process, when signal Mi is encoded, encoding of signal Mj is directly triggered.

[0196] Optionally, the number of target data blocks is at least two, and the at least two target data blocks include a first target data block and a second target data block. The consumer-side device alternately encodes the M signals to be encoded in the target data block according to the signal encoding order of the M signals to be encoded, obtaining the encoded data of the target data block in a specific manner. This may include: alternately encoding the M signals to be encoded in the first target data block according to the signal encoding order of the M signals to be encoded; after the first target data block has been alternately encoded, alternately encoding the S signals to be encoded in the second target data block; where S is a positive integer less than or equal to M. The encoded data of the first target data block obtained by alternately encoding the M signals to be encoded is obtained, and the encoded data of the second target data block obtained by alternately encoding the S signals to be encoded is obtained.

[0197] Specifically, when performing serial encoding on target data blocks in point cloud data—that is, encoding one target data block before encoding another—the consumer-side device can alternately encode the M signals to be encoded from the first target data block according to the signal encoding order of the M signals to be encoded. After alternately encoding the first target data block, the S signals to be encoded from the second target data block are alternately encoded, where S is a positive integer less than or equal to M. The encoded data of the first target data block obtained by alternately encoding the M signals to be encoded is then obtained, as is the encoded data of the first target data block obtained by alternately encoding the S signals to be encoded.

[0198] In one embodiment, the consumer-side device can employ a caching mechanism to encode target data blocks in point cloud data. This caching mechanism means that when the signal to be encoded in the target data block meets the caching conditions, the signal to be encoded that meets the caching conditions is stored in the encoding cache. When the cached encoding conditions are met, the signal to be encoded in the encoding cache is encoded. When the signal to be encoded in the target data block meets the encoding conditions, the signal to be encoded that meets the encoding conditions is immediately encoded, the signal to be encoded in the encoding cache is encoded, and the encoding cache is cleared.

[0199] Specifically, when the consumer-side device employs a caching mechanism for encoding the first and second target data blocks, the encoding order of the second target data block precedes that of the first target data block. The second target data block may or may not be adjacent to the first target data block. When alternating encoding of the signals to be encoded in the second target data block, if the signals to be encoded in the second target data block meet the caching conditions, then the signals to be encoded in the second target data block that meet the caching conditions are stored in the encoding cache. Thus, the encoding cache contains the signals to be encoded in the second target data block. When alternating encoding of the signals to be encoded in the first target data block, if the signals to be encoded in the first target data block meet the encoding conditions, then the signals to be encoded in the first target data block that meet the encoding conditions are immediately encoded, and the signals to be encoded in the second target data block that meet the caching conditions in the encoding cache are also encoded, and the encoding cache is then cleared.

[0200] Therefore, when all signals to be encoded in the second target data block meet the buffering condition, all signals to be encoded in the second target data block will be stored in the encoding buffer. After the first target data block is alternately encoded, all signals to be encoded in the second target data block will be alternately encoded. At this time, S equals M, meaning all signals to be encoded in the second target data block will be alternately encoded. When some signals to be encoded in the second target data block meet the buffering condition, some signals to be encoded in the second target data block will be stored in the encoding buffer. After the first target data block is alternately encoded, some signals to be encoded in the second target data block will be alternately encoded. At this time, S is less than M, meaning some signals to be encoded in the second target data block will be alternately encoded.

[0201] Specifically, if the first signal to be encoded in the signal encoding order is the color attribute prediction residual corresponding to a color attribute, and the color attribute prediction residual uses run-length encoding, encoding is only performed when the color attribute prediction residual is non-zero. When the color attribute prediction residual is zero, the run-length corresponding to the color attribute prediction residual is updated, i.e., the run-length is increased by one run-length. This may result in some target data blocks' color attribute prediction residuals not being encoded. To ensure that the encoding of other signals after the first one is synchronized with the encoding of the color attribute prediction residual, when the color attribute prediction residual of a certain target data block is not encoded, other signals to be encoded after the color attribute prediction residual can be stored in a buffer. When the color attribute prediction residual of a subsequent target data block is encoded, the other signals to be encoded in the encoding buffer after the color attribute prediction residual are encoded. In this way, the same target data block can be used for encoding the color attribute prediction residual and for encoding other signals to be encoded. The encoded data obtained from encoding the color attribute prediction residual and the encoded data obtained from encoding other signals to be encoded can be used as the encoded data of the corresponding target data block, which facilitates subsequent decoding and improves decoding efficiency.

[0202] In one embodiment, when the consumer-side device does not employ a caching mechanism to encode the target data block in the point cloud data, the encoding order of the second target data block is later than the encoding order of the first target data block. After the first target data block has been alternately encoded, the S signals to be encoded in the second target data block are alternately encoded. At this time, S equals M, that is, all signals to be encoded in the second target data block are alternately encoded.

[0203] Optionally, the number of target data blocks is at least two, and the at least two target data blocks include a first target data block and a second target data block. The consumer-side device alternately encodes the M signals to be encoded in the target data block according to the signal encoding order of the M signals to be encoded, obtaining the encoded data of the target data block. Specifically, this can include: alternately encoding the M signals to be encoded in the first target data block and the M signals to be encoded in the second target data block in parallel, according to the signal encoding order of the M signals to be encoded, to obtain the encoded data of the first target data block and the encoded data of the second target data block.

[0204] Specifically, when parallel encoding is performed on target data blocks in point cloud data, that is, when multiple target data blocks are encoded at the same time, the consumer-side device can alternately encode the M signals to be encoded of the first target data block and the M signals to be encoded of the second target data block in parallel, based on M signals to be encoded, to obtain the encoded data of the first target data block and the encoded data of the second target data block.

[0205] Optionally, the M signals to be encoded include a first signal to be encoded and a second signal to be encoded, with the signal encoding order of the first signal to be encoded preceding that of the second signal to be encoded. The consumer-side device, according to the signal encoding order of the M signals to be encoded, alternately encodes the M signals to be encoded in the first target data block. The specific method for alternately encoding the S signals to be encoded in the second target data block after the first target data block has been alternately encoded may include: encoding the first signal to be encoded in the first target data block; if the first signal to be encoded in the first target data block has been encoded, then encoding the second signal to be encoded in the first target data block; if the second signal to be encoded in the first target data block has been encoded, then it is determined that the alternating encoding of the first target data block has been completed, and the S signals to be encoded in the second target data block are then alternately encoded.

[0206] Specifically, the consumer-side device can encode the first signal to be encoded in the first target data block according to the signal encoding order between the first signal to be encoded and the second signal to be encoded. When the encoding of the first signal to be encoded in the first target data block is completed, the second signal to be encoded in the first target data block is then encoded. When the encoding of the second signal to be encoded in the first target data block is completed, it is determined that the alternating encoding of the first target data block is completed, and then the S signals to be encoded in the second target data block are alternately encoded.

[0207] In one embodiment, if the first signal to be encoded of the first target data block has been encoded and the encoding method of the second signal to be encoded of the first target data block is non-run-length encoding, then when the second signal to be encoded of the first target data block has been encoded, it will be determined that the first target data block has been alternately encoded.

[0208] In one embodiment, if the first signal to be encoded of the first target data block has been encoded, and the encoding method of the second signal to be encoded of the first target data block is run-length encoding, and the signal type of the second signal to be encoded of the first target data block is a first signal type, then when the second signal to be encoded of the first target data block has been encoded, the first target data block is updated to an encoded data block, and the initial data block set composed of the data blocks to be encoded whose block encoding order in the point cloud data is after the block encoding order of the first target data block is updated to a candidate data block set.

[0209] Optionally, the M signals to be encoded include a first signal to be encoded and a second signal to be encoded. The signal encoding order of the first signal to be encoded precedes that of the second signal to be encoded. The second signal to be encoded is encoded using run-length encoding. The signal type of the second signal to be encoded in the first target data block is a second signal type. When the consumer-side device has finished alternately encoding the first target data block, the specific method for alternately encoding the S signals to be encoded in the second target data block may include: encoding the first signal to be encoded in the first target data block. If the first signal to be encoded in the first target data block has been fully encoded, then the alternating encoding of the first target data block is determined to be complete, and the alternating encoding of the S signals to be encoded in the second target data block is then performed.

[0210] Specifically, the second signal to be encoded uses run-length encoding. If the signal type of the second signal to be encoded is the first signal type (i.e., a signal type other than the second signal type), then the signal value of the second signal to be encoded is encoded. If the signal type of the second signal to be encoded is the second signal type (e.g., zero, or one, depending on the specific situation), then no encoding is performed; instead, the run length corresponding to the second signal to be encoded is updated, i.e., the run length corresponding to the second signal to be encoded is increased by one run length. Therefore, when the signal type of the second signal to be encoded is the second signal type, the first signal to be encoded in the first target data block is encoded. When the first signal to be encoded in the first target data block has been encoded, it is determined that the first target data block has been alternately encoded, and the S signals to be encoded in the second target data block are alternately encoded.

[0211] Optionally, the encoding method for the first signal to be encoded can be either run-length encoding (LLE) or non-run-length encoding (NLE). Similarly, the encoding method for the second signal to be encoded can also be either LLE or NLE. LLE encoding refers to replacing a continuous string of identical values ​​with a representative value and string length. NLE encoding methods can include arithmetic encoding, Huffman coding, etc. For example, if the signal to be encoded is aaaabaaaa, LLE encoding can be used to obtain 4b4.

[0212] Optionally, when the encoding method of the first signal to be encoded is run-length encoding, the specific method by which the consumer-side device encodes the first signal to be encoded of the first target data block may include: traversing the data blocks to be encoded in the candidate data block set sequentially according to the block encoding order. This candidate data block set includes data blocks in the point cloud data whose block encoding order follows that of the already encoded data blocks. If a data block to be encoded with a first signal of the first signal type is found in the candidate data block set, the traversed data block to be encoded is determined as the first target data block. Run-length encoding is performed on the first signal to be encoded of the first target data block to obtain the first encoded value corresponding to the first signal to be encoded of the first target data block.

[0213] Specifically, when using run-length encoding to encode the first signal to be encoded, if the signal value of the first signal to be encoded is of the second signal type (e.g., zero), the run length is updated, and the signal value of the first signal to be encoded is not encoded; only if the signal value of the first signal to be encoded is of the first signal type (e.g., non-zero) will the first signal to be encoded of the first signal type be encoded. Therefore, the consumer-side device can traverse the data blocks to be encoded in the candidate data block set sequentially according to the block encoding order. If a data block to be encoded with a first signal of the first signal type is found in the candidate data block set, the traversed data block to be encoded is determined as the first target data block. Further, the consumer-side device can perform run-length encoding on the first signal to be encoded of the first target data block to obtain the first encoded value corresponding to the first signal to be encoded of the first target data block.

[0214] Optionally, the consumer-side device can identify the data block to be encoded in the candidate data block set whose block encoding order follows that of the first target data block as the second target data block. After alternating encoding of the second target data block, the first and second target data blocks are updated to encoded data blocks, and the initial data block set, consisting of the data blocks in the point cloud data whose block encoding order follows that of the second target data block, is updated to the candidate data block set. This forms an encoding loop, sequentially alternating the encoding of target data blocks in the point cloud data.

[0215] Optionally, the consumer-side device performs run-length encoding on the first signal to be encoded of the first target data block to obtain the first encoded value corresponding to the first signal to be encoded of the first target data block. Specifically, this may include: performing signal encoding on the first signal to be encoded of the first target data block to obtain a first signal encoding value for the first signal to be encoded of the first target data block; performing length encoding on the first run-length to obtain a first length encoding value; the first run-length reflecting the number of first data blocks; the first data block being a consecutive adjacent data block in the point cloud data whose block encoding order precedes that of the first target data block and which has a second signal type; and the first length encoding value reflecting the signal encoding value of the first signal to be encoded of the first data block. The first signal encoding value and the first length encoding value are then determined as the first encoded value corresponding to the first signal to be encoded of the first target data block.

[0216] Specifically, when the first signal to be encoded in the first target data block uses run-length encoding, and the signal type of the first signal to be encoded in the first target data block is a first signal type, then the signal value of the first signal to be encoded in the first target data block is signal encoded to obtain the first signal encoded value of the first signal to be encoded in the first target data block. The consumer-side device also performs length encoding on the first run-length to obtain a first length encoded value. This first run-length is used to reflect the number of first data blocks. The first data block is a series of adjacent data blocks in the point cloud data whose block encoding order is earlier than that of the first target data block and which have a second signal type. The first length encoded value is used to reflect the signal encoded value of the first signal to be encoded in the first data block. The first signal encoded value and the first length encoded value are determined as the first encoded value corresponding to the first signal to be encoded in the first target data block.

[0217] For example, the point cloud data includes data block 1, data block 2, data block 3, and a first target data block arranged in block encoding order. The signal value of the first signal to be encoded for data block 1 is 0, the signal value of the first signal to be encoded for data block 2 is 0, the signal value of the first signal to be encoded for data block 3 is 0, and the signal value of the first signal to be encoded for the first target data block is 1. The initial travel length is Len1 = 0. When the consumer device detects that the signal value of the first signal to be encoded for data block 1 is 0, the initial travel length is updated to Len1 = 1. The first signals to be encoded for data blocks 2 and 3 are encoded sequentially to obtain the first travel length Len1 = 3. This first travel length Len1 = 3 reflects the number of the first data blocks (i.e., data block 1, data block 2, and data block 3). When the first signal to be encoded for the first target data block is detected to be 1, the first travel length Len1 = 3 is encoded to obtain the first length encoded value, and the first travel encoding is initialized and updated to Len1 = 0. The signal value 1 of the first signal to be encoded in the first target data block is encoded to obtain the first signal encoding value of the first signal to be encoded in the first target data block.

[0218] Optionally, when the encoding method of the first signal to be encoded is non-runtime encoding, the specific method by which the consumer-side device encodes the first signal to be encoded of the first target data block may include: selecting the data block to be encoded with the smallest difference between the block encoding order in the point cloud data and the block encoding order of the already encoded data blocks as the first target data block; performing signal encoding on the first signal to be encoded of the first target data block to obtain a first signal encoding value of the first signal to be encoded of the first target data block; and determining the first signal encoding value as the first encoding value corresponding to the first signal to be encoded of the first target data block.

[0219] Specifically, when the encoding method of the first signal to be encoded is non-run-length encoding, regardless of whether the signal type of the first signal to be encoded in the first target data block is a first signal type or a second signal type, the signal value of the first signal to be encoded will be encoded. The consumer-side device can take the data block to be encoded with the smallest difference between the block encoding order in the point cloud data and the block encoding order of the already encoded data block as the first target data block, that is, the data block to be encoded whose block encoding order is adjacent to the block encoding order of the already encoded data. Further, the consumer-side device can perform signal encoding on the signal value of the first signal to be encoded in the first target data block to obtain the first signal encoding value of the first signal to be encoded in the first target data block.

[0220] Optionally, the data block to be encoded in the candidate data block set whose block encoding order is after the first target data block is determined as the second target data block. After the second target data block is alternately encoded, both the first and second target data blocks are updated to the encoded data blocks. This forms an encoding loop, and the target data blocks in the point cloud data are alternately encoded sequentially.

[0221] Optionally, the consumer-side device may employ run-length encoding for the second signal to be encoded in the first target data block. The specific method by which the consumer-side device encodes the second signal to be encoded in the first target data block may include: if the first signal to be encoded in the first target data block has been encoded, and the signal type of the second signal to be encoded in the first target data block is a first signal type, then signal encoding is performed on the second signal to be encoded in the first target data block to obtain a second signal encoding value. Length encoding is performed on the second run-length to obtain a second length encoding value; the second run-length reflects the number of second data blocks; the second data block is a series of consecutive adjacent data blocks in the point cloud data whose block encoding order precedes that of the first target data block and which have a second signal type; the second length encoding value reflects the signal encoding value of the second signal to be encoded in the second data block. The second signal encoding value and the second length encoding value are determined as the second encoding value corresponding to the second signal to be encoded in the first target data block.

[0222] Specifically, the consumer-side device can use run-length encoding for the second signal to be encoded in the first target data block. If the first signal to be encoded in the first target data block has been encoded, and the signal type of the second signal to be encoded in the first target data block is the first signal type, then signal encoding is performed on the second signal to be encoded in the first target data block to obtain the second signal encoded value of the second signal to be encoded in the first target data block. Since when run-length encoding is used for the second signal to be encoded, if the signal type of the second signal to be encoded is the second signal type (e.g., zero), the second run length corresponding to the second signal to be encoded is updated, but the second signal to be encoded is not encoded. Therefore, run-length encoding is only performed on the second signal to be encoded in the first target data block when the signal type of the second signal to be encoded is the first signal type (e.g., non-zero). The consumer-side device can then perform length encoding on the second run length corresponding to the second signal to be encoded to obtain the second length encoded value. The second stroke length is used to reflect the number of second data blocks, which are consecutive adjacent data blocks in the point cloud data whose block encoding order is earlier than that of the first target data block and which have a second signal type; the second length encoding value is used to reflect the signal encoding value of the second signal to be encoded in the second data block.

[0223] For example, the point cloud data includes data blocks 4, 5, and 6 arranged sequentially according to block encoding order, as well as a first target data block. The signal value of the second signal to be encoded for data block 4 is 0, the signal value of the second signal to be encoded for data block 5 is 0, the signal value of the second signal to be encoded for data block 6 is 0, and the signal value of the second signal to be encoded for the first target data block is 1. The initial travel length is Len2 = 0. When the consumer device detects that the signal value of the second signal to be encoded for data block 4 is 0, the initial travel length is updated to obtain a second travel length Len2 = 1. The second signals to be encoded for data blocks 5 and 6 are encoded sequentially to obtain a second travel length Len2 = 3. This second travel length Len2 = 3 is used to reflect the number of the first data blocks (i.e., data blocks 4, 5, and 6). When the second signal to be encoded for the first target data block is detected to be 1, the second travel length Len2 = 3 is encoded to obtain a second length encoded value, and the second travel length is initialized and updated to Len1 = 0. The signal value 1 of the second signal to be encoded in the first target data block is encoded to obtain the second signal encoding value of the second signal to be encoded in the first target data block.

[0224] Optionally, the encoding method for the second signal to be encoded is non-runtime encoding. The specific method by which the consumer-side device encodes the second signal to be encoded from the first target data block may include: if the first signal to be encoded from the first target data block has already been encoded, then directly encode the second signal to be encoded from the first target data block to obtain a second signal encoding value; and then determine the second signal encoding value as the second encoding value corresponding to the second signal to be encoded from the first target data block. In this case, the consumer-side device may use arithmetic encoding, Huffman encoding, or other encoding methods to encode the second signal to be encoded from the first target data block.

[0225] Optionally, when the first signal to be encoded in the first target data block uses run-length encoding and the signal type of the first signal to be encoded in the first target data block is a second signal, the first run-length corresponding to the first signal to be encoded is updated. After the first run-length is updated, the second signal to be encoded in the first target data block is encoded. If the second signal to be encoded in the first target data block also uses run-length encoding and the signal type of the second signal to be encoded in the first target data block is a second signal type, the second run-length corresponding to the second signal to be encoded in the first target data block is updated. This confirms that the alternating encoding of the first target data block is complete, and the signals to be encoded in the data blocks whose block encoding order is in the same order as the first target data block are then alternately encoded. Specifically, if the second signal to be encoded in the first target data block also uses run-length encoding, and the signal type of the second signal to be encoded in the first target data block is the first signal type, then length encoding is performed on the second run-length corresponding to the second signal to be encoded in the first target data block, and signal encoding is performed on the second signal to be encoded in the first target data block to obtain the second encoded value of the second signal to be encoded in the first target data block. This completes the alternating encoding of the first target data block, and alternating encoding is performed on the signals to be encoded in the data blocks whose block encoding order is in the same order as the first target data block. If the second signal to be encoded in the first target data block uses non-run-length encoding, then the signal value of the second signal to be encoded in the first target data block is encoded to obtain the second encoded value of the second signal to be encoded in the first target data block. This completes the alternating encoding of the first target data block, and alternating encoding is performed on the signals to be encoded in the data blocks whose block encoding order is in the same order as the first target data block.

[0226] Optionally, the consumer-side device can use a caching mechanism to encode the signal to be encoded in the target data block of the point cloud data. The following is a detailed explanation of using a caching mechanism to encode the signal to be encoded in the target data block of the point cloud data.

[0227] In one embodiment, the encoding method of the first signal to be encoded is run-length encoding, the encoding method of the second signal to be encoded is run-length encoding, and the signal type of the second signal to be encoded in the first target data block is a first signal type. The second signal to be encoded in the first target data block is stored in an encoding buffer when the first signal to be encoded in the first target data block is encoded. Alternatively, the second signal to be encoded in the first target data block can also be stored in the encoding buffer when the consumer-side device iterates through the second signal to be encoded in the first target data block after encoding the first signal to be encoded in the first target data block. The encoding buffer also includes the second signal to be encoded in a third data block, which is a second signal to be encoded with a first signal type and a first signal to be encoded with a second signal type, and the block encoding order is preceding the block encoding order of the first target data block.

[0228] If the first signal to be encoded in the first target data block has been encoded, and the signal type of the second signal to be encoded in the first target data block is the first signal type, then the second signal to be encoded in the third data block is read from the encoding buffer, and run-length encoding is performed on the second signal to be encoded in the third data block to obtain the third encoded value corresponding to the second signal to be encoded in the third data block. The encoding time of the second signal to be encoded in the third data block is earlier than the encoding time of the second signal to be encoded in the first target data block. When the first signal to be encoded is run-length encoded, if the first signal to be encoded has not been encoded, the second signal to be encoded, whose signal encoding order is arranged after the first signal to be encoded, is stored in the encoding buffer. The second signal to be encoded stored in the encoding buffer is only encoded when the first signal to be encoded is encoded. In this way, the second signal to be encoded, whose signal encoding order is arranged after the first signal to be encoded, can be encoded synchronously with the first signal to be encoded, so that when the first signal to be encoded and the second signal to be encoded are encoded, they both correspond to the same first target data block, which facilitates subsequent decoding.

[0229] like Figure 5 As shown, Figure 5 This is a schematic diagram of an encoding method for a signal to be encoded provided in an embodiment of this application. Data block i in the point cloud data includes a first signal to be encoded, A, and a second signal to be encoded, B. The signal encoding order of the first signal to be encoded, A, precedes the signal encoding order of the second signal to be encoded, B. The first signal to be encoded uses run-length encoding, and the second signal to be encoded also uses run-length encoding. Figure 5As shown, the consumer-side device can execute step 60a to begin encoding data blocks in the point cloud data. The consumer-side device can execute step 60b to initialize the data block identifier i to 0, i, that is, to encode data block 0; initialize the first stroke length LenA corresponding to the first signal to be encoded A to 0, i.e., LenA = 0; initialize the second stroke length LenB corresponding to the second signal to be encoded B to 0, i.e., LenB = 0; initialize the buffer (i.e., the encoding buffer) and clear the buffer.

[0230] Further, the consumer-side device can execute step 60c to detect whether the residual A0 (i.e., the first signal A to be encoded in data block 0, which is first in the block encoding sequence) is equal to 0. If the residual A0 is equal to 0, then step 60e is executed to increase the first stroke length LenA corresponding to the first signal A to be encoded by one length, resulting in an updated first stroke length Len = 1, and the encoding flag is set to 1 (i.e., the first signal to be encoded has not been encoded). If the residual A0 is not equal to 0, then step 60d is executed to encode the residual A0, and simultaneously encode the first stroke length LenA = 0, and set the encoding flag to 0 (i.e., the first signal to be encoded has been encoded). In this way, the attribute encoding of the first signal A to be encoded in data block 0 is completed. Further, the consumer-side device can execute step 60f to detect whether the residual B0 of the second signal B to be encoded in data block 0 is equal to 0. If the residual B0 is equal to 0, then step 60h is executed to increase the second stroke length corresponding to the second signal to be encoded by one length, i.e., the second stroke length corresponding to the second signal B to be encoded is LenB = 1. If the residual B0 is not equal to 0, then execute step 60g to store the second stroke length LenB = 0 corresponding to the second signal to be encoded B and the residual B0 into the buffer.

[0231] Further, the consumer-side device can execute step 60i to detect whether the encoding identifier is 0. If the encoding identifier is 1, it means that the first signal to be encoded has not been encoded. Then, step 60l is executed to increase the length of the data block identifier i, that is, to alternately encode the signal to be encoded of data block 1, which is in the same block encoding order as data block 0. If the identifier is 0, it means that the first attribute to be encoded has been encoded. Then, step 60j is executed to encode the second attribute to be encoded of data block 0 in the buffer, that is, to encode all the data in the buffer and clear all the data 60k in the buffer. After clearing the buffer, step 60l is executed to increase the length of the data block identifier i, that is, to alternately encode the signal to be encoded of data block 1, which is in the same block encoding order as data block 0. Among them, the consumer-side device can execute step 60k to detect whether the data block identifier i is less than or equal to M. If the data block identifier i is less than or equal to M, then to alternately encode the M signals to be encoded of the next data block 1 after data block 0. If the data block identifier i is greater than M, then the encoding of all data blocks in the point cloud data is complete.

[0232] Optionally, the first signal to be encoded is encoded using run-length encoding, and the second signal to be encoded is encoded using non-run-length encoding. The second signal to be encoded from the first target data block is stored in an encoding buffer while the first signal to be encoded from the first target data block is being encoded. The encoding buffer also includes the second signal to be encoded from a fourth data block, which has a first signal of a second signal type and whose block encoding order precedes that of the first target data block. If the first signal to be encoded from the first target data block has already been encoded, the second signal to be encoded from the fourth data block is read from the encoding buffer. Signal encoding is performed on the second signal to be encoded from the fourth data block to obtain the fourth signal encoding value corresponding to the second signal to be encoded from the fourth data block. The encoding time of the second signal to be encoded from the fourth data block is earlier than the encoding time of the second signal to be encoded from the first target data block.

[0233] Specifically, when the first signal to be encoded is encoded using run-length encoding and the second signal to be encoded using non-run-length encoding, when the first signal to be encoded from the first target data block is encoded, the second signal to be encoded stored in the encoding buffer will be encoded, and the encoding buffer will be cleared. When the consumer-side device encodes the cached data in the encoding buffer, it can encode the second signals to be encoded from each data block in the buffer according to the order in which they were stored.

[0234] like Figure 6 As shown, Figure 6This is a schematic diagram of an encoding method for a signal to be encoded provided in an embodiment of this application. Data block i in the point cloud data includes a first signal to be encoded, A, and a second signal to be encoded, B. The signal encoding order of the first signal to be encoded, A, precedes the signal encoding order of the second signal to be encoded, B, and the first signal to be encoded uses run-length encoding, while the second signal to be encoded uses non-run-length encoding. Figure 6 As shown, the consumer-side device can execute step 70a to begin encoding data blocks in the point cloud data. The consumer-side device can execute step 70b to initialize the data block identifier i by setting i to 0, i.e., to encode data block 0; initialize the first stroke length LenA corresponding to the first signal to be encoded A by setting the first stroke length to 0, i.e., LenA = 0; initialize the buffer (i.e., the encoding buffer) and clear the buffer.

[0235] Further, the consumer-side device can execute step 70c to detect whether the residual A0 (i.e., the first signal A to be encoded in data block 0, which is first in the block encoding order) is equal to 0. If the residual A0 is equal to 0, then execute step 70e to increase the first stroke length LenA corresponding to the first signal A to be encoded by one length, obtaining the updated first stroke length Len = 1, and set the encoding flag to 1 (i.e., the first signal to be encoded has not been encoded). If the residual A0 is not equal to 0, then execute step 70d to encode the residual A0, and simultaneously encode the first stroke length LenA = 0, and set the encoding flag to 0 (i.e., the first signal to be encoded has been encoded). In this way, the attribute encoding of the first signal A to be encoded in data block 0 is completed. Further, the consumer-side device can execute step 70f to store the second stroke length LenB = 0 corresponding to the second signal B to be encoded, and the residual B0, into the buffer.

[0236] Further, the consumer-side device can execute step 70g to detect whether the encoding identifier is 0. If the encoding identifier is 1, it means that the first signal to be encoded has not been encoded, and then step 70j is executed to increase the length of the data block identifier i, that is, to alternately encode the signal to be encoded of data block 1, which is in the same block encoding order as data block 0. If the identifier is 0, it means that the first attribute to be encoded has been encoded, and then step 70h is executed to encode the second attribute to be encoded of data block 0 in the buffer, that is, to encode all the data in the buffer and clear all the data in the buffer 70i. After clearing the buffer, step 70j is executed to increase the length of the data block identifier i, that is, to alternately encode the signal to be encoded of data block 1, which is in the same block encoding order as data block 0. Among these steps, the consumer-side device can execute step 70k to detect whether the data block identifier i is less than or equal to M. If the data block identifier i is less than or equal to M, then to alternately encode the M signals to be encoded of the next data block 1 after data block 0. If the data block identifier i is greater than M, then the encoding of all data blocks in the point cloud data is complete.

[0237] Optionally, the consumer-side device can divide the detection period of the data blocks in the point cloud data according to the block encoding order between data blocks, resulting in multiple detection periods. For example, when performing attribute encoding on a block-by-block basis, L1 data blocks can be used as one detection period to encode each data block. When performing attribute encoding on a block-by-block basis, L2 data blocks can be used as one detection period to encode the signals to be encoded for each data block. If the first signals to be encoded for the data blocks within the detection period of the first target data block have all been encoded, the second signal to be encoded for the fifth data block is read from the cache. This fifth data block includes the data blocks within the detection period of the first target data block. The second signal to be encoded for the fifth data block is encoded to obtain the fifth encoded value corresponding to the second signal to be encoded for the second data block. The fifth data block is then deleted from the encoding cache, that is, the related data encoding cache of the fifth data block is deleted. This related data can refer to the second signal to be encoded for the fifth data block, or the second stroke length corresponding to the second signal to be encoded.

[0238] like Figure 7 As shown, Figure 7 This is a schematic diagram illustrating the clearing of the encoding buffer according to an embodiment of this application. Data block 1, data block 2, and data block 3 constitute a detection cycle. The block encoding order of data block 1 precedes that of data block 2, and the block encoding order of data block 2 precedes that of data block 3. The signal encoding method of signal A to be encoded precedes that of signal B to be encoded. The encoding method of signal A to be encoded is run-length encoding, and if signal A to be encoded has not been encoded, signal B to be encoded will be stored in the encoding buffer. Figure 7 As shown, since the signal value of the signal to be encoded A in data block 1 is 0, and the signal value of the signal to be encoded A in data block 2 is also 0, the consumer-side device will store the signal value 0 of the signal to be encoded B in data block 1 and the signal value 1 of the signal to be encoded B in data block 2 into the buffer. When the signal value 1 of the signal to be encoded A in data block 3 is detected, the first run length LenA = 2 is encoded, and the signal value 1 of the signal to be encoded A in data block 3 is encoded. When encoding the signal to be encoded A in data block 3, the signal value 0 of the signal to be encoded B in data block 3 is stored into the buffer. It can be understood that when encoding the signal to be encoded B of each data block, the signal value of the signal to be encoded B of each data block is directly stored into the encoding buffer. Whether the signal to be encoded in the encoding buffer needs to be encoded is determined by the signal value of the signal to be encoded A. When the encoding of signal A (i.e., the first signal to be encoded) of data block 3 is completed, it is determined that the encoding of the first signals to be encoded of all data blocks within the detection period consisting of data blocks 1, 2, and 3 is completed. Then, the signal values ​​0, 1, and 0 of the signals to be encoded B of data block 1, data block 2, and data block 3 in the encoding buffer are all encoded. That is, all signals B to be encoded in the encoding buffer are encoded, and the encoding buffer is cleared. In this way, the encoding buffer can be avoided from being overloaded due to storing a large number of signals B to be encoded in the encoding buffer.

[0239] Optionally, the consumer-side device can detect the signal to be encoded for each data block within each detection cycle. When the signal to be encoded meets the encoding conditions, it is encoded; if the signal does not meet the encoding conditions, the signal is marked with a stroke length or stored in the encoding buffer. If all signals to be encoded for the data blocks within the detection cycle of the first target data block have been detected, the second signal to be encoded for the fifth data block is read from the buffer. This fifth data block includes the data blocks within the detection cycle of the first target data block. The second signal to be encoded for the fifth data block is encoded to obtain the fifth encoded value corresponding to the second signal to be encoded for the second data block. The fifth data block is then deleted from the encoding buffer, i.e., the related data encoding buffer for the fifth data block is deleted. This related data can refer to the second signal to be encoded for the fifth data block, or the second stroke length corresponding to the second signal to be encoded.

[0240] Optionally, when encoding by data blocks, if the capacity of the encoding buffer is less than a first capacity threshold, the detection period includes L1 data blocks. The first capacity threshold is determined based on the semaphore of the second signal to be encoded in the L1 data blocks. It can be understood that the greater the semaphore of the second signal to be encoded, the smaller the first capacity threshold; conversely, the smaller the semaphore, the larger the first capacity threshold. When encoding by data block groups, if the capacity of the encoding buffer is less than a second capacity threshold, the detection period includes data blocks within L2 data block groups. The second capacity threshold is determined based on the semaphore of the second signal to be encoded in the L2 data block groups. Similarly, the greater the semaphore of the second signal to be encoded, the smaller the second capacity threshold; conversely, the smaller the semaphore, the larger the second capacity threshold.

[0241] Optionally, after the consumer-side device has encoded all the data blocks in the point cloud data, it can arrange the encoded data corresponding to each target data block according to the block encoding order and the signal identifier of the signal to be encoded, so as to obtain the point cloud code stream corresponding to the point cloud data.

[0242] In this application, when point cloud data needs to be encoded, the consumer-side device can acquire M signals to be encoded from a target data block in the point cloud data, and the signal encoding order of the M signals to be encoded, where M is a positive integer greater than 1; the signals to be encoded are used to reflect the original media attributes of the target data block; the target data block can refer to any data block to be encoded in the point cloud data. Further, the consumer-side device can alternately encode the M signals to be encoded from the target data block according to the signal encoding order of the M signals to be encoded, to obtain the encoded data of the target data block; here, alternating encoding can refer to encoding the M signals to be encoded from one target data block and then encoding the S signals to be encoded from another target data block, where S is a positive integer less than or equal to M; or, alternating encoding can refer to encoding the M signals to be encoded from multiple target data blocks in parallel. It is evident that by eliminating the need to wait for the encoding of the signals corresponding to one type of original media attribute of all target data blocks to be completed before encoding the signals corresponding to another type of original media attribute of each target data block, encoding latency can be reduced and the encoding efficiency of data blocks in point cloud data can be improved. Furthermore, it is not necessary to cache the signals corresponding to the other type of original media attribute of all target data blocks in the encoding cache, thus reducing cache pressure.

[0243] like Figure 8 As shown, Figure 8 This application provides a point cloud data decoding method, which will be described below in conjunction with... Figure 8This application provides a detailed description of the point cloud data decoding method proposed in its embodiments. This point cloud data decoding method can be executed by any consumer-side device consuming media content. It is understood that the consumer-side device includes the terminal device (or server) where the user consuming the media content is located, such as... Figure 8 As shown, the method may specifically include, but is not limited to, the following steps:

[0244] S201, obtain the M encoded data corresponding to the target data block to be decoded in the point cloud data, and the signal decoding order of the M encoded data.

[0245] Specifically, after the consumer-side device acquires the encoded data of the point cloud data, it can parse the encoded data to obtain M encoded data corresponding to the target data block to be decoded, as well as the signal decoding order of the M encoded data. This signal decoding order refers to the signal encoding order of the signals to be encoded in the target data block of the point cloud data. In other words, this signal decoding order refers to the signal encoding order during the encoding of the signals to be encoded in the target data block. For example, if the encoding order of the signals to be encoded is signal A first, then signal B, then the signal decoding order is signal A first, then signal B.

[0246] S202, according to the signal decoding order, the M encoded data corresponding to the target data block are decoded alternately to obtain the decoded signal of the target data block.

[0247] Specifically, the consumer-side device can alternately decode the M encoded data corresponding to the target data block according to the signal decoding order to obtain the decoded signal of the target data block. The decoded signal reflects the original media attributes of the target data block; M is a positive integer greater than 1. The M encoded data corresponding to the target data block are obtained by encoding the M signals to be encoded in the target data block. When no signal to be encoded is encoded, the encoded data of the unencoded signal is a default value. This default value occupies one character (i.e., one position), and no data is recorded at that character or position; that is, the default value indicates that the unencoded signal has no encoded data. For example, when signal A is not encoded, the encoded data corresponding to signal A is the default value.

[0248] Optionally, the number of target data blocks is at least two, including a first target data block and a second target data block. The consumer-side device alternately decodes the M encoded data corresponding to the target data blocks according to the signal decoding order to obtain the decoded signal of the target data blocks. Specifically, this can be achieved by: alternately decoding the M encoded data of the first target data block according to the signal decoding order; and after the first target data block is alternately decoded, alternately decoding the S encoded data of the second target data block; where S is a positive integer less than or equal to M. The decoded signal of the first target data block obtained by alternately decoding the M encoded data of the first target data block is obtained, and the decoded signal of the second target data block obtained by alternately decoding the S encoded data of the second target data block is also obtained.

[0249] Specifically, the consumer-side device can alternately decode the M encoded data of the first target data block according to the signal decoding order to obtain the M decoded signals of the first target data block. When the first target data block is completed by alternating decoding, the M encoded data of the second target data block are alternately decoded to obtain the M decoded signals corresponding to the second target data block.

[0250] Optionally, the number of target data blocks is at least two, and the at least two target data blocks include a first target data block and a second target data block. The consumer-side device alternately decodes the M encoded data corresponding to the target data blocks according to the signal decoding order to obtain the M decoded signals of the target data blocks. Specifically, this can include: alternately encoding the M encoded data of the first target data block and the M encoded data of the second target data block in parallel according to the signal decoding order to obtain the M decoded signals of the first target data block and the M decoded signals of the second target data block.

[0251] Specifically, when the encoding end uses multiple encoders to encode the target data block of the point cloud data in parallel, generating multiple bitstreams, the consumer-side device can alternately decode the M encoded data of the first data block in the first bitstream and the M encoded data of the second target data block in the second bitstream in parallel according to the signal decoding order, to obtain M decoded signals of the first target data block and M decoded signals of the second target data block.

[0252] Optionally, the encoded data corresponding to the first target data block includes a first encoded value and a second encoded value; the signal decoding order of the first encoded value precedes the signal decoding order of the second encoded value. The consumer-side device, according to the signal encoding order of the M signals to be encoded, alternately decodes the M encoded data of the first target data block. The specific method for alternately decoding the M encoded data of the second target data block after the first target data block has been alternately decoded may include: decoding the first encoded value of the first target data block; if the first encoded value of the first target data block has been decoded, then decoding the second encoded value of the first target data block; if the second encoded value of the first target data block has been decoded, then it is determined that the alternating decoding of the first target data block has been completed, and the M encoded values ​​of the second target data block are then alternately decoded.

[0253] Optionally, the decoding method for the first encoded value is run-length decoding. The first encoded value of the first target data block includes a first signal encoded value and a first length encoded value. The specific method by which the consumer-side device decodes the first encoded value of the first target data block may include: decoding the first length encoded value corresponding to the first target data block to obtain the first run-length corresponding to the first data block. The first run-length reflects the number of first data blocks; the first data block is a series of adjacent data blocks in the point cloud data whose block encoding order precedes that of the first target data block and which have a first decoded signal of the second signal type. Based on the first run-length, the first signal encoded value corresponding to the first target data block is decoded to obtain the first decoded signal of the first target data block.

[0254] For example, if the consumer-side device decodes the first encoded value of the first target data block and obtains that the first run length corresponding to the first data block is 3, then the number of the first data blocks can be determined to be 3, that is, 3 data blocks whose block encoding order is preceding the block encoding order of the first target data block. Therefore, based on the number of first data blocks being 3, the first signal encoded value corresponding to the first target data block can be decoded to obtain the first decoded signal of the first target data block.

[0255] Optionally, the specific method for decoding the first signal encoding value corresponding to the first target data block to obtain the first decoded signal of the first target data block according to the first travel length may include: determining the F data blocks to be decoded in the point cloud data whose block decoding order is after the block decoding order of the already decoded data blocks as the first data block; F is the same as the first travel length. Determining the decoded signal of the second signal type as the first decoded signal of the first data block. Determining the data blocks to be decoded in the point cloud data whose block decoding order is after the decoding order of the first data block as the first target data block. Decoding the first signal encoding value corresponding to the first target data block to obtain the first decoded signal of the first target data block.

[0256] Optionally, the decoding method for the first encoded value is a non-run-length decoding method; the first encoded value corresponding to the first decoded signal of the first target data block includes the first signal encoded value. The specific method by which the consumer-side device decodes the first encoded value of the first target data block may include: identifying the data block to be decoded in the point cloud data whose block decoding order is after the block decoding order of the already decoded data blocks as the first target data block; and decoding the first signal encoded value to obtain the first decoded signal of the first target data block.

[0257] Optionally, when the first target data block is composed of multiple sub-data blocks, after obtaining the M decoding signals corresponding to the first target data block, the original media attributes of each sub-data block can be determined based on each decoding signal, that is, one decoding signal is used to reflect the original media attributes of one sub-data block.

[0258] Optionally, the first target data block includes a first sub-data block and a second sub-data block. A first decoded signal of the first target data block reflects the original media attributes of the first sub-data block. A second decoded signal of the first target data block reflects the original media attributes of the second sub-data block; the second decoded signal of the first target data block is obtained by decoding based on the second encoded value of the first target data block.

[0259] For example, the first target data block includes four decoded signals (signal A, signal B, signal C, and signal D), and the first target data block consists of four sub-data blocks (sub-data block 1, sub-data block 2, sub-data block 3, and sub-data block 4). Signal A reflects the original media attributes of sub-data block 1, signal B reflects the original media attributes of sub-data block 2, signal C reflects the original media attributes of sub-data block 3, and signal D reflects the original media attributes of sub-data block 4.

[0260] Optionally, the consumer-side device can alternately decode the M encoded data corresponding to the first target data block by: alternatingly decoding the M encoded data of the first target data block according to the block decoding order and the signal decoding order to obtain the M decoded signals of the first target data block. The block decoding order can refer to the encoding order during the encoding of the first target data block. Specifically, when the decoding method of alternatingly decoding the M encoded data of the first target data block using the signal to be decoded is run-length decoding, the M encoded data corresponding to the first target data block to be decoded can be determined according to the block decoding order. According to the signal decoding order, the M encoded data corresponding to the first target data block are alternately decoded to obtain the M decoded signals of the first target data block. Specifically, the consumer side can obtain the signal identifier to be decoded, such as signal A, according to the signal decoding order, and then determine the encoded data corresponding to signal A from the M encoded data corresponding to the first target data block. The encoded data corresponding to signal A includes a stroke length LenA and a signal encoding value. The consumer-side device can detect whether the stroke length LenA is greater than 0. If the stroke length LenA is greater than 0, the signal value of the decoded signal A of the first data block 1 is determined to be 0, and the stroke length LenA is reduced by one length, i.e., LenA = LenA - 1. The first data block 1 is the data block that is first in the block decoding order among the first data blocks. The first data block is a consecutive adjacent data block of the first signal to be encoded in the point cloud data whose block encoding order is before the block encoding order of the currently decoded first target data block, and which has the second signal type. If the stroke length LenA is not greater than 0, i.e., LenA = 0, the signal encoding value corresponding to signal A is parsed to obtain the signal value corresponding to signal A, and the signal value corresponding to signal A is determined as the signal value of the decoded signal A of the first target data block.

[0261] Specifically, after the consumer-side device receives the decoded signal A of the first data block, it can determine the signal to be decoded, such as signal B, which follows signal A in the signal decoding order, based on the signal decoding sequence. Further, the consumer-side device can obtain the encoded data corresponding to signal B from the M encoded data of the first target data block. This encoded data includes the run length LenB and the signal encoding value. Further, the consumer-side device can detect whether LenB is greater than 0. If the run length LenB is greater than 0, the signal value of the decoded signal B of the first data block is determined to be 0; if the run length LenB is not greater than 0 (LenB = 0), the signal encoding value corresponding to signal B is parsed to obtain the signal value corresponding to signal B, and this signal value is determined as the signal value of the decoded signal B of the first target data block. Further, if the signals to be decoded consist only of signals A and B, it can be determined that one round of alternating decoding of the signals to be decoded is complete, and the above steps can be referenced to enter the next round of alternating signal decoding, thereby obtaining the M decoded signals of each data block.

[0262] For example, if the M encoded data of the first target data block 1 include the encoded data {LenA2, resA=2} corresponding to signal A and the encoded data {LenB=1, resB=1, LenB=0, resB=1} corresponding to signal B, and the signal decoding order of signal A precedes the signal decoding order of signal B, the consumer-side device can obtain the stroke length LenA=2 corresponding to signal A. Since this stroke length LenA=2 is greater than 0, it can determine that the signal value of signal A (i.e., the decoded signal) of the first data block 1 is 0, and subtract one stroke length from the stroke length LenA=2, i.e., the stroke length LenA=1. After determining that the signal value of signal A is 0, the consumer-side device can obtain the stroke length LenB=1 corresponding to signal B. Since this LenB=1 is greater than 0, it can determine that the signal value of signal B (i.e., the decoded signal) of the first data block 1 is 0, and subtract one stroke length from the stroke length LenB=1, i.e., the stroke length LenB=0. At this point, the signal value of signal A in the first data block 1 is 0, and the signal value of signal B is 0. The M encoded data of the first target data block 1 are updated to the encoded data corresponding to signal A: {LenA = 1, resA = 2}, and the encoded data corresponding to signal B: {LenB = 0, resB = 1, LenB = 0, resB = 1}. Further, the consumer-side device can obtain the travel length LenA = 1 corresponding to signal A. Since this travel length LenA = 1 is greater than 0, the signal value of signal A in the first data block 2 can be determined to be 0. The travel length LenA = 1 is then subtracted by one travel length, resulting in a travel length LenA = 0. Further, the consumer-side device can obtain the travel length LenB = 0 corresponding to signal B. Since LenB = 0 is equal to 1, the signal value of signal B (i.e., the attribute prediction residual) is parsed to obtain the signal value of signal B in the first data block 2 as 1. At this point, the signal value of signal A in the first data block 2 is 0, and the signal value of signal B is 1. The M encoded data of the first target data block 1 are updated to the encoded data corresponding to signal A: {LenA = 0, resA = 2}, and the encoded data corresponding to signal B: {LenB = 0, resB = 1}. Further, the consumer-side device can obtain the encoded data corresponding to signal A: {LenA = 0, resA = 2}. Since LenA = 0 is equal to 0, resA = 2 is parsed to obtain the signal value 2 of signal A in the first target data block 1. Further, the consumer-side device can obtain the run length LenB = 0 corresponding to signal B, and resB = 1 is parsed to obtain the signal value of signal B in the first target data block 1. This completes the alternating decoding of the first target data block 1, obtaining the decoded signal of the first target data block 1.

[0263] like Figure 9 As shown, Figure 9This is a schematic diagram of an encoded data decoding method provided in an embodiment of this application. The decoding signal of the data block includes attribute prediction residual A and attribute prediction residual B. Run-length decoding is used to decode attribute prediction residual A and attribute prediction residual B. M is the total number of decoded signals. Figure 9As shown, the consumer-side device may perform step 100a to start decoding the target data block in the point cloud data. Further, the consumer-side device may perform step 100b to initialize the block identifier of the data block to 0, that is, i=0, and the current data block i to be decoded is the decoding signal. The consumer-side device may perform step 100c to detect whether LenA corresponding to the attribute prediction residual A is greater than 0, that is, whether the first length coded value is greater than 0. The first length coded value may refer to the first length coded value in the target data block ranked first in the decoding order. If LenA is greater than 0, the consumer-side device may perform step 100g to determine that the attribute prediction residual A of the data block i is 0, and determine that LenA=LenA-1. If LenA is less than 0, the consumer-side device may perform step 100d to parse and update LenA. Further, the consumer-side device may perform step 100e to judge again whether LenA is greater than zero. If LenA is greater than 0, the consumer-side device may perform step 100g to determine that the attribute prediction residual A of the data block i is 0. If the updated LenA=0, the consumer-side device may perform step 100f to parse the first signal coded value (that is, residual Ai), and determine the parsed signal value as the attribute prediction residual A0 of the data block i. Further, the consumer-side device may perform step 100h to detect whether LenB corresponding to the attribute prediction residual B is greater than 0, that is, whether the second length coded value is greater than 0. The second length coded value may refer to the second length coded value in the target data block ranked first in the decoding order. If LenB is greater than 0, the consumer-side device may perform step 100l to determine that the attribute prediction residual B of the data block i is 0, and determine that LenB=LenB-1. If LenB is less than 0, the consumer-side device may perform step 100i to parse and update LenB. Further, the consumer-side device may perform step 100j to judge again whether LenB is greater than zero. If LenB is greater than 0, the consumer-side device may perform step 100l to determine that the attribute prediction residual B of the data block i is 0. If the updated Len is not greater than 0, the consumer-side device may perform step 100k to parse the first signal coded value (that is, residual Bi), and determine the parsed signal value as the attribute prediction residual B0 of the data block i. Further, the consumer-side device may perform step 100m to increment i by one, that is, i+1. Further, the consumer-side device may perform step 100n to judge whether i<M. If i<M, step 100c is executed in a loop. If i>=M, step 100o is executed to end the decoding of the target data block of the point cloud data.

[0264] As Figure 10 shown, Figure 10is a schematic diagram of a coded data decoding method provided in the embodiments of the present application. The decoded signals of a data block include an attribute prediction residual A and an attribute prediction residual B, the attribute prediction residual A is decoded by a run-length decoding method, and M is the total number of decoded signals. As Figure 10 shown, the consumer-side device may perform step 110a to start decoding the target data block in the point cloud data. Further, the consumer-side device may perform step 110b to initialize the block identifier of the data block to 0, that is, i=0, which is the identifier of the data block to be decoded currently. The consumer-side device may perform step 110c to detect whether LenA corresponding to the attribute prediction residual A is greater than 0, that is, whether the first length coded value is greater than 0, and the first length coded value may refer to the first length coded value in the target data block arranged first in the decoding order. If LenA is greater than 0, the consumer-side device may perform step 110g, which may determine that the attribute prediction residual A of the data block i is 0, and determine that LenA=LenA-1. If LenA is less than 0, the consumer-side device may perform step 110d to parse and update LenA. Further, the consumer-side device may perform step 110e to judge again whether LenA is greater than zero. If LenA is greater than 0, the consumer-side device may perform step 110g to determine that the attribute prediction residual A of the data block i is 0. If the updated LenA=0, the consumer-side device may perform step 110f to parse the first signal coded value (i.e., residual Ai), and determine the parsed signal value as the attribute prediction residual A0 of the data block i. Further, the consumer-side device may perform step 110h to parse the second signal coded value (i.e., residual Bi), and determine the parsed signal value as the attribute prediction residual B0 of the data block i. Further, the consumer-side device may perform step 110i to increment i by one length, that is, i+1. Further, the consumer-side device may perform step 110j to judge whether i<M. If i<M, step 110c is executed in a loop. If i>=M, step 110k is executed to end the decoding of the target data block of the point cloud data.

[0265] In this application, when point cloud data needs to be decoded, the consumer-side device can obtain M encoded data corresponding to the target data block to be decoded in the point cloud data, as well as the signal decoding order of the M encoded data. The target data block can refer to any data block to be decoded in the point cloud data. Further, the consumer-side device can alternately decode the M encoded data corresponding to the target data block according to the signal decoding order to obtain the decoded signal of the target data block. This decoded signal reflects the original media attributes of the target data block; M is a positive integer greater than 1. Alternating decoding here can refer to decoding the M encoded data of one target data block and then decoding the M encoded data of another target data block, or it can refer to encoding the M encoded data of multiple target data blocks in parallel. It is evident that by eliminating the need to wait for the encoded data corresponding to one type of original media attribute of all target data blocks to be decoded before decoding the encoded data corresponding to another type of original media attribute of each target data block, decoding latency can be reduced and decoding efficiency of data blocks in point cloud data can be improved. Furthermore, it is not necessary to cache the encoded data corresponding to the other type of original media attribute of all target data blocks in the decoding cache, thus reducing cache pressure.

[0266] Please see Figure 11 , Figure 11 This is a schematic diagram of a point cloud data decoding device provided in an embodiment of this application. The aforementioned point cloud data decoding device can be a computer program (including program code) running on a computer device; for example, the point cloud data decoding device is an application software. The point cloud data decoding device can be used to execute corresponding steps in the point cloud data decoding method provided in the embodiments of this application. Figure 11 As shown, the point cloud data decoding device may include: a first acquisition module 11 and an alternating decoding module 12.

[0267] The first acquisition module is used to acquire M encoded data corresponding to the target data block to be decoded in the point cloud data, and the signal decoding order of the M encoded data; M is a positive integer greater than 1;

[0268] The alternating decoding module is used to alternately decode the M encoded data corresponding to the target data block according to the signal decoding order, so as to obtain M decoded signals of the target data block. The decoded signals are used to reflect the original media attributes of the target data block.

[0269] The number of target data blocks is at least two, and the at least two target data blocks include a first target data block and a second target data block;

[0270] The alternating decoding module is used for:

[0271] According to the signal decoding order, the M encoded data of the first target data block are decoded alternately. After the first target data block is decoded alternately, the M encoded data of the second target data block are decoded alternately.

[0272] Obtain M decoded signals of the first target data block obtained by alternately decoding M encoded data of the first target data block, and obtain M decoded signals of the second target data block obtained by alternately decoding M encoded data of the second target data block.

[0273] The number of target data blocks is at least two, and the at least two target data blocks include a first target data block and a second target data block;

[0274] The alternating decoding module is used for:

[0275] According to the signal decoding order, the M encoded data of the first target data block and the M encoded data of the second target data block are alternately encoded in parallel to obtain the M decoded signals of the first target data block and the M decoded signals of the second target data block.

[0276] The encoded data corresponding to the first target data block includes a first encoded value and a second encoded value; the signal decoding order of the first encoded value is before the signal decoding order of the second encoded value.

[0277] The alternating decoding module is used for:

[0278] Decode the first encoded value of the first target data block;

[0279] If the first encoded value of the first target data block has been decoded, then the second encoded value of the first target data block is decoded.

[0280] If the second encoded value of the first target data block has been decoded, then the first target data block is determined to have been decoded alternately, and the M signals to be encoded in the second target data block are decoded alternately.

[0281] The decoding method for the first encoded value is run-length decoding; the first encoded value of the first target data block includes a first signal encoded value and a first length encoded value.

[0282] The alternating decoding module is used for:

[0283] The first length encoding value corresponding to the first target data block is decoded to obtain the first run length corresponding to the first data block; the first run length is used to reflect the number of first data blocks; the first data block is a continuous adjacent data block in the point cloud data whose block encoding order is located before the block encoding order of the first target data block and has a first decoded signal of the second signal type;

[0284] Based on the first stroke length, the first signal encoding value corresponding to the first target data block is decoded to obtain the first decoded signal of the first target data block.

[0285] The alternating decoding module is used for:

[0286] The F data blocks to be decoded in the point cloud data whose block decoding order is after the block decoding order of the already decoded data blocks are determined as the first data block; F is the same as the first run length.

[0287] The decoding signal of the second signal type is determined as the first decoding signal of the first data block;

[0288] The data block to be decoded that is in the decoding order of the first data block in the point cloud data is identified as the first target data block;

[0289] The first signal encoding value corresponding to the first target data block is decoded to obtain the first decoded signal of the first target data block.

[0290] The decoding method for the first encoded value is non-run-time decoding; the first encoded value corresponding to the first decoded signal of the first target data block includes the first signal encoded value;

[0291] The alternating decoding module is used for:

[0292] The data block to be decoded in the point cloud data whose block decoding order is after the block decoding order of the already decoded data blocks is determined as the first target data block;

[0293] The first signal encoding value is decoded to obtain the first decoded signal of the first target data block.

[0294] The first target data block includes a first sub-data block and a second sub-data block;

[0295] The first decoded signal of the first target data block is used to reflect the original media properties of the first sub-data block;

[0296] The second decoding signal of the first target data block is used to reflect the original media attributes of the second sub-data block. The second decoding signal of the first target data block is obtained by decoding the second encoding value of the first target data block.

[0297] According to one embodiment of this application, Figure 11The various modules in the point cloud data decoding device shown can be individually or entirely merged into one or more units, or one or more of these units can be further divided into multiple functionally smaller sub-units to achieve the same operation without affecting the technical effects of the embodiments of this application. The above modules are based on logical functional division. In practical applications, the function of one module can also be implemented by multiple units, or the function of multiple modules can be implemented by one unit. In other embodiments of this application, the point cloud data decoding device may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by multiple units.

[0298] In this application, when point cloud data needs to be decoded, the consumer-side device can obtain M encoded data corresponding to the target data block to be decoded in the point cloud data, as well as the signal decoding order of the M encoded data. The target data block can refer to any data block to be decoded in the point cloud data. Further, the consumer-side device can alternately decode the M encoded data corresponding to the target data block according to the signal decoding order to obtain the decoded signal of the target data block. This decoded signal reflects the original media attributes of the target data block; M is a positive integer greater than 1. Alternating decoding here can refer to decoding the M encoded data of one target data block and then decoding the M encoded data of another target data block, or it can refer to encoding the M encoded data of multiple target data blocks in parallel. It is evident that by eliminating the need to wait for the encoded data corresponding to one type of original media attribute of all target data blocks to be decoded before decoding the encoded data corresponding to another type of original media attribute of each target data block, decoding latency can be reduced and decoding efficiency of data blocks in point cloud data can be improved. Furthermore, it is not necessary to cache the encoded data corresponding to the other type of original media attribute of all target data blocks in the decoding cache, thus reducing cache pressure.

[0299] Please see Figure 12 , Figure 12 This is a schematic diagram of a point cloud data encoding device provided in an embodiment of this application. The aforementioned point cloud data encoding device can be a computer program (including program code) running on a computer device; for example, the point cloud data encoding device is an application software. The point cloud data encoding device can be used to execute corresponding steps in the point cloud data encoding method provided in the embodiments of this application. Figure 12 As shown, the point cloud data encoding device may include: a second acquisition module 21 and an alternating encoding module 22.

[0300] The second acquisition module is used to acquire M signals to be encoded from the target data block in the point cloud data, and the signal encoding order of the M signals to be encoded; M is a positive integer greater than 1; the signals to be encoded are used to reflect the original media attributes of the target data block;

[0301] The alternating encoding module is used to alternately encode the M signals to be encoded in the target data block according to the signal encoding order of the M signals to be encoded, so as to obtain the encoded data of the target data block.

[0302] The number of target data blocks is at least two, and the at least two target data blocks include a first target data block and a second target data block;

[0303] The alternating encoding module is used for:

[0304] Based on the signal encoding order of the M signals to be encoded, the M signals to be encoded in the first target data block are alternately encoded;

[0305] After the first target data block is alternately encoded, the S signals to be encoded in the second target data block are alternately encoded; S is a positive integer less than or equal to M.

[0306] Obtain the encoded data of the first target data block obtained by alternating encoding of M signals to be encoded, and obtain the encoded data of the second target data block obtained by alternating encoding of S signals to be encoded.

[0307] The alternating encoding module is used for:

[0308] The number of target data blocks is at least two, and the at least two target data blocks include a first target data block and a second target data block;

[0309] Based on the signal encoding order of the M signals to be encoded, the M signals to be encoded in the target data block are alternately encoded to obtain the encoded data of the target data block, including:

[0310] According to the signal encoding order of the M signals to be encoded, the M signals to be encoded in the first target data block are alternately encoded in parallel, and the M signals to be encoded in the second target data block are alternately encoded to obtain the encoded data of the first target data block and the encoded data of the second target data block.

[0311] The alternating encoding module is used for:

[0312] The M signals to be encoded include a first signal to be encoded and a second signal to be encoded, wherein the signal encoding order of the first signal to be encoded is before the signal encoding order of the second signal to be encoded.

[0313] Based on the signal encoding order of the M signals to be encoded, the M signals to be encoded in the first target data block are alternately encoded. After the first target data block is alternately encoded, the S signals to be encoded in the second target data block are alternately encoded, including:

[0314] Encode the first signal to be encoded in the first target data block;

[0315] If the first signal to be encoded in the first target data block has been encoded, then the second signal to be encoded in the first target data block is encoded.

[0316] If the second signal to be encoded in the first target data block has been encoded, then the first target data block is determined to be encoded alternately, and the S signals to be encoded in the second target data block are encoded alternately.

[0317] Among them, the M signals to be encoded include a first signal to be encoded and a second signal to be encoded; the signal encoding order of the first signal to be encoded is before the signal encoding order of the second signal to be encoded; the encoding method of the second signal to be encoded is run-length encoding, and the signal type of the second signal to be encoded in the first target data block is the second signal type;

[0318] The alternating encoding module is used for:

[0319] Encode the first signal to be encoded in the first target data block;

[0320] If the first signal to be encoded in the first target data block has been encoded, then the first target data block is determined to be encoded alternately, and the S signals to be encoded in the second target data block are encoded alternately.

[0321] The first signal to be encoded is encoded using run-length encoding.

[0322] The alternating encoding module is used for:

[0323] According to the block encoding order, the data blocks to be encoded in the candidate data block set are traversed sequentially; the candidate data block set includes the data blocks to be encoded in the point cloud data whose block encoding order is after the block encoding order of the already encoded data blocks.

[0324] If a data block to be encoded with a first signal of the first signal type is found in the candidate data block set, then the data block to be encoded found is determined as the first target data block.

[0325] Run-length encoding is performed on the first signal to be encoded in the first target data block to obtain the first encoded value corresponding to the first signal to be encoded in the first target data block.

[0326] The alternating encoding module is used for:

[0327] The data block to be encoded in the candidate data block set whose block encoding order is after the first target data block is determined as the second target data block;

[0328] After the second target data block is alternately encoded, the first and second target data blocks are updated to the encoded data blocks. The initial set of data blocks consisting of the data blocks to be encoded in the point cloud data whose block encoding order is after that of the second target data block is updated to the candidate data block set.

[0329] The alternating encoding module is used for:

[0330] The first signal to be encoded of the first target data block is encoded to obtain the first signal encoding value of the first signal to be encoded of the first target data block.

[0331] The first stroke length is length encoded to obtain a first length encoded value; the first stroke length is used to reflect the number of first data blocks; the first data block is a series of adjacent data blocks in the point cloud data whose block encoding order is before the block encoding order of the first target data block and which have a second signal type; the first length encoded value is used to reflect the signal encoding value of the first signal to be encoded in the first data block;

[0332] The first signal encoding value and the first length encoding value are determined as the first encoding value corresponding to the first signal to be encoded in the first target data block.

[0333] The first signal to be encoded is encoded using a non-run-length encoding method.

[0334] The alternating encoding module is used for:

[0335] The data block to be encoded with the smallest difference between the block encoding order in the point cloud data and the block encoding order of the already encoded data blocks is taken as the first target data block;

[0336] The first signal to be encoded of the first target data block is encoded to obtain the first signal encoding value of the first signal to be encoded of the first target data block.

[0337] The first signal encoding value is determined as the first encoding value corresponding to the first signal to be encoded in the first target data block.

[0338] The alternating encoding module is used for:

[0339] The data block to be encoded in the candidate data block set whose block encoding order is after the first target data block is determined as the second target data block;

[0340] When the second target data block is completed, the first target data block and the second target data block are updated to the encoded data blocks.

[0341] The second signal to be encoded is encoded using run-length encoding.

[0342] The alternating encoding module is used for:

[0343] If the first signal to be encoded in the first target data block has been encoded, and the signal type of the second signal to be encoded in the first target data block is the first signal type, then the second signal to be encoded in the first target data block is signal encoded to obtain the second signal encoded value of the second signal to be encoded in the first target data block.

[0344] The second stroke length is length encoded to obtain a second length encoded value; the second stroke length is used to reflect the number of second data blocks; the second data block is a consecutive adjacent data block of the second signal to be encoded in the point cloud data whose block encoding order is before the block encoding order of the first target data block and has a second signal type; the second length encoded value is used to reflect the signal encoding value of the second signal to be encoded in the second data block;

[0345] The second signal encoding value and the second length encoding value are determined as the second encoding value corresponding to the second signal to be encoded in the first target data block.

[0346] The second signal to be encoded is encoded using a non-run-length encoding method.

[0347] The alternating encoding module is used for:

[0348] If the first signal to be encoded in the first target data block has been encoded, then the second signal to be encoded in the first target data block is signal encoded to obtain the second signal encoded value of the second signal to be encoded in the first target data block.

[0349] The second signal encoding value is determined as the second encoding value corresponding to the second signal to be encoded in the first target data block.

[0350] Wherein, the encoding method of the first signal to be encoded is run-length encoding, the encoding method of the second signal to be encoded is run-length encoding, and the signal type of the second signal to be encoded in the first target data block is the first signal type;

[0351] When the first target data block's second signal to be encoded is encoded, it is stored in the encoding buffer. The encoding buffer also includes the second signal to be encoded of the third data block. The third data block has a second signal to be encoded of the first signal type and a first signal to be encoded of the second signal type, and the block encoding order is the same as the block encoding order of the first target data block.

[0352] The alternating encoding module is used for:

[0353] If the first signal to be encoded in the first target data block has been encoded, then the second signal to be encoded in the third data block is read from the encoding buffer.

[0354] Run-length encoding is performed on the second signal to be encoded in the third data block to obtain the third encoded value corresponding to the second signal to be encoded in the third data block. The encoding time of the second signal to be encoded in the third data block is earlier than the encoding time of the second signal to be encoded in the first target data block.

[0355] The first signal to be encoded is encoded using a run-length encoding method, and the second signal to be encoded is encoded using a non-run-length encoding method.

[0356] The second signal to be encoded of the first target data block is stored in the encoding buffer when the first signal to be encoded of the first target data block is encoded; the encoding buffer also includes the second signal to be encoded of the fourth data block, the fourth data block having the first signal to be encoded of the second signal type, and the block encoding order of the fourth data block being the block encoding order of the first target data block.

[0357] The alternating encoding module is used for:

[0358] If the first signal to be encoded in the first target data block has been encoded, then the second signal to be encoded in the fourth data block is read from the encoding buffer;

[0359] The second signal to be encoded in the fourth data block is encoded to obtain the fourth signal encoding value corresponding to the second signal to be encoded in the fourth data block. The encoding time of the second signal to be encoded in the fourth data block is earlier than the encoding time of the second signal to be encoded in the first target data block.

[0360] The alternating encoding module is used for:

[0361] If the first signals to be encoded for all data blocks within the detection period of the first target data block have been encoded, then the second signal to be encoded for the fifth data block is read from the encoding buffer; the fifth data block includes the data blocks within the detection period of the first target data block.

[0362] The second signal to be encoded in the fifth data block is encoded to obtain the fifth encoded value corresponding to the second signal to be encoded in the fifth data block.

[0363] Remove the fifth data block from the encoding cache.

[0364] If the capacity of the encoding buffer is less than the first capacity threshold, the detection period includes L1 data blocks. The first capacity threshold is determined based on the signal quantity of the second signal to be encoded in the L1 data blocks.

[0365] If the capacity of the encoding buffer is less than the second capacity threshold, the detection period includes data blocks within L2 data block groups. The second capacity threshold is determined based on the signal quantity of the second signal to be encoded within the data blocks of the L2 data block groups.

[0366] Among them, the M signals to be encoded in the target data block include the attribute prediction residuals corresponding to the M types of original media attributes of the target data block respectively; the attribute prediction residual corresponding to the first type of original media attribute is obtained by subtracting the first type of original media attribute and the first type of predicted media attribute corresponding to the first type of original media attribute. The first type of predicted media attribute is obtained by attribute prediction based on the first type of original media attribute of the reference data block of the target data block. The first type of original media attribute belongs to the M types of original media attributes.

[0367] Among them, the reference data block refers to the data block in the point cloud data whose positional distance from the target data block is less than or equal to the distance threshold. The distance threshold is determined based on the positional distance between the candidate reference data block and the target data block. The candidate reference data block refers to the data block in the point cloud data other than the target data block.

[0368] The first type of predicted media attribute is obtained by weighting the first type of original media attributes of the reference data block based on the weight parameters, which are determined according to the positional distance between the reference data block and the target data block.

[0369] Wherein, a target data block includes at least two sub-data blocks in a target data block group, and the M signals to be encoded in the target data block include the first transform coefficient and the second transform coefficient corresponding to the P-class original media attributes of the target data block, respectively. The P-class original media attributes of the target data block are determined based on the P-class sub-original media attributes corresponding to the at least two sub-data blocks in the target data block group, respectively; M is greater than P, and P is a positive integer greater than or equal to 1.

[0370] Among them, the P-class original media attributes of the target data block include the second type of original media attributes. The first transformation coefficient and the second transformation coefficient corresponding to the second type of original media attributes are obtained by transforming the second type of original media attributes using a transformation matrix. The transformation matrix is ​​determined according to the number of sub-data blocks in the target data block group.

[0371] Among them, the P-class original media attributes of the target data block include the second type of original media attributes. The first transformation coefficient and the second transformation coefficient corresponding to the second type of original media attributes are obtained by transforming the attribute prediction residuals corresponding to the second type of original media attributes using a transformation matrix. The transformation matrix is ​​determined according to the number of sub-data blocks in the target data block group.

[0372] In this group, the sub-data blocks in the target data block group have the same Hilbert transform code. The Hilbert transform code of each sub-data block is obtained by performing a Hilbert transform on the position of each sub-data block in the point cloud data.

[0373] The number of sub-data blocks in the target data block group is less than the data block limit. The data block limit is determined based on the number of sub-data blocks in adjacent data block groups. The sub-data blocks in adjacent data block groups are adjacent to the sub-data blocks in the target data block group.

[0374] Among them, the attribute prediction residual corresponding to the second type of original media attribute is obtained by subtracting the second type of original media attribute and the second type of predicted media attribute corresponding to the second type of original media attribute. The second type of predicted media attribute is predicted based on the second type of sub-original media attribute of at least two sub-data blocks within the target data block group.

[0375] According to one embodiment of this application, Figure 12 The various modules in the point cloud data encoding device shown can be individually or entirely merged into one or more units, or one or more of these units can be further divided into multiple functionally smaller sub-units to achieve the same operation without affecting the technical effects of the embodiments of this application. The above modules are based on logical functional division. In practical applications, the function of one module can be implemented by multiple units, or the function of multiple modules can be implemented by one unit. In other embodiments of this application, the point cloud data encoding device may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by multiple units.

[0376] In this application, when point cloud data needs to be encoded, the consumer-side device can acquire M signals to be encoded from a target data block in the point cloud data, and the signal encoding order of the M signals to be encoded, where M is a positive integer greater than 1; the signals to be encoded are used to reflect the original media attributes of the target data block; the target data block can refer to any data block to be encoded in the point cloud data. Further, the consumer-side device can alternately encode the M signals to be encoded from the target data block according to the signal encoding order of the M signals to be encoded, to obtain the encoded data of the target data block; here, alternating encoding can refer to encoding the M signals to be encoded from one target data block and then encoding the S signals to be encoded from another target data block, where S is a positive integer less than or equal to M; or, alternating encoding can refer to encoding the M signals to be encoded from multiple target data blocks in parallel. It is evident that by eliminating the need to wait for the encoding of the signals corresponding to one type of original media attribute of all target data blocks to be completed before encoding the signals corresponding to another type of original media attribute of each target data block, encoding latency can be reduced and the encoding efficiency of data blocks in point cloud data can be improved. Furthermore, it is not necessary to cache the signals corresponding to the other type of original media attribute of all target data blocks in the encoding cache, thus reducing cache pressure.

[0377] Please see Figure 13 , Figure 13 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Figure 13 As shown, the computer device 1000 may include a processor 1001, a network interface 1004, and a memory 1005. Furthermore, the computer device 1000 may also include a user interface 1003 and at least one communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as at least one disk storage device. Optionally, the memory 1005 may also be at least one storage device located remotely from the processor 1001. Figure 13 As shown, the memory 1005, which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a device control application.

[0378] exist Figure 13 In the computer device 1000 shown, the network interface 1004 provides network communication functionality; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:

[0379] Obtain the M encoded data corresponding to the target data block to be decoded in the point cloud data, and the signal decoding order of the M encoded data; M is a positive integer greater than 1;

[0380] According to the signal decoding order, the M encoded data corresponding to the target data block are decoded alternately to obtain the M decoded signals of the target data block. The decoded signals are used to reflect the original media attributes of the target data block.

[0381] It should be understood that the computer device 1000 described in the embodiments of this application can execute the foregoing text. Figure 3 The description of the point cloud data encoding method in the corresponding embodiments can also be performed as described above. Figure 11 The description of the point cloud data encoding device in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated.

[0382] Please see Figure 14 , Figure 14This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Figure 14 As shown, the computer device 1000 may include a processor 1001, a network interface 1004, and a memory 1005. Furthermore, the computer device 1000 may also include a user interface 1003 and at least one communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as at least one disk storage device. Optionally, the memory 1005 may also be at least one storage device located remotely from the processor 1001. Figure 14 As shown, the memory 1005, which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a device control application.

[0383] exist Figure 14 In the computer device 1000 shown, the network interface 1004 provides network communication functionality; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:

[0384] Obtain M signals to be encoded from the target data block in the point cloud data, and the signal encoding order of the M signals to be encoded; M is a positive integer greater than 1; the signals to be encoded are used to reflect the original media attributes of the target data block;

[0385] Based on the signal encoding order of the M signals to be encoded, the M signals to be encoded in the target data block are alternately encoded to obtain the encoded data of the target data block.

[0386] It should be understood that the computer device 1000 described in the embodiments of this application can execute the foregoing text. Figure 8 The description of the point cloud data encoding method in the corresponding embodiments can also be performed as described above. Figure 12 The description of the point cloud data encoding device in the corresponding embodiments will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated.

[0387] Furthermore, it should be noted that this application embodiment also provides a computer-readable storage medium, which stores a computer program executed by the point cloud data encoding device mentioned above. The computer program includes program instructions, and when the processor executes the program instructions, it can execute the aforementioned... Figure 3 and Figure 8 The description of the point cloud data encoding method in the corresponding embodiments will not be repeated here.

[0388] Furthermore, the beneficial effects of using the same method will not be repeated here. For technical details not disclosed in the computer-readable storage medium embodiments involved in this application, please refer to the description of the method embodiments of this application. As an example, program instructions can be deployed and executed on a computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed in multiple locations and interconnected through a communication network. Multiple computing devices distributed in multiple locations and interconnected through a communication network can constitute a blockchain system.

[0389] Furthermore, it should be noted that this application also provides a computer program product or computer program, which may include computer instructions, which may be stored in a computer-readable storage medium. The processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor may execute the computer instructions, causing the computer device to perform the aforementioned actions. Figure 3 and Figure 8 The description of the point cloud data encoding method in the corresponding embodiments is already provided and will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the computer program products or computer program embodiments involved in this application, please refer to the description of the method embodiments of this application.

[0390] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0391] The steps in the method of this application embodiment can be adjusted, combined, or deleted according to actual needs.

[0392] The modules in the device of this application embodiment can be merged, divided, and deleted according to actual needs.

[0393] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0394] The above description discloses only preferred embodiments of the present invention and should not be construed as limiting the scope of the present invention. Therefore, equivalent variations made in accordance with the claims of the present invention are still within the scope of the present invention.

Claims

1. A point cloud data decoding method, characterized in that, include: Obtain M encoded data corresponding to the target data block to be decoded in the point cloud data, and the signal decoding order of the M encoded data; M is a positive integer greater than 1, and the number of target data blocks is at least two, including the first target data block; According to the signal decoding order, the M encoded data corresponding to the target data block are alternately decoded to obtain M decoded signals of the target data block. The decoded signals are used to reflect the original media attributes of the target data block. The alternate decoding means that after decoding the M encoded data of one target data block, the M encoded data of another target data block are decoded. Alternatively, the alternate decoding means that the M encoded data of at least two target data blocks are decoded in parallel. The encoded data corresponding to the first target data block includes a first encoded value and a second encoded value. The first target data block includes a first sub-data block and a second sub-data block. The first decoding signal of the first target data block is used to reflect the original media attributes of the first sub-data block. The second decoding signal of the first target data block is used to reflect the original media attributes of the second sub-data block. The second decoding signal of the first target data block is obtained by decoding based on the second encoded value of the first target data block.

2. The method according to claim 1, characterized in that, The at least two target data blocks also include a second target data block; The step of alternately decoding the M coded data corresponding to the target data block according to the signal decoding order to obtain the M decoded signals of the target data block includes: According to the signal decoding order, the M encoded data of the first target data block are decoded alternately, and when the first target data block is decoded alternately, the M encoded data of the second target data block are decoded alternately. Obtain M decoded signals of the first target data block obtained by alternately decoding M encoded data of the first target data block, and obtain M decoded signals of the second target data block obtained by alternately decoding M encoded data of the second target data block.

3. The method according to claim 1, characterized in that, The at least two target data blocks also include a second target data block; The step of alternately decoding the M coded data corresponding to the target data block according to the signal decoding order to obtain the M decoded signals of the target data block includes: According to the signal decoding order, the M encoded data of the first target data block and the M encoded data of the second target data block are decoded alternately in parallel to obtain the M decoded signals of the first target data block and the M decoded signals of the second target data block.

4. The method according to claim 2, characterized in that, The signal decoding order of the first encoded value is before the signal decoding order of the second encoded value; The step of alternately decoding the M encoded data of the first target data block according to the signal decoding order, and then alternately decoding the M encoded data of the second target data block after the first target data block has been decoded, includes: Decode the first encoded value of the first target data block; If the first encoded value of the first target data block has been decoded, then the second encoded value of the first target data block is decoded. If the second encoded value of the first target data block has been decoded, then the first target data block is determined to have been decoded alternately, and the M encoded data of the second target data block are decoded alternately.

5. The method according to claim 4, characterized in that, The decoding method for the first encoded value is run-length decoding; the first encoded value of the first target data block includes a first signal encoded value and a first length encoded value; Decoding the first encoded value of the first target data block includes: The first length encoding value corresponding to the first target data block is decoded to obtain the first run length corresponding to the first data block; the first run length is used to reflect the number of the first data blocks; the first data block is a series of adjacent data blocks in the point cloud data whose block encoding order is before the block encoding order of the first target data block and which have a first decoded signal of the second signal type; Based on the first travel length, the first signal encoding value corresponding to the first target data block is decoded to obtain the first decoded signal of the first target data block.

6. The method according to claim 5, characterized in that, The step of decoding the first signal encoding value corresponding to the first target data block according to the first travel length to obtain the first decoded signal of the first target data block includes: The F data blocks to be decoded in the point cloud data whose block decoding order is after the block decoding order of the already decoded data blocks are determined as the first data block; F is the same as the first stroke length. The decoded signal of the second signal type is determined as the first decoded signal of the first data block; The data block to be decoded in the point cloud data whose block decoding order is after the decoding order of the first data block is determined as the first target data block; The first signal encoding value corresponding to the first target data block is decoded to obtain the first decoded signal of the first target data block.

7. The method according to claim 4, characterized in that, The decoding method for the first encoded value is non-run-time decoding; the first encoded value corresponding to the first decoded signal of the first target data block includes the first signal encoded value; Decoding the first encoded value of the first target data block includes: The data block to be decoded in the point cloud data whose block decoding order is after the block decoding order of the already decoded data blocks is determined as the first target data block; The first signal encoding value is decoded to obtain the first decoded signal of the first target data block.

8. A point cloud data encoding method, characterized in that, include: Obtain M signals to be encoded from the target data block in the point cloud data, and the signal encoding order of the M signals to be encoded; M is a positive integer greater than 1; The signal to be encoded is used to reflect the original media attributes of the target data block; the number of target data blocks is at least two. According to the signal encoding order of the M signals to be encoded, the M signals to be encoded of the target data block are alternately encoded to obtain the encoded data of the target data block; the alternate encoding is to encode the M signals to be encoded of one target data block and then encode the S signals to be encoded of another target data block, where S is a positive integer less than or equal to M; or, the alternate encoding is to encode the M signals to be encoded of at least two target data blocks in parallel. Wherein, a target data block includes at least two sub-data blocks in a target data block group, and the M signals to be encoded in the target data block include first transform coefficients and second transform coefficients corresponding to the P-class original media attributes of the target data block, respectively. The P-class original media attributes of the target data block are determined based on the P-class sub-original media attributes corresponding to the at least two sub-data blocks in the target data block group, respectively. M is greater than P, where P is a positive integer greater than or equal to 1.

9. The method according to claim 8, characterized in that, The at least two target data blocks include a first target data block and a second target data block; The step of alternately encoding the M signals to be encoded in the target data block according to the signal encoding order of the M signals to be encoded, to obtain the encoded data of the target data block, includes: According to the signal encoding order of the M signals to be encoded, the M signals to be encoded in the first target data block are alternately encoded; After the first target data block is alternately encoded, the S signals to be encoded in the second target data block are alternately encoded; S is a positive integer less than or equal to M; Obtain the encoded data of the first target data block obtained by alternating encoding of the M signals to be encoded, and obtain the encoded data of the second target data block obtained by alternating encoding of the S signals to be encoded.

10. The method according to claim 9, characterized in that, The M signals to be encoded include a first signal to be encoded and a second signal to be encoded, wherein the signal encoding order of the first signal to be encoded is before the signal encoding order of the second signal to be encoded. The step of alternately encoding the M signals to be encoded in the first target data block according to the signal encoding order of the M signals to be encoded, and then alternately encoding the S signals to be encoded in the second target data block after the first target data block has been alternately encoded, includes: Encode the first signal to be encoded in the first target data block; If the first signal to be encoded in the first target data block has been encoded, then the second signal to be encoded in the first target data block is encoded. If the second signal to be encoded in the first target data block has been encoded, then the first target data block is determined to have been alternately encoded, and the S signals to be encoded in the second target data block are alternately encoded.

11. The method according to claim 9, characterized in that, The M signals to be encoded include a first signal to be encoded and a second signal to be encoded; the signal encoding order of the first signal to be encoded is before the signal encoding order of the second signal to be encoded; the encoding method of the second signal to be encoded is run-length encoding, and the signal type of the second signal to be encoded in the first target data block is a second signal type; The step of alternately encoding the M signals to be encoded in the first target data block according to the signal encoding order of the M signals to be encoded, and then alternately encoding the S signals to be encoded in the second target data block after the first target data block has been alternately encoded, includes: Encode the first signal to be encoded in the first target data block; If the first signal to be encoded in the first target data block has been encoded, then the first target data block is determined to be encoded alternately, and the S signals to be encoded in the second target data block are encoded alternately.

12. The method according to claim 10, characterized in that, The encoding method of the first signal to be encoded is run-length encoding; The encoding of the first signal to be encoded in the first target data block includes: According to the block encoding order, the data blocks to be encoded in the candidate data block set are traversed sequentially; the candidate data block set includes the data blocks to be encoded in the point cloud data whose block encoding order is after the block encoding order of the already encoded data blocks. If a data block to be encoded with a first signal of a first signal type is found in the candidate data block set, then the data block to be encoded found is determined as the first target data block. Run-length encoding is performed on the first signal to be encoded in the first target data block to obtain the first encoded value corresponding to the first signal to be encoded in the first target data block.

13. The method according to claim 12, characterized in that, The method further includes: The data block to be encoded in the candidate data block set whose block encoding order is after the first target data block is determined as the second target data block; When the second target data block is alternately encoded, the first target data block and the second target data block are updated to the encoded data block, and the initial data block set consisting of the data blocks to be encoded in the point cloud data whose block encoding order is after the block encoding order of the second target data block is updated to the candidate data block set.

14. The method according to claim 12, characterized in that, The step of performing run-length encoding on the first signal to be encoded of the first target data block to obtain the first encoded value corresponding to the first signal to be encoded of the first target data block includes: The first signal to be encoded of the first target data block is encoded to obtain the first signal encoding value of the first signal to be encoded of the first target data block. The first stroke length is length-encoded to obtain a first length-encoded value; the first stroke length is used to reflect the number of first data blocks; the first data block is a series of adjacent data blocks in the point cloud data whose block encoding order is earlier than that of the first target data block and which have a first signal to be encoded of a second signal type; the first length-encoded value is used to reflect the signal encoding value of the first signal to be encoded in the first data block. The first signal encoding value and the first length encoding value are determined as the first encoding value corresponding to the first signal to be encoded in the first target data block.

15. The method according to claim 10, characterized in that, The encoding method of the first signal to be encoded is non-runtime encoding. The encoding of the first signal to be encoded in the first target data block includes: The data block to be encoded with the smallest difference between the block encoding order in the point cloud data and the block encoding order of the already encoded data block is taken as the first target data block; The first signal to be encoded of the first target data block is encoded to obtain the first signal encoding value of the first signal to be encoded of the first target data block. The first signal encoding value is determined as the first encoding value corresponding to the first signal to be encoded in the first target data block.

16. The method according to claim 15, characterized in that, The method further includes: The data block to be encoded in the candidate data block set whose block encoding order is after the first target data block is determined as the second target data block; When the second target data block is alternately encoded, the first target data block and the second target data block are updated to the encoded data block.

17. The method according to claim 10, characterized in that, The second signal to be encoded is encoded using run-length encoding. If the first signal to be encoded in the first target data block has been encoded, then encoding the second signal to be encoded in the first target data block includes: If the first signal to be encoded of the first target data block has been encoded and the signal type of the second signal to be encoded of the first target data block is the first signal type, then the second signal to be encoded of the first target data block is signal encoded to obtain the second signal encoding value of the second signal to be encoded of the first target data block. The second stroke length is length-encoded to obtain a second length-encoded value; the second stroke length is used to reflect the number of second data blocks; the second data block is a series of adjacent data blocks in the point cloud data whose block encoding order is earlier than that of the first target data block and which have a second signal type; the second length-encoded value is used to reflect the signal encoding value of the second signal to be encoded in the second data block; The second signal encoding value and the second length encoding value are determined as the second encoding value corresponding to the second signal to be encoded in the first target data block.

18. The method according to claim 10, characterized in that, The second signal to be encoded is encoded using a non-run-length encoding method; If the first signal to be encoded in the first target data block has been encoded, then encoding the second signal to be encoded in the first target data block includes: If the first signal to be encoded of the first target data block has been encoded, then the second signal to be encoded of the first target data block is signal encoded to obtain the second signal encoded value of the second signal to be encoded of the first target data block. The second signal encoding value is determined as the second encoding value corresponding to the second signal to be encoded in the first target data block.

19. The method according to claim 10, characterized in that, The encoding method of the first signal to be encoded is run-length encoding, the encoding method of the second signal to be encoded is run-length encoding, and the signal type of the second signal to be encoded in the first target data block is the first signal type; The second signal to be encoded of the first target data block is stored in the encoding buffer when the first signal to be encoded of the first target data block is completed; The encoding buffer also includes a second signal to be encoded for a third data block. The third data block has a second signal to be encoded of a first signal type and a first signal to be encoded of a second signal type, and the block encoding order is a data block to be encoded that precedes the block encoding order of the first target data block. The method further includes: If the first signal to be encoded in the first target data block has been encoded, then the second signal to be encoded in the third data block is read from the encoding buffer; Run-length encoding is performed on the second signal to be encoded in the third data block to obtain the third encoded value corresponding to the second signal to be encoded in the third data block. The encoding time of the second signal to be encoded in the third data block is earlier than the encoding time of the second signal to be encoded in the first target data block.

20. The method according to claim 10, characterized in that, The first signal to be encoded is encoded using run-length encoding, and the second signal to be encoded is encoded using non-run-length encoding. The second signal to be encoded in the first target data block is stored in the encoding buffer when the first signal to be encoded in the first target data block is encoded; The encoding buffer also includes a second signal to be encoded for a fourth data block, the fourth data block having a first signal to be encoded of a second signal type, and the block encoding order being a data block to be encoded that precedes the block encoding order of the first target data block; The method further includes: If the first signal to be encoded in the first target data block has been encoded, then the second signal to be encoded in the fourth data block is read from the encoding buffer; The second signal to be encoded in the fourth data block is encoded to obtain the fourth signal encoding value corresponding to the second signal to be encoded in the fourth data block. The encoding time of the second signal to be encoded in the fourth data block is earlier than the encoding time of the second signal to be encoded in the first target data block.

21. The method according to claim 19 or 20, characterized in that, The method further includes: If the first signals to be encoded for all data blocks within the detection period of the first target data block have been encoded, then the second signal to be encoded for the fifth data block is read from the encoding buffer; the fifth data block includes data blocks within the detection period of the first target data block. The second signal to be encoded in the fifth data block is encoded to obtain the fifth encoded value corresponding to the second signal to be encoded in the fifth data block. The fifth data block is removed from the encoding cache.

22. The method according to claim 21, characterized in that, If the capacity of the encoding buffer is less than the first capacity threshold, then the detection period includes L1 data blocks, and the first capacity threshold is determined based on the signal quantity of the second signal to be encoded in the L1 data blocks. If the capacity of the encoding buffer is less than the second capacity threshold, then the detection period includes data blocks within L2 data block groups. The second capacity threshold is determined based on the signal quantity of the second signal to be encoded within the data blocks of the L2 data block groups.

23. The method according to claim 8, characterized in that, The M signals to be encoded in the target data block also include attribute prediction residuals corresponding to the M types of original media attributes of the target data block; the attribute prediction residual corresponding to the first type of original media attribute is obtained by subtracting the first type of original media attribute and the first type of predicted media attribute corresponding to the first type of original media attribute. The first type of predicted media attribute is obtained by attribute prediction based on the first type of original media attribute of the reference data block of the target data block. The first type of original media attribute belongs to the M types of original media attributes.

24. The method according to claim 8, characterized in that, The P-class original media attributes of the target data block include a second type of original media attributes. The first transformation coefficient and the second transformation coefficient corresponding to the second type of original media attributes are obtained by transforming the second type of original media attributes or the corresponding attribute prediction residuals using a transformation matrix. The transformation matrix is ​​determined according to the number of sub-data blocks in the target data block group.

25. The method according to claim 24, characterized in that, The sub-data blocks in the target data block group have the same Hilbert transform code. The Hilbert transform code of each sub-data block is obtained by performing a Hilbert transform on the position of each sub-data block in the point cloud data.

26. The method according to claim 25, characterized in that, The number of sub-data blocks in the target data block group is less than the data block limit, which is determined based on the number of sub-data blocks in adjacent data block groups. The sub-data blocks in the adjacent data block groups are adjacent to the sub-data blocks in the target data block group.

27. The method according to claim 24, characterized in that, The attribute prediction residual corresponding to the second type of original media attribute is obtained by subtracting the second type of original media attribute and the second type of predicted media attribute corresponding to the second type of original media attribute. The second type of predicted media attribute is predicted based on the second type of sub-original media attribute of at least two sub-data blocks within the target data block group.

28. A point cloud data decoding device, characterized in that, include: The first acquisition module is used to acquire M encoded data corresponding to the target data block to be decoded in the point cloud data, and the signal decoding order of the M encoded data; M is a positive integer greater than 1, and the number of target data blocks is at least two, including the first target data block; An alternating decoding module is used to alternately decode M encoded data corresponding to the target data block according to the signal decoding order to obtain M decoded signals of the target data block. The decoded signals are used to reflect the original media attributes of the target data block. The alternating decoding means that after decoding the M encoded data of one target data block, the M encoded data of another target data block are decoded. Alternatively, the alternating decoding means that the M encoded data of at least two target data blocks are decoded in parallel. The encoded data corresponding to the first target data block includes a first encoded value and a second encoded value. The first target data block includes a first sub-data block and a second sub-data block. The first decoding signal of the first target data block is used to reflect the original media attributes of the first sub-data block. The second decoding signal of the first target data block is used to reflect the original media attributes of the second sub-data block. The second decoding signal of the first target data block is obtained by decoding based on the second encoded value of the first target data block.

29. A point cloud data encoding device, characterized in that, include: The second acquisition module is used to acquire M signals to be encoded from the target data block in the point cloud data, and the signal encoding order of the M signals to be encoded. M is a positive integer greater than 1; The signal to be encoded is used to reflect the original media attributes of the target data block; the number of target data blocks is at least two. An alternating encoding module is used to alternately encode the M signals to be encoded in the target data block according to the signal encoding order of the M signals to be encoded, so as to obtain the encoded data of the target data block; the alternating encoding is to encode the M signals to be encoded in one target data block and then encode the S signals to be encoded in another target data block, where S is a positive integer less than or equal to M; or, the alternating encoding is to encode the M signals to be encoded in at least two target data blocks in parallel. Wherein, a target data block includes at least two sub-data blocks in a target data block group, and the M signals to be encoded in the target data block include first transform coefficients and second transform coefficients corresponding to the P-class original media attributes of the target data block, respectively. The P-class original media attributes of the target data block are determined based on the P-class sub-original media attributes corresponding to the at least two sub-data blocks in the target data block group, respectively. M is greater than P, where P is a positive integer greater than or equal to 1.

30. A computer device, characterized in that, include: Processor and memory; The processor is connected to a memory, wherein the memory is used to store a computer program, and the processor is used to invoke the computer program to cause the computer device to perform the method according to any one of claims 1-27.

31. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded and executed by a processor to cause a computer device having the processor to perform the method of any one of claims 1-27.

Citation Information

Patent Citations

  • Coding and decoding method and device of point cloud attribute, equipment and storage medium

    CN116233467A