Data processing method and device, electronic equipment, storage medium and program product
Patent Information
- Application Number
- CN202611123053.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-27
- Publication Date
- 2026-10-13
AI Technical Summary
[0003]由此可知,通过上述方式对3D点云数据体素化时,复杂度较高
[0010]本公开所提供的实施例,对第一点云数据体素化时,首先对第一点云数据中每个点数据的位置坐标进行编码,得到每个点数据的编码值,然后根据该编码值,对第一点云数据中的点数据进行分组,得到多个目标分组,从而能够通过分组,使得编码值相同的点数据(即同一体素内的点)位于同一目标分组中。之后根据每个点数据的原始索引及多个目标分组,确定每个点数据所属体素的第一索引以及每个点数据在所属体素内的第二索引,从而得到对第一点云数据体素化后的第二点云数据。通过这种方式,能够基于坐标编码、点数据分组及索引计算的方式,快速准确地实现点云数据的体素化,从而提高了点云数据体素化的处理效率,满足了实时处理需求。
Smart Images

Figure CN122906172A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a data processing method and apparatus, electronic device, storage medium, and program product. Background Technology
[0002] Three-dimensional (3D) point cloud data voxelization is the process of mapping discrete 3D point cloud data to a regular 3D mesh (voxels). In related technologies, 3D point cloud data voxelization typically employs a nested loop approach that iterates through all preceding point data. That is, during voxelization, for each point data in the 3D point cloud data, all preceding point data must be traversed to determine if they belong to the same voxel. The computational complexity of this method is O(n²), where n is the number of point data in the point cloud data.
[0003] Therefore, the voxelization of 3D point cloud data using the above methods is highly complex. Furthermore, as the scale of 3D point cloud data continues to increase, the processing efficiency of these methods drops sharply, failing to meet real-time processing requirements. Therefore, a new method for voxelizing point cloud data is urgently needed. Summary of the Invention
[0004] This disclosure provides a data processing method and apparatus, electronic device, storage medium, and program product.
[0005] In a first aspect, this disclosure provides a data processing method, which includes: encoding the position coordinates of each point data in a first point cloud data to obtain an encoded value for each point data; wherein the point data further includes an original index; grouping the point data in the first point cloud data according to the encoded value to obtain multiple target groups; wherein the encoded values of the point data in each target group are the same; determining a first index of the voxel to which each point data belongs and a second index of each point data within its voxel according to the original index of each point data and the multiple target groups, to obtain a second point cloud data after voxelization of the first point cloud data.
[0006] Secondly, this disclosure provides a data processing apparatus, comprising: an encoding module for encoding the position coordinates of each point data in a first point cloud data to obtain an encoded value for each point data; wherein the point data further includes an original index; a grouping module for grouping the point data in the first point cloud data according to the encoded value to obtain multiple target groups; wherein the encoded values of the point data in each target group are the same; and an index determination module for determining a first index of the voxel to which each point data belongs and a second index of each point data within its voxel according to the original index of each point data and the multiple target groups, to obtain a second point cloud data voxelized from the first point cloud data.
[0007] Thirdly, this disclosure provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the data processing method described above.
[0008] Fourthly, this disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-described data processing method.
[0009] Fifthly, this disclosure provides a computer program product comprising computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device performs the data processing method described above.
[0010] The embodiments provided in this disclosure, when voxelizing the first point cloud data, firstly encode the position coordinates of each point data in the first point cloud data to obtain the encoded value of each point data. Then, based on the encoded value, the point data in the first point cloud data are grouped to obtain multiple target groups. This grouping ensures that point data with the same encoded value (i.e., points within the same voxel) are located in the same target group. Then, based on the original index of each point data and the multiple target groups, the first index of the voxel to which each point data belongs and the second index of each point data within its respective voxel are determined, thereby obtaining the second point cloud data after voxelizing the first point cloud data. In this way, voxelization of point cloud data can be achieved quickly and accurately based on coordinate encoding, point data grouping, and index calculation, thereby improving the processing efficiency of point cloud data voxelization and meeting real-time processing requirements.
[0011] Furthermore, the data processing method of this disclosure avoids nested loop calculations, and each step can be executed in parallel, thereby making full use of the parallel computing power of the processing device, improving hardware resource utilization while reducing hardware resource consumption.
[0012] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0013] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the embodiments of the present disclosure to explain the disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the description of detailed exemplary embodiments with reference to the accompanying drawings, which are described below.
[0014] Figure 1 This is a flowchart of a data processing method provided in an embodiment of the present disclosure.
[0015] Figure 2 This is a schematic diagram of a data processing method provided in an embodiment of the present disclosure.
[0016] Figure 3 This is a block diagram of a data processing apparatus provided in an embodiment of the present disclosure.
[0017] Figure 4 This is a block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation
[0018] To enable those skilled in the art to better understand the technical solutions of this disclosure, exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments of this disclosure to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0019] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.
[0020] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.
[0021] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded. Words such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.
[0022] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined herein.
[0023] As mentioned earlier, related technologies employ a nested loop approach that sequentially traverses all previous point data to voxelize 3D point cloud data. This approach is not only highly complex and cannot meet real-time processing requirements, but the long-term, high-load computation of the nested loops also consumes a large amount of hardware resources (such as memory and computing power), increasing hardware resource consumption.
[0024] To address the aforementioned technical problems, embodiments of this disclosure provide a data processing method, comprising: encoding the position coordinates of each point data in a first point cloud data to obtain an encoded value for each point data; wherein the point data further includes an original index; grouping the point data in the first point cloud data according to the encoded values to obtain multiple target groups; wherein the encoded values of the point data in each target group are the same; determining a first index of the voxel to which each point data belongs and a second index of each point data within its respective voxel according to the original index of each point data and the multiple target groups, to obtain a second point cloud data voxelized from the first point cloud data.
[0025] According to the data processing method of this disclosure embodiment, when voxelizing the first point cloud data, the position coordinates of each point data in the first point cloud data are first encoded to obtain the encoded value of each point data. Then, based on the encoded value, the point data in the first point cloud data are grouped to obtain multiple target groups. This grouping ensures that point data with the same encoded value (i.e., points within the same voxel) are located in the same target group. Then, based on the original index of each point data and the multiple target groups, the first index of the voxel to which each point data belongs and the second index of each point data within its respective voxel are determined, thereby obtaining the second point cloud data after voxelizing the first point cloud data. In this way, voxelization of point cloud data can be achieved quickly and accurately based on coordinate encoding, point data grouping, and index calculation, thereby improving the processing efficiency of point cloud data voxelization and meeting real-time processing requirements.
[0026] Furthermore, the data processing method of this disclosure avoids nested loop calculations, and each step can be executed in parallel, thereby making full use of the parallel computing power of the processing device (e.g., graphics processing unit GPU), improving hardware resource utilization while reducing hardware resource consumption.
[0027] The data processing method according to embodiments of this disclosure can be executed by an electronic device such as a terminal device or a server. The terminal device can be a user equipment (UE), a mobile device, a user terminal, a personal digital assistant (PDA), a handheld device, a computing device, an in-vehicle device, a wearable device, etc. The method can be implemented by a processor calling computer-readable program instructions stored in memory. Alternatively, the method can be executed by a server.
[0028] Figure 1 A flowchart illustrating a data processing method provided in an embodiment of this disclosure. (Refer to...) Figure 1 The method includes steps S11-S13, which are described in detail below.
[0029] In step S11, the position coordinates of each point data in the first point cloud data are encoded to obtain the encoded value of each point data. The point data also includes the original index.
[0030] In step S12, the point data in the first point cloud data is grouped according to the encoded value to obtain multiple target groups. The encoded values of the point data in each target group are the same.
[0031] In step S13, based on the original index of each point data and the multiple target groups, the first index of the voxel to which each point data belongs and the second index of each point data within the voxel are determined, thus obtaining the second point cloud data after voxelizing the first point cloud data.
[0032] In some possible implementations, the first point cloud data can be collected using devices such as lidar, cameras, and ultrasonic sensors. It should be noted that the first point cloud data can also be obtained through other methods, and this disclosure does not impose any limitations on this. The first point cloud data includes multiple point data points. Each point data point includes its location coordinates and original index. The location coordinates of the point data point indicate its position in a three-dimensional coordinate system and can be represented as (x, y, z), where x, y, and z are all integers. The original index of the point data point can be used to uniquely identify that point data point; it can be a unique identifier for that point data point within the first point cloud data.
[0033] In some possible implementations, in step S11, the position coordinates of each point data in the first point cloud data can be encoded to obtain the encoded value of each point data. The encoded value of each point data corresponds one-to-one with its position coordinates, and the encoded value corresponding to each position coordinate is globally unique. That is, point data with the same position coordinates have the same encoded value, and point data with different position coordinates have different encoded values. The encoded value of the point data is an integer. For example, the encoded value is a 64-bit unsigned integer. In one example, the position coordinates of each point data can be mapped to an encoded value through a preset mapping relationship. In another example, the position coordinates of the point data can be represented as binary numbers, and then the position coordinates of the point data can be encoded through bitwise operations (such as shift, bitwise OR, etc.) to obtain the encoded value of the point data. It should be noted that the position coordinates of the point data can also be encoded in other ways, and this disclosure does not limit this.
[0034] In some possible implementations, in step S12, the point data in the first point cloud data can be grouped according to the encoded values to obtain multiple target groups. The encoded values of the point data in each target group are the same. For example, the point data in the first point cloud data can be aggregated and grouped according to the encoded values to obtain multiple target groups. Alternatively, the point data in the first point cloud data can be sorted according to the encoded values, with point data having the same encoded values arranged consecutively, thus obtaining multiple target groups. It should be noted that other methods can also be used to group the point data in the first point cloud data, and this disclosure does not limit this approach.
[0035] In some possible implementations, in step S13, based on the original index of each point data and multiple target groups, the first index of the voxel to which each point data belongs and the second index of each point data within its respective voxel are determined. Each target group corresponds to one voxel. For any target group, the original index of any point data in the target group can be determined as the index of the voxel corresponding to the target group, and then the index of the voxel corresponding to the target group can be determined as the first index of the voxel to which each point data belongs in the target group. Then, based on the order in which each point data in the target group is added (i.e., the order in which the point data is added to the target group during sorting or clustering), the second index of each point data within its respective voxel is determined; or, based on the order in which the original indices of each point data in the target group are from smallest to largest, the second index of each point data within its respective voxel is determined. It should be noted that the first index of the voxel to which each point data belongs and the second index of each point data within its respective voxel can also be determined in other ways, and this disclosure does not limit this.
[0036] By determining the first index of the voxel to which each point data belongs and the second index of each point data within its voxel using the above method, the voxelization of the first point data is completed, resulting in the voxelized second point cloud data.
[0037] According to the data processing method of this disclosure embodiment, when voxelizing the first point cloud data, the position coordinates of each point data in the first point cloud data are first encoded to obtain the encoded value of each point data. Then, based on the encoded value, the point data in the first point cloud data are grouped to obtain multiple target groups. This grouping ensures that point data with the same encoded value (i.e., points within the same voxel) are located in the same target group. Then, based on the original index of each point data and the multiple target groups, the first index of the voxel to which each point data belongs and the second index of each point data within its respective voxel are determined, thereby obtaining the second point cloud data after voxelizing the first point cloud data. In this way, voxelization of point cloud data can be achieved quickly and accurately based on coordinate encoding, point data grouping, and index calculation, thereby improving the processing efficiency of point cloud data voxelization and meeting real-time processing requirements.
[0038] The data processing method according to the embodiments of this disclosure will now be described in detail.
[0039] As mentioned above, the position coordinates of each point in the first point cloud data can be encoded in step S11 to obtain the encoded value of each point. In some possible implementations, step S11 may include: for any point in the first point cloud data, converting the first coordinate value in the position coordinates of the point data into first data of a preset bit width, converting the second coordinate value in the position coordinates of the point data into second data of a preset bit width, and converting the third coordinate value in the position coordinates of the point data into third data of a preset bit width; performing shift and bitwise OR operations on the first data, the second data, and the third data to obtain the encoded value of the point data.
[0040] For any point in the first point cloud data, when encoding the position coordinates of that point, the position coordinates can first be converted into binary numbers of a preset bit width (e.g., 64 bits). Specifically, the first coordinate value (x-value) of the point data can be converted into first data of a preset bit width, for example, the x-value can be converted into 64-bit binary representation; the second coordinate value (y-value) can be converted into second data of a preset bit width, for example, the y-value can be converted into 64-bit binary representation; and the third coordinate value (z-value) can be converted into third data of a preset bit width, for example, the z-value can be converted into 64-bit binary representation.
[0041] Then, shift and OR operations are performed on the first, second, and third data to obtain the encoded value of the dotted data. Alternatively, two of the first, second, and third data can be shifted by different numbers of bits before performing a bitwise OR operation to obtain the encoded value of the dotted data. For example, with a preset bit width of 64 bits, the second data can be shifted left by 42 bits to obtain the sixth data, and the third data can be shifted left by 21 bits to obtain the seventh data. The first data remains unchanged, i.e., the x value remains unchanged, the y value is shifted left by 42 bits, and the z value is shifted left by 21 bits. Then, a bitwise OR operation is performed on the first, sixth, and seventh data to obtain the encoded value of the dotted data. It should be noted that the shift and OR operations on the first, second, and third data can also be performed in other ways, and this disclosure does not limit this.
[0042] In the embodiments of this disclosure, when encoding the position coordinates of point data, the first, second, and third coordinate values of the point data are first converted into first, second, and third data of a preset bit width, respectively. Then, the first, second, and third data are shifted and bitwise ORed to obtain the encoded value of the point data. This method achieves lossless conversion from the position coordinates of point data to the encoded value, improves the accuracy of the encoded value, and provides a comparison benchmark for subsequent grouping of point data based on the encoded value.
[0043] In some possible implementations, the step of shifting and performing a bitwise OR operation on the first data, the second data, and the third data to obtain the encoded value of the point data includes: shifting the first data left by a first preset number of bits to obtain the fourth data; shifting the second data left by a second preset number of bits to obtain the fifth data; and performing a bitwise OR operation on the fourth data, the fifth data, and the third data to obtain the encoded value of the point data.
[0044] The first preset number of bits is twice the second preset number of bits. For example, when the preset bit width is 64 bits, the first preset number of bits is 42 bits and the second preset number of bits is 21 bits.
[0045] When performing shift and bitwise OR operations on the first, second, and third data, the first data (x value) is shifted left by a first preset number of bits (42 bits) to obtain the fourth data; the second data (y value) is shifted left by a second preset number of bits (21 bits) to obtain the fifth data; and the third data is not shifted. Then, a bitwise OR operation is performed on the fourth, fifth, and third data to obtain the encoded value of the dotted data. In the 64-bit encoded value obtained in this way, of the 63 bits excluding the most significant bit, the high 21 bits are the x value, the middle 21 bits are the y value, and the low 21 bits are the z value.
[0046] In the embodiments of this disclosure, when shifting and bitwise ORing the first data, the second data, and the third data, the first data can be shifted left by a first preset number of bits to obtain the fourth data, and the second data can be shifted left by a second preset number of bits to obtain the fifth data. Then, a bitwise OR operation is performed on the fourth data, the fifth data, and the third data to obtain the encoded value of the point data. This reduces the encoding complexity of the position coordinates of the point data and improves the processing efficiency when encoding the position coordinates of the point data.
[0047] In some possible implementations, step S12 may include: sorting all point data in the first point cloud data in ascending order of the encoded values, using the encoded values as keys and the original indexes as values, to obtain sorted first point cloud data; and determining multiple target groups based on the sorted first point cloud data.
[0048] When grouping point data in the first point cloud data, a sorting grouping method can be used. A sorting algorithm or function (such as `thrust::sort by key`) can be used to sort all point data in the first point cloud in ascending order of the encoded values, using the encoded values as keys and the original indices as values. In other words, using the encoded values and original indices of the point data as key-value pairs, all point data in the first point cloud data are sorted in ascending order of the encoded values to obtain the sorted first point cloud data. Then, point data with the same encoded values in the sorted first point cloud data are identified as a target group. Each target group includes at least one point data point. The point data in the target group can be arranged in ascending order of the original indices or according to the order in which each point data point was added to the target group.
[0049] For example, the encoded values of all points in the first point cloud data (the encoded values of the 7 points are 122, 100, 100, 100, 150, 150, and 111 respectively) can be stored in array A, and the original indices of all point data can be stored in array B. Examples of array A and array B are shown below:
[0050] Array A: 122, 100, 100, 100, 150, 150, 111
[0051] Data B: 0, 1, 2, 3, 4, 5, 6
[0052] It can be seen that in the first cloud data, the encoding value of the first data point is 122, and the original index is 0; the encoding value of the second data point is 100, and the original index is 1; the encoding value of the third data point is 100, and the original index is 2; the encoding value of the fourth data point is 100, and the original index is 3; the encoding value of the fifth data point is 150, and the original index is 4; the encoding value of the sixth data point is 150, and the original index is 5; and the encoding value of the seventh data point is 111, and the original index is 6.
[0053] Using the encoded value and original index of the point data as key-value pairs, all point data in the first point cloud data are sorted in ascending order of the encoded value to obtain the sorted first point cloud data. The point data of the sorted first point cloud data is stored in array C, and the corresponding original indices are stored in array D. An example of array C and array D is shown below when the point data in the target group is sorted in ascending order of the original indices:
[0054] Array C: 100, 100, 100, 111, 122, 150, 150
[0055] Data D: 1, 2, 3, 6, 0, 4, 5
[0056] With the point data in the target group arranged in the order of addition, examples of arrays C and D are as follows:
[0057] Array C: 100, 100, 100, 111, 122, 150, 150
[0058] Data D: 3, 1, 2, 6, 0, 4, 5
[0059] In this example, the sorting process is performed in parallel by two processing units of the processing device. The first processing unit sorts the first three data points in array A, and the second processing unit sorts the last four data points in array A. Therefore, for the three data points with a code value of 100, the first data point processed by the second processing unit, with an original index of 3, is sorted. Since it was added to the target group in order 1, it is ranked first in the target group. The second data point processed by the first processing unit, with an original index of 1, is sorted. Since it was added to the target group in order 2, it is ranked second in the target group. The third data point processed by the first processing unit, with an original index of 2, is sorted. Since it was added to the target group in order 3, it is ranked third in the target group.
[0060] Then, based on the sorted first point cloud data, four target groups were determined: the first target group includes three point data points, namely, point data with a code value of 100 and an original index of 1, point data with a code value of 100 and an original index of 2, and point data with a code value of 100 and an original index of 3; the second target group includes one point data point, namely, point data with a code value of 111 and an original index of 6; the third target group includes one point data point, namely, point data with a code value of 122 and an original index of 0; and the fourth target group includes two point data points, namely, point data with a code value of 150 and an original index of 4, and point data with a code value of 150 and an original index of 5.
[0061] It should be noted that in practical applications, array C and array A can share the same storage space; array D and array B can also share the same storage space. For ease of explanation, different array names are used here.
[0062] In the embodiments of this disclosure, when grouping the point data in the first point cloud data, all the point data in the first point cloud data are first sorted in ascending order of the encoding value, using the encoded value as the key and the original index as the value, to obtain the sorted first point cloud data. Then, based on the sorted first point cloud data, multiple target groups are determined, thereby enabling point data with the same encoding value to be quickly and accurately divided into the same target group by sorting and grouping, thus improving processing efficiency.
[0063] In some possible implementations, step S13 may include: for the first point data in any target group, determining the original index of the first point data as the first index of the voxel to which the first point data belongs; wherein the first point data is the first point data in the target group; and determining the second index of the first point data within its voxel as 0.
[0064] The first data point in any target group can be designated as the first data point. For the first data point, its original index can be set as the first index of the voxel to which it belongs, and its second index within the voxel can be set to 0. Specifically, if the data points in the target group are arranged in ascending order of their original indices, the first data point is the one with the smallest original index in the target group; if the data points in the target group are arranged in the order they were added, the first data point is the first data point added to the target group.
[0065] For example, if the point data in the target group is sorted in ascending order of the original index, arrays C and D are shown below:
[0066] Array C: 100, 100, 100, 111, 122, 150, 150
[0067] Data D: 1, 2, 3, 6, 0, 4, 5
[0068] For the first target group in this example, its first point data is a point data with a code value of 100 and an original index of 1. The original index 1 of the first point data can be determined as the first index of the voxel to which the first point data belongs, and the second index of the first point data within the voxel to which it belongs can be determined as 0.
[0069] For example, if the point data in the target group is arranged in the order of addition, arrays C and D are shown below:
[0070] Array C: 100, 100, 100, 111, 122, 150, 150
[0071] Data D: 3, 1, 2, 6, 0, 4, 5
[0072] For the first target group in this example, its first point data is a point data with a code value of 100 and an original index of 3. The original index 3 of the first point data can be determined as the first index of the voxel to which the first point data belongs, and the second index of the first point data within the voxel to which it belongs can be determined as 0.
[0073] In this way, the first index of the voxel to which the first point data belongs in each target group and the second index of the first point data within the voxel can be determined quickly and accurately, thus improving processing efficiency.
[0074] In some possible implementations, step S13 may include: for the third point data, setting both the first index of the voxel to which the third point data belongs and the second index of the third point data within the voxel to 0, wherein the third point data is the point data in the sorted first point cloud data whose original index is 0.
[0075] Points with an original index of 0 in the sorted first point cloud data can be identified as third points. For the third point, both the first index of the voxel to which it belongs and the second index within that voxel can be set to 0. For example, in the example above, for a point with a code value of 111 and an original index of 0, both the first index of the voxel to which it belongs and the second index within that voxel can be set to 0.
[0076] In the embodiments of this disclosure, for point data with an original index of 0 in the sorted first point cloud data, it can be directly determined that both its first index and second index are 0, thereby improving processing efficiency.
[0077] In some possible implementations, step S13 may further include: for the second point data in the target group, determining the first index of the voxel to which the target point data belongs as the first index of the voxel to which the second point data belongs; wherein the target point data is the first point data or the third point data, and the second point data is any point data in the target group other than the target point data; determining the first order of the second point data in the sorted first point cloud data and the second order of the target point data in the sorted first point cloud data; and determining the difference between the first order and the second order as the second index of the second point data within its voxel.
[0078] When a target group includes multiple point data points, the point data points other than the target point data (the first or third point data point) in the target group can be designated as second point data points. For any second point data point in the target group, since the point data points in the same target group belong to the same voxel, the first index of the voxel to which the target point data point belongs in that target group can be determined as the first index of the voxel to which the second point data point belongs. Then, the first order of the second point data point in the sorted first point cloud data and the second order of the target point data point in that target group in the sorted first point cloud data can be determined. The difference between the first and second orders is then determined as the second index of the second point data point within its voxel.
[0079] For example, if the point data in the target group is sorted in ascending order of the original index, arrays C and D are shown below:
[0080] Array C: 100, 100, 100, 111, 122, 150, 150
[0081] Data D: 1, 2, 3, 6, 0, 4, 5
[0082] In the first target group of this example, there are two second point data points: one with a code value of 100 and an original index of 2, and the other with a code value of 100 and an original index of 3. The first index of the voxel to which the target point data belongs in this target group is 1. Therefore, the first index of the voxel to which these two second point data points belong can both be determined as 1. For the second point data with a code value of 100 and an original index of 2, its first order in the sorted first point cloud data is 2, and the second order of the target point data in this target group in the sorted first point cloud data is 1. Therefore, the difference between the first order and the second number, 1, can be determined as the second index of the second point data within its voxel. For the second point data with a code value of 100 and an original index of 3, its first order in the sorted first point cloud data is 3, and the second order of the target point data in this target group in the sorted first point cloud data is 1. Therefore, the difference between the first order and the second number, 2, can be determined as the second index of the second point data within its voxel.
[0083] In the fourth target group of this example, there is a second point data, which is a point data with an encoding value of 150 and an original index of 5. The first index of the voxel to which the target point data belongs in this target group is 4. Therefore, the first index of the voxel to which the second point data belongs can be determined as 4. For the second point data with an encoding value of 150 and an original index of 5, its first order in the sorted first point cloud data is 7. The second order of the target point data in this target group in the sorted first point cloud data is 6. Therefore, the difference of 1 between the first order and the second number can be determined as the second index of the second point data within its voxel.
[0084] It should be noted that when the point data in the target group is arranged in the order of addition, the method for determining the second index of the second point data within its voxel is similar to the method described above, and will not be repeated here.
[0085] In the embodiments of this disclosure, for the second point data in the target group other than the target point data (first point data or third point data), the first index of the voxel to which the target point data belongs can be determined as the first index of the voxel to which the second point data belongs; the difference between the first order (the order of the second point data in the sorted first point cloud data) and the second order (the order of the target point data in the sorted first point cloud data) can be determined as the second index of the second point data in its voxel. Thus, based on the difference between the first index of the voxel to which the target point data belongs in the target group, the second point data, and the order of the target point data in the sorted first point cloud data, the first index and the second index of the second point data in the target group other than the target point data can be quickly and accurately determined, improving processing efficiency.
[0086] In some possible implementations, the first index of the voxel to which each point data belongs and the second index of each point data within its voxel can also be stored in arrays. For example, the first index of the voxel to which each point data belongs can be stored in array E, and the second index of each point data within its voxel can be stored in array F. Based on the above example, the data stored in arrays C and D are as follows:
[0087] Array C: 100, 100, 100, 111, 122, 150, 150
[0088] Data D: 1, 2, 3, 6, 0, 4, 5
[0089] Correspondingly, the index data stored in data E and array F are:
[0090] Array E: 1, 1, 1, 6, 0, 4, 4
[0091] Data F: 0, 1, 2, 0, 0, 0, 1
[0092] In some possible implementations, step S13 may include: for any target group, sorting the point data in the target group according to the original index of the point data in the target group to obtain a sorted target group; determining the original index of the first point data in the sorted target group as the first index of the voxel to which each point data belongs in the target group; for any point data in the sorted target group, determining the second index of the point data in the voxel to which it belongs according to the order of the point data in the sorted target group.
[0093] If the point data within a group is not sorted during the grouping process of the first point cloud data, for any target group, the point data in the target group can be sorted according to the original index of the point data in that target group to obtain a sorted target group. For example, the point data in the target group can be sorted in ascending order of the original index of the point data to obtain a sorted target group. Then, the original index of the first point data in the sorted target group is determined as the first index of the voxel to which each point data in the target group belongs.
[0094] For any data point within the sorted target group, its second index within the voxel can be determined based on its order within the group (starting from 1). For example, if the data point's order is 1 (ranked 1st), its second index within the voxel is 0; if it's 2 (ranked 2nd), it's 1; and if it's 3 (ranked 3rd), it's 2. In other words, subtracting 1 from the data point's order within the group yields its second index within the voxel.
[0095] For example, if the point data in the target group is sorted in ascending order of the original index, arrays C and D are shown below:
[0096] Array C: 100, 100, 100, 111, 122, 150, 150
[0097] Data D: 1, 2, 3, 6, 0, 4, 5
[0098] In the first sorted target group, the original index 1 of the first point data (the point data with a code value of 100 and an original index of 1) in the sorted target group is determined as the first index (i.e., the first index is 1) of the voxel to which each point data belongs in the first target group. For point data with a code value of 100 and an original index of 1, its order in the sorted target group is 1, so the second index of this point data in its voxel is 0; for point data with a code value of 100 and an original index of 2, its order in the sorted target group is 2, so the second index of this point data in its voxel is 1; for point data with a code value of 100 and an original index of 3, its order in the sorted target group is 3, so the second index of this point data in its voxel is 2.
[0099] In the fourth target group after sorting, the original index 4 of the first point data in the sorted target group (the point data with a code value of 150 and an original index of 4) is determined as the first index (i.e., the first index is 4) of the voxel to which each point data belongs in the fourth target group. For the point data with a code value of 150 and an original index of 4, its order in the sorted target group is 1, so the second index of this point data in its voxel is 0; for the point data with a code value of 150 and an original index of 5, its order in the sorted target group is 2, so the second index of this point data in its voxel is 1.
[0100] In the embodiments of this disclosure, for any target group, the point data in the target group can be sorted according to the original index of the point data in the target group to obtain a sorted target group. Then, the original index of the first point data in the sorted target group is determined as the first index of the voxel to which each point data belongs in the target group. And according to the order of the point data in the sorted target group, the second index of the point data in the voxel to which it belongs is determined. Thus, the first index and the second index of each point data in the target group can be determined based on the original index of the point data in the target group, which improves the processing efficiency when determining the first index and the second index of each point data in the target group.
[0101] In some possible implementations, in order to improve processing efficiency, the above-mentioned process of determining the first and second indices of each data point can be implemented by GPU kernel functions or by other means, and this disclosure does not limit it.
[0102] In some possible implementations, step S11 may include: for any point data in the first point cloud data of the target task, if the position coordinates of the point data include negative numbers, the point data is determined to be invalid data; if the point data is invalid data, the encoded value of the point data is determined to be a preset value. The preset value is the maximum value corresponding to the data bit width of the encoded value (i.e., the aforementioned preset bit width). In this way, invalid point data is placed at the end of the data during sorting, avoiding invalid point data from participating in the grouping of point data and improving the robustness of the algorithm.
[0103] In some possible implementations, the first point cloud data is the point cloud data of the target task; the data processing method of this disclosure embodiment further includes: executing the target task based on the second point cloud data; the target task is any one of a three-dimensional reconstruction task, a target recognition task, and a path planning task.
[0104] The first point cloud data can be the point cloud data of the target task. The target task is a 3D processing task based on the first point cloud data. The target task can be at least one of a 3D reconstruction task, a target recognition task, and a path planning task. Among them, the 3D reconstruction task can be a 3D modeling task of roads, intersections, obstacles, and high-precision maps in autonomous driving of vehicles to achieve environmental perception and localization of vehicles. The 3D reconstruction task can also be a medical 3D image generation task. The target recognition task can be a task of recognizing pedestrians, vehicles, traffic lights, lane lines, traffic signs, obstacles, etc. in autonomous driving of vehicles. The path planning task can be an indoor navigation and obstacle avoidance path planning task for robots such as sweeping robots, delivery robots, and hotel service robots, or a path planning task in autonomous driving of vehicles. It should be noted that the embodiments of this disclosure do not limit the specific type of the target task or its specific application scenario.
[0105] After obtaining the second point cloud data by voxelizing the first point cloud data using the above method, the target task can be executed based on the second point cloud data. In other words, the voxelization of the first point cloud data in steps S11-S13 can be regarded as data preprocessing when executing the target task.
[0106] In the embodiments of this disclosure, the first point cloud data is the point cloud data of the target task. After the first point cloud data is voxelized to obtain the second point cloud data in the above manner, the target task can be executed based on the second point cloud data, thereby improving the execution efficiency of the target task.
[0107] Figure 2 This is a schematic diagram illustrating a data processing method provided in an embodiment of this disclosure. (Refer to...) Figure 2 The data processing method includes steps S201-S209, which are described in detail below.
[0108] In step S201, for any point data in the first point cloud data, the first coordinate value in the position coordinates of the point data is converted into 64-bit first data, the second coordinate value in the position coordinates of the point data is converted into 64-bit second data, and the third coordinate value in the position coordinates of the point data is converted into 64-bit third data.
[0109] In step S202, the first data is shifted left by 42 bits to obtain the fourth data; the second data is shifted left by 21 bits to obtain the fifth data; a bitwise OR operation is performed on the fourth data, the fifth data, and the third data to obtain the encoded value of the data at that point.
[0110] In step S203, all point data in the first point cloud data are sorted in ascending order of the encoded value, using the encoded value as the key and the original index as the value, to obtain the sorted first point cloud data.
[0111] In step S204, multiple target groups are determined based on the sorted first point cloud data.
[0112] In step S205, for the third point data, both the first index of the voxel to which the third point data belongs and the second index of the third point data within its voxel are set to 0. The third point data refers to the point data in the sorted first point cloud data whose original index was 0.
[0113] In step S206, for the first point data in any target group, the original index of the first point data is determined as the first index of the voxel to which the first point data belongs; the second index of the first point data within its voxel is determined to be 0. Here, the first point data is the first point data located in the target group.
[0114] In step S207, for the second point data in the target group, the first index of the voxel to which the target point data belongs is determined as the first index of the voxel to which the second point data belongs. Here, the target point data is either the first point data or the third point data, and the second point data is any point data in the target group other than the target point data.
[0115] In step S208, the first order of the second point data in the sorted first point cloud data and the second order of the target point data in the sorted first point cloud data are determined; the difference between the first order and the second order is determined as the second index of the second point data in its respective voxel.
[0116] In step S209, the second point cloud data after voxelization of the first point cloud data is obtained through the above processing.
[0117] The data processing method of this disclosure is based on coordinate encoding, sorting and grouping, and parallel indexing calculation, which realizes the voxelization of 3D point cloud data and avoids point-by-point nested comparison in related technologies. The data processing method of this disclosure reduces the computational complexity from O(n²) to O(nlogn) and can be fully adapted to GPU parallel computing architecture.
[0118] The specific beneficial effects of the data processing method in this disclosure include the following five aspects.
[0119] (1) The computational complexity is significantly reduced, and the processing efficiency is improved exponentially. The embodiments of this disclosure optimize the computational complexity of point cloud data voxelization from O(n²) to O(nlogn). Among them, the coordinate encoding and index calculation steps have a linear complexity of O(n), and the core sorting step has a complexity of O(nlogn). The overall complexity is reduced from quadratic to logarithmic linear. For point cloud data of millions or more, the processing time shows a logarithmic growth trend, which completely solves the problem of the sharp decline in the processing efficiency of point cloud data voxelization in large-scale data scenarios.
[0120] (2) The parallel computing power of the GPU is fully released, and the utilization rate of hardware resources is greatly improved. The three core steps of this embodiment can all be implemented in parallel based on GPU kernel functions, and nested loop logic is eliminated, avoiding the problems of poor parallelism and wasted computing power caused by data dependence. At the same time, through the parallel sorting interface of the Thrust library, the parallel computing potential of the GPU is further explored. Under the same hardware conditions, it can support larger-scale point cloud data processing, reducing hardware deployment costs and operating energy consumption.
[0121] (3) The accuracy and consistency of the voxelization results are guaranteed. The embodiments of this disclosure ensure that points within the same voxel have completely identical encoding values through the design of unique three-dimensional position coordinates, and achieve accurate grouping after sorting; and can accurately calculate the index of the voxel to which each point belongs (first index) and the index of each point's data within its voxel (second index), which improves efficiency while ensuring the accuracy of the voxelization results without the need for additional verification steps.
[0122] (4) Adapting to real-time processing scenarios and expanding the boundaries of technology applications. The high-performance characteristics of the embodiments of this disclosure enable them to meet the stringent timeliness requirements of scenarios such as autonomous driving environment perception, real-time robot navigation, and large-scale 3D scene reconstruction. Even with high-dynamic, high-density point cloud data input, millisecond-level voxelization processing can still be achieved, breaking through the limitations of related technologies in the field of real-time applications and providing key support for the real-time performance of downstream algorithms (such as object detection and semantic segmentation).
[0123] (5) The solution is highly versatile and easy to integrate and extend. The core function of this embodiment adopts a templated design, supporting coordinate data input of different integer types; at the same time, the parameters of the GPU kernel function are flexibly configured, and the size of the grid and blocks can be dynamically adjusted according to the scale of the point cloud data. It is easy to integrate into the existing 3D point cloud processing framework and has good prospects for engineering applications.
[0124] It is understood that the various method embodiments mentioned above in this disclosure can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this disclosure will not elaborate further. Those skilled in the art will understand that in the above methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.
[0125] In addition, this disclosure also provides a data processing apparatus, an electronic device, and a computer-readable storage medium, all of which can be used to implement any of the data processing methods provided in this disclosure. The corresponding technical solutions and descriptions are described in the corresponding section of the method and will not be repeated here.
[0126] Figure 3 This is a block diagram of a data processing apparatus provided in an embodiment of the present disclosure.
[0127] Reference Figure 3 This disclosure provides a data processing apparatus, which includes an encoding module 31, a grouping module 32, and an index determination module 33.
[0128] The encoding module 31 is used to encode the position coordinates of each point data in the first point cloud data to obtain the encoded value of each point data; wherein, the point data also includes the original index.
[0129] The grouping module 32 is used to group the point data in the first point cloud data according to the encoded value to obtain multiple target groups; wherein the encoded value of the point data in each target group is the same.
[0130] The index determination module 33 is used to determine the first index of the voxel to which each point data belongs and the second index of each point data within the voxel according to the original index of each point data and the multiple target groups, so as to obtain the second point cloud data after voxelizing the first point cloud data.
[0131] In some possible implementations, the grouping module 32 is specifically used to: sort all point data in the first point cloud data in ascending order of the encoded value, using the encoded value as the key and the original index as the value, to obtain sorted first point cloud data; and determine multiple target groups based on the sorted first point cloud data.
[0132] In some possible implementations, the index determination module 33 is specifically used to: for the first point data in any target group, determine the original index of the first point data as the first index of the voxel to which the first point data belongs; wherein the first point data is the first point data in the target group; and determine the second index of the first point data within its voxel as 0.
[0133] In some possible implementations, the index determination module 33 is specifically used to: for the third point data, determine the first index of the voxel to which the third point data belongs and the second index of the third point data within the voxel to be 0, wherein the third point data is the point data in the sorted first point cloud data whose original index is 0.
[0134] In some possible implementations, the index determination module 33 is specifically used to: for the second point data in the target group, determine the first index of the voxel to which the target point data belongs as the first index of the voxel to which the second point data belongs; wherein, the target point data is the first point data or the third point data, and the second point data is any point data in the target group other than the target point data; determine the first order of the second point data in the sorted first point cloud data and the second order of the target point data in the sorted first point cloud data; and determine the difference between the first order and the second order as the second index of the second point data within its voxel.
[0135] In some possible implementations, the index determination module 33 is specifically used to: for any target group, sort the point data in the target group according to the original index of the point data in the target group to obtain a sorted target group; determine the original index of the first point data in the sorted target group as the first index of the voxel to which each point data in the target group belongs; for any point data in the sorted target group, determine the second index of the point data in the voxel to which it belongs according to the order of the point data in the sorted target group.
[0136] In some possible implementations, the encoding module 31 is specifically used to: for any point data in the first point cloud data, convert the first coordinate value in the position coordinates of the point data into first data of a preset bit width, convert the second coordinate value in the position coordinates of the point data into second data of the preset bit width, and convert the third coordinate value in the position coordinates of the point data into third data of the preset bit width; perform shift and bitwise OR operations on the first data, the second data, and the third data to obtain the encoded value of the point data.
[0137] In some possible implementations, the encoding module 31 is specifically used to: shift the first data left by a first preset number of bits to obtain the fourth data; shift the second data left by a second preset number of bits to obtain the fifth data; and perform a bitwise OR operation on the fourth data, the fifth data, and the third data to obtain the encoded value of the point data.
[0138] In some possible implementations, the first point cloud data is the point cloud data of the target task; the device further includes: an execution module, used to execute the target task based on the second point cloud data; the target task is any one of a 3D reconstruction task, a target recognition task, and a path planning task.
[0139] Figure 4 This is a block diagram of an electronic device provided in an embodiment of the present disclosure.
[0140] Reference Figure 4 This disclosure provides an electronic device, which includes: at least one processor 701; at least one memory 702; and one or more I / O interfaces 703 connected between the processor 701 and the memory 702; wherein the memory 702 stores one or more computer programs that can be executed by the at least one processor 701, and the one or more computer programs are executed by the at least one processor 701 to enable the at least one processor 701 to perform the above-described data processing method.
[0141] This disclosure also provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the data processing method described above. The computer-readable storage medium may be volatile or non-volatile.
[0142] This disclosure also provides a computer program product including computer-readable code, which, when run in a processor of an electronic device, enables the processor in the electronic device to perform the aforementioned data processing method.
[0143] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).
[0144] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable program instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0145] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0146] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0147] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0148] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0149] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0150] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0151] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0152] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in connection with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in connection with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.
Claims
1. A data processing method, characterized in that, include: The position coordinates of each point in the first point cloud data are encoded to obtain the encoded value of each point; wherein, the point data also includes the original index; Based on the encoded value, the point data in the first point cloud data is grouped to obtain multiple target groups; wherein the encoded value of the point data in each target group is the same; Based on the original index of each point data and the multiple target groups, the first index of the voxel to which each point data belongs and the second index of each point data within the voxel are determined, resulting in the voxelized second point cloud data of the first point cloud data.
2. The method according to claim 1, characterized in that, The step involves grouping the point data in the first point cloud data according to the encoded value to obtain multiple target groups, including: Using the encoded value as the key and the original index as the value, sort all the point data in the first point cloud data in ascending order of the encoded value to obtain the sorted first point cloud data; Based on the sorted first point cloud data, multiple target groups are determined.
3. The method according to claim 2, characterized in that, The step of determining the first index of the voxel to which each point data belongs and the second index of each point data within its voxel, based on the original index of each point data and the multiple target groups, includes: For the first data point in any target group, the original index of the first data point is determined as the first index of the voxel to which the first data point belongs; wherein, the first data point is the data point that is the first one in the target group; The second index of the first data point within its corresponding voxel is set to 0.
4. The method according to claim 2, characterized in that, The step of determining the first index of the voxel to which each point data belongs and the second index of each point data within its voxel, based on the original index of each point data and the multiple target groups, includes: For the third point data, the first index of the voxel to which the third point data belongs and the second index of the third point data within the voxel to which it belongs are both determined to be 0. The third point data is the point data with an original index of 0 in the sorted first point cloud data.
5. The method according to claim 3 or 4, characterized in that, The step of determining the first index of the voxel to which each point data belongs and the second index of each point data within its voxel, based on the original index of each point data and the multiple target groups, further includes: For the second point data in the target group, the first index of the voxel to which the target point data belongs is determined as the first index of the voxel to which the second point data belongs; wherein, the target point data is the first point data or the third point data, and the second point data is any point data in the target group other than the target point data; Determine the first order of the second point data in the sorted first point cloud data and the second order of the target point data in the sorted first point cloud data; The difference between the first sequence and the second sequence is determined as the second index of the second point data within its respective voxel.
6. The method according to claim 1, characterized in that, The step of determining the first index of the voxel to which each point data belongs and the second index of each point data within its voxel, based on the original index of each point data and the multiple target groups, includes: For any target group, the point data in the target group is sorted according to the original index of the point data in the target group to obtain the sorted target group; The original index of the first point data in the sorted target group is determined as the first index of the voxel to which each point data in the target group belongs; For any point data in the sorted target group, the second index of the point data within its respective voxel is determined according to the order of the point data in the sorted target group.
7. The method according to claim 1, characterized in that, The process of encoding the position coordinates of each point in the first point cloud data to obtain the encoded value of each point includes: For any point data in the first point cloud data, the first coordinate value in the position coordinates of the point data is converted into first data with a preset bit width, the second coordinate value in the position coordinates of the point data is converted into second data with the preset bit width, and the third coordinate value in the position coordinates of the point data is converted into third data with the preset bit width. The first data, the second data, and the third data are shifted and bitwise ORed to obtain the encoded value of the point data.
8. The method according to claim 7, characterized in that, The step of shifting and bitwise ORing the first data, the second data, and the third data to obtain the encoded value of the point data includes: Shift the first data left by a first preset number of bits to obtain the fourth data; Shift the second data left by a second preset number of bits to obtain the fifth data; Perform a bitwise OR operation on the fourth data, the fifth data, and the third data to obtain the encoded value of the point data.
9. The method according to claim 1, characterized in that, The first point cloud data is the point cloud data of the target task; the method further includes: Based on the second cloud data point, execute the target task; The target task can be any one of the following: 3D reconstruction task, target recognition task, or path planning task.
10. A data processing apparatus, characterized in that, include: The encoding module is used to encode the position coordinates of each point data in the first point cloud data to obtain the encoded value of each point data; wherein, the point data also includes the original index; The grouping module is used to group the point data in the first point cloud data according to the encoded value to obtain multiple target groups; wherein the encoded value of the point data in each target group is the same; The index determination module is used to determine the first index of the voxel to which each point data belongs and the second index of each point data within the voxel based on the original index of each point data and the multiple target groups, so as to obtain the second point cloud data after voxelizing the first point cloud data.
11. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the data processing method as described in any one of claims 1-9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the data processing method as described in any one of claims 1-9.
13. A computer program product, characterized in that, It includes computer-readable code, which, when executed in a processor of an electronic device, causes the processor in the electronic device to perform the data processing method as described in any one of claims 1-9.