Nearest neighbor point retrieval method based on multi-scale grid division
Through multi-scale raster division and index construction, the problem of inefficient retrieval of the closest point in large-scale geospatial data is solved, and fast and efficient closest point retrieval is achieved, suitable for point data with high spatial resolution.
Patent Information
- Application Number
- CN202410943781.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-11-22
AI Technical Summary
The existing closest point search method is inefficient and computationally expensive when processing large-scale, high-spatial resolution point data, making it difficult to effectively reduce the computational burden during the search process.
Using a multi-scale raster division method, by constructing a multi-scale raster index, the point candidate library is partitioned and encoded, and the neighborhood raster encoding information is used to quickly confirm the neighborhood points of the target point, so as to achieve a fast nearest point. Search.
It effectively reduces the computational burden during the search process, improves the retrieval efficiency of the closest points, and can quickly find the closest points among a large number of geospatial data points, suitable for large-scale and high spatial resolution point data.
Smart Images

Figure CN119003584A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of geographic information processing, and in particular relates to a nearest neighbor point retrieval method based on multi-scale grid division. Background Art
[0002] With the rapid development of geographic information systems and location-based services, the scale and complexity of spatial data are growing, which puts forward higher requirements for efficient retrieval and analysis of spatial data. Among many spatial data retrieval tasks, the nearest neighbor search is one of the core issues. It has a wide range of applications in path planning, geographic information retrieval, remote sensing image analysis and other fields.
[0003] In existing technologies, nearest neighbor retrieval usually relies on spatial index structures, such as R-tree, Quadtree, etc. These structures perform well on small-scale data sets, but face problems of low efficiency and high computational cost when processing large-scale, high-spatial-resolution point data. At the same time, raster data structures are widely used in the field of geographic information processing, playing an important role in the expression and storage of geographic data, terrain spatial analysis, multi-scale analysis, data fusion and integration, etc. It provides a basis for the digitization, analysis, visualization and decision-making of geographic information, and is an indispensable component of modern geographic information systems. Raster data structures can well represent the adjacency relationship within the spatial range, and they have great reference significance for the retrieval of adjacent points. When facing large-scale and high-spatial-resolution point data, they can greatly reduce invalid indexes and logical judgments, and improve the retrieval rate. Therefore, how to combine the advantages of raster data structures, build and optimize raster indexes at different scales, effectively reduce the computational burden in the retrieval process, and achieve fast nearest neighbor retrieval has become the focus of this study. Summary of the invention
[0004] The purpose of the present invention is to provide a nearest neighbor point retrieval method based on multi-scale grid division, which can utilize the grid structure to divide the multi-scale spatial grid, realize the partitioning and encoding of the point candidate library, and realize the rapid confirmation of the neighborhood points of the target point according to the coding information of the neighborhood grid, thereby greatly improving the retrieval efficiency of the nearest neighbor point.
[0005] The technical solution adopted by the present invention is:
[0006] A nearest neighbor point retrieval method based on multi-scale grid division includes the following steps:
[0007] Step 1: Get the entire access point set The location information of all points in the The grid origin
[0008] Step 2: Search the point set library The distance between the two nearest points in the search point set The highest spatial resolution Combined with the multi-scale coefficient, the retrieval point set library is obtained Multi-scale grid
[0009] Step 3: Based on the access point set The position of each point and the grid scale in the grid are determined to determine the arbitrary point P i Multi-scale grid coding Get updated access point set
[0010] Step 4: For any target point M with known coordinates, obtain the multi-scale grid code of the target point M. And get the neighborhood raster code set
[0011] Step 5: Obtain all neighboring point sets in the grid where the target point M is located and the neighborhood grid code set at different scales
[0012] Step 6: Get the nearest point of the target point M in each scale grid neighborhood Then we get the multi-scale nearest point set L M ;
[0013] Step 7: multi-scale nearest point set L for the target point M M Screening is performed to obtain the multi-scale nearest point J of the target point M M .
[0014] Furthermore, in step 2, the point set library is retrieved Multi-scale grid It is expressed as:
[0015]
[0016] In the formula, λ1, λ2 and λ3 represent the scale coefficients with increasing sizes. is the grid scale determined by the scale factor λ1.
[0017] Furthermore, the i-th point P in step 3 i Multi-scale grid coding The determination rules are as follows:
[0018]
[0019] λ j ={λ1,λ2,λ3}
[0020] In the formula, int() means rounding down the data. and Respectively represent the grid scale , is the grid code formed by combining the row number and column number through the letter Z, λ j represents a set of multi-scale coefficients, x i and i P i The coordinates of the point;
[0021] Updated access point set library The i-th point P in i It is expressed as:
[0022]
[0023] In the formula, Access Point Set The number of all points in .
[0024] Furthermore, the multi-scale grid encoding of the target point M in step 4 is The calculation is as follows:
[0025]
[0026] λ j ={λ1,λ2,λ3}
[0027] In the formula, x M and M Respectively represent the coordinates of the target point M, and Respectively represent the grid scale , is the grid code formed by combining the row number and column number through the letter Z, λ j represents a set of multi-scale coefficients;
[0028] Neighborhood raster code set The expression is:
[0029]
[0030] in, Indicates that the code is The tth neighborhood of the grid, the 8-neighborhood code is calculated as follows:
[0031]
[0032] Furthermore, the set of all neighboring points of the target point M in step 5 It is expressed as:
[0033]
[0034] Furthermore, the multi-scale nearest neighbor point set L in step 6 M It is expressed as:
[0035]
[0036] The nearest point to the target point M for:
[0037]
[0038] Among them, d(P k ,M) means finding point P k The spatial Euclidean distance from point M, x k and x M Respectively represent point P k and the spatial x coordinates of point M, y k and M Respectively represent point P k And the spatial Y coordinate of point M.
[0039] Furthermore, the multi-scale nearest neighbor point set J in step 7 M It is expressed as:
[0040]
[0041] The present invention has the following beneficial effects:
[0042] (1) The present invention proposes a nearest neighbor point retrieval method based on multi-scale grid division. By constructing a multi-scale grid index, the computational burden in the retrieval process can be effectively reduced, and fast nearest neighbor point retrieval can be achieved.
[0043] (2) The method of the present invention is aimed at the application needs of retrieving a large number of geographic spatial data points. The candidate point library is partitioned and encoded. The neighborhood points of the target point can be quickly confirmed based on the encoding information of the neighborhood grid, providing effective technical support for finding the nearest point to the target point among a large number of candidate data points. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 Schematic diagram of the principle of the nearest point retrieval method for multi-scale grid division of the present invention. DETAILED DESCRIPTION
[0045] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0046] A nearest neighbor point retrieval method based on multi-scale grid partitioning, such as Figure 1As shown, the following steps are included:
[0047] Step 1: Get the entire access point set The location information of all points in points, the i-th point can be expressed as:
[0048]
[0049] Among them, x i and i Respectively represent P i The coordinates of the point.
[0050] Based on point set library Coordinate information of the midpoint, grid origin It can be expressed as:
[0051]
[0052] In the formula, X o and Y o They represent the coordinates of the grid origin respectively, and min() means finding the minimum value.
[0053] Step 2: Search the point set library The distance between the two nearest points in the point set is taken as the highest spatial resolution of the point set library. The retrieval point set library Multi-scale grid It is calculated as follows:
[0054]
[0055] In the formula, λ1, λ2 and λ3 represent the scale coefficients with increasing sizes. is the grid scale determined by the scale factor λ1.
[0056] Step 3: Based on the access point set The position of each point and the grid scale in the grid are determined to determine the arbitrary point P i Multi-scale grid coding The determination rules are as follows:
[0057]
[0058] λ j ={λ1,λ2,λ3}
[0059] Among them, int() means rounding down the data. and Respectively represent the grid scale , is the grid code formed by combining the row number and column number through the letter Z, λ j represents a set of multi-scale coefficients;
[0060] Updated access point set library The i-th point P in i It can be expressed as:
[0061]
[0062] Step 4: For any target point M with known coordinates, obtain the multi-scale grid code where it is located It is calculated as follows:
[0063]
[0064] λ j ={λ1,λ2,λ3}
[0065] Among them, x M and M Respectively represent the coordinates of the target point M, and Respectively represent the grid scale , is the grid code formed by combining the row number and column number through the letter Z, λ j represents a set of multi-scale coefficients;
[0066] In order to alleviate the problem of no adjacent points in the grid, it is necessary to obtain the neighborhood grid code set The calculation is as follows:
[0067]
[0068] in, Indicates that the code is The tth neighborhood of the grid, the 8-neighborhood code is calculated as follows:
[0069]
[0070] Step 5: Obtain all neighboring point sets in the grid where the target point M is located and the neighborhood grid code set at different scales It can be expressed as:
[0071]
[0072] Step 6: Get the nearest point of the target point M in each scale grid neighborhood It can be expressed as:
[0073]
[0074] Among them, d(P k ,M) means finding point P k The spatial Euclidean distance from point M, x k and x M Respectively represent point P k and the spatial x coordinates of point M, y k and M Respectively represent point P k and the spatial Y coordinate of point M;
[0075] Based on the nearest points under multiple scales, the multi-scale nearest point set L can be obtained. M , which can be expressed as:
[0076]
[0077] Step 7: multi-scale nearest point set L for the target point M M Screening is performed to obtain the multi-scale nearest point J of the target point M M , which can be expressed as:
[0078]
[0079] In summary, the nearest neighbor point retrieval method based on multi-scale grid division proposed in the present invention can effectively reduce the computational burden in the process of retrieving a large amount of geographic spatial point data. This method partitions and encodes the point candidate library, and can quickly confirm the neighborhood points of the target point based on the coding information of the neighborhood grid, providing effective technical support for finding the nearest point to the target point among a large number of candidate data candidate points.
Claims
1. A nearest neighbor point retrieval method based on multi-scale grid division, characterized in that: The following steps are involved: Step 1: Get the entire access point set The location information of all points in the The grid origin Step 2: Search the point set library The distance between the two nearest points in the search point set The highest spatial resolution Combined with the multi-scale coefficient, the retrieval point set library is obtained Multi-scale grid Step 3: Based on the access point set The position of each point and the grid scale in the grid are determined to determine the arbitrary point P i Multi-scale grid coding Get updated access point set Step 4: For any target point M with known coordinates, obtain the multi-scale grid code of the target point M. And get the neighborhood raster code set Step 5: Obtain all neighboring point sets in the grid where the target point M is located and the neighborhood grid code set at different scales Step 6: Get the nearest point of the target point M in each scale grid neighborhood Then we get the multi-scale nearest point set L M ; Step 7: multi-scale nearest point set L for the target point M M Screening is performed to obtain the multi-scale nearest point J of the target point M M .
2. The nearest neighbor point retrieval method based on multi-scale grid division according to claim 1 is characterized in that: Retrieve the point set library in step 2 Multi-scale grid It is expressed as: In the formula, λ1, λ2 and λ3 represent the scale coefficients with increasing sizes. is the grid scale determined by the scale factor λ1.
3. The nearest neighbor point retrieval method based on multi-scale grid division according to claim 2 is characterized in that: The i-th point P in step 3 i Multi-scale grid coding The determination rules are as follows: l j ={λ1,λ2,λ3} In the formula, int() means rounding down the data. and Respectively represent the grid scale , is the grid code formed by combining the row number and column number through the letter Z, λ j represents a set of multi-scale coefficients, x i and i P i The coordinates of the point; Updated access point set library The i-th point P in i It is expressed as: In the formula, Access Point Set The number of all points in .
4. The nearest neighbor point retrieval method based on multi-scale grid division according to claim 3 is characterized in that: The multi-scale grid encoding of the target point M in step 4 The calculation is as follows: l j ={λ1,λ2,λ3} In the formula, x M and M Respectively represent the coordinates of the target point M, and Respectively represent the grid scale , is the grid code formed by combining the row number and column number through the letter Z, λ j represents a set of multi-scale coefficients; Neighborhood raster code set The expression is: in, Indicates that the code is The tth neighborhood of the grid, the 8-neighborhood code is calculated as follows:
5. The nearest neighbor point retrieval method based on multi-scale grid division according to claim 4 is characterized in that: The set of all neighboring points of the target point M in step 5 It is expressed as:
6. The nearest neighbor point retrieval method based on multi-scale grid division according to claim 5 is characterized in that: The multi-scale nearest neighbor point set L in step 6 M It is expressed as: The nearest point to the target point M for: Among them, d(P k ,M) means finding point P k The spatial Euclidean distance from point M, x k and x M Respectively represent point P k and the spatial x coordinates of point M, y k and M Respectively represent point P k And the spatial Y coordinate of point M.
7. The nearest neighbor point retrieval method based on multi-scale grid division according to claim 6 is characterized in that: The multi-scale nearest neighbor point set J in step 7 M It is expressed as:
