CN114998513B - Grid remapping method of earth simulation system with circulating boundary based on KD tree - Google Patents

Grid remapping method of earth simulation system with circulating boundary based on KD tree Download PDF

Info

Publication number
CN114998513B
CN114998513B CN202210517802.4A CN202210517802A CN114998513B CN 114998513 B CN114998513 B CN 114998513B CN 202210517802 A CN202210517802 A CN 202210517802A CN 114998513 B CN114998513 B CN 114998513B
Authority
CN
China
Prior art keywords
point
target
source
search
dimension
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210517802.4A
Other languages
Chinese (zh)
Other versions
CN114998513A (en
Inventor
曹宇
陈妍
王辉赞
张小将
赵文静
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National University of Defense Technology
Original Assignee
National University of Defense Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by National University of Defense Technology filed Critical National University of Defense Technology
Priority to CN202210517802.4A priority Critical patent/CN114998513B/en
Publication of CN114998513A publication Critical patent/CN114998513A/en
Application granted granted Critical
Publication of CN114998513B publication Critical patent/CN114998513B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/005Tree description, e.g. octree, quadtree
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention belongs to the technical field of geographic information data processing and reconstruction, and discloses a grid remapping method of an earth simulation system with a circulating boundary based on a KD tree, which comprises the following steps: acquiring a grid of the earth simulation system, determining a source grid point, a target grid point and a circulation boundary, and placing all the source grid point and the target grid point in a specified circulation section of each circulation dimension; if the target grid points are concentrated near the loop boundary and the target grid points are far more than the source grid points, searching the source grid points corresponding to the target grid points based on a KD tree source point replication method; otherwise searching a source grid point corresponding to the target grid point based on a KD tree target point replication method; the grid information is remapped according to the target grid point and the corresponding source grid point. The method not only maintains the advantages of no requirement on the grid type and strong applicability of the KD tree, but also effectively solves the problem of cyclic boundaries in the grid remapping process of the earth simulation system, and has wide application prospect.

Description

Grid remapping method of earth simulation system with circulating boundary based on KD tree
Technical Field
The invention belongs to the technical field of geographic information data processing and reconstruction, and particularly relates to a grid remapping method of an earth simulation system with a circulating boundary based on a KD tree.
Background
Data searching in high-dimensional space is one of the most difficult problems in many applications. As a classical data structure, KD-trees are widely used for data searching in high-dimensional space, especially nearest neighbor and range searches. Typical application scenarios include ray tracing, mesh mapping, cluster analysis, and the like.
The KD-tree can be regarded as a special binary tree. The KD tree is different from the common binary tree in that the common binary tree is always divided by adopting fixed dimensionality, and the KD tree can be divided by adopting any dimensionality in each layer according to the requirement. The dimension of greatest variance or greatest dispersion is typically selected for partitioning in order to partition the search space as uniformly as possible. Intermediate points are typically chosen as dividing points to construct a balanced KD-tree, thereby reducing tree height and shortening search time. After the KD-tree construction is completed, the entire search space is actually organized in the form of a binary tree according to the partitioning order. As shown in FIG. 1, the KD tree utilizes hyperplane to divide space, and the premise of obtaining independent, unique and non-overlapping subspaces is that any dimension of the space is non-cyclic. However, many applications in reality require processing of cycle boundary conditions. For example, in a geodetic system, the longitude of the global grid is cyclic. Once there are loop boundaries in the search space, many pruning decisions in the original KD-tree based data search process will no longer hold.
Disclosure of Invention
According to the characteristics of the circulation boundary, new data structures and algorithms are designed, and it is important to solve the application problem of KD trees in a high-dimensional circulation space. In view of this, the present invention proposes a grid remapping method for an earth modeling system with a circular boundary based on KD-trees.
Specifically, the invention discloses a KD tree-based earth simulation system grid remapping method with a circulation boundary, which comprises the following steps:
step 1, placing all source grid points and target grid points in a specified circulation segment of each circulation dimension;
step 2, selecting different methods to search corresponding source grid points required by remapping the target grid points according to the distribution condition of the target grid points and the number of the target grid points and the source grid points;
step 201, if the target grid points are concentrated near the loop boundary and the target grid points are far more than the source grid points, searching the source grid points corresponding to the target grid points based on a KD tree source point replication method;
step 202, otherwise searching a source grid point corresponding to the target grid point based on a KD tree target point replication method;
step 3, remapping grid information according to the target grid points and the corresponding source grid points;
the source point replication method described in step 201 includes the steps of: for each pair of loop boundaries A and B, copying source grid points near loop boundary A to the outside of loop boundary B, and copying source grid points near loop boundary B to the outside of loop boundary A; constructing a KD tree for the original source grid points and the copied source grid points based on the geographic information data; searching a corresponding source grid point for the target grid point according to a classical KD tree searching algorithm; post-processing the result, namely mapping the searched source grid points back to the corresponding original source grid points;
the target point replication method described in step 202 includes the following steps: constructing a KD tree based on the geographic information data; obtaining target grid points, searching corresponding source grid points in the KD tree, and obtaining the current search result of the source grid points; selecting an unprocessed circulation dimension, copying a target grid point to an outer corresponding position of a circulation boundary at a side far from the target grid point, searching a corresponding source grid point search result again based on the copied target grid point, and comparing and selecting a current optimal source grid point search result from the obtained source grid point search results; the above operation is repeated for the remaining loop dimensions to obtain the final optimal source grid point.
Further, the range of replication in step 201 is determined by the distribution characteristics of the source grid point data, including:
if the maximum distance between any position in the search space and its nearest source grid point is L, then only source grid points within L need to be duplicated from the loop boundary;
if the maximum distance between any position of the search space within the range of the loop boundary L and its nearest source grid point is L, then only the source grid points within the range of the loop boundary L need to be duplicated;
if the distribution characteristics of the source grid point data are unknown or uncertain, the maximum replication area for each loop boundary will be half the search space.
Further, the target point replication method described in step 202, for a selected cyclic dimension, replicates and search cancels a target grid point in the selected cyclic dimension if the target grid point is more distant from its nearest cyclic boundary than the current search threshold before starting a new search.
Further, in the target point replication method described in step 202, in the new search, the optimal distance between the current target grid point and the source grid point is taken as the initial search distance.
Further, in the searching process in step 202, a nearest neighbor searching method is adopted, which specifically includes:
setting the initial nearest distance between the initial target grid point and the source grid point as T 0
After the first round of nearest neighbor search, the shortest distance between the target grid point and its nearest source grid point is T;
sequentially processing each cycle dimension; in processing the unprocessed cyclic dimension i, firstly comparing the distance S from the target grid point to the nearest cyclic boundary from the target grid point in the i-th dimension with the current shortest distance T, and if S is not less than T, meaning that the point near another cyclic boundary in the i-th dimension is not likely to be more recent than the current point, directly starting to process the next cyclic dimension; otherwise, further searching is carried out in the current circulation dimension;
copying the target grid points to the same relative positions outside the corresponding circulating boundary before starting a new search, wherein the current shortest distance T is used as an initial shortest distance value in the subsequent search so as to cut off more unnecessary branches in the new search;
assuming that the latest nearest distance is T, comparing between T and T, and selecting the smallest result as the latest search result;
after all the circulating dimensions are subjected to the operation, the final shortest distance and the corresponding source grid points are obtained as final results.
Further, in the searching process in step 202, a K-neighboring point searching method is adopted, which specifically includes:
setting an initial K-th close T of an initial target grid point and a source grid point 0
After the first round of nearest neighbor search, the final distance between the target grid point and the K-th source grid point closest to the target grid point is T;
sequentially processing each cycle dimension; in processing the unprocessed cyclic dimension i, firstly comparing the distance S from the target grid point to the nearest cyclic boundary from the target grid point in the i-th dimension with the distance T of the current nearest K-th source grid point, and if S is not smaller than T, meaning that a relevant point is unlikely to exist near another cyclic boundary in the i-th dimension, directly starting to process the next cyclic dimension; otherwise, further searching is carried out in the current circulation dimension;
copying the target grid point to the same relative position outside the corresponding circulating boundary before starting a new search, wherein the subsequent search uses the current K-th short distance T as an initial shortest distance value so as to cut off more unnecessary branches in the new search;
assuming that the new K-th close distance is T, comparing between T and T, and selecting the smallest result as the latest result;
after all the cyclic dimensions are subjected to the above operation, the obtained kth close distance and the corresponding source grid point are the final results.
Further, the searching process in step 202 adopts a range searching method, which specifically includes:
setting a search distance T;
sequentially processing each cycle dimension; when processing unprocessed cyclic dimension i, firstly comparing the distance S from the target grid point to the nearest cyclic boundary from the target grid point in the i-th dimension with the current searching distance T, and if S is not smaller than T, meaning that the correlation point is unlikely to exist near the other cyclic boundary in the i-th dimension, directly starting to process the next cyclic dimension; otherwise, further searching is carried out in the current circulation dimension;
copying the target grid points to the same relative positions outside the corresponding circulating boundary before starting a new search, and then performing a new range search;
after all the circulating dimensions are subjected to the operation, the corresponding source grid points are obtained as the final result.
The beneficial effects of the invention are as follows:
the invention can effectively solve the grid remapping problem of the earth simulation system with the circulation boundary, and can greatly reduce the search time by using the target point replication method.
Drawings
FIG. 1KD tree diagram;
FIG. 2 is a schematic diagram of the mirroring method of the present invention;
FIG. 3 is an overall flow chart of the present invention;
FIG. 4 is a flow chart of the source point copy mirroring method of the present invention;
FIG. 5 is a flow chart of the target point copy mirroring method of the present invention;
FIG. 6 shows the trend of search time of the source point copy mirror image method and the target point copy mirror image method according to the present invention with the number of source points;
fig. 7 shows a trend of search time of the source point copy mirroring method and the target point copy mirroring method according to the present invention with the number of target points.
Detailed Description
The invention is further described below with reference to the accompanying drawings, without limiting the invention in any way, and any alterations or substitutions based on the teachings of the invention are intended to fall within the scope of the invention.
In actual processing, a boundary is usually artificially defined in the circulation space, which is called a circulation boundary. Thus, the search space has two virtual finite boundaries in the dimension of the loop boundary. The invention provides a method for realizing data search of a KD tree in a high-dimensional cyclic space by using a mirror image method, which comprises the following steps:
step 1, placing all source grid points and target grid points in a specified circulation segment of each circulation dimension;
step 2, selecting different methods to search corresponding source grid points required by remapping the target grid points according to the distribution condition of the target grid points and the number of the target grid points and the source grid points;
step 201, if the target grid points are concentrated near the loop boundary and the target grid points are far more than the source grid points, searching the source grid points corresponding to the target grid points based on a KD tree source point replication method;
step 202, otherwise searching a source grid point corresponding to the target grid point based on a KD tree target point replication method;
step 3, remapping grid information according to the target grid points and the corresponding source grid points;
the source point replication method described in step 201 includes the steps of: for each pair of loop boundaries A and B, copying source grid points near loop boundary A to the outside of loop boundary B, and copying source grid points near loop boundary B to the outside of loop boundary A; constructing a KD tree for the original source grid points and the copied source grid points based on the geographic information data; searching a corresponding source grid point for the target grid point according to a classical KD tree searching algorithm; post-processing the result, namely mapping the searched source grid points back to the corresponding original source grid points;
the target point replication method described in step 202 includes the following steps: constructing a KD tree based on the geographic information data; obtaining target grid points, searching corresponding source grid points in the KD tree, and obtaining the current search result of the source grid points; selecting an unprocessed circulation dimension, copying a target grid point to an outer corresponding position of a circulation boundary at a side far from the target grid point, searching a corresponding source grid point search result again based on the copied target grid point, and comparing and selecting a current optimal source grid point search result from the obtained source grid point search results; the above operation is repeated for the remaining loop dimensions to obtain the final optimal source grid point.
The range of replication described in step 201 is determined by the distribution characteristics of the source grid point data, including:
if the maximum distance between any position in the search space and its nearest source grid point is L, then only source grid points within L need to be duplicated from the loop boundary;
if the maximum distance between any position of the search space within the range of the loop boundary L and its nearest source grid point is L, then only the source grid points within the range of the loop boundary L need to be duplicated;
if the distribution characteristics of the source grid point data are unknown or uncertain, the maximum replication area for each loop boundary will be half the search space.
The target point replication method described in step 202, for a selected cyclic dimension, replicates and search cancels a target grid point in the selected cyclic dimension if the target grid point is more distant from its nearest cyclic boundary than the current search threshold before a new search begins.
In the target point replication method described in step 202, in the new search, the optimal distance between the current target grid point and the source grid point is taken as the initial search distance.
The searching process in step 202 adopts a nearest neighbor searching method, which specifically includes:
setting the initial nearest distance between the initial target grid point and the source grid point as T 0
After the first round of nearest neighbor search, the shortest distance between the target grid point and its nearest source grid point is T;
sequentially processing each cycle dimension; in processing the unprocessed cyclic dimension i, firstly comparing the distance S from the target grid point to the nearest cyclic boundary from the target grid point in the i-th dimension with the current shortest distance T, and if S is not less than T, meaning that the point near another cyclic boundary in the i-th dimension is not likely to be more recent than the current point, directly starting to process the next cyclic dimension; otherwise, further searching is carried out in the current circulation dimension;
copying the target grid points to the same relative positions outside the corresponding circulating boundary before starting a new search, wherein the current shortest distance T is used as an initial shortest distance value in the subsequent search so as to cut off more unnecessary branches in the new search;
assuming that the latest nearest distance is T, comparing between T and T, and selecting the smallest result as the latest search result;
after all the circulating dimensions are subjected to the operation, the final shortest distance and the corresponding source grid points are obtained as final results.
The search process in step 202 adopts a K-neighbor searching method, which specifically includes:
setting an initial K-th close T of an initial target grid point and a source grid point 0
After the first round of nearest neighbor search, the final distance between the target grid point and the K-th source grid point closest to the target grid point is T;
sequentially processing each cycle dimension; in processing the unprocessed cyclic dimension i, firstly comparing the distance S from the target grid point to the nearest cyclic boundary from the target grid point in the i-th dimension with the distance T of the current nearest K-th source grid point, and if S is not smaller than T, meaning that a relevant point is unlikely to exist near another cyclic boundary in the i-th dimension, directly starting to process the next cyclic dimension; otherwise, further searching is carried out in the current circulation dimension;
copying the target grid point to the same relative position outside the corresponding circulating boundary before starting a new search, wherein the subsequent search uses the current K-th short distance T as an initial shortest distance value so as to cut off more unnecessary branches in the new search;
assuming that the new K-th close distance is T, comparing between T and T, and selecting the smallest result as the latest result;
after all the cyclic dimensions are subjected to the above operation, the obtained kth close distance and the corresponding source grid point are the final results.
The searching process in step 202 adopts a range searching method, which specifically includes:
setting a search distance T;
sequentially processing each cycle dimension; when processing unprocessed cyclic dimension i, firstly comparing the distance S from the target grid point to the nearest cyclic boundary from the target grid point in the i-th dimension with the current searching distance T, and if S is not smaller than T, meaning that the correlation point is unlikely to exist near the other cyclic boundary in the i-th dimension, directly starting to process the next cyclic dimension; otherwise, further searching is carried out in the current circulation dimension;
copying the target grid points to the same relative positions outside the corresponding circulating boundary before starting a new search, and then performing a new range search;
after all the circulating dimensions are subjected to the operation, the corresponding source grid points are obtained as the final result.
Examples
The mirroring method is divided into two schemes from the object selected by the mirror point, and in this embodiment, 2-dimensional space nearest point search with cyclic boundaries on the left and right sides is taken as an example: the first solution is to mirror the source points, i.e. copy the points near the loop boundary a to the outside of the loop boundary B, copy the points near the loop boundary B to the outside of the loop boundary a, and copy the maximum copy area of each copy to half the whole search space (as shown in fig. 2 (a)). If the distribution of source data has some further available features, such as the maximum distance between any location in the search space and its nearest source point, the number of data points that need to be replicated can be further controlled. The second approach is to select the target point as the mirror image. After undergoing a search process, the target point may be copied outside of a loop boundary (assumed to be a B boundary) farther from the target point, and a round of search may be performed again (as shown in fig. 2 (B)). The final result is selected from the two search results. If the search time is required to be further reduced, new data structures and algorithms can be set by utilizing the characteristics of the KD tree and the distribution characteristics of the source data and the target data, and pruning can be further carried out. For example, the second search may be cancelled if the target point is more distant from the B boundary than the first search result before the second search begins.
The following sections describe in detail the process of the present invention:
let the search space have K and C cycle boundaries. Without loss of generality, we set D1 to Dc as the cyclic dimension, where Di represents the ith dimension.
Fig. 4 shows the source point copy mirroring flow. For each loop dimension, source points near one loop boundary are copied outside of another corresponding loop boundary. The scope of replication may be determined by the distribution characteristics of the source data. For example, if the maximum distance between any location in the search space and its nearest source point is L, then only source points within L of the loop boundary need be replicated. In fact, the preconditions may be further weakened. The limited replication method is still effective as long as the source point density near the loop boundary reaches this condition. However, if the distribution characteristics of the source data are unknown or uncertain, the maximum repetition area of each loop boundary will be half of the original search space. It should be noted that each copy is based on the original source data. After replication of the relevant source points for each cycle dimension, a KD-tree can be constructed and the nearest points found according to classical algorithms (see non-patent paper Cao y, wang b, zhao w—j, et al, "Research on Searching Algorithms for Unstructured Grid Remapping Based on KD Tree,"3rd International Conference on Computer and Communication Engineering Technology.pp.29-33,2020 for more details on these classical algorithms). The final step is to map the searched source grid points back to the corresponding original source grid points.
Taking nearest neighbor point search as an example, the mirror image method flow based on target point replication is shown in fig. 5. Early work, including KD-tree construction and conventional nearest neighbor searching, was identical to the common KD-tree based nearest neighbor searching. Initial closest distance T 0 Typically set to a negative number or a sufficiently large value. After the first round of data search, the final shortest distance between the target point and its nearest source point is T. Subsequently, we should process each loop dimension in a special way. For simplicity, these cyclic dimensions may be processed sequentially. In processing the unprocessed cyclic dimension i, the distance S from the target point to the nearest cyclic boundary in the i-th dimension to the target point should initially be compared with the magnitude of the current shortest distance T. If S is not less than T, meaning that a point near another loop boundary in the ith dimension is not likely to be closer than the current point, processing of the next loop dimension can begin directly. Otherwise, it is needed toFurther searches are performed in the current loop dimension. Before starting a new search, we need to copy the target point to the same relative position outside the corresponding loop boundary. The subsequent search may use the current shortest distance T as the initial shortest distance value, which may help us cut off more unnecessary branches in the new search. Assuming that the new nearest distance is T, we should compare between T and select the smallest result as the latest result. After all the cyclic dimensions have undergone the above operations, the shortest distance and the corresponding source point obtained last will be the final result.
The method may become a range search for the loop space if the nearest distance is replaced with a specified distance. The method specifically comprises the following steps:
setting a search distance T;
sequentially processing each cycle dimension; when processing unprocessed cyclic dimension i, firstly comparing the distance S from the target grid point to the nearest cyclic boundary from the target grid point in the i-th dimension with the current searching distance T, and if S is not smaller than T, meaning that the correlation point is unlikely to exist near the other cyclic boundary in the i-th dimension, directly starting to process the next cyclic dimension; otherwise, further searching is carried out in the current circulation dimension;
copying the target grid points to the same relative positions outside the corresponding circulating boundary before starting a new search, and then performing a new range search;
after all the circulating dimensions are subjected to the operation, the corresponding source grid points are obtained as the final result.
The method may become a K-nearest neighbor search for the loop space if the nearest distance is replaced with the K-th nearest distance. The K adjacent point searching method specifically comprises the following steps:
setting an initial K-th close T of an initial target grid point and a source grid point 0
After the first round of nearest neighbor search, the final distance between the target grid point and the K-th source grid point closest to the target grid point is T;
sequentially processing each cycle dimension; in processing the unprocessed cyclic dimension i, firstly comparing the distance S from the target grid point to the nearest cyclic boundary from the target grid point in the i-th dimension with the distance T of the current nearest K-th source grid point, and if S is not smaller than T, meaning that a relevant point is unlikely to exist near another cyclic boundary in the i-th dimension, directly starting to process the next cyclic dimension; otherwise, further searching is carried out in the current circulation dimension;
copying the target grid point to the same relative position outside the corresponding circulating boundary before starting a new search, wherein the subsequent search uses the current K-th short distance T as an initial shortest distance value so as to cut off more unnecessary branches in the new search;
assuming that the new K-th close distance is T, comparing between T and T, and selecting the smallest result as the latest result;
after all the cyclic dimensions are subjected to the above operation, the obtained kth close distance and the corresponding source grid point are the final results.
The conventional KD tree construction method comprises the following steps: after the two-dimensional point set to be divided is prepared, the KD tree can be constructed. Firstly, judging whether a point set to be divided is an empty set, if so, ending the construction process, and if not, formally starting the construction process. The first step is to select the partitioning dimension K, and the common criterion is to prioritize the dimension with high variance. A sequential segmentation strategy may be employed for simplicity. The second step is to select the dividing points, and the common criterion is to select the point in the median on the current dividing dimension so that the number of elements on the left and right subtrees after dividing is equivalent, and the finally formed binary tree is a balanced binary tree, and the depth of each search is equivalent. The selection of the median typically requires ordering the points, where a fast ordering method is used. And thirdly, according to the selected division points, the rest points to be divided are put into a left subtree point set and a right subtree point set. The specific rule is that the point to be divided with the K dimension value smaller than or equal to the K dimension value of the dividing point is placed in the left subtree, and the other points are placed in the right subtree. The left and right subtree point sets recursively construct left and right subtrees, respectively, according to the methods described previously.
The conventional KD tree search algorithm is as follows: when the current point T of the KD-tree is empty, the search is ended. Otherwise, firstly judging the dimension K divided by T and calculating the distance between T and the target point M. If T is closer to M, the minimum distance D and the corresponding closest point need to be updated. After this, the subtree is entered to continue the search. If the value of the target point M in the partitioning dimension K is equal to or less than the value of the current point T in the dimension K, meaning that M is located in the left subtree space of T, the distance of the point in this space from M may be smaller than the distance of the point in the right subtree space from M, so the recursive search of the left subtree of T is prioritized. Otherwise, the right subtree of T is searched preferentially. When a leaf node is searched, the search process begins backtracking. And judging whether the distance between the target point and the current point in the K dimension is greater than the minimum distance D. If so, meaning that no more recent points are possible in another subtree space of the current point T, the trace back may continue. Otherwise, another sub-tree space of the current point T needs to be searched further. The KD tree-based range search process is similar to the nearest neighbor search process, and only the minimum distance D is replaced by a fixed range value, and the operations of updating D and the nearest point are replaced by recording the current point T. For more details reference is made to the non-patent paper Cao y, wang b, zhao w-j, et al, "Research on Searching Algorithms for Unstructured Grid Remapping Based on KD Tree,"3rd International Conference on Computer and Communication Engineering Technology.pp.29-33,2020.
Fig. 6 shows the times at which two mirroring methods search for data at different source points. The source point and the target point are both 4-dimensional data, and the target point (M) is 2 21 The number of the circulation boundaries is 4, and the number of the source points (N) is from 2 18 To 2 24 Change, 2-fold increase each time. As can be seen from the figure, the target point replication method is better than the source point replication method in the current configuration. The search time of the source point replication method increases at a rate almost equal to Mlog 2 N is proportional and the rate of increase of the search time of the target point replication method significantly decreases with increasing number of source points, which is due to the decreasing rate of target point replication with increasing number of source points.
Fig. 7 illustrates the times at which two mirroring methods search for data at different target points. The source point and the target point are 4-dimensional data, and the source point is 2 24 The number of the circulation boundaries is 4, and the number of the target points is 2 18 To 2 24 Change, 2-fold increase each time. It can be seen from the figure that the search time of both the source point replication method and the target point replication method increases linearly with the increase of the target point. In addition, the search time of the target point replication method is still smaller than that of the source point replication method.
The beneficial effects of the invention are as follows:
the method not only maintains the advantages of no requirement on the grid type and strong applicability of the KD tree, but also effectively solves the problem of cyclic boundaries in the grid remapping process of the earth simulation system.
The embodiment of the present invention is an implementation manner of the present invention, but the implementation manner of the present invention is not limited by the embodiment, and any other changes, modifications, substitutions, combinations, and simplifications made by the spirit and principle of the present invention should be equivalent substitution manner, and all the changes, substitutions, combinations, and simplifications are included in the protection scope of the present invention.

Claims (6)

1. The grid remapping method of the earth simulation system with the circulation boundary based on the KD tree is characterized by comprising the following steps:
step 1, placing all source grid points and target grid points in a specified circulation segment of each circulation dimension;
step 2, selecting different methods to search corresponding source grid points required by remapping the target grid points according to the distribution condition of the target grid points and the number of the target grid points and the source grid points;
step 201, if the target grid points are concentrated near the loop boundary and the target grid points are far more than the source grid points, searching the source grid points corresponding to the target grid points based on a KD tree source point replication method;
step 202, otherwise searching a source grid point corresponding to the target grid point based on a KD tree target point replication method;
step 3, remapping grid information according to the target grid points and the corresponding source grid points;
the source point replication method described in step 201 includes the steps of: for each pair of loop boundaries A and B, copying source grid points near loop boundary A to the outside of loop boundary B, and copying source grid points near loop boundary B to the outside of loop boundary A; constructing a KD tree for the original source grid points and the copied source grid points based on the geographic information data; searching a corresponding source grid point for the target grid point according to a classical KD tree searching algorithm; post-processing the result, namely mapping the searched source grid points back to the corresponding original source grid points; the range of the copying is determined by the distribution characteristics of the source grid point data, and the copying comprises the following steps:
if the maximum distance between any position in the search space and its nearest source grid point is L, then only source grid points within L need to be duplicated from the loop boundary;
if the maximum distance between any position of the search space within the range of the loop boundary L and its nearest source grid point is L, then only the source grid points within the range of the loop boundary L need to be duplicated;
if the distribution characteristics of the source grid point data are unknown or uncertain, the largest replication area of each loop boundary will be half the search space;
the target point replication method described in step 202 includes the following steps: constructing a KD tree based on the geographic information data; obtaining target grid points, searching corresponding source grid points in the KD tree, and obtaining the current search result of the source grid points; selecting an unprocessed circulation dimension, copying a target grid point to an outer corresponding position of a circulation boundary at a side far from the target grid point, searching a corresponding source grid point search result again based on the copied target grid point, and comparing and selecting a current optimal source grid point search result from the obtained source grid point search results; the above operation is repeated for the remaining loop dimensions to obtain the final optimal source grid point.
2. The KD-tree based earth modeling system grid remapping method of claim 1, wherein the target point replication method of step 202 replicates and search cancellation for a selected cyclic dimension if the target grid point is more distant from its nearest cyclic boundary than the current search threshold for that selected cyclic dimension before a new search begins.
3. The KD-tree based earth modeling system grid remapping method of claim 1, wherein the target point replication method of step 202 uses the optimal distance between the current target grid point and the source grid point as the initial search distance in the new search.
4. The KD-tree based earth modeling system grid remapping method with loop boundaries of claim 1, wherein the searching in step 202 employs a nearest neighbor searching method, comprising:
setting the initial nearest distance between the initial target grid point and the source grid point as T 0
After the first round of nearest neighbor search, the shortest distance between the target grid point and its nearest source grid point is T;
sequentially processing each cycle dimension; in processing the unprocessed cyclic dimension i, firstly comparing the distance S from the target grid point to the nearest cyclic boundary from the target grid point in the i-th dimension with the current shortest distance T, and if S is not less than T, meaning that the point near another cyclic boundary in the i-th dimension is not likely to be more recent than the current point, directly starting to process the next cyclic dimension; otherwise, further searching is carried out in the current circulation dimension;
copying the target grid points to the same relative positions outside the corresponding circulating boundary before starting a new search, wherein the current shortest distance T is used as an initial shortest distance value in the subsequent search so as to cut off more unnecessary branches in the new search;
assuming that the latest nearest distance is T, comparing between T and T, and selecting the smallest result as the latest search result;
after all the circulating dimensions are subjected to the operation, the final shortest distance and the corresponding source grid points are obtained as final results.
5. The KD-tree based earth modeling system grid remapping method with loop boundaries of claim 1, wherein the searching in step 202 employs a K-nearest neighbor search method, comprising:
setting an initial K-th close T of an initial target grid point and a source grid point 0
After the first round of nearest neighbor search, the final distance between the target grid point and the K-th source grid point closest to the target grid point is T;
sequentially processing each cycle dimension; in processing the unprocessed cyclic dimension i, firstly comparing the distance S from the target grid point to the nearest cyclic boundary from the target grid point in the i-th dimension with the distance T of the current nearest K-th source grid point, and if S is not smaller than T, meaning that a relevant point is unlikely to exist near another cyclic boundary in the i-th dimension, directly starting to process the next cyclic dimension; otherwise, further searching is carried out in the current circulation dimension;
copying the target grid point to the same relative position outside the corresponding circulating boundary before starting a new search, wherein the subsequent search uses the current K-th short distance T as an initial shortest distance value so as to cut off more unnecessary branches in the new search;
assuming that the new K-th close distance is T, comparing between T and T, and selecting the smallest result as the latest result;
after all the cyclic dimensions are subjected to the above operation, the obtained kth close distance and the corresponding source grid point are the final results.
6. The KD-tree based earth modeling system grid remapping method with loop boundaries of claim 1, wherein the searching in step 202 employs a range search method, comprising:
setting a search distance T;
sequentially processing each cycle dimension; when processing unprocessed cyclic dimension i, firstly comparing the distance S from the target grid point to the nearest cyclic boundary from the target grid point in the i-th dimension with the current searching distance T, and if S is not smaller than T, meaning that the correlation point is unlikely to exist near the other cyclic boundary in the i-th dimension, directly starting to process the next cyclic dimension; otherwise, further searching is carried out in the current circulation dimension;
copying the target grid points to the same relative positions outside the corresponding circulating boundary before starting a new search, and then performing a new range search;
after all the circulating dimensions are subjected to the operation, the corresponding source grid points are obtained as the final result.
CN202210517802.4A 2022-05-12 2022-05-12 Grid remapping method of earth simulation system with circulating boundary based on KD tree Active CN114998513B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210517802.4A CN114998513B (en) 2022-05-12 2022-05-12 Grid remapping method of earth simulation system with circulating boundary based on KD tree

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210517802.4A CN114998513B (en) 2022-05-12 2022-05-12 Grid remapping method of earth simulation system with circulating boundary based on KD tree

Publications (2)

Publication Number Publication Date
CN114998513A CN114998513A (en) 2022-09-02
CN114998513B true CN114998513B (en) 2024-01-30

Family

ID=83026743

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210517802.4A Active CN114998513B (en) 2022-05-12 2022-05-12 Grid remapping method of earth simulation system with circulating boundary based on KD tree

Country Status (1)

Country Link
CN (1) CN114998513B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109118588A (en) * 2018-09-25 2019-01-01 武汉大势智慧科技有限公司 A kind of colored LOD model automatic forming method decomposed based on block
CN111523159A (en) * 2020-04-16 2020-08-11 深圳云甲科技有限公司 Shaping method of grid model, terminal and storage medium
CN112181991A (en) * 2020-10-15 2021-01-05 中国人民解放军国防科技大学 Earth simulation system grid remapping method based on rapid construction of KD tree

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100418092C (en) * 2006-02-20 2008-09-10 南京联创科技股份有限公司 Grid and T-tree index method for rapid positioning in main memory database
US9041713B2 (en) * 2006-11-28 2015-05-26 International Business Machines Corporation Dynamic spatial index remapping for optimal aggregate performance
US7852336B2 (en) * 2006-11-28 2010-12-14 International Business Machines Corporation Dynamic determination of optimal spatial index mapping to processor thread resources

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109118588A (en) * 2018-09-25 2019-01-01 武汉大势智慧科技有限公司 A kind of colored LOD model automatic forming method decomposed based on block
CN111523159A (en) * 2020-04-16 2020-08-11 深圳云甲科技有限公司 Shaping method of grid model, terminal and storage medium
CN112181991A (en) * 2020-10-15 2021-01-05 中国人民解放军国防科技大学 Earth simulation system grid remapping method based on rapid construction of KD tree

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
general data search algorithms for earth simulation systems with cyclic boundaries;yu cao et al;《international journal of geo-information》;1-13 *
Research on Searching Algorithms for Unstructured Grid Remapping Based on KD Tree;Yu Cao 等;《2020 IEEE 3rd International Conference on Computer and Communication Engineering Technology (CCET)》;29-33 *
大规模地貌场景的实时纹理合成;朱涛;罗仕鉴;;计算机工程(10);264-266 *

Also Published As

Publication number Publication date
CN114998513A (en) 2022-09-02

Similar Documents

Publication Publication Date Title
CN111079899A (en) Neural network model compression method, system, device and medium
Hadian et al. Interpolation-friendly B-trees: Bridging the Gap Between Algorithmic and Learned Indexes.
CN110275929B (en) Candidate road section screening method based on grid segmentation and grid segmentation method
CN111460234A (en) Graph query method and device, electronic equipment and computer readable storage medium
CN116822422B (en) Analysis optimization method of digital logic circuit and related equipment
CN108875914B (en) Method and device for preprocessing and post-processing neural network data
CN114491200A (en) Method and device for matching heterogeneous interest points based on graph neural network
KR102305575B1 (en) Method and system for highlighting similar areas using similarity between images
KR101994871B1 (en) Apparatus for generating index to multi dimensional data
CN114998513B (en) Grid remapping method of earth simulation system with circulating boundary based on KD tree
CN114186518A (en) Integrated circuit yield estimation method and memory
Zhang et al. Reinforcement learning with actor-critic for knowledge graph reasoning
CN111291085B (en) Hierarchical interest matching method, hierarchical interest matching device, computer equipment and storage medium
CN108897820B (en) Parallelization method of DENCLUE algorithm
CN111309982A (en) Self-adaptive structure adjustment method and system of machine learning data index structure
CN108664548B (en) Network access behavior characteristic group dynamic mining method and system under degradation condition
Huang et al. A grid and density based fast spatial clustering algorithm
CN110807061A (en) Method for searching frequent subgraphs of uncertain graphs based on layering
CN117009539A (en) Entity alignment method, device, equipment and storage medium of knowledge graph
CN112434035B (en) Indexing method and system for concurrent Hash index data structure based on machine learning
CN109800241A (en) A kind of set operation method and terminal
KR102585925B1 (en) Apparatus for automatically collecting learning data and method therefor
CN117332543B (en) Distribution processing method for heterogeneous data sources of power grid
US20220172105A1 (en) Efficient and scalable computation of global feature importance explanations
CN110750661B (en) Method, device, computer equipment and storage medium for searching image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information

Inventor after: Cao Yu

Inventor after: Chen Yan

Inventor after: Wang Huizan

Inventor after: Zhang Xiaojiang

Inventor after: Zhao Wenjing

Inventor before: Cao Yu

Inventor before: Chen Yan

Inventor before: Wang Huizan

Inventor before: Zhang Xiaojiang

Inventor before: Zhao Wenjing

CB03 Change of inventor or designer information
GR01 Patent grant
GR01 Patent grant