A Visualization Method, Device, Equipment and Medium for Distance Range Join Query

By converting the spatial distance range connection query into the spatial topological relationship between pixel location and vector object, querying pixel by pixel and outputting visual results, the problems of low query efficiency and poor applicability of large-scale spatial data sets are solved, and efficient query and analysis are achieved.

CN120045594BActive Publication Date: 2025-07-04NAT UNIV OF DEFENSE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510531782.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-07-04
Estimated Expiration
2045-04-25

AI Technical Summary

Technical Problem

When the prior art handles distance-range connection query of large-scale spatial data sets, the query time is long and cannot meet the real-time requirements. The applicability of the existing methods is greatly affected by data set division and query strategies.

Method used

The spatial vector data set is divided into a reference data set and a target data set, and the pixel-by-pixel query is used to determine whether the target vector is within the current pixel range, and further determine whether the distance between the target vector and the reference vector is less than the preset threshold within the qualified pixel range, and output the distance range connection query results.

Benefits of technology

It significantly improves query efficiency, maintains the applicability of different data sets, and can directly output visual query results, supporting detailed analysis and operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045594B_ABST
    Figure CN120045594B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device, equipment and medium for visualizing distance range join queries. The method includes: dividing a spatial vector data set containing multiple types of vector data into a reference data set and a target data set, and performing visualization processing on all vector data in a display screen; traversing each pixel in the display screen, querying whether a target vector in the target data set is within the spatial range represented by the current pixel, and screening the pixels containing the target vector as qualified pixels; within the spatial range of the qualified pixels, querying whether the distance between the target vector and a reference vector in the reference data set is less than a preset distance threshold, and performing style matching between the display value of the qualified pixels and the distance range join query result that meets the distance threshold constraint condition, and outputting a visualized distance range join query result. This method significantly improves the efficiency of distance range join queries by querying pixel by pixel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of spatial data analysis, and particularly to a method, device, equipment and medium for visualizing distance range join queries. Background Art

[0002] Distance Range Join Query (DRJQ) is a basic and important operation in spatial database queries. Its task is to find, for each point in set P, all points in set Q that are within the circular region centered at that point with a radius of R.

[0003] DRJQ usually involves the input and query of large-scale data sets. Common methods for processing these big data include parallel computing, distributed computing, and machine learning. However, although these methods can improve query efficiency to a certain extent, when dealing with a data set of hundreds of millions of records, the query time may still reach about 100 seconds, which cannot meet the real-time requirements. Moreover, most existing methods rely on the distribution and partitioning of the data set, which leads to the need to re-plan the query strategy when dealing with different data sets, thus affecting their applicability. Summary of the Invention

[0004] Based on this, it is necessary to provide a method, device, equipment and medium for visualizing distance range join queries for the above technical problems.

[0005] A method for visualizing distance range join queries, the method comprising:

[0006] Step 1, dividing a spatial vector data set containing multiple types of vector data into a reference data set and a target data set, and performing visualization processing on all vector data on a display screen;

[0007] Step 2, traversing each pixel on the display screen, querying whether the target vector in the target data set is within the spatial range represented by the current pixel, and filtering out the pixels whose spatial range represented by the current pixel contains the target vector as qualified pixels;

[0008] Step 3, within the spatial range of the qualified pixels, querying whether the distance between the target vector and the reference vector in the reference data set is less than a preset distance threshold, outputting the target vector and the reference vector that meet the distance threshold constraint condition as the distance range join query result, and matching the display value of the qualified pixels with the distance range join query result to output the visualized distance range join query result.

[0009] In one embodiment, the vector data includes point vectors, line segment vectors, and polygon vectors, and all vector data is stored based on an R-tree index;

[0010] Among them, the R-tree index of the point vector includes the point coordinates and the ID corresponding to the point;

[0011] The R-tree index of the line segment vector includes the starting point of the line segment and the ID corresponding to the line segment;

[0012] The R-tree index of the polygon vector includes the line segment index representing each side of the polygon vector and the border index representing the minimum bounding rectangle of the polygon vector; among them, the line segment index includes the starting point of the line segment, the inscribed polygon IP, and the ID corresponding to the line segment, and the border index includes the lower left corner coordinates and the upper right corner coordinates of the border.

[0013] In one embodiment, the method further includes:

[0014] For the distance range join query of the point vector, set the distance threshold The framed query area is a circular area centered on the point vector with a radius of ;

[0015] For the distance range join query of the line segment vector, set the distance threshold The framed query area is the union of all circular areas centered on each point on the line segment vector with a radius of ;

[0016] For the distance range join query of the polygon vector, set the distance threshold The framed query area is the union of all circular areas centered on each point on the border of the polygon vector with a radius of and the spatial range inside the border of the polygon vector.

[0017] In one embodiment, when the vector data in the reference data set and the target data set is a point vector or a line segment vector, step 2 of the method further includes:

[0018] Define that the spatial range represented by the current pixel is a circular area centered on the pixel center with a pixel radius of , and use the inscribed rectangle and the circumscribed rectangle of this circular area as the internal box and the external box respectively; among them, the side length of the internal box is , the side length of the external box is , represents the resolution of the Z-th level of the display screen;

[0019] Perform the initial query of the target vector in the internal box. If the target vector is initially queried, determine that the target vector in the internal box is completely located within the spatial range represented by the current pixel, and regard the current pixel as a qualified pixel;

[0020] Otherwise, perform a secondary query for the target vector in the outer box. If the target vector is found in the secondary query, further determine the distance between the target vector in the outer box and the pixel center Whether it is less than , if it is less than, determine that at least one target vector is within the space range represented by the current pixel, and regard the current pixel as a qualified pixel; otherwise, regard the current pixel as an unqualified pixel; where is the spatial Euclidean distance.

[0021] In one embodiment, when the vector data in the reference data set and the target data set are point vectors or line segment vectors, step 3 of the method further includes:

[0022] Use the target vector in the qualified pixel as the query center, and construct a circular area with the query center as the center and a radius of the distance threshold , and use the inscribed rectangle and the circumscribed rectangle of the circular area as the inner query box and the outer query box respectively; where the side length of the inner query box is , and the side length of the outer query box is ;

[0023] Perform a primary query for the reference vector in the inner query box. If the reference vector is found in the primary query, determine the distance between the reference vector in the inner query box and the query center is less than the distance threshold , and directly output the reference vector in the inner query box and the target vector used as the query center as the distance range connection query result;

[0024] Otherwise, perform a secondary query for the reference vector in the outer query box. If the reference vector is found in the secondary query, further determine the distance between the reference vector in the outer query box and the target vector used as the query center Whether it is less than the distance threshold , if it is less than, output at least one reference vector and the target vector used as the query center as the distance range connection query result; otherwise, output that the distance range connection query result is none.

[0025] In one embodiment, when the vector data in the reference data set and / or the target data set are polygon vector data, steps 2 and 3 of the method further include:

[0026] When the reference vector is a point vector or a line segment vector and the target vector is a polygon vector, first evaluate the spatial relationship between the current pixel and any one of the target vectors. If the distance between the boundary feature of any one of the target vectors and the pixel center is less than the pixel radius, or the pixel center is located inside any one of the target vectors, it is determined that at least one target vector is located within the space range represented by the current pixel, and the current pixel is used as a qualified pixel. Then, determine whether the qualified pixel intersects with any one of the reference vectors under the distance threshold, and output the reference vector that meets the intersection condition and the target vector in the qualified pixel as the distance range connection query result.

[0027] When the reference vector is a polygon vector and the target vector is a point vector or a line segment vector, first query whether the target vector is located within the space range represented by the current pixel. If the distance between any one of the target vectors and the pixel center is less than , it is determined that at least one target vector is located within the space range represented by the current pixel, and the current pixel is used as a qualified pixel. Then, determine whether the pixel center of the qualified pixel is located inside any one of the reference vectors or intersects with any one of the reference vectors under the distance threshold, and output the reference vector containing the pixel center or the reference vector that meets the intersection condition and the target vector in the qualified pixel as the distance range connection query result. Among them, is the pixel radius, represents the resolution of the Z-th level of the display screen.

[0028] When both the reference vector and the target vector are polygon vectors, only output the reference vector and the target vector that meet the following two constraint conditions as the distance range connection query result, including:

[0029] Constraint condition 1: The pixel center is located inside any one of the target vectors or the boundary of any one of the target vectors is within the space range represented by the current pixel.

[0030] Constraint condition 2: The pixel center is located inside any one of the reference vectors or intersects with any one of the reference vectors under the distance threshold.

[0031] In one embodiment, determining whether the pixel center is located inside the polygon vector includes:

[0032] Locate the candidate polygon vectors that may contain the pixel center according to the border index of the polygon vector;

[0033] Draw a query line segment parallel to the x-axis from the boundary of the minimum bounding rectangle of the polygon vector to the pixel center position, and use the line segment index of the polygon vector to count the number of intersections of this query line segment and the boundary of the polygon vector. If the number of intersections is odd, it is determined that the pixel center is inside the polygon vector; if the number of intersections is even, it is determined that the pixel center is outside the polygon vector.

[0034] A distance range connection query visualization device, the device comprising:

[0035] A data preprocessing module, configured to divide a spatial vector data set containing multi-type vector data into a reference data set and a target data set, and perform visualization processing on all vector data on a display screen;

[0036] A pixel and target vector space query module, configured to traverse each pixel on the display screen, query whether a target vector in the target data set is within the spatial range represented by the current pixel, and filter out pixels whose spatial range represented by the current pixel contains the target vector as qualified pixels;

[0037] A target vector and reference vector space query module, configured to query whether the distance between a target vector and a reference vector in the reference data set is less than a preset distance threshold within the spatial range of the qualified pixels, output the target vector and the reference vector that meet the distance threshold constraint condition as the distance range connection query result, and perform style matching between the display value of the qualified pixels and the distance range connection query result, and output the visualized distance range connection query result.

[0038] A computer device, comprising a memory and a processor, the memory storing a computer program, and when the processor executes the computer program, the following steps are implemented:

[0039] Step 1, divide a spatial vector data set containing multi-type vector data into a reference data set and a target data set, and perform visualization processing on all vector data on a display screen;

[0040] Step 2, traverse each pixel on the display screen, query whether a target vector in the target data set is within the spatial range represented by the current pixel, and filter out pixels whose spatial range represented by the current pixel contains the target vector as qualified pixels;

[0041] Step 3, query whether the distance between a target vector and a reference vector in the reference data set is less than a preset distance threshold within the spatial range of the qualified pixels, output the target vector and the reference vector that meet the distance threshold constraint condition as the distance range connection query result, and perform style matching between the display value of the qualified pixels and the distance range connection query result, and output the visualized distance range connection query result.

[0042] A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0043] Step 1, divide a spatial vector data set containing multi-type vector data into a reference data set and a target data set, and perform visualization processing on all vector data on a display screen;

[0044] Step 2: Traverse each pixel in the display screen, query whether the target vector in the target dataset is within the spatial range represented by the current pixel, and filter out the pixels whose spatial range represented by the current pixel contains the target vector as qualified pixels;

[0045] Step 3: Within the spatial range of the qualified pixels, query whether the distance between the target vector and the reference vector in the reference dataset is less than a preset distance threshold, output the target vector and the reference vector that meet the distance threshold constraint condition as the distance range join query result, and match the display value of the qualified pixel with the distance range join query result in terms of style, and output the visualized distance range join query result.

[0046] The above-mentioned method, device, equipment and medium for visualizing distance range join query transform the problem of distance range join query in space into the problem of evaluating the spatial topological relationship between the pixel position and the vector object. First, judge and filter out the qualified pixels in the display screen that contain the target vector by traversing, and then, within the qualified pixels, only query the distances between a small number of target vectors and reference vectors to output the distance range join query result, realizing the efficient query of vector data. Moreover, since the number of pixels in the display screen is limited and stable, the same computational complexity can be maintained when processing different types and scales of spatial data queries, significantly improving the computational query efficiency and ensuring the applicability in different datasets. In addition, by querying pixel by pixel and matching the display value of the qualified pixel with the distance range join query result in terms of style, the visualized query result can be directly output, which is beneficial to providing guidance for the subsequent detailed analysis and targeted operations of the data. Description of the Drawings

[0047] Figure 1 It is a schematic flowchart of the method for visualizing distance range join query in an embodiment;

[0048] Figure 2 It is a schematic diagram of the overall architecture of the method for visualizing distance range join query in an embodiment;

[0049] Figure 3 It is a schematic diagram of different types of target vectors intersecting with pixel P in an embodiment; among them, Figure 3 (a) shows that the point vector intersects with pixel P; Figure 3 (b) shows that the line segment vector intersects with pixel P; Figure 3 (c) shows that the polygon vector intersects with pixel P;

[0050] Figure 4 It is a schematic diagram of different types of target vectors not intersecting with pixel P in an embodiment; among them, Figure 4 (a) shows that the point vector does not intersect with pixel P; Figure 4 (b) shows that the line segment vector does not intersect with pixel P;Figure 4 (c) The polygon vector does not intersect with pixel P;

[0051] Figure 5 Set distance thresholds for different types of vectors in an embodiment Schematic diagram of the framed query area; wherein, Figure 5 Set distance threshold for point vector Framed query area; Figure 5 (b) Set distance threshold for line segment vector Framed query area; Figure 5 (c) Set distance threshold for polygon vector Framed query area;

[0052] Figure 6 Schematic diagram of the query box set for point vector or line segment vector in an embodiment; wherein, Figure 6 (a) Inner box and outer box; Figure 6 (b) Inner query box and outer query box;

[0053] Figure 7 Schematic diagram of the influence of the value of the number n of query centers in qualified pixels on the query result in an embodiment; wherein, Figure 7 (a) n = 1, Figure 7 (b) n = 3, Figure 7 (c) n = ground truth;

[0054] Figure 8 Schematic diagram of the query performance comparison of different methods in an embodiment; wherein, Figure 8 (a) Query D2 using reference dataset D1; Figure 8 (b) Query D4 using reference dataset D3; Figure 8 (c) Query D6 using reference dataset D5;

[0055] Figure 9 Schematic diagram of the internal structure of a computer device in an embodiment. Detailed implementation manners

[0056] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0057] First, define Theorem 1 as: Let the reference dataset and the target dataset be two point sets in the spatial vector dataset and Let be the distance threshold, then the result of the distance range join query is a set , which contains each reference vector in , all target vectors from such that these points lie within a circular range centered at with radius :

[0058] ;

[0059] wherein, represents the i -th reference vector and , is the number of reference vectors; represents the j -th target vector, and , is the number of target vectors.

[0060] In one embodiment, as shown in Figure 1 and Figure 2 , a method for visualizing distance range join queries is provided, including the following steps:

[0061] Step 1, divide the spatial vector data set containing multi-type vector data into a reference data set and a target data set, and perform visualization processing on all vector data on the display screen.

[0062] Step 2, traverse each pixel on the display screen, query whether the target vector in the target data set is within the spatial range represented by the current pixel, and filter the pixels whose spatial range represented by the current pixel contains the target vector as qualified pixels.

[0063] Step 3, within the spatial range of the qualified pixels, query whether the distance between the target vector and the reference vector in the reference data set is less than the preset distance threshold, output the target vector and the reference vector that meet the distance threshold constraint condition as the result of the distance range join query, and perform style matching between the display value of the qualified pixels and the result of the distance range join query, and output the visualized result of the distance range join query.

[0064] Among them, the style matching is as shown in Figure 2 , assign a value to each pixel. If it is an unqualified pixel, directly assign a null value; if it is a qualified pixel, judge the corresponding assignment according to the result of the distance range join query. If the result of the distance range join query is none, the assignment of the qualified pixel is null; otherwise, the assignment of the qualified pixel is not null.

[0065] This method transforms the problem of spatial distance range join query into the problem of evaluating the spatial topological relationship between pixel positions and vector objects. Since the number of pixels in the display screen is limited and stable, it can maintain a consistent computational complexity when processing different types and scales of spatial data queries, significantly improving the computational query efficiency and ensuring applicability in different datasets. In addition, by querying pixel by pixel and matching the display values of qualified pixels with the results of the distance range join query, a visual query result can be directly output, which is beneficial for guiding the detailed analysis and targeted operations of subsequent data.

[0066] In one embodiment, the vector data includes point vectors, line segment vectors, and polygon vectors. To efficiently organize and manage spatial vector data and improve query efficiency, all vector data is stored based on the R-tree index, as shown in Table 1.

[0067] Table 1 R-tree Index of Multi-Type Vector Data

[0068]

[0069] The R-tree index RtreeP of the point vector in Table 1 includes the point coordinates (x, y) and the ID corresponding to the point; the R-tree index RtreeL of the line segment vector includes the starting point of the line segment and the ID corresponding to the line segment; the R-tree index of the polygon vector includes the line segment index RtreeE representing each side of the polygon vector and the border index RtreeMBR representing the minimum bounding rectangle of the polygon vector; among them, the line segment index RtreeE includes the starting point of the line segment, the inscribed polygon IP, and the ID corresponding to the line segment, and the border index RtreeMBR includes the lower left corner coordinates ( , ) and the upper right corner coordinates ( ). Further, to support spatial judgment, for the R-tree index of the polygon vector, the following operations are also performed: 1) Determine whether the node information is parallel to the x-axis; 2) For edges with monotonically increasing or decreasing values, use the line segment cutting technique for processing.

[0070] In one embodiment, to handle the problem of spatial topological relationship, the INTERSECT (set intersection) operation of the R-tree is adopted. Specifically, as Figure 3 and Figure 4As shown, it is necessary to determine whether different types of target vectors A or B are within the range of radius R of pixel P. For point vectors, the condition is that the point is within the pixel range; for line vectors, it is required that the line feature is completely or partially within the pixel range; for polygon vectors, it is required that the polygon is completely within the pixel range or its spatial range overlaps with the spatial range of the pixel. This problem can be solved by checking the intersection of a circle centered at pixel P with a radius of R and any target vector object. However, since the R-tree groups adjacent objects using minimum bounding rectangles at a high level and cannot directly support queries for circular regions, the definition in Theorem 1 is further extended to handle distance range join queries. Further, the method proposed in this application also includes:

[0071] As Figure 5 shown in (a), for the distance range join query of point vectors, a distance threshold is set to frame the query region as a circular region centered at the point vector with a radius of .

[0072] As Figure 5 shown in (b), for the distance range join query of line segment vectors, a distance threshold is set to frame the query region as the union of all circular regions centered at each point on the line segment vector with a radius of ;

[0073] As Figure 5 shown in (c), for the distance range join query of polygon vectors, a distance threshold is set to frame the query region as the union of all circular regions centered at each point on the polygon vector border with a radius of and the spatial range inside the polygon vector border.

[0074] In one embodiment, to further improve the query efficiency of different types of vector data, when the vector data in the reference dataset and the target dataset are point vectors or line segment vectors, step 2 of the method proposed in this application further includes:

[0075] Define the spatial range represented by the current pixel as a circular region centered at the pixel center with a pixel radius of , and use the inscribed rectangle and the circumscribed rectangle of this circular region as the InsideBox and OutsideBox respectively, as shown in Figure 6 (a); where the side length of the InsideBox is , the side length of the OutsideBox is , represents the resolution of the Z-th level of the display screen;

[0076] Perform the initial query of the target vector in the internal box. If the target vector is initially queried, determine that the target vector in the internal box is completely within the spatial range represented by the current pixel, and regard the current pixel as a qualified pixel;

[0077] Otherwise, perform the secondary query of the target vector in the external box. If the target vector is secondarily queried, further determine the distance between the target vector in the external box and the pixel center Whether it is less than , if it is less than, determine that at least one target vector is within the spatial range represented by the current pixel, and regard the current pixel as a qualified pixel; otherwise, regard the current pixel as an unqualified pixel; where is the spatial Euclidean distance.

[0078] In one embodiment, when the vector data in the reference data set and the target data set are point vectors or line segment vectors, step 3 of the method proposed in this application further includes:

[0079] Use the target vector in the qualified pixel as the query center, and construct a circular area with the query center as the center and a radius of the distance threshold , and use the inscribed rectangle and the circumscribed rectangle of the circular area as the internal query box (IQueryBox) and the external query box (OQueryBox) respectively, as shown in Figure 6 (b); where the side length of the internal query box is , and the side length of the external query box is ;

[0080] Perform the initial query of the reference vector in the internal query box. If the reference vector is initially queried, determine that the distance between the reference vector in the internal query box and the query center is less than the distance threshold , and directly output the reference vector in the internal query box and the target vector used as the query center as the query result of the distance range connection;

[0081] Otherwise, perform the secondary query of the reference vector in the external query box. If the reference vector is secondarily queried, further determine the distance between the reference vector in the external query box and the target vector used as the query center Whether it is less than the distance threshold , if it is less than, output at least one reference vector and the target vector used as the query center as the query result of the distance range connection; otherwise, output that the query result of the distance range connection is none.

[0082] Specifically, the value of the number n of query centers in the qualified pixel is determined according to the actual application requirements, Figure 7 shows the influence of setting n to 1, 3, and the ground truth on the query result, Figure 7 The vectors in are point vectors.Figure 7 The blue dots represent the target vectors that have not been queried, the black dots represent the reference vectors, and the red dots represent the target vectors that serve as the query centers. During the distance range connection query process, for data-intensive query scenarios, only a small number of target vectors serving as query centers need to be queried to obtain the pixel display result, significantly improving the query efficiency.

[0083] In one embodiment, when the distance range connection query involves polygon vectors, two issues need to be considered: First, how to determine whether a pixel is inside a polygon vector; Second, how to determine whether the polygon vector belongs to the reference data set, the target data set, or both. To solve this problem, steps 2 and 3 of the method proposed in this application also include:

[0084] When the reference vector is a point vector or a line segment vector and the target vector is a polygon vector, first evaluate the spatial relationship between the current pixel and any one of the target vectors. If the distance between the boundary feature of any one of the target vectors and the pixel center is less than the pixel radius, or the pixel center is inside any one of the target vectors, it is determined that at least one target vector is within the spatial range represented by the current pixel, and the current pixel is regarded as a qualified pixel; Then, determine whether the qualified pixel intersects with any one of the reference vectors under the distance threshold, and output the reference vectors that meet the intersection condition and the target vectors in the qualified pixels as the distance range connection query result;

[0085] When the reference vector is a polygon vector and the target vector is a point vector or a line segment vector, first query whether the target vector is within the spatial range represented by the current pixel. If the distance between any one of the target vectors and the pixel center is less than , it is determined that at least one target vector is within the spatial range represented by the current pixel, and the current pixel is regarded as a qualified pixel; Then, determine whether the pixel center of the qualified pixel is inside any one of the reference vectors or intersects with any one of the reference vectors under the distance threshold, and output the reference vectors containing the pixel center or the reference vectors that meet the intersection condition and the target vectors in the qualified pixels as the distance range connection query result; where, is the pixel radius, represents the resolution of the Z-th level of the display screen;

[0086] When both the reference vector and the target vector are polygon vectors, only the reference vectors and target vectors that meet the following two constraint conditions are output as the distance range connection query result, including:

[0087] Constraint condition 1: The pixel center is inside any one of the target vectors or the boundary of any one of the target vectors is within the spatial range represented by the current pixel;

[0088] Constraint 2: The pixel center is located inside any reference vector or intersects with any reference vector within a distance threshold.

[0089] Specifically, the method for determining whether the pixel center is located inside the polygon vector is as follows: First, locate the candidate polygon vectors that may contain the pixel center according to the bounding box index RtreeMBR of the polygon vector; then, use the ray casting algorithm to determine whether the pixel center is inside the candidate polygon vector. Specifically, draw a query line segment (QuerySegment) parallel to the x-axis from the boundary of the minimum bounding rectangle of the polygon vector to the pixel center position, and use the line segment index RtreeE of the polygon vector to count the number of intersection points of this query line segment and the boundary of the polygon vector; if the number of intersection points is odd, it is determined that the pixel center is inside the polygon vector; if the number of intersection points is even, it is determined that the pixel center is outside the polygon vector. This judgment method also applies to polygon vectors with internal loops. To improve the query efficiency, it is necessary to minimize the length of the query line segment as much as possible to accelerate the query process. Specific strategies include: 1) Give priority to polygon vectors with smaller x spans for spatial inspection; 2) Use the vertical line segment from the pixel to the nearest edge of the minimum bounding rectangle of the polygon vector as the query line segment to reduce the amount of calculation.

[0090] Through the above steps, it is possible to effectively process spatial queries involving polygon vectors, ensure accurate judgment of the spatial topological relationship between pixels and polygon vectors, and thus support more accurate distance range join queries.

[0091] Furthermore, to evaluate the performance of the method proposed in this application, the method proposed in this application was tested in an independent environment and compared with current leading spatial databases and GIS (Geographic Information System) software, including QGIS, ArcGIS, and PostgreSQL; in addition, the performance of the method proposed in this application in processing large datasets of distance range join queries (distributed raster join queries) in a cluster environment will also be evaluated, where spatial indexes will be built for all experimental datasets. The experimental datasets are shown in Table 2.

[0092] In the experiment, the method proposed in this application is also called PixelQuery (pixel query), and the visualization window resolution of PixelQuery is set to the current standard 1920×1080, and the visual level is 3. The reference datasets used in the experiment , and , as well as the target datasets , and , and the comparison results of the query performance of different methods are as Figure 8 shown, Figure 8Shows the query performance advantage of the PixelQuery algorithm as the dataset size and spatial range expand. The experiment conducted distance range join query tasks on datasets of the same type but different sizes, and set different spatial join query radii.

[0093] Table 2 Experimental Datasets

[0094]

[0095] It can be seen from Figure 8 that under the same data scale, ArcGIS is superior to QGIS and PostgreSQL in query performance. As the dataset size increases and the data distribution range expands, its query time increases significantly. However, when processing large-scale geographic vector data queries, as the query radius increases, the time consumption of ArcGIS decreases. This is because its query method involves constructing a bounding box through index objects. The increase in the query radius (RB) leads to an increase in the coverage area of the bounding box and an increase in the number of features contained, thus reducing the overall number of queries. Among the four methods, QGI is less sensitive to the increase in the query radius and is more affected by the data size; PostgreSQL performs better when the data volume is small, but its performance is significantly affected by the data size and the query radius. At the scale of tens of millions of data, the calculation times of QGIS and PostgreSQL are much higher than those of ArcGIS and PixelQuery. This is because their query methods rely on spatial indexes to perform nearest neighbor queries between source vector features and adjacent vector features. As the data scale grows significantly, the number of queries increases rapidly.

[0096] In one embodiment, a distance range join query visualization device is provided, including:

[0097] A data preprocessing module for dividing a spatial vector dataset containing multi-type vector data into a reference dataset and a target dataset, and performing visualization processing on all vector data on a display screen;

[0098] A pixel and target vector space query module for traversing each pixel on the display screen, querying whether the target vector in the target dataset is within the spatial range represented by the current pixel, and filtering the pixels whose spatial range represented by the current pixel contains the target vector as qualified pixels;

[0099] A target vector and reference vector space query module is used to query whether the distance between the target vector and the reference vector in the reference dataset is less than a preset distance threshold within the spatial range of qualified pixels, output the target vector and the reference vector that meet the distance threshold constraint condition as the query result of distance range connection, and perform style matching on the display value of the qualified pixels and the query result of distance range connection, and output the visualized query result of distance range connection.

[0100] For the specific limitations of the distance range connection query visualization device, reference can be made to the limitations on the distance range connection query visualization method in the above text, which will not be elaborated here. Each module in the above distance range connection query visualization device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.

[0101] In one embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 9 shown. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it realizes a distance range connection query visualization method. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, a trackball, or a touchpad set on the shell of the computer device, or an external keyboard, touchpad, or mouse, etc.

[0102] Those skilled in the art can understand that Figure 9 the structure shown in

[0103] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0104] Step 1: Divide the spatial vector dataset containing multi-type vector data into a reference dataset and a target dataset, and perform visualization processing on all vector data on the display screen;

[0105] Step 2: Traverse each pixel on the display screen, query whether the target vector in the target dataset is within the spatial range represented by the current pixel, and filter out the pixels whose spatial range represented by the current pixel contains the target vector as qualified pixels;

[0106] Step 3: Within the spatial range of the qualified pixels, query whether the distance between the target vector and the reference vector in the reference dataset is less than a preset distance threshold, output the target vector and the reference vector that meet the distance threshold constraint condition as the distance range join query result, and perform style matching on the display value of the qualified pixels and the distance range join query result, and output the visualized distance range join query result.

[0107] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0108] Step 1: Divide the spatial vector dataset containing multi-type vector data into a reference dataset and a target dataset, and perform visualization processing on all vector data on the display screen;

[0109] Step 2: Traverse each pixel on the display screen, query whether the target vector in the target dataset is within the spatial range represented by the current pixel, and filter out the pixels whose spatial range represented by the current pixel contains the target vector as qualified pixels;

[0110] Step 3: Within the spatial range of the qualified pixels, query whether the distance between the target vector and the reference vector in the reference dataset is less than a preset distance threshold, output the target vector and the reference vector that meet the distance threshold constraint condition as the distance range join query result, and perform style matching on the display value of the qualified pixels and the distance range join query result, and output the visualized distance range join query result.

[0111] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0112] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0113] The above-described embodiments only represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A visualization method for distance range join query, characterized in that, The method includes: Step 1, dividing a spatial vector data set containing multiple types of vector data into a reference data set and a target data set, and performing visualization processing on all vector data on a display screen; Step 2, traversing each pixel on the display screen, querying whether a target vector in the target data set is located within the spatial range represented by the current pixel, and screening pixels whose spatial range represented by the current pixel contains the target vector as qualified pixels; Step 3, within the spatial range of the qualified pixels, querying whether the distance between the target vector and a reference vector in the reference data set is less than a preset distance threshold, outputting the target vector and the reference vector that meet the distance threshold constraint condition as the distance range join query result, and performing style matching between the display value of the qualified pixels and the distance range join query result, and outputting the visualized distance range join query result.

2. The method according to claim 1, wherein The vector data includes point vectors, line segment vectors, and polygon vectors, and all vector data is stored based on an R-tree index; Among them, the R-tree index of the point vector includes the point coordinates and the ID corresponding to the point; The R-tree index of the line segment vector includes the starting point of the line segment and the ID corresponding to the line segment; The R-tree index of the polygon vector includes the line segment index representing each side of the polygon vector and the border index representing the minimum bounding rectangle of the polygon vector; among them, the line segment index includes the starting point of the line segment, the inscribed polygon IP, and the ID corresponding to the line segment, and the border index includes the lower left coordinate and the upper right coordinate of the border.

3. The method according to claim 2, wherein The method further includes: For the distance range join query of point vectors, set the distance threshold The framed query area is a circular area centered on the point vector with a radius of ; For the distance range connection query of line segment vectors, set the distance threshold The framed query area is the union of all circular areas centered at each point on the line segment vector with a radius of ; For the distance range join query of polygon vectors, set the distance threshold The framed query area is the union of all circular areas centered at each point on the polygon vector border with a radius of and the spatial range inside the polygon vector border.

4. The method according to claim 3, characterized in that, When the vector data in the reference data set and the target data set are point vectors or line segment vectors, step 2 of the method further includes: Define the spatial range represented by the current pixel as a circular area centered on the pixel center with the pixel radius as and use the inscribed rectangle and the circumscribed rectangle of the circular area as the internal box and the external box respectively; where the side length of the internal box is and the side length of the external box is , represents the resolution of the Z-th level of the display screen; Performing an initial query of the target vector in the internal box. If the target vector is initially queried, it is determined that the target vector in the internal box is completely located within the spatial range represented by the current pixel, and the current pixel is used as a qualified pixel; Otherwise, perform a secondary query for the target vector in the external box. If the target vector is found in the secondary query, further determine the distance between the target vector in the external box and the pixel center whether it is less than . If it is less than, it is determined that at least one target vector is within the spatial range represented by the current pixel, and the current pixel is regarded as a qualified pixel; otherwise, the current pixel is regarded as an unqualified pixel; where is the spatial Euclidean distance 5. The method according to claim 4, wherein When the vector data in the reference data set and the target data set are point vectors or line segment vectors, step 3 of the method further includes: Taking the target vector in the qualified pixels as the query center, construct a circular area with the query center as the center of the circle and the distance threshold as the radius, and use the inscribed rectangle and the circumscribed rectangle of the circular area as the internal query box and the external query box respectively; wherein, the side length of the internal query box is , and the side length of the external query box is , ; Perform an initial query of the reference vector in the internal query box. If a reference vector is initially queried, determine the distance between the reference vector in the internal query box and the query center is less than the distance threshold , directly output the reference vector in the internal query box and the target vector serving as the query center as the connection query result of the distance range; Otherwise, perform a secondary query of the reference vector in the external query box. If the reference vector is found in the secondary query, further determine the distance between the reference vector in the external query box and the target vector serving as the query center whether it is less than the distance threshold , if it is less than, output the connection query result of the distance range with at least one reference vector and the target vector serving as the query center; otherwise, output that the connection query result of the distance range is none.

6. The method according to claim 3, characterized in that When the vector data in the reference data set and / or the target data set are polygon vector data, steps 2 and 3 of the method further include: When the reference vector is a point vector or a line segment vector and the target vector is a polygon vector, first evaluate the spatial relationship between the current pixel and any one of the target vectors. If the distance between the boundary feature of any one of the target vectors and the pixel center is less than the pixel radius, or the pixel center is located inside any one of the target vectors, it is determined that at least one target vector is located within the spatial range represented by the current pixel, and the current pixel is used as a qualified pixel; then, determine whether the qualified pixel intersects with any one of the reference vectors under the distance threshold, and output the reference vector that meets the intersection condition and the target vector in the qualified pixel as the distance range join query result; When the reference vector is a polygon vector and the target vector is a point vector or a line segment vector, first query whether the target vector is within the spatial range represented by the current pixel. If the distance between any target vector and the pixel center is less than , it is determined that at least one target vector is within the spatial range represented by the current pixel, and the current pixel is regarded as a qualified pixel. Then, determine whether the pixel center of the qualified pixel is inside any reference vector or intersects with any reference vector within the distance threshold, and output the reference vector containing the pixel center or the reference vector satisfying the intersection condition and the target vector in the qualified pixel as the distance range connection query result. Among them, is the pixel radius, represents the resolution of the Z-th level of the display screen; When both the reference vector and the target vector are polygon vectors, only output the reference vector and the target vector that meet the following two constraint conditions as the distance range join query result, including: Constraint condition 1: The pixel center is located inside any target vector or on the boundary of any target vector within the spatial range represented by the current pixel; Constraint condition 2: The pixel center is located inside any reference vector or intersects with any reference vector within a distance threshold.

7. The method according to claim 6, wherein Determining whether the pixel center is located inside the polygon vector includes: Locating the candidate polygon vector that may contain the pixel center according to the border index of the polygon vector; Drawing a query line parallel to the x-axis from the boundary of the minimum bounding rectangle of the polygon vector to the pixel center position, and using the line segment index of the polygon vector to count the number of intersection points between this query line and the boundary of the polygon vector; if the number of intersection points is odd, it is determined that the pixel center is inside the polygon vector; if the number of intersection points is even, it is determined that the pixel center is outside the polygon vector.

8. A visualization device for distance range join query, characterized in that, The device includes: A data preprocessing module for dividing the spatial vector dataset containing multi-type vector data into a reference dataset and a target dataset, and performing visualization processing on all vector data on the display screen; A pixel and target vector spatial query module for traversing each pixel on the display screen, querying whether the target vector in the target dataset is within the spatial range represented by the current pixel, and filtering the pixels whose spatial range represented by the current pixel contains the target vector as qualified pixels; A target vector and reference vector spatial query module for querying whether the distance between the target vector and the reference vector in the reference dataset is less than a preset distance threshold within the spatial range of the qualified pixels, outputting the target vector and the reference vector that meet the distance threshold constraint condition as the distance range join query result, and performing style matching between the display value of the qualified pixels and the distance range join query result, and outputting the visualized distance range join query result.

9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Large-scale Bayesian network parallel inference method based on MapReduce

    CN103744878A

  • Map display method, remote sensing map display method, computing equipment and storage medium

    CN115375868A