3D point cloud data processing method, device and equipment based on mixed KD tree
By introducing a combination of hybrid KD tree and historical query approximate search in 3D point cloud data processing, the problem of low efficiency in 3D point cloud data search processing in traditional technology is solved, and more efficient data processing is achieved, suitable for financial business scenarios.
Patent Information
- Application Number
- CN202411693374.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-07
AI Technical Summary
In traditional technology, the search processing efficiency of 3D point cloud data is low, resulting in performance bottlenecks when applied in financial business scenarios.
Using a 3D point cloud data processing method based on a hybrid KD tree, we determine the reference point cloud features and judge whether there are similar features in the historical query set. If it does not exist, parallel search is performed using the disordered set structure of the preset hybrid KD tree, and combined with the approximate search of historical query to optimize processing efficiency.
It significantly reduces the search processing time overhead of 3D point cloud data, improves the search processing efficiency, and makes the application of 3D point cloud technology more efficient in financial business scenarios.
Smart Images

Figure CN119579789A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of point cloud data and financial technology, and in particular to a 3D point cloud data processing method, device, computer equipment and computer-readable storage medium based on a hybrid KD tree. Background Art
[0002] Point cloud, also known as 3D point cloud, is a data structure used to represent objects or scenes in three-dimensional space. It consists of multiple three-dimensional coordinate points (X, Y, Z), and each point represents a position in space. These point cloud data are usually generated by lidar scanners or other 3D scanners. They have the advantages of fast speed, strong penetration, non-contact, full digital, high precision and high density. In addition to spatial coordinates, point cloud data can also contain rich information, such as color, classification value, intensity value, time and other attribute information. This information is aggregated at each point to jointly describe the surface of the object and realize the digital expression of the object's shape.
[0003] With the development of financial technology, in the financial field, 3D point cloud technology can be deeply integrated with financial service scenarios to realize financial business services including but not limited to three-dimensional display of physical objects, detection of pledged changes, and online real-life business hall interaction, providing strong support for innovation in financial service models. For example, financial institutions can use 3D point cloud technology to perform three-dimensional fine modeling of bank cards, precious metals and other items, restore the physical objects 1:1 through online 3D display, and combine user population distribution, preferences and other behavioral data to tailor corresponding cards or precious metal styles for customers to improve financial service marketing capabilities. For another example, based on three-dimensional point cloud and virtual-real interaction technology, banks and other financial institutions can collect high-precision three-dimensional data of the indoor space of the business hall, quickly replicate it into an online real-life business hall, and create a digital virtual world parallel to the real world, so that customers can enter the business hall with virtual images, conduct 3D tours, financial business consultation and processing, and experience a variety of rich and diverse interaction methods in an immersive way.
[0004] As a prerequisite for 3D digitization in the financial field, accurate 3D model data is particularly important, and 3D point cloud processing has a natural advantage in obtaining accurate spatial data. With the development of point cloud technology, the resolution of point cloud images is getting higher and higher, and the generated point clouds are getting denser and denser. How to speed up point cloud processing has become a research hotspot.
[0005] In traditional technology, point cloud processing often uses the K-nearest neighbors (KNN) search algorithm to query the K nearest points among the neighboring points of the target point. The KNN search method with the highest accuracy is based on linear search, that is, each point is compared with all the remaining points one by one. However, this method takes a very long time to query, so the speed can be improved by building an index. KD tree is a typical solution. However, KNN search based on KD tree needs to search from the root node to each corresponding leaf node one by one, which takes too long, resulting in low search and processing efficiency of 3D point cloud data based on KNN algorithm.
[0006] Therefore, how to efficiently search and process 3D point cloud data has become a technical problem that needs to be urgently solved in the business scenarios of 3D point cloud technology applications. Summary of the invention
[0007] The present application provides a 3D point cloud data processing method, apparatus, computer equipment and computer-readable storage medium based on a hybrid KD tree, which can solve the technical problem of low search and processing efficiency of 3D point cloud data in traditional technologies.
[0008] In the first aspect, the present application provides a 3D point cloud data processing method based on a hybrid KD tree, including: determining the benchmark point cloud features corresponding to the 3D point cloud data; judging whether a preset historical query set contains historical query point cloud features that are the same or similar to the benchmark point cloud features; if not, using a preset K nearest neighbor algorithm to search preset leaf nodes in parallel to obtain target point cloud features corresponding to the benchmark point cloud features; the preset leaf nodes are an unordered set contained in a preset hybrid KD tree.
[0009] In the second aspect, the present application provides a 3D point cloud data processing device based on a hybrid KD tree, comprising: a first determination unit, used to determine the benchmark point cloud features corresponding to the 3D point cloud data; a first judgment unit, used to judge whether a preset historical query set contains historical query point cloud features that are the same or similar to the benchmark point cloud features; a search unit, used to use a preset K nearest neighbor algorithm to search preset leaf nodes in parallel when the judgment result of the first judgment unit is no, so as to obtain the target point cloud features corresponding to the benchmark point cloud features; the preset leaf nodes are an unordered set contained in a preset hybrid KD tree.
[0010] In a third aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the 3D point cloud data processing method based on the hybrid KD tree when executing the computer program.
[0011] In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor executes the steps of the 3D point cloud data processing method based on the hybrid KD tree.
[0012] The present application provides a 3D point cloud data processing method, apparatus, computer equipment and computer-readable storage medium based on a hybrid KD tree. The method determines the reference point cloud features corresponding to the 3D point cloud data, and determines whether a preset historical query set contains historical query point cloud features that are identical or similar to the reference point cloud features. If the preset historical query set does not contain historical query point cloud features that are identical or similar to the reference point cloud features, the preset leaf nodes based on the unordered set contained in the preset hybrid KD tree are searched in parallel using a preset K nearest neighbor algorithm to obtain the target corresponding to the reference point cloud features. The point cloud features are not only based on historical queries, but also combine the approximate search based on historical queries with the precise search based on the hybrid KD tree, and give priority to the approximate search, which reduces the time overhead of the search processing of 3D point cloud data and improves the search processing efficiency of 3D point cloud data. Moreover, according to the leaf nodes based on the unordered set contained in the hybrid KD tree, on the premise of quickly locating the preset leaf nodes where the target point cloud features are located through the root node of the hybrid KD tree, parallel searches are performed based on the unordered sets corresponding to the preset leaf nodes, thereby realizing parallel searches of the hybrid KD tree and improving the search processing efficiency of 3D point cloud data. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0014] Figure 1 A schematic diagram of a flow chart of a 3D point cloud data processing method based on a hybrid KD tree provided in an embodiment of the present application;
[0015] Figure 2 A schematic diagram of a hybrid KD tree for a 3D point cloud data processing method based on a hybrid KD tree provided in an embodiment of the present application;
[0016] Figure 3 A schematic diagram of a first sub-process of a 3D point cloud data processing method based on a hybrid KD tree provided in an embodiment of the present application;
[0017] Figure 4 A schematic diagram of a second sub-process of a 3D point cloud data processing method based on a hybrid KD tree provided in an embodiment of the present application;
[0018] Figure 5 A schematic block diagram of a 3D point cloud data processing device based on a hybrid KD tree provided in an embodiment of the present application;
[0019] Figure 6 A schematic block diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0021] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0022] An embodiment of the present application provides a 3D point cloud data processing method based on a hybrid KD tree, which can be applied to computer devices including but not limited to smart phones, tablet computers, laptops, desktop computers, servers, etc., and can be used when processing 3D point cloud data in fields including but not limited to financial technology.
[0023] In the face of the technical problem of low search and processing efficiency of 3D point cloud data in traditional technologies, the inventors proposed a 3D point cloud data processing method based on a hybrid KD tree in the embodiment of the present application. The core idea of the embodiment of the present application is: construct a KD tree with an unordered set structure as the leaf nodes, that is, a hybrid KD tree, and based on the leaf nodes based on the unordered set contained in the hybrid KD tree, on the premise of quickly locating the area where the target sample point is located through the root node of the hybrid KD tree, a parallel search is performed based on the unordered set corresponding to the leaf node to realize parallel search of the hybrid KD tree, so as to improve the search and processing efficiency of 3D point cloud data, and further In the next step, on the basis of realizing the parallel search of the hybrid KD tree, based on the historical query, the approximate search based on the historical query and the precise search based on the hybrid KD tree are combined, and the approximate search is given priority to further reduce the time overhead of the search processing of 3D point cloud data, thereby further improving the search processing efficiency of 3D point cloud data. Compared with the problem of too low execution efficiency of the KNN algorithm based on the traditional KD tree in the traditional technology, the embodiment of the present application can realize efficient processing of 3D point cloud data search based on the hybrid KD tree, which is conducive to the application of 3D point cloud technology in scenarios including but not limited to financial business.
[0024] Some embodiments of the present application are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0025] See also Figure 1 and Figure 2 , Figure 1 A schematic diagram of a process flow of a 3D point cloud data processing method based on a hybrid KD tree provided in an embodiment of the present application, Figure 2 A schematic diagram of a hybrid KD tree for a 3D point cloud data processing method based on a hybrid KD tree provided in an embodiment of the present application. Figure 1 and Figure 2 As shown, the method includes but is not limited to the following steps S11-S14:
[0026] S11. Determine the reference point cloud features corresponding to the 3D point cloud data.
[0027] Explanatorily, the reference point cloud feature refers to the feature of several nearest neighboring points to be queried. In different situations, the reference point cloud feature refers to different objects. For example, in the point cloud classification situation, the reference point cloud feature refers to the feature of the point to be classified. The category label of the point to be classified is determined by comparing the distance between the reference point cloud feature and the existing point. In the point cloud reconstruction situation, the reference point cloud feature refers to the feature of the point to be filled with missing points or the point cloud shape to be restored. The missing points corresponding to the reference point cloud feature are filled or the point cloud shape corresponding to the reference point cloud feature is restored by searching for several nearest neighboring points adjacent to the reference point cloud feature.
[0028] Based on the above description, for the 3D point cloud data that needs to be searched and processed, the benchmark point cloud features corresponding to the 3D point cloud data are determined in advance. The benchmark point cloud features can be determined by methods including but not limited to global feature extraction, local feature extraction, curvature calculation in PCL, neighborhood covariance-based methods, kernel point weighting methods, etc.
[0029] S12: Determine whether the preset historical query set contains historical query point cloud features that are the same as or similar to the reference point cloud features.
[0030] Explanatory, a historical query set is pre-set, that is, a preset historical query set, which represents the historical query point cloud features and corresponding historical query results corresponding to the query requests made in the past. The preset historical query set can be represented by H, and the uninitialized historical query set is represented by
[0031] Based on the above ideas and settings, it is determined whether the preset historical query set contains historical query point cloud features that are the same or similar to the benchmark point cloud features. Generally, the benchmark point cloud features and the historical query point cloud features contained in the preset historical query set are converted into their respective corresponding vectors, and a similarity comparison is performed between the vectors to determine whether the preset historical query set contains historical query point cloud features that are the same or similar to the benchmark point cloud features.
[0032] Exemplarily, in one example, a distance threshold between the benchmark point cloud feature and the historical query point cloud feature included in the preset historical query set is preset to T, that is, the preset distance threshold is T, and the preset distance threshold T indicates that the distance between the benchmark point cloud feature and the historical query point cloud feature is less than or equal to T, indicating that the benchmark point cloud feature and the historical query point cloud feature are the same or similar, and the distance between the benchmark point cloud feature and the historical query point cloud feature is greater than T, indicating that the benchmark point cloud feature and the historical query point cloud feature are not the same or similar, and the distance Distance between the preset benchmark point cloud feature q and the historical query point cloud feature ClosestQurey included in the preset historical query set is calculated. If Distance(q,ClosestQurey)≤T, it is determined that the preset historical query set contains the historical query point cloud feature that is the same or similar to the benchmark point cloud feature. If Distance(q,ClosestQurey)>T, it is determined that the preset historical query set does not contain the historical query point cloud feature that is the same or similar to the benchmark point cloud feature.
[0033] S13, if the above judgment result is yes, obtaining the historical query result corresponding to the historical query point cloud feature, and using the historical query result as the target point cloud feature corresponding to the reference point cloud feature;
[0034] S14. When the above judgment result is no, according to the preset leaf nodes based on the unordered set structure contained in the preset hybrid KD tree, the preset K nearest neighbor algorithm is used to search the preset leaf nodes in parallel to obtain the target point cloud features corresponding to the reference point cloud features.
[0035] Explanatory, please continue to see Figure 2 ,like Figure 2As shown, a hybrid KD tree is pre-set, that is, a preset hybrid KD tree. The preset hybrid KD tree means a top tree structure corresponding to the root node and a leaf node based on an unordered set at the bottom of the tree. The top tree structure corresponding to the root node refers to a tree structure composed of all nodes above the leaf node based on an unordered set at the bottom of the tree, that is, the part above the leaf node of the preset hybrid KD tree is still constructed according to the traditional KD tree for "dimensional space segmentation" to construct the top tree structure corresponding to the root node contained in the preset hybrid KD tree. The "dimensional space segmentation" corresponding to the root node contained in the preset hybrid KD tree is segmented into at least one layer, but the "dimensional space segmentation" performed by the traditional KD tree is not segmented to the bottom, and is not performed until it can no longer be segmented. Instead, the "dimensional space segmentation" performed by the traditional KD tree is stopped before it can no longer be segmented, and leaf nodes based on an unordered set are formed, that is, the preset leaf nodes based on an unordered set contained in the preset hybrid KD tree, such as Figure 2 As shown, the preset leaf nodes based on the unordered set included in the preset hybrid KD tree are part B, corresponding to part A in the traditional KD tree, and the same cutting part between the preset hybrid KD tree and the traditional KD tree is part C.
[0036] According to the above-mentioned conception and setting, when the preset historical query set contains historical query point cloud features that are the same or similar to the benchmark point cloud features, the historical query results corresponding to the historical query point cloud features are obtained, and the historical query results are used as the target point cloud features corresponding to the benchmark point cloud features, thereby realizing approximate search based on historical queries and giving priority to approximate search, so as to further reduce the time overhead of search processing of 3D point cloud data, thereby further improving the search processing efficiency of 3D point cloud data.
[0037] Please continue reading Figure 2 In the case that the preset historical query set does not contain the historical query point cloud features that are the same or similar to the benchmark point cloud features, according to the preset leaf nodes based on the unordered set contained in the preset hybrid KD tree, the preset K nearest neighbor algorithm is used to search the preset leaf nodes in parallel to obtain the target point cloud features corresponding to the benchmark point cloud features, wherein the K nearest neighbor algorithm, also known as the K nearest neighbor classification algorithm or the neighboring algorithm, is K-NearestNeighbor in English, abbreviated as KNN, which can be based on the leaf nodes based on the unordered set contained in the hybrid KD tree, and on the premise of quickly locating the area where the target sample points are located through the root node of the hybrid KD tree, based on the unordered set corresponding to the leaf nodes, perform parallel search to realize parallel search of the hybrid KD tree, so as to improve the search processing efficiency of 3D point cloud data.
[0038] After obtaining several target point cloud features corresponding to the reference point cloud features, applications in business scenarios including but not limited to point cloud classification, point cloud reconstruction, and three-dimensional modeling are then performed based on the target point cloud features. For example, financial institutions can use 3D point cloud technology to perform three-dimensional fine modeling of bank cards, precious metals and other items, and restore the physical objects 1:1 through online 3D display, and combine user population distribution, preferences and other behavioral data to tailor corresponding card or precious metal styles for customers, thereby improving financial service marketing capabilities. For another example, based on three-dimensional point clouds and virtual-real interaction technology, banks and other financial institutions can collect high-precision three-dimensional data of the indoor space of the business hall, quickly replicate it into an online real-life business hall, and create a digital virtual world parallel to the real world, so that customers can enter the business hall with virtual images, conduct 3D tours, and handle financial business consultations, and experience a variety of rich and diverse interaction methods in an immersive way, which can improve the search and processing efficiency of 3D point cloud data.
[0039] In an embodiment of the present application, by determining the benchmark point cloud features corresponding to the 3D point cloud data, it is determined whether the preset historical query set contains historical query point cloud features that are identical or similar to the benchmark point cloud features. When the preset historical query set does not contain historical query point cloud features that are identical or similar to the benchmark point cloud features, the preset leaf nodes based on the unordered set contained in the preset hybrid KD tree are used to search the preset leaf nodes in parallel using the preset K nearest neighbor algorithm to obtain the target point cloud features corresponding to the benchmark point cloud features. Not only is the approximate search based on the historical query combined with the precise search based on the hybrid KD tree based on the historical query, and the approximate search is given priority, thereby reducing the time overhead of the search processing of the 3D point cloud data and improving the search processing efficiency of the 3D point cloud data. Moreover, according to the leaf nodes based on the unordered set contained in the hybrid KD tree, on the premise of quickly locating the preset leaf nodes where the target point cloud features are located through the root node of the hybrid KD tree, a parallel search is performed based on the unordered set corresponding to the preset leaf nodes to realize the parallel search of the hybrid KD tree, thereby improving the search processing efficiency of the 3D point cloud data.
[0040] In one embodiment, see Figure 3 , Figure 3 This is a schematic diagram of the first sub-process of the 3D point cloud data processing method based on the hybrid KD tree provided in the embodiment of the present application. Figure 3 As shown, in this embodiment, a preset K nearest neighbor algorithm is used to search the preset leaf nodes in parallel to obtain the target point cloud features corresponding to the reference point cloud features, including:
[0041] S31, according to the root node included in the preset hybrid KD tree and based on the preset K nearest neighbor algorithm, determining the preset target leaf node corresponding to the reference point cloud feature;
[0042] S32. According to the unordered set corresponding to the preset target leaf node and based on the preset K nearest neighbor algorithm, the unordered set is searched in parallel to obtain the target point cloud feature corresponding to the reference point cloud feature.
[0043] Explanatory, the K nearest neighbor algorithm is pre-set, that is, the preset K nearest neighbor algorithm, the K nearest neighbor algorithm as described above, is mainly used to search for the K neighboring values closest to the reference point cloud features, and the preset K nearest neighbor algorithm can search in parallel for preset target leaf nodes based on an unordered set.
[0044] Based on the above ideas and settings, please continue to refer to Figure 2 ,like Figure 2 As shown, according to the root node contained in the preset hybrid KD tree and based on the preset K nearest neighbor algorithm, the preset target leaf node corresponding to the benchmark point cloud feature is determined, so that the leaf node area where the target point cloud feature is located can be quickly located through the root node of the hybrid KD tree, and then according to the unordered set of the preset target leaf nodes and based on the preset K nearest neighbor algorithm, the unordered set is searched in parallel to obtain the target point cloud feature corresponding to the benchmark point cloud feature, and a parallel search is performed based on the unordered set corresponding to the preset leaf node. Compared with the traditional technology in which the KD tree can only search from the root node to each leaf node one by one, a parallel search of the hybrid KD tree is realized, which can improve the search and processing efficiency of 3D point cloud data.
[0045] In an embodiment of the present application, based on a preset K nearest neighbor algorithm, the conventional search of the root node contained in a preset hybrid KD tree is combined with the parallel search based on an unordered set of preset target leaf nodes. On the premise of quickly locating the target leaf node area where the target point cloud features are located through the root node of the hybrid KD tree, a parallel precise search is performed based on the unordered set corresponding to the preset target leaf nodes to realize the parallel search of the hybrid KD tree, thereby improving the search and processing efficiency of 3D point cloud data.
[0046] In one embodiment, according to the unordered set corresponding to the preset target leaf node and based on the preset K nearest neighbor algorithm, the unordered set is searched in parallel to obtain the target point cloud feature corresponding to the reference point cloud feature, including:
[0047] According to the unordered set corresponding to the preset target leaf node and based on the preset K nearest neighbor algorithm, the proximity values between the reference point cloud features and different preset sample point cloud features included in the unordered set are calculated in parallel;
[0048] According to the proximity value, K target sample point cloud features adjacent to the reference point cloud feature are determined to obtain a target point cloud feature corresponding to the reference point cloud feature.
[0049] Explanatory, please continue to see Figure 2 ,like Figure 2 As shown, according to an unordered set of preset target leaf nodes and based on a preset K nearest neighbor algorithm, the proximity values between the benchmark point cloud features and several different preset sample point cloud features contained in the preset leaf nodes are calculated in parallel, and according to the size of the above proximity values, the target sample point cloud features closest to the benchmark point cloud features are screened out to determine the K target sample point cloud features adjacent to the benchmark point cloud features, and a number of target point cloud features corresponding to the benchmark point cloud features are obtained based on the KNN search algorithm, and then applications in business scenarios including but not limited to point cloud classification and point cloud reconstruction are performed according to the target point cloud features. For example, financial institutions can use 3D point cloud technology to perform three-dimensional fine-scale modeling of bank cards, precious metals and other items, and restore the real objects 1:1 through online 3D display. In addition, they can combine user population distribution, preferences and other behavioral data to tailor corresponding card or precious metal styles for customers, thereby improving financial service marketing capabilities. For another example, based on 3D point cloud and virtual-reality interaction technology, banks and other financial institutions can collect high-precision three-dimensional data of the interior space of the business hall, quickly replicate it into an online real-life business hall, and create a digital virtual world parallel to the real world, so that customers can enter the business hall through virtual images, conduct 3D tours, consult and handle financial business, and experience a variety of rich and diverse interaction methods in an immersive way.
[0050] In an embodiment of the present application, K target sample point cloud features adjacent to the benchmark point cloud feature are determined by calculating the proximity values between the benchmark point cloud feature and different preset sample point cloud features contained in the unordered set in parallel according to the unordered set corresponding to the preset target leaf node, so as to obtain the target point cloud feature corresponding to the benchmark point cloud feature. Based on the leaf nodes based on the unordered set contained in the hybrid KD tree, on the premise of quickly locating the preset leaf node where the target point cloud feature is located through the root node of the hybrid KD tree, a parallel search is performed based on the unordered set corresponding to the preset leaf node, thereby realizing the parallel search of the above-mentioned preset hybrid KD tree, which can improve the search and processing efficiency of 3D point cloud data.
[0051] In one embodiment, the preset hybrid KD tree includes n layers, where n is a natural number and n≥2; before the preset leaf nodes are searched in parallel using a preset K nearest neighbor algorithm to obtain the target point cloud features corresponding to the reference point cloud features, the method further includes:
[0052] Based on the traditional KD tree, an n-1-layer tree structure is constructed, and all preset sample point cloud features contained in each leaf node of the nth layer are grouped into an unordered set to obtain a preset hybrid KD tree.
[0053] Explanatory, please continue to see Figure 2 ,like Figure 2As shown, it is assumed that the preset hybrid KD tree with a tree depth of n layers is constructed, that is, the preset hybrid KD tree includes n layers of nodes, wherein n is a natural number, and n ≥ 2, wherein an n-1 layer tree structure is pre-constructed, that is, from the 1st layer to the n-1th layer corresponding to the root node of the preset hybrid KD tree, the n-1 layer tree structure is constructed according to the traditional KD tree construction method, that is, when constructing the 1st to n-1th layer tree structure of the preset hybrid KD tree, each node will select a dimension for division, such as the 1st dimension, the 2nd dimension, etc., and divide the data points into two left and right sub-areas according to the size of this dimension. For each Layer by layer, different dimensions are selected in sequence for division until all data points in the n-1th layer are divided, which can ensure that each dimension is used evenly, thereby maintaining the balance of the top tree structure of the preset hybrid KD tree, and forming all the preset sample point cloud features contained in each leaf node of the nth layer into an unordered set to obtain a preset hybrid KD tree, and then according to the preset leaf nodes based on the unordered set contained in the preset hybrid KD tree, the preset K nearest neighbor algorithm is used to search the preset leaf nodes in parallel to obtain the target point cloud features corresponding to the benchmark point cloud features, thereby realizing parallel search of the hybrid KD tree.
[0054] In an embodiment of the present application, a preset hybrid KD tree is constructed with a conventional tree structure at the top and leaf nodes based on an unordered set at the bottom. Then, based on the leaf nodes based on the unordered set contained in the hybrid KD tree, a parallel search is performed based on the unordered set corresponding to the preset leaf node, on the premise of quickly locating the preset leaf node where the target point cloud feature is located through the root node of the hybrid KD tree. This can realize parallel search of the above-mentioned preset hybrid KD tree to improve the search and processing efficiency of 3D point cloud data.
[0055] In one embodiment, see Figure 4 , Figure 4 The second sub-flow diagram of the 3D point cloud data processing method based on the hybrid KD tree provided in the embodiment of the present application. Figure 4 As shown, in this embodiment, judging whether the preset historical query set contains historical query point cloud features that are the same as or similar to the reference point cloud features includes:
[0056] S41, determining a first point cloud feature vector corresponding to the reference point cloud feature, and determining a second point cloud feature vector corresponding to the historical query point cloud feature included in a preset historical query set;
[0057] S42, calculating the similarity corresponding to the similarity between the first point cloud feature vector and the second point cloud feature vector;
[0058] S43, determining whether the similarity is greater than or equal to a preset similarity threshold;
[0059] S44, when the similarity is greater than or equal to a preset similarity threshold, determining that the preset historical query set includes a historical query point cloud feature that is identical or similar to the reference point cloud feature;
[0060] S45: When the similarity is less than a preset similarity threshold, determine that the preset historical query set does not include a historical query point cloud feature that is the same as or similar to the reference point cloud feature.
[0061] Explanatory, it is determined whether the preset historical query set contains historical query point cloud features that are identical or similar to the benchmark point cloud features, i.e., it is determined whether the historical query point cloud features contained in the preset historical query set are identical or similar to the benchmark point cloud features, and identical is a special case of similar, i.e., it is determined whether the historical query point cloud features contained in the preset historical query set are similar to the benchmark point cloud features. Generally, a similarity algorithm is used to determine whether the historical query point cloud features contained in the preset historical query set are similar to the benchmark point cloud features, wherein the similarity algorithm is a method for calculating the degree of similarity between two or more objects, and common similarity calculation methods include but are not limited to cosine similarity and dot product similarity, cosine similarity measures the similarity of two vectors by calculating the angle between them, and dot product similarity measures the similarity of two vectors by calculating the dot product of them.
[0062] According to the above-mentioned conception and setting, the first point cloud feature vector corresponding to the benchmark point cloud feature is first determined, and the second point cloud feature vector corresponding to the historical query point cloud feature contained in the preset historical query set is determined, wherein the point cloud feature vector refers to the vector representation corresponding to the corresponding point cloud feature, and the "first" involved in the first point cloud feature vector and the "second" involved in the second point cloud feature vector are only used to distinguish different point cloud feature vectors, and are not used to limit the corresponding point cloud feature vectors. Other similar descriptions in the embodiments of the present application are similar by analogy.
[0063] Then, the similarity corresponding to the similarity between the first point cloud feature vector and the second point cloud feature vector is calculated. As mentioned above, the similarity calculation method includes but is not limited to cosine similarity and dot product similarity. It is sufficient to select a suitable similarity calculation method, and then determine whether the similarity is greater than or equal to a preset similarity threshold. The preset similarity threshold represents the critical value of whether the first point cloud feature vector and the second point cloud feature vector are similar. When the similarity is greater than or equal to the preset similarity threshold, it is determined that the preset historical query set contains historical query point cloud features that are the same or similar to the benchmark point cloud features, and then the target point cloud features corresponding to the benchmark point cloud features are determined based on the approximate search of the historical queries. When the similarity is less than the preset similarity threshold, it is determined that the preset historical query set does not contain historical query point cloud features that are the same or similar to the benchmark point cloud features, and then the target point cloud features corresponding to the benchmark point cloud features are determined according to the precise search based on the hybrid KD tree described above.
[0064] In an embodiment of the present application, it is pre-determined whether a preset historical query set contains historical query point cloud features that are identical or similar to the benchmark point cloud features. Then, when the preset historical query set contains historical query point cloud features that are identical or similar to the benchmark point cloud features, the historical query results corresponding to the historical query point cloud features are used as the target point cloud features corresponding to the benchmark point cloud features. Since the benchmark point cloud features are identical or very close to the historical query point cloud features, the K adjacent points corresponding to them are also very similar. Based on this, approximate searches based on historical queries are prioritized, which reduces the time overhead of search processing of 3D point cloud data and improves the search processing efficiency of 3D point cloud data.
[0065] In one embodiment, after obtaining the target point cloud feature corresponding to the reference point cloud feature, the method further includes:
[0066] The reference point cloud features and the corresponding target point cloud features are updated to the preset historical query set.
[0067] Explanatory, when the preset historical query set does not contain historical query point cloud features that are identical or similar to the benchmark point cloud features, and according to the preset leaf nodes based on the unordered set contained in the preset hybrid KD tree, the preset K nearest neighbor algorithm is used to search the preset leaf nodes in parallel to obtain the target point cloud features corresponding to the benchmark point cloud features. Then, the benchmark point cloud features and the corresponding target point cloud features are updated to the preset historical query set to optimize the preset historical query set, so as to give priority to approximate searches based on historical queries in subsequent 3D point cloud data search processing.
[0068] In the embodiment of the present application, by updating the benchmark point cloud features and the corresponding target point cloud features to a preset historical query set, it is convenient to give priority to approximate searches based on historical queries in subsequent 3D point cloud data search processing, further reduce the time overhead of subsequent 3D point cloud data search processing, and further improve the search processing efficiency of 3D point cloud data.
[0069] It should be noted that the 3D point cloud data processing method based on the hybrid KD tree described in the above embodiments can recombine the technical features contained in different embodiments as needed to obtain a combined implementation plan, but they are all within the scope of protection required by this application.
[0070] See also Figure 5 , Figure 5 A schematic block diagram of a 3D point cloud data processing device based on a hybrid KD tree provided in an embodiment of the present application. Corresponding to the above-mentioned 3D point cloud data processing method based on a hybrid KD tree, an embodiment of the present application also provides a 3D point cloud data processing device based on a hybrid KD tree. Figure 5 As shown, the 3D point cloud data processing device based on the hybrid KD tree includes a unit for executing the above-mentioned 3D point cloud data processing method based on the hybrid KD tree, and the 3D point cloud data processing device based on the hybrid KD tree can be configured in a computer device. Specifically, please refer to Figure 5 The 3D point cloud data processing device 50 based on the hybrid KD tree includes a first determination unit 51, a first judgment unit 52 and a search unit 53.
[0071] Wherein, the first determining unit 51 is used to determine the reference point cloud features corresponding to the 3D point cloud data;
[0072] A first judging unit 52 is used to judge whether a preset historical query set contains a historical query point cloud feature that is the same as or similar to the reference point cloud feature;
[0073] The search unit 53 is used to use the preset K nearest neighbor algorithm to search the preset leaf nodes in parallel to obtain the target point cloud features corresponding to the reference point cloud features when the judgment result of the first judgment unit is no; the preset leaf nodes are an unordered set contained in the preset hybrid KD tree.
[0074] In one embodiment, the search unit 53 includes:
[0075] A first determination subunit is used to determine a preset target leaf node corresponding to the reference point cloud feature according to a root node included in a preset hybrid KD tree and based on a preset K nearest neighbor algorithm;
[0076] The first search subunit is used to search the unordered set in parallel according to the unordered set corresponding to the preset target leaf node and based on the preset K nearest neighbor algorithm to obtain the target point cloud feature corresponding to the reference point cloud feature.
[0077] In one embodiment, the first search subunit includes:
[0078] A first calculation subunit is used to calculate, in parallel, proximity values between the reference point cloud features and different preset sample point cloud features included in the unordered set according to the unordered set corresponding to the preset target leaf node and based on the preset K nearest neighbor algorithm;
[0079] The second determining subunit is used to determine K target sample point cloud features adjacent to the reference point cloud feature according to the proximity value, and obtain the target point cloud feature corresponding to the reference point cloud feature.
[0080] In one embodiment, the preset hybrid KD tree includes n layers, where n is a natural number and n≥2; the 3D point cloud data processing device 50 based on the hybrid KD tree further includes:
[0081] The construction unit is used to construct an n-1 layer tree structure based on the traditional KD tree, and to form an unordered set of all preset sample point cloud features contained in each leaf node of the nth layer to obtain a preset hybrid KD tree.
[0082] In one embodiment, the first determining unit 52 includes:
[0083] A third determination subunit is used to determine a first point cloud feature vector corresponding to the reference point cloud feature, and to determine a second point cloud feature vector corresponding to the historical query point cloud feature included in a preset historical query set;
[0084] A second calculation subunit, used to calculate the similarity corresponding to the similarity between the first point cloud feature vector and the second point cloud feature vector;
[0085] A first judging subunit, used to judge whether the similarity is greater than or equal to a preset similarity threshold;
[0086] The first determination subunit is configured to determine, when the similarity is less than a preset similarity threshold, that the preset historical query set does not include a historical query point cloud feature that is identical to or similar to the reference point cloud feature.
[0087] In one embodiment, the 3D point cloud data processing device 50 based on the hybrid KD tree further includes:
[0088] An acquisition unit is used to acquire historical query results corresponding to the historical query point cloud features when the preset historical query set contains historical query point cloud features that are identical or similar to the benchmark point cloud features, and use the historical query results as target point cloud features corresponding to the benchmark point cloud features.
[0089] In one embodiment, the 3D point cloud data processing device 50 based on the hybrid KD tree further includes:
[0090] An updating unit is used to update the reference point cloud features and the corresponding target point cloud features to the preset historical query set.
[0091] It should be noted that technical personnel in the relevant field can clearly understand that the specific implementation process of the above-mentioned 3D point cloud data processing device based on the hybrid KD tree and each unit can refer to the corresponding description in the aforementioned method embodiment. For the convenience and conciseness of the description, it will not be repeated here.
[0092] At the same time, the division and connection method of each unit in the above-mentioned 3D point cloud data processing device based on the hybrid KD tree is only for illustrative purposes. In other embodiments, the 3D point cloud data processing device based on the hybrid KD tree can be divided into different units as needed, and the units in the 3D point cloud data processing device based on the hybrid KD tree can also be connected in different orders and methods to complete all or part of the functions of the above-mentioned 3D point cloud data processing device based on the hybrid KD tree.
[0093] The above-mentioned 3D point cloud data processing device based on the hybrid KD tree can be implemented in the form of a computer program. The computer program can be used in Figure 6 Runs on the computer device shown.
[0094] See also Figure 6 , Figure 6 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 500 may be a computer device such as a desktop computer or a server, or may be a component or part in other devices.
[0095] See also Figure 6 The computer device 500 includes a processor 502, a memory and a network interface 505 connected via a system bus 501, wherein the memory may include a non-volatile storage medium 503 and an internal memory 504, and the memory may also be a volatile storage medium.
[0096] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, the processor 502 may execute the above-mentioned 3D point cloud data processing method based on the hybrid KD tree.
[0097] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .
[0098] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute the above-mentioned 3D point cloud data processing method based on the hybrid KD tree.
[0099] The network interface 505 is used to communicate with other devices over the network. Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the present application scheme, and does not constitute a limitation on the computer device 500 to which the present application scheme is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. For example, in some embodiments, the computer device may only include a memory and a processor. In such an embodiment, the structure and function of the memory and the processor are the same as those of the present application scheme. Figure 6 The embodiments shown are consistent and will not be described again here.
[0100] Among them, the processor 502 is used to run the computer program 5032 stored in the memory to implement the following steps: determine the benchmark point cloud features corresponding to the 3D point cloud data; determine whether the preset historical query set contains historical query point cloud features that are the same or similar to the benchmark point cloud features; if not, use the preset K nearest neighbor algorithm to search the preset leaf nodes in parallel to obtain the target point cloud features corresponding to the benchmark point cloud features; the preset leaf nodes are an unordered set contained in the preset hybrid KD tree.
[0101] In one embodiment, when the processor 502 uses a preset K nearest neighbor algorithm to search the preset leaf nodes in parallel to obtain the target point cloud feature corresponding to the reference point cloud feature, the processor 502 specifically implements the following steps:
[0102] According to the root node included in the preset hybrid KD tree and based on the preset K nearest neighbor algorithm, determine the preset target leaf node corresponding to the reference point cloud feature;
[0103] According to the unordered set corresponding to the preset target leaf node and based on the preset K nearest neighbor algorithm, the unordered set is searched in parallel to obtain the target point cloud feature corresponding to the reference point cloud feature.
[0104] In one embodiment, the processor 502 implements the following steps when implementing the unordered set corresponding to the preset target leaf node and searching the unordered set in parallel based on the preset K nearest neighbor algorithm to obtain the target point cloud feature corresponding to the reference point cloud feature:
[0105] According to the unordered set corresponding to the preset target leaf node and based on the preset K nearest neighbor algorithm, the proximity values between the reference point cloud features and different preset sample point cloud features included in the unordered set are calculated in parallel;
[0106] According to the proximity value, K target sample point cloud features adjacent to the reference point cloud feature are determined to obtain a target point cloud feature corresponding to the reference point cloud feature.
[0107] In one embodiment, the preset hybrid KD tree includes n layers, where n is a natural number and n≥2; before the processor 502 uses the preset K nearest neighbor algorithm to search the preset leaf nodes in parallel to obtain the target point cloud features corresponding to the reference point cloud features, it further implements the following steps:
[0108] Based on the traditional KD tree, an n-1-layer tree structure is constructed, and all preset sample point cloud features contained in each leaf node of the nth layer are grouped into an unordered set to obtain a preset hybrid KD tree.
[0109] In one embodiment, the processor 502 specifically implements the following steps when determining whether the preset historical query set includes a historical query point cloud feature that is the same as or similar to the reference point cloud feature:
[0110] Determine a first point cloud feature vector corresponding to the reference point cloud feature, and determine a second point cloud feature vector corresponding to the historical query point cloud feature included in a preset historical query set;
[0111] Calculating a similarity corresponding to the similarity between the first point cloud feature vector and the second point cloud feature vector;
[0112] Determining whether the similarity is greater than or equal to a preset similarity threshold;
[0113] When the similarity is less than a preset similarity threshold, it is determined that the preset historical query set does not include a historical query point cloud feature that is the same as or similar to the reference point cloud feature.
[0114] In one embodiment, the processor 502 further implements the following steps:
[0115] When the preset historical query set includes a historical query point cloud feature that is identical or similar to the reference point cloud feature, a historical query result corresponding to the historical query point cloud feature is obtained, and the historical query result is used as a target point cloud feature corresponding to the reference point cloud feature.
[0116] In one embodiment, after obtaining the target point cloud feature corresponding to the reference point cloud feature, the processor 502 further implements the following steps:
[0117] The reference point cloud features and the corresponding target point cloud features are updated to the preset historical query set.
[0118] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0119] Those skilled in the art will appreciate that all or part of the processes in the method for implementing the above embodiment can be completed by a computer program, which can be stored in a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.
[0120] Therefore, the present application also provides a computer-readable storage medium. The computer-readable storage medium may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, and the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the following steps:
[0121] A computer program product, when running on a computer, enables the computer to execute the steps of the 3D point cloud data processing method based on the hybrid KD tree described in the above embodiments.
[0122] The computer-readable storage medium may be an internal storage unit of the aforementioned device, such as a hard disk or memory of the device. The computer-readable storage medium may also be an external storage device of the device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the device and an external storage device.
[0123] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0124] The storage medium is a physical, non-transient storage medium, for example, it can be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk, etc., which can store computer programs.
[0125] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0126] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0127] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present application can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0128] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for an electronic device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.
[0129] The software tools or components not provided by our company that appear in the embodiments of this application are merely examples and do not represent actual use.
[0130] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A 3D point cloud data processing method based on a hybrid KD tree, characterized in that: include: Determine the reference point cloud features corresponding to the 3D point cloud data; Determine whether the preset historical query set contains historical query point cloud features that are the same as or similar to the reference point cloud features; If not, a preset K nearest neighbor algorithm is used to search the preset leaf nodes in parallel to obtain the target point cloud features corresponding to the reference point cloud features; the preset leaf nodes are an unordered set contained in the preset hybrid KD tree.
2. The 3D point cloud data processing method based on the hybrid KD tree according to claim 1, characterized in that: The preset leaf nodes are searched in parallel using a preset K nearest neighbor algorithm to obtain target point cloud features corresponding to the reference point cloud features, including: According to the root node included in the preset hybrid KD tree and based on the preset K nearest neighbor algorithm, determine the preset target leaf node corresponding to the reference point cloud feature; According to the unordered set corresponding to the preset target leaf node and based on the preset K nearest neighbor algorithm, the unordered set is searched in parallel to obtain the target point cloud feature corresponding to the reference point cloud feature.
3. The 3D point cloud data processing method based on the hybrid KD tree according to claim 2 is characterized in that: According to the unordered set corresponding to the preset target leaf node and based on the preset K nearest neighbor algorithm, the unordered set is searched in parallel to obtain the target point cloud feature corresponding to the reference point cloud feature, including: According to the unordered set corresponding to the preset target leaf node and based on the preset K nearest neighbor algorithm, the proximity values between the reference point cloud features and different preset sample point cloud features included in the unordered set are calculated in parallel; According to the proximity value, K target sample point cloud features adjacent to the reference point cloud feature are determined to obtain a target point cloud feature corresponding to the reference point cloud feature.
4. The 3D point cloud data processing method based on the hybrid KD tree according to any one of claims 1 to 3, characterized in that: The preset hybrid KD tree includes n layers, where n is a natural number and n≥2; before the preset leaf nodes are searched in parallel using a preset K nearest neighbor algorithm to obtain the target point cloud features corresponding to the reference point cloud features, the method further includes: Based on the traditional KD tree, an n-1-layer tree structure is constructed, and all preset sample point cloud features contained in each leaf node of the nth layer are grouped into an unordered set to obtain a preset hybrid KD tree.
5. The 3D point cloud data processing method based on the hybrid KD tree according to any one of claims 1 to 3, characterized in that: Determining whether the preset historical query set contains historical query point cloud features that are the same as or similar to the reference point cloud features includes: Determine a first point cloud feature vector corresponding to the reference point cloud feature, and determine a second point cloud feature vector corresponding to the historical query point cloud feature included in a preset historical query set; Calculating a similarity corresponding to the similarity between the first point cloud feature vector and the second point cloud feature vector; Determining whether the similarity is greater than or equal to a preset similarity threshold; When the similarity is less than a preset similarity threshold, it is determined that the preset historical query set does not include a historical query point cloud feature that is the same as or similar to the reference point cloud feature.
6. The 3D point cloud data processing method based on the hybrid KD tree according to any one of claims 1 to 3, characterized in that: The method further comprises: When the preset historical query set includes a historical query point cloud feature that is identical or similar to the reference point cloud feature, a historical query result corresponding to the historical query point cloud feature is obtained, and the historical query result is used as a target point cloud feature corresponding to the reference point cloud feature.
7. The 3D point cloud data processing method based on the hybrid KD tree according to any one of claims 1 to 3, characterized in that: After obtaining the target point cloud feature corresponding to the reference point cloud feature, the method further includes: The reference point cloud features and the corresponding target point cloud features are updated to the preset historical query set.
8. A 3D point cloud data processing device based on a hybrid KD tree, characterized in that: include: A first determining unit, used to determine the reference point cloud features corresponding to the 3D point cloud data; A first judgment unit, used to judge whether a preset historical query set contains a historical query point cloud feature that is the same as or similar to the reference point cloud feature; A search unit, configured to, when the judgment result of the first judgment unit is negative, use a preset K nearest neighbor algorithm to search preset leaf nodes in parallel to obtain a target point cloud feature corresponding to the reference point cloud feature; The preset leaf nodes are an unordered set contained in the preset hybrid KD tree.
9. A computer device, characterized in that: The computer device comprises a memory and a processor connected to the memory; the memory is used to store a computer program; the processor is used to run the computer program to execute the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 can be implemented.