A method for fast query matching of lidar point cloud based on local sensitive hashing

By combining locality-sensitive hashing algorithm and pseudo-Hilbert curve index with sparse incremental voxels, the problem of high computational resource consumption and low efficiency of KNN query method on high-dimensional datasets is solved, and fast query matching of LiDAR point clouds is realized.

CN116737978BActive Publication Date: 2025-12-30HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310711384.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-15
Publication Date
2025-12-30
Estimated Expiration
2043-06-15

AI Technical Summary

Technical Problem

The K-Nearest Neighbor (KNN) query method consumes a lot of computational resources and has low query efficiency when processing high-dimensional data or large-scale datasets.

Method used

Locality Sensitive Hash (LSH) algorithm is used for indexing, and point cloud data is organized by combining pseudo Hilbert curves and sparse incremental voxels (ivox). Similar point clouds are grouped together by hash encoding, and multi-probe LSH is used for efficient similarity search.

Benefits of technology

While ensuring query accuracy, it significantly shortens query time and improves retrieval efficiency and matching accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116737978B_ABST
    Figure CN116737978B_ABST
Patent Text Reader

Abstract

The application provides a kind of laser radar point cloud fast query matching method based on local sensitive hash, first through laser radar scanning collection environment data, point cloud segmentation is carried out to the point cloud data collected using K-means clustering segmentation algorithm;Then the feature of data object is extracted, and the data set S after preprocessing is obtained;The point cloud data in voxel is generated one-dimensional index sequence using pseudo-hilbert curve generation algorithm;The pseudo-hilbert curve sequence obtained is encoded using LSH, and the index is constructed, the Euclidean distance between query point cloud and candidate point cloud is confirmed, and the nearest point cloud in voxel is confirmed.The method of the application improves the speed of point cloud feature extraction query based on local sensitive hash index method, shortens the query matching time and improves the query matching precision;LSH index gathers similar point clouds together by hashing coding pseudo-hilbert sequence, reduces the number of point clouds that need to calculate distance, thereby improves the retrieval efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of lidar point cloud technology, specifically relating to a fast query and matching method for lidar point clouds based on locality-sensitive hashing. Background Technology

[0002] The K-Nearest Neighbors (KNN) query method has wide applications in data mining. Given a sample set and a query object, this algorithm returns the K closest (most similar) objects to the query object. However, this algorithm has limitations when handling high-dimensional data or large sample sets. For example, in a large image database, a user needs to find the set of most similar images for a given query image, which requires querying all images in the database, resulting in a very large workload. The main challenge in handling KNN queries lies in the sheer volume of data; every object in the dataset needs to participate in the computation, consuming significant computational resources.

[0003] The core idea of ​​the KNN algorithm is as follows: Given a set of objects O and a query object q, the given dataset is divided into a training set and a test set. The distance between the query object and all objects in the training set is calculated, and the K nearest training objects to the query object are selected. These K objects are the K nearest neighbors of the query object. The KNN algorithm was initially proposed to solve data classification problems. Further research has been conducted on its application in areas such as classification accuracy of test datasets, dimensionality reduction of high-dimensional data, classification of neighboring objects in sparse data, and the selection of the K value.

[0004] This invention proposes a fast query and matching method for LiDAR point clouds based on Locality Sensitive Hashing (LSH), which primarily utilizes the LSH algorithm. LSH is one of the most popular algorithms for similarity retrieval; it's an approximate nearest neighbor algorithm built on hashing, reducing retrieval time complexity to linear. Compared to other tree-based data structures, LSH handles data retrieval problems in high-dimensional spaces much better. Compared to the K-Nearest Neighbor (KNN) query method mentioned earlier, this invention uses LSH for indexing. The basic idea is to ensure that adjacent points fall into the same "bucket," so during nearest neighbor search, we only need to search within one bucket or a few adjacent buckets. This significantly reduces workload, computational resource consumption, and improves query efficiency and accuracy. Summary of the Invention

[0005] Purpose of the invention: This invention provides a more practical and faster method for fast query and matching of LiDAR point clouds based on locality-sensitive hashing.

[0006] Technical Solution: This invention proposes a fast query and matching method for lidar point clouds based on locality-sensitive hashing, comprising the following steps:

[0007] Step (1) Collect point cloud data in voxels by scanning with lidar, and segment the collected point cloud data using the K-means clustering segmentation algorithm;

[0008] Step (2) Next, feature extraction is performed on the point cloud data that needs to be processed within the voxel to obtain the preprocessed dataset S;

[0009] Step (3) Represent all objects in the dataset S obtained in the previous step as vectors according to the vector space model to obtain the point cloud feature object vector set;

[0010] Step (4) Use sparse incremental voxels to organize the point cloud, determine a query point cloud, and use the pseudo Hilbert curve generation algorithm to generate a one-dimensional index sequence of point cloud data in the voxels, and sort them according to the pseudo Hilbert curve order.

[0011] Step (5) uses the Locality Sensitive Hash (LSH) method to hash the pseudo Hilbert curve sequence obtained in step (4), constructs an LSH index, maps it to a hash bucket, and forms a corresponding hash table.

[0012] Step (6) For the similar candidate sequences obtained in step (5), the closest point cloud among the voxels is confirmed based on the Euclidean distance between the query point cloud and the candidate point clouds.

[0013] Further, in step (1), a suitable segmentation algorithm is selected to segment the collected point cloud data; a distance-based clustering segmentation algorithm (K-means clustering) is selected for point cloud segmentation. The main idea is to select K samples from the samples to be clustered and segmented, then traverse all samples, calculate the Euclidean distance between each sample and the K samples, and then classify it into the category of the sample with the smallest distance, so that all samples have found their respective categories; then recalculate the centroids of the samples in the K categories respectively; then return to the first step to continue iterating, and so on until the centroids of the samples in the K categories no longer move or move very little.

[0014] (a) Randomly select K cluster centroids as μ1, μ2, ..., μ k ∈R n .

[0015] (b) Repeat the following procedure until convergence:

[0016] For each sample i, calculate the class it should belong to.

[0017]

[0018] For each class j, recalculate the centroid of that class.

[0019]

[0020] Further, in step (2), feature extraction is performed on the point cloud data within the voxel that needs to be processed. The feature extraction process is as follows:

[0021] Feature extraction mainly consists of two steps: region segmentation and feature extraction. The region segmentation stage primarily classifies and identifies feature patterns, determining which pattern a feature belongs to (e.g., a straight line, an arc), and identifying the region belonging to that feature pattern and the set of laser data points within that region. The feature extraction stage primarily determines the parameters of various feature patterns and extracts feature points. The feature extraction stage consists of three steps:

[0022] (a) Classify laser point clouds by line bundles;

[0023] (b) Calculate the curvature of the laser point cloud; the curvature calculation formula is as follows:

[0024]

[0025] The formula for calculating the curvature at the i-th point is:

[0026]

[0027] Where c represents the calculated curvature; n represents the region of the point cloud, which is n points forward and backward centered on the current point i; k represents the k-th frame point; and L represents the laser coordinates.

[0028] (c) Extract feature points based on curvature and perform preprocessing to obtain dataset S.

[0029] Further, step (4) describes organizing the point cloud using sparse incremental voxels (ivoxes), where the point cloud is initially stored in sparse voxels. Since the lidar point cloud is sparse, a sparse hash map is used to store voxels containing only at least one point. The hash index can be calculated using any spatial hash algorithm; in this implementation, the following hash function is used:

[0030]

[0031] idv = hash(v) = (v x n x )X or (v y n y )X or (v z n z) mod N (5)

[0032] Where, p x ,p y ,p z yes The coordinates. s is the voxel size, n x n y n z Let N be a large prime number, and N be the size of the hash map. Points in each voxel are stored as a vector or as a low-level internal structure, such as IVox-PHC.

[0033] Furthermore, the IVox-PHC proposed in step (4) is another implementation of ivox, which replaces the linear layout within each voxel with a pseudo-Hilbert curve (PHC). The PHC space-filling curve maps from a low-dimensional space to a high-dimensional space while preserving locality, and can also map from a high-dimensional space to a low-dimensional space. In the implementation, a voxel is divided into (2k) segments. 3 A smaller cube, where k is a configurable PHC order. For example, k = 6, which can be determined based on the physical size of the voxels, with the cube ranging from 0 to (2k) based on their position in the PHC. 3 -1 is used for indexing. Each cube stores the centroid of all points within the cube.

[0034] Furthermore, in step (4), the pseudo-Hilbert curve (PHC) generation algorithm is used to generate a one-dimensional index sequence from the point cloud data in the voxels. The specific process is as follows:

[0035] (a) Represent the point cloud data as a three-dimensional voxel mesh.

[0036] (b) For each point, its coordinates in the voxel grid can be calculated by dividing the point’s spatial location by the voxel size and rounding down.

[0037] (c) For each voxel, calculate the three-dimensional coordinates of its center point. These center points will serve as nodes of the curve.

[0038] (d) For each node, convert its three-dimensional coordinates into one-dimensional index values ​​using a pseudo-Hilbert curve coordinate mapping algorithm. That is, first convert the value of each dimension of the three-dimensional coordinates into binary; then interleave the three binary strings bit by bit to form a new binary string; finally, convert the new binary string into a decimal index value.

[0039] (e) Sort all nodes in ascending order of their index values. The final one-dimensional index sequence is the sorted sequence of node index values.

[0040] Furthermore, step (5) constructs an index using locality-sensitive hashing:

[0041] The number of hash tables L, the number of hash functions K in each table, and the parameters related to the locality-sensitive hash function itself are determined based on the accuracy of the search results (i.e., the probability of finding adjacent data). All data objects are hashed into the corresponding buckets using the LSH hash function, forming one or more hash tables. L sets of locality-sensitive hash functions as shown in formula (6) are used to construct L hash tables. The locality-sensitive hash functions are shown in formula (6):

[0042]

[0043] Where o is a d-dimensional data point in the dataset, a is a randomly generated d-dimensional vector whose distribution satisfies the standard Gaussian distribution N(0,1), b is a real number in the range [0,w], and w is a real number representing the slice width in LSH. Suppose two data points p and q are separated by a distance s = |p,q|. After mapping by a randomly selected Local Sensitive Hash Function (LSH), the probability that p and q have the same hash value is P(s,w), and the probability P(s,w) is calculated as shown in formula (7):

[0044]

[0045] Where f2(x) is the probability density function of a Gaussian distribution, and norm(·) represents the density accumulation function of a Gaussian distribution.

[0046] Furthermore, in step (5), the pseudo-Hilbert curve sequence obtained in step (4) is encoded using the Locality Sensitive Hashing (LSH) method, which can construct an LSH index to support efficient similarity search. The specific steps are explained below:

[0047] (a) Initialize LSH index parameters. This includes the number and parameter settings of locality-sensitive hash functions, the size of the hash table, etc.

[0048] (b) Use the one-dimensional index sequence generated by the pseudo-Hilbert curve as input data.

[0049] (c) Divide the input data into fixed-size subsequences, or fragments. The size of the fragments should be sufficient to capture the key features of the sequence.

[0050] (d) Apply a locality-sensitive hash function to each segment, as shown in Equation (6).

[0051] (e) The output of the locality-sensitive hash function maps fragments to indices of L hash tables.

[0052] (f) Repeat steps 3) through 5) to hash all the fragments and map them to the corresponding hash table indices. Given a query sequence, split it into fragments and apply the same hash function, then use the hash value of the query sequence to look up similar indices in the hash table, and obtain similar candidate sequences based on the indices in the hash table.

[0053] (g) The index of a hash table can be a hash bucket, in which the index of the segment corresponding to the hash value is stored.

[0054] Furthermore, in step (6), for the similar candidate sequences obtained from the previous indexing step, the closest point cloud among the voxels is confirmed based on the Euclidean distance between the query point cloud and the candidate point clouds.

[0055] In LSH, different distance metrics have corresponding hash functions. Here, the LSH hash function for Euclidean distance is: H(V) = |V*R + b| / a, where R is a random vector, a is the bucket width, and b is a random variable uniformly distributed between [0, a]. That is, all vectors are mapped to a straight line through the hash function. This line consists of many line segments of length a, and each different vector V is randomly mapped to a different line segment. In three-dimensional space, the Euclidean distance formula is:

[0056]

[0057]

[0058] Where ρ is the distance from point (x1, y1, z1) to point (x2, y2, z2), and |X| is the distance from point (x2, y2, z2) to the origin.

[0059] Here, the nearest point cloud in a voxel is queried using a multi-probe LSH method. This is a method to reduce the number of independent hash tables in the LSH data structure. The core idea is to use a strictly selected probe sequence to detect multiple buckets that may contain the nearest neighbor. Given a query point q, the "standard" LSH data structure only considers one cell from L hash tables (this cell is determined by the hash value h of i∈[L]). i (q) Given). In multi-probe LSH, candidates from multiple cells in each hash table are considered. The principle is as follows: in the hash function h i Below, a point p that is close to q but failed to collide with it may still hash to be close to h. i The value of (q). By probing the same hash table close to h. i(q) has multiple hash locations. Multi-probe LSH achieves a given success probability with fewer hash tables than the "standard" LSH. Multi-probe LSH efficiently detects neighboring points, calculates the Euclidean distance using the Euclidean distance formula, and determines the nearest point cloud by sorting and comparison.

[0060] Beneficial effects: Compared with the prior art, the beneficial effects of the present invention are as follows:

[0061] 1. This invention uses pseudo-Hilbert curve (PHC) and locality sensitive hashing (LSH) for indexing. When querying the Euclidean distance between the point cloud and the candidate point cloud sequence, multi-probe LSH is used to detect and sort the neighboring points, which not only ensures the query accuracy but also shortens the query time.

[0062] 2. This invention uses LSH indexing to group similar point clouds together by hashing and matching pseudo-Hilbert sequences, reducing the number of point clouds requiring distance calculation and thus improving retrieval efficiency. Locality Sensitive Hashing (LSH) avoids comparing the query object with all data objects one by one by hashing similar data objects into hash buckets, thus improving query matching efficiency. Attached Figure Description

[0063] Figure 1 The flowchart shows a fast query and matching method for LiDAR point clouds based on locality-sensitive hashing.

[0064] Figure 2 A flowchart illustrating how the PHC generation algorithm generates a one-dimensional index sequence from point cloud data in voxels;

[0065] Figure 3 The flowchart illustrates the process of constructing an LSH index and forming a hash table for this invention. Detailed Implementation

[0066] The present invention will now be described in further detail with reference to the accompanying drawings.

[0067] This invention proposes a fast query and matching method for lidar point clouds based on locality-sensitive hashing, such as... Figure 1 As shown, the specific steps include:

[0068] Step (1) Collect point cloud data from voxels using LiDAR scanning, and segment the collected point cloud data using the K-means clustering algorithm. The main idea of ​​the K-means clustering algorithm is to select K samples from the samples to be clustered and segmented, then traverse all samples, calculate the Euclidean distance between each sample and the K-samples, and then classify it into the category of the sample with the smallest distance. Then all samples will find their respective categories. Then recalculate the centroids of the samples in the K categories. Then return to the first step to continue iterating until the centroids of the samples in the K categories no longer move or move very little.

[0069] Specific steps:

[0070] (a) Randomly select K cluster centroids as μ1, μ2, ..., μ k ∈R n .

[0071] (b) Repeat the following procedure until convergence:

[0072] For each sample i, calculate the class it should belong to.

[0073]

[0074] For each class j, recalculate the centroid of that class.

[0075]

[0076] Step (2) Next, feature extraction is performed on the point cloud data within the voxel to obtain the preprocessed dataset S. Feature extraction mainly consists of two steps: region segmentation and feature extraction. The region segmentation stage primarily completes the classification and identification of feature patterns, i.e., determining which type of pattern the feature belongs to, such as a straight line, an arc, etc., and determining the region belonging to that feature pattern and the set of laser data points within that region. The feature extraction stage primarily completes the determination of parameters for various feature patterns and the extraction of feature points. The feature extraction stage consists of three steps:

[0077] (a) Classify laser point clouds by line bundles;

[0078] (b) Calculate the curvature of the laser point cloud; the curvature calculation formula is as follows:

[0079]

[0080] The formula for calculating the curvature at the i-th point is:

[0081]

[0082] Where c represents the calculated curvature; n represents the region of the point cloud, which is n points forward and backward centered on the current point i; k represents the k-th frame point; and L represents the laser coordinates.

[0083] (c) Extract feature points based on curvature and perform preprocessing to obtain dataset S.

[0084] Step (3) Represent all objects in the dataset S obtained in the previous step as vectors according to the vector space model to obtain the point cloud feature object vector set;

[0085] Step (4) uses sparse incremental voxels to organize the point cloud, determines a query point cloud, and uses a pseudo-Hilbert curve generation algorithm to generate a one-dimensional index sequence from the point cloud data in the voxels, and sorts them according to the pseudo-Hilbert curve order. Figure 2 As shown, the specific process of generating a one-dimensional index sequence and sorting it according to the pseudo-Hilbert curve order is as follows: The point cloud data is represented as a three-dimensional voxel grid; for each point, its coordinates in the voxel grid are calculated, which can be achieved by dividing the point's spatial position by the voxel size and rounding down; then, for each voxel, the three-dimensional coordinates of its center point are calculated; for each node, its three-dimensional coordinates are converted into one-dimensional index values ​​using the pseudo-Hilbert curve coordinate mapping algorithm; finally, all nodes are sorted according to their index values ​​in ascending order, and the final one-dimensional index sequence is the sorted node index value sequence.

[0086] Step (5) uses the Locality Sensitive Hashing (LSH) method to hash the pseudo-Hilbert curve sequence obtained in step (4), constructs an LSH index, maps it to hash buckets, and forms a corresponding hash table. The specific process described above is as follows: Figure 3 As shown: Initialize LSH index parameters; use the one-dimensional index sequence generated by the pseudo-Hilbert curve as input data; divide the input data into fixed-size segments; create an empty hash table or hash table array; apply a locality-sensitive hash function to each segment and map the hash value to the corresponding hash table index; repeat the steps of dividing the input data into fixed-size segments and mapping the hash value to the corresponding hash table index, perform locality-sensitive hashing on all segments, and map them to the corresponding hash table indexes.

[0087] Locality Sensitive Hashing (LSH) is a method that can quickly complete approximate KNN search by building a hash index. After the original data points that are closer in distance are mapped by the locality sensitive hash function, they are more likely to obtain the same hash value (mapped to the same hash bucket). The locality sensitive hash function is used to quickly find the approximate nearest neighbors of a large amount of high-dimensional data, and the approximate search is to compare the distances or similarities between data points. The hash function that makes two originally adjacent data points fall into the same bucket after hash transformation needs to satisfy the following two conditions:

[0088] (1) If d(x,y) ≤ d1, then the probability that h(x) = h(y) is at least p1;

[0089] (2) If d(x,y) ≥ d2, then the probability that h(x) = h(y) is at most p2;

[0090] Where d(x,y) is a distance metric between x and y, d1 < d2, and h(x) and h(y) respectively represent the hash transformation of x and y. The hash function that satisfies the above two conditions is called (d1,d2,p1,p2)-sensitive. And the process of generating one or more hash tables by hashing the original data set through one or more (d1,d2,p1,p2)-sensitive hash functions is called locality sensitive hashing.

[0091] When performing nearest neighbor search based on the Euclidean distance, the original space is a high-dimensional Euclidean space, and the new mapped space is a low-dimensional Euclidean space. Further, it can be concluded that points that are similar in the original high-dimensional space are definitely also similar in the low-dimensional space, but points that were originally not similar have a certain small probability of becoming similar points in the low-dimensional space. And for different distance (similarity) evaluation functions, there are different locality sensitive hash functions. For example, the most commonly used locality sensitive hash function for the Euclidean distance is shown in formula (6):

[0092]

[0093] Where o is a d-dimensional data point in the dataset, a is a randomly generated d-dimensional vector whose distribution satisfies the standard Gaussian distribution N(0,1), b is a real number in the range [0,w], and w is a real number representing the width of the segment in LSH. The idea is to divide the one-dimensional number line into segments of equal length, and then map the high-dimensional data onto the segmented number line, where the hash values ​​of points that are close to each other are very likely to be equal. Suppose two data points p and q are far apart and their distance is s = |p,q|. After mapping through a randomly selected Local Sensitive Hash Function (LSH), the probability that the hash values ​​of p and q are equal is P(s,w), and the probability P(s,w) is calculated as shown in formula (7):

[0094]

[0095] Where f2(x) is the probability density function of a Gaussian distribution, and norm(·) represents the density accumulation function of a Gaussian distribution.

[0096] Step (6) involves identifying the closest point cloud among the voxels based on the Euclidean distance between the query point cloud and the candidate point cloud, using the similar candidate sequence indexed in step (5). When querying the Euclidean distance between the query point cloud and the candidate point cloud sequence, a multi-probe LSH is used to detect voxel hashes that are close to h in the voxel hash table. i Multiple hash positions of (q) are used to speed up the query for the nearest point by using an incremental sorting method.

[0097] In LSH, different distance metrics have corresponding hash functions. Here, the LSH hash function for Euclidean distance is: H(V) = |V*R + b| / a, where R is a random vector, a is the bucket width, and b is a random variable uniformly distributed between [0, a]. That is, all vectors are mapped to a straight line through the hash function. This line consists of many line segments of length a, and each different vector V is randomly mapped to a different line segment. In three-dimensional space, the Euclidean distance formula is:

[0098]

[0099]

[0100] Where ρ is the distance from point (x1, y1, z1) to point (x2, y2, z2), and |X| is the distance from point (x2, y2, z2) to the origin.

[0101] Here, the nearest point cloud in a voxel is queried using a multi-probe LSH method. This is a method to reduce the number of independent hash tables in the LSH data structure. The core idea is to use a strictly selected probe sequence to detect multiple buckets that may contain the nearest neighbor. Given a query point q, the "standard" LSH data structure only considers one cell from L hash tables (this cell is determined by the hash value h of i∈[L]). i (q) Given). In multi-probe LSH, candidates from multiple cells in each hash table are considered. The principle is as follows: in the hash function h i Below, a point p that is close to q but failed to collide with it may still hash to be close to h. i The value of (q). By probing the same hash table close to h. i (q) has multiple hash locations. Multi-probe LSH achieves a given success probability with fewer hash tables than the "standard" LSH. Multi-probe LSH efficiently detects neighboring points, calculates the Euclidean distance using the Euclidean distance formula, and determines the nearest point cloud by sorting and comparison.

[0102] Voxels are a traditional method for storing volumetric data and can represent objects ranging from smoke to 3D printed models, from skeletal scans to terrain representations. A single bit can be stored to indicate whether the voxel's center is inside or outside the object. For medical applications, density or opacity may be provided, as well as volumetric flow rate, and color, normals, signed distances, or other values ​​may also be stored for rendering convenience. Each voxel does not require positional information, as its location is determined by an index within the mesh.

[0103] Voxel representations of models can be used for many different purposes. A regular data mesh is suitable for all operations related to the entire object, not just its surface. For example, the volume of an object represented by voxels is the sum of the voxels within it. The regular structure of the mesh and the well-defined local neighborhoods of voxels mean that phenomena such as smoke, erosion, or cloud formation can be simulated using cellular automata or other algorithms. Finite element analysis uses voxels to determine the tensile strength of an object. Sculpting a model becomes an operation of subtracting voxels; conversely, building a detailed model can be done by placing a polygonal model into a voxel mesh and determining the voxels that overlap it. Compared to the more traditional polygon workflow, which must deal with singularities and accuracy issues, this constructive solid geometry modeling operation is efficient, predictable, and guaranteed to work. Voxel-based systems such as OpenVDB and NVIDIA GVDB Voxels are used in filmmaking, scientific and medical visualization, 3D printing, and other applications.

Claims

1. A method for fast query matching of lidar point cloud based on locality sensitive hashing, characterized in that, The method comprises the following steps: Step (1) collect point cloud data in voxels by laser radar scanning, and use a K-means clustering segmentation algorithm to segment the collected point cloud data; Step (2) feature extraction is performed on the point cloud data in the voxel that needs to be processed to obtain a pre-processed data set S; Step (3) the objects in the data set S obtained in the previous step are represented in vector form according to the vector space model, and a point cloud feature object vector set is obtained; Step (4) use a sparse incremental voxel ivox to organize the point cloud, determine a query point cloud, and use a pseudo-Hilbert curve generation algorithm to generate a one-dimensional index sequence of the point cloud data in the voxel, and sort according to the pseudo-Hilbert curve order; Step (5) use a local sensitive hashing method to hash encode the pseudo-Hilbert curve sequence obtained in step (4), construct an LSH index, map it into a hash bucket and form a corresponding hash table; Step (6) for the similar candidate sequence obtained by indexing in step (5), confirm the nearest point cloud in the voxel according to the Euclidean distance between the query point cloud and the candidate point cloud, In step (4), the pseudo-Hilbert curve PHC generation algorithm is used to generate a one-dimensional index sequence of the point cloud data in the voxel, and the specific process is as follows: (a) represent the point cloud data as a three-dimensional voxel grid; (b) for each point, calculate its coordinates in the voxel grid, which can be achieved by dividing the spatial position of the point by the voxel size and taking the integer part; (c) for each voxel, calculate the three-dimensional coordinates of the center point, which will be used as the nodes of the curve; (d) for each node, convert its three-dimensional coordinates to a one-dimensional index value, using the coordinate mapping algorithm of the pseudo-Hilbert curve, that is, first convert the value of each dimension of the three-dimensional coordinates to binary; then combine the three binary strings bit by bit to form a new binary string; finally, convert the new binary string to a decimal index value; (e) sort all nodes in order of index value from small to large, and the final one-dimensional index sequence is the sorted node index value sequence.

2. The method of claim 1, wherein: In step (1), the collected point cloud data is segmented, the point cloud space is divided into a regular voxel grid, and each voxel is regarded as a unit for segmentation, Divide the points in the point cloud into K samples, traverse all samples, calculate the Euclidean distance between each sample and K-1 samples, and then classify it into the class to which the sample with the smallest distance belongs, then all samples find their respective classes; then the centroids of the samples in the K classes are recalculated; then return to the first step to continue iteration, until the centroids of the samples in the K classes no longer move or move very little, The specific steps are as follows: (a) randomly select K cluster centroids as ,...... ; (b) repeat the following process until convergence: For each sample i, calculate the class it should belong to (1) For each class j, recalculate the centroid of the class := (2) In step (2), the process of feature extraction on the point cloud data in the voxel that needs to be processed is as follows: Feature extraction mainly includes two steps: region segmentation and feature extraction stage. The region segmentation stage completes the classification and identification of feature patterns, i.e., determining which category the feature belongs to and determining the region and the set of laser data points in the region belonging to the feature pattern. The feature extraction stage completes the determination of parameters of various feature patterns and the extraction of feature points. The feature extraction stage includes three steps: (a) Classify the laser point cloud according to the beam; (b) Calculate the curvature of the laser point cloud; the curvature calculation formula is as follows: C= (3) The formula for calculating the curvature of the i-th point is: C = (4) Where C represents the calculated curvature; n represents the region of the point cloud, which is centered on the current point i and takes n points forward and backward; k represents the k-th frame point, and L represents the laser coordinate; (c) Extract feature points according to the curvature, and obtain the data set S through preprocessing.

3. The method of claim 1, wherein: In step (4), the point cloud is organized by sparse incremental voxels ivox, and the ivox-PHC basic structure is selected, and a pseudo-Hilbert curve PHC is used to replace the linear layout inside each voxel.

4. The method of claim 3, wherein: In step (4), the point cloud is organized by sparse incremental voxels ivox, and the ivox-PHC basic structure is selected, and a pseudo-Hilbert curve PHC is used to replace the linear layout inside each voxel. P= [ , , ,V= [ , , ; idv=hash(v)=( )XOR( )XOR ( ) mod N (5) wherein, , , is the coordinate of P , s is the size of the voxel, , , is a large prime number, N is the size of the hash map, and the points in each voxel are stored as a vector or as an underlying internal structure.

5. The method of claim 4, wherein: ivox-PHC replaces the linear layout inside each voxel with a pseudo-Hilbert curve PHC in step (4), PHC space-filling curve is to map from low-dimensional space to high-dimensional space or from high-dimensional space to low-dimensional space while keeping locality, in implementation, a voxel is divided into (2k smaller cubes, where k is a configurable PHC order, when taking k = 6, determined according to the physical size of the voxel, multidimensional datasets are indexed from 0 to (2k -1 according to their position in PHC, each cube stores the centroid of all points within the cube.

6. The method of claim 1, wherein: In step (5), the pseudo-Hilbert curve sequence obtained in step (4) is encoded by using the local sensitive hashing method to construct an LSH index. The LSH algorithm maps similar data into the same hash bucket, which can quickly locate the hash bucket where the most similar pseudo-Hilbert curve sequence of the query point cloud is located.

7. The method of claim 6, wherein: In step (5), an index is constructed by using local sensitive hashing: the number of hash tables L, the number of hash functions K in each table, and the parameters related to the local sensitive hashing function are determined according to the accuracy of the search results. All data objects are hashed into the corresponding buckets by LSH hash function, forming one or more hash tables. L groups of local sensitive hashing functions as shown in formula (6) are used to construct L hash tables hash table. The local sensitive hashing function is as shown in formula (6): h(o)= (6) Where o is a d-dimensional data point in the data set, a is a randomly generated d-dimensional vector with a standard Gaussian distribution N(0, 1), b is a real number in the range [0, w], and w is a real number representing the width of the slice in LSH. If the distance between two data points p and q is s = |p, q|, the probability that p and q have equal hash values after being mapped by a randomly selected local sensitive hashing function LSH is P(s, w). The calculation method of the probability P(s, w) is as shown in formula (7): P(s, w) = Pr[h(p) = h(q)] = (7) = 1 - 2norm( ) (1 ) wherein (x) is a probability density function of a Gaussian distribution, and (x) = (2 ) , norm(·) denotes a density cumulative function of a Gaussian distribution.

8. The method of claim 7, wherein: In step (5), the pseudo-Hilbert curve sequence obtained in step (4) is encoded by using the local sensitive hashing LSH method to construct an LSH index to support efficient similarity search. The specific steps are as follows: (a) Initialize LSH index parameters, including the number and parameter settings of the local sensitive hash function, the size of the hash table; (b) Take the one-dimensional index sequence generated by the pseudo-Hilbert curve as the input data; (c) Divide the input data into fixed-size subsequences or fragments, and the size of the fragment should be able to capture the key features in the sequence; (d) Apply the local sensitive hash function to each fragment, and the local sensitive hash function adopts formula (6): (e) The output of the local sensitive hash function maps the fragment to the index of the L hash table; (f) Repeat steps (c) to (e) to hash all fragments and map them to the corresponding hash table index, given a query sequence, divide it into fragments and apply the same hash function, then use the hash value of the query sequence to find similar indexes in the hash table, and according to the index in the hash table, obtain similar candidate sequences; (g) The index of the hash table can be a hash bucket, and each hash bucket saves the index of the fragment corresponding to the hash value.

9. The method of claim 1, wherein: In step (6), when querying the Euclidean distance between the point cloud and the candidate point cloud sequence, the multiple probe LSH probe voxel hash table is used to query the multiple hash positions close to (q) and the incremental sorting method is used to accelerate the query of the nearest point. In LSH, different distance metrics have corresponding hash functions. Here, the LSH hash function corresponding to the Euclidean distance is: H(V)=|V*R + b| / a, R is a random vector, a is the bucket width, and b is a random variable uniformly distributed between [0, a], that is, all vectors are mapped to a straight line by the hash function, and this straight line is composed of many line segments with length a, and each different vector V is randomly mapped to a different line segment. In three-dimensional space, the Euclidean distance formula is: = , (8) |X| = . in For point ( , ) to the point ( , The distance from point () is |X|, where |X| is the distance from point () , The distance from the origin.

Citation Information

Patent Citations

  • LSH (Locality Sensitive Hashing)-based clustering and indexing method and LSH-based clustering and indexing system

    CN103631928A

  • Similarity data retrieval method based on locality sensitive hashing (LASH) improved algorithm

    CN104035949A