Road network batch shortest distance query method based on hop-labeling

By dividing the road network into a tree map division structure and using a CPU-GPU hybrid vertex shrinkage method, a 2-hop tag that can efficiently handle large batches of shortest distance queries is built, solving the difficulty in the highly dynamic environment in the existing technology Quickly deal with distance query problems, significantly improving query processing capabilities.

CN119441259APending Publication Date: 2025-02-14SHENYANG AEROSPACE UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411487977.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The prior art is difficult to process distance queries at a speed of millions per second in highly dynamic environments, especially 2-hop labeling cannot be effectively maintained when frequently updated, making it difficult to keep up with large or frequent updates.

Method used

By using the graph division method to divide the road network into multi-layer tree-shaped graph division structure, a partitioned rank tree is obtained, and the parallelized shrinking order is determined, and a CPU-GPU hybrid vertex shrinking method is used to combine the label pruning strategy to construct A 2-hop tag capable of performing shortest path query.

Benefits of technology

It significantly accelerates the construction time of H2H tags, shortens the label construction time by 3-5 times, reduces the size of the final tag by nearly 1.5 times, and improves the processing capability of large batches of shortest distance queries in highly dynamic networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441259A_ABST
    Figure CN119441259A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of data processing, and particularly relates to a road network batch shortest distance query method based on hop-labeling, which comprises the following steps of: 1, dividing a road network into a multi-layer tree diagram division structure by using a diagram division method, further obtaining a partition rank tree, determining a parallelizable contraction sequence through the partition rank tree, and obtaining a query result; the method comprises the following steps of: after all vertexes are shrunk by using a CPU-GPU (Central Processing Unit-Graphic Processing Unit) mixed vertex shrunk method, outputting a decomposition tree Tree-Decomposition; 2, the main memory allocates final spaces required by labels to all vertexes of the decomposition tree, label construction equipment is selected according to the sizes of the final spaces of the labels, a parallel label calculation method of a CPU or a GPU is used for label construction, and a final 2-hop label capable of executing shortest path query is obtained in combination with a label pruning strategy; and 3, after a large batch of shortest distance query requests needing to be responded in the road network are obtained, batch shortest distance query parallelization based on 2-hop is carried out, and a shortest distance result of the batch query requests is output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of data processing, and in particular relates to a road network batch shortest distance query method based on hop-labeling. Background Art

[0002] The shortest distance query is a basic operation in location-based services and graph-related computing. In practical applications, travel time in a road network is often more important than travel distance because it reflects the actual travel cost.

[0003] The most efficient method for shortest distance calculation is 2-hop labeling, which can answer queries in microseconds. However, when traffic conditions change dynamically, they take a long time to maintain and even longer to rebuild, making it difficult for them to keep up with large or frequent updates. Therefore, real-life applications still rely on slow graph search algorithms.

[0004] Therefore, as of now, no method can handle distance queries at a speed of millions per second in a highly dynamic environment. 2-hop labeling is the only method that can meet the needs of a large number of queries, but its maintenance cannot handle frequent updates. In this patent, the index construction is accelerated so that it can handle highly dynamic networks even when the entire graph changes. Specifically, the current most advanced 2-hop labeling for road networks is H2H, which is also the basic structure of many advanced 2-hop labels H2H, P2H, TD-H2H. However, it takes several minutes to build on a network with millions of vertices, which is difficult to keep up with frequent updates. Since its construction efficiency cannot be improved in theory, it is mainly focused on providing a better vertex order or tree structure {RLH2H, P2H, HC2L}, but the improvement is not large. Therefore, how to significantly speed up H2H construction is an important and unresolved issue for achieving effective shortest distance queries in road networks. Summary of the invention

[0005] In order to solve the above technical problems, the present invention provides a road network batch shortest distance query method based on hop-labeling, comprising the following steps:

[0006] Step 1: Use the graph partitioning method to divide the road network into a multi-layer tree-like graph partitioning structure, and then obtain the partition rank tree. The partition rank tree is used to determine the parallelizable contraction order. After all vertices are contracted using the CPU-GPU hybrid vertex contraction method, the decomposition tree (Tree-Decomposition) is output;

[0007] Step 2: The main memory allocates the final space required for labels to all vertices of the decomposition tree. The label construction device is selected according to the final label space size. The label construction is performed using the parallel label calculation method of the CPU or GPU. Combined with the label pruning strategy, the final 2-hop label that can execute the shortest path query is obtained.

[0008] Step 3: After obtaining a large batch of shortest distance query requests that need to be responded to, the batch shortest distance query is parallelized based on 2-hop, and the shortest distance results of the batch query requests are output;

[0009] Furthermore, the road network is subjected to CPU-GPU hybrid vertex contraction, which specifically includes the following steps:

[0010] Step 1.1: Using the topological information of the graph, the original road network graph is divided into two subgraphs with similar number of points in the subgraph according to the METIS static graph partitioning algorithm. The same graph partitioning is continued for each subgraph. After several iterations, a hierarchical tree structure of graph partitioning is formed, which is called a partition tree.

[0011] Step 1.2, using the hierarchical graph partitioning structure partition tree (Partition-Tree), starting from the bottom layer, determine whether all the neighbors of the vertices in the subgraph are inside the subgraph; if so, determine it as a non-boundary point, otherwise determine it as a boundary point; if the vertex is determined to be a non-boundary point for the first time, record the vertex as a vertex that needs to be shrunk in the subgraph, and remove the vertex from the entire graph; after all layers from bottom to top perform this judgment, the vertex records obtained will become a structure that is consistent with the structure of the partition tree (Partition-Tree) and unique to the vertex inside the tree, which is called a partition rank tree (Partition-Rank-Tree);

[0012] Step 1.3: After obtaining the partition rank tree, the spatial upper bound NUB (Node-Upper-Bound) of each vertex of each subgraph in the partition is calculated and allocated in the main memory from bottom to top. The calculation formula is:

[0013] NUB Gi (v i )=|V i |+|N out (v i )|;

[0014] Where |V i | indicates G i The number of vertices in the subgraph, |N out (v i )| represents the vertex vi The number of neighbor points that are not in the subgraph;

[0015] Step 1.4: After obtaining NUB, transfer NUB to the global memory of GPU, and then perform vertex contraction optimized by DTH on GPU; on GPU, each thread will be responsible for the vertex contraction that needs to be performed in the only subgraph of the same layer, and the contraction method is parallel between subgraphs and serial within subgraphs; after contracting 8-10 layers on GPU according to the order determined by the partition rank tree, transfer the incomplete tree decomposition back to the main memory of CPU, and then perform global contraction of the remaining vertices optimized by DTH on CPU; DTH will participate in the sorting strategy of vertex contraction order, in the decomposition of vertex v i When its neighbor v j The tree height DTH is determined as DTH(v j )=max(DTH(v j ),DTH(v i )+1); The final sorting strategy used is: Top-level sorting: DTH(v j )+Degree(v j ), the second level sorting: Degree(v j ), the third level sorting: v j ;After this step is implemented, the output tree decomposition;

[0016] Furthermore, the size of the final label space is used as a basis for selecting a label construction device. If the actual space occupied during label construction exceeds the upper limit of the GPU's global memory, the label construction is implemented on the CPU, otherwise, the label construction is implemented on the GPU.

[0017] Furthermore, the 2-hop tag that can perform the shortest path query is established in the following way:

[0018] Step 2.1: Use the decomposition tree obtained after shrinking in step 1 to perform a bottom-up label space estimation. The estimated value is the tree height of each vertex in the decomposition tree. Since the size of the label space of a single vertex is actually the height of the decomposition tree, for example, vertex v i The tree height is h, v i The final labels of the vertices are also of size h; then, the space required for the final labels of all vertices is allocated in main memory;

[0019] Step 2.2: After obtaining the actual label space size of all vertices through step 2.1, if the actual space occupied during label construction exceeds the upper limit of the GPU's global memory, then choose to implement label construction on the CPU, otherwise choose to implement label construction on the GPU; the strategies for executing label construction on the CPU or GPU are:

[0020] The parallel construction strategy of the CPU is as follows: after the space allocation of vertex labels is completed, the data obtained from tree decomposition is placed in the labels in sequence according to the level of the vertices. Due to the small number of threads on the CPU, a preemptive thread pool strategy is used to determine the boundary of parallel construction during the top-down traversal of the CPU. On the CPU, label construction starts from the root node of the tree decomposition, with the vertex granularity as the parallel granularity and the label calculation of all adjacent points in the vertex as the workload of a single thread, and parallel label construction is performed;

[0021] The parallel construction strategy on the GPU is as follows: after the spatial allocation of vertex labels is completed, the data obtained from the tree decomposition is placed in the labels in sequence according to the vertex rank; then, the label that incorporates the decomposition tree information is transmitted to the GPU; because each vertex in the decomposition tree can be further subdivided into neighboring points, the granularity of the neighbors during the decomposition is used as the parallel boundary of the GPU, and label construction starts from the root node of the tree decomposition. The label calculation of the vertex's neighboring points is used as the parallel granularity and the workload of a single thread to perform parallel label construction; among them, the number of threads in the CPU version is fixed to the number of hardware threads of the CPU itself, and the number of threads in the GPU version changes with the depth of traversal;

[0022] Step 2.4: After the parallel label calculation method using CPU or GPU is given, the labels still need to be calculated. When calculating the labels, the 2-hop feature can be used to perform pruning. i When all decomposition neighbors are used as the exit to calculate the shortest distance to all other ancestor nodes, the calculation of vertices with a lower order than the decomposition neighbors is unnecessary; therefore, each time a single vertex label is constructed, the calculation of points with a lower order than the decomposition neighbors is cut off. After this calculation step is completed, a 2-hop label that can respond to the shortest distance query is obtained;

[0023] Furthermore, in step 3.1, before querying, the 2-hop label that can perform the shortest path query and the large batch of shortest distance query requests that need to be responded to are transmitted to the GPU;

[0024] Step 3.2: In the GPU, a single query is used as the parallel granularity, and the shortest distance calculation of a single query is used as the calculation amount of a single thread to perform parallel 2-hop query calculations. When querying the shortest distance between the starting point s and the end point t in a single query, the sum of all the labels of the same vertex starting from the head node in the s label and the t label is calculated, and the smallest one is taken as the shortest distance query result. The calculation formula is: dist(s, t) = min(L s (k)+L t(k)), where k is the same vertex in the labels of s and t; in particular, if the final label does not exist on the GPU, the query is performed on the CPU side;

[0025] Step 3.3: When performing batch query, the CPU transmits the same batch of queries to the GPU, and executes the query steps in parallel in the GPU, and then returns the results to the CPU. After all threads are executed, the final query results are transferred back to the main memory to output the shortest distance results of the large batch query requests. In particular, if the GPU does not have the final label, the query is executed on the CPU, and the query strategy is as follows: according to the number of threads actually supported by the CPU as the parallel granularity, each thread is evenly divided into all the shortest distance queries, and all the shortest distance calculations in a single thread are used as the calculation amount of a single thread. Parallel query calculations are performed to output the shortest distance results of the large batch query requests.

[0026] In the actual construction of the real road network graph, the hop-labeling label preprocessing step: This scheme introduces GPU into all the preprocessing steps and the shortest distance query step of the hop-labeling label for the first time. After verification by actual road network data in Asia, Europe, America and other regions, the CPU-GPU hybrid label construction scheme (this scheme) has obvious advantages in both the preprocessing step and the query step. Compared with the traditional hop-labeling algorithm (H2H, etc.) that only supports CPU operations, the preprocessing step is shortened by 3-5 times because this scheme introduces a parallel vertex contraction method that combines graph partitioning suitable for GPU with NUB, as well as a pruning strategy and parallel construction strategy for unnecessary paths during label construction. The size of the final label is reduced by nearly 1.5 times; When responding to a large number of shortest distance queries for real road networks, this scheme uses the high parallelism of the GPU and the high efficiency of the hop-labeling algorithm when it is highly parallel, so that the 2-hop query using the GPU (this scheme) is compared with the 2-hop query using only the CPU. The overall time of the single batch batch shortest distance query has been improved by nearly an order of magnitude. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 is a flow chart of the present invention;

[0028] Figure 2 is the road network in the embodiment;

[0029] Figure 3 A structural diagram for dividing the diagrams in the embodiments;

[0030] Figure 4 is a partition tree in the embodiment;

[0031] Figure 5It is a partition rank tree obtained based on the partition tree in the embodiment;

[0032] Figure 6 Schematic diagram of calculation of NUB in the embodiment;

[0033] Figure 7 A schematic diagram of a single vertex contraction in an embodiment;

[0034] Figure 8 This is an example diagram of shrinkage optimization using DTH;

[0035] Fig. 9 The intermediate result tree decomposition after the vertex contraction step;

[0036] Fig.10 The paths involved in the label building process;

[0037] Fig.11 Based on Fig. 9 Schematic diagram of the final labeling result. DETAILED DESCRIPTION

[0038] The principles and features of the present invention are described below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.

[0039] Hob-labeling is an efficient shortest distance calculation algorithm. Through a specific preprocessing method, the original road network partition is converted into labels (labeling) that contain enough information to query the shortest distance of all vertices. When querying, only the labels generated by preprocessing need to be used in a two-hop (2-hop) manner to calculate the shortest distance between any two points, without explicitly using the graph structure and edge length information. The overall process of the road network batch shortest distance query method based on hop-labeling described in this article is as follows:

[0040] refer to Figure 1 The present invention provides a parallel optimization method for a batch shortest distance query algorithm based on hop-labeling, which utilizes the high parallelism provided by GPU and a series of optimization strategies for GPU to achieve label preprocessing acceleration and batch shortest distance query acceleration. The embodiments of the method are as follows:

[0041] Example:

[0042] by Figure 2 Taking the weighted undirected road network graph G(V,E) as an example, the implementation steps of the parallel optimization method are as follows:

[0043] The vertex contraction method for CPU-GPU hybrid in step 1 is as follows:

[0044] Step 1.1: Divide the entire road network into three layers according to the METIS and other algorithms. The division results are as follows: Figure 3 After the first division, the overall road network G(V,E) is divided into two sub-graphs: and in Contains the top 8 vertices 6, 2, 9, 3, 11, 10, 12, 13, Contains the 8 vertices 5, 15, 1, 4, 14, 7, 8, and 16 at the top of the graph. After the second division, the two subgraphs are further divided into 4 smaller subgraphs according to the left and right sides. and The vertices contained in each are Figure 3 As shown;

[0045] Step 1.2: The partition tree after graph partitioning is as follows Figure 4 As shown. Then, the boundary points and non-boundary points in each partition are distinguished. If the vertex is determined to be a non-boundary point for the first time, the vertex is recorded as a vertex that needs to be shrunk in the subgraph, and the vertex is removed from the entire graph. Figure 5 The partition rank tree shown;

[0046] Step 1.3: In order to meet the static data requirements of the GPU, it is necessary to pre-calculate and allocate the space NUB required for contraction. The calculation formula is: Where |V i | indicates G i The number of vertices in the subgraph, |N out (v i )| represents the vertex v i The number of neighboring points that are not in the subgraph. Figure 2 The NUB calculation steps for all vertices are as follows Figure 6 Each vertex is calculated until it is determined to be a non-boundary point.

[0047] Step 1.4: After obtaining the NUB, transfer the NUB to the global memory of the GPU, and then perform vertex contraction after DTH optimization on the GPU. In this embodiment, the vertices of the bottom layer and the second bottom layer will be placed on the GPU to perform parallel vertex contraction, and the vertices of the top layer will be placed on the CPU to perform global vertex contraction. The contraction strategy is as follows: Figure 7 As shown in the figure, the current point is deleted, and the corresponding edges of all neighboring point pairs are updated or added; when the subgraph shrinks, the tree height DTH during decomposition will be added to the order of the actual decomposition. For example, when decomposing vertex v 16 When, because v 16 The tree height of is initialized to 0, so the tree height DTH of its neighbors is determined to be DTH(v1)=max(DTH(v1),DTH(v16 )+1)=max(0,1)=1 and DTH(v4)=1. When performing sorting, DTH(v1) will determine the decomposition order together with the number of neighbors when it is decomposed; Figure 8 As shown, MDE order is the result of the traditional shrinkage method, and DTH order is the shrinkage result obtained in this step;

[0048] After the contraction is completed, you will get Fig. 9 or Fig.11 The decomposition tree shown in the second column. In order to obtain the final label, step 2 needs to be performed to further expand the decomposition tree into usable labels.

[0049] In step 2, the details of pruning and parallelization of the label construction part are as follows:

[0050] Step 2.1: Use the decomposition tree obtained after shrinking in step 1 to perform a bottom-up label space estimation. The estimated value is the tree height of each vertex in the decomposition tree. Since the size of the label space is actually the height of the decomposition tree, for example, the tree height of vertex v4 is 4, its final label size is 4.

[0051] Step 2.2: In this embodiment, the space required for the final labels of all vertices is allocated in the main memory. The final space is 67 units of space. If it is stored as an int type, 67*4Byte is required.

[0052] Step 2.3: This step will describe the strategy for performing label construction on the CPU or GPU respectively.

[0053] The parallel construction strategy of the CPU is as follows: After the space allocation of vertex labels is completed, the data obtained by tree decomposition is placed in the labels in sequence according to the rank of the vertex; for example, when allocating vertex v 13 After the label space, v 13 The tree decomposition result is placed at point v 13 In the label space of . When using the CPU for parallelization, a fixed boundary is used to build parallelism from top to bottom. Assuming there are 3 threads (boundaries), the label calculation of 3 vertices can be performed simultaneously, for example, all labels in v9, v4, and v6 can be calculated simultaneously (serial construction within vertices).

[0054] The parallel construction strategy on the GPU is as follows: After the space allocation of vertex labels is completed, the data obtained by tree decomposition is placed in the labels in sequence according to the vertex rank; when using the GPU to perform parallelization, the boundary changes with the number of layers. For example, when performing parallelization of the third layer, the boundary is v3(v1), v3(v2), v5(v1), v5(v2). Among them, the parallel granularity of the GPU is refined to neighbor nodes, rather than the original vertices (v3, v5);

[0055] Step 2.4: After the parallel label calculation method using CPU or GPU is given, it is still necessary to calculate the labels. When calculating the labels, the 2-hop feature can be used to perform pruning. Fig.10 As shown, the shortest paths contained in the final label can be divided into four categories, among which the fourth category of paths can be cut off during label calculation. 13 When the path from neighbor vertex v3 to other ancestor nodes is the shortest, a Type-4 path such as v 13 -v3-v9 can be cut off, and (v 13 ,v9) The shortest distance can be obtained by 2-hop from the final label L 3-total After this calculation step is completed, the output of step 2 is obtained: the 2-hop label that can respond to the shortest distance query. The final label is as follows Fig.11 shown.

[0056] In step 3, the parallelization details of the 2-hop batch shortest distance query are as follows:

[0057] Step 3.1: Before querying, transmit the 2-hop labels that can perform the shortest path query and the large batch of shortest distance query requests that need to be responded to to the GPU. If the CPU is used to build the labels, compress the labels into CSR format and transmit them to the GPU;

[0058] Step 3.2: In the GPU, a single query is used as the parallel granularity, and the shortest distance calculation of a single query is used as the calculation amount of a single thread to perform parallel 2-hop query calculations. When a single query is performed for the shortest distance between the starting point s and the end point t, the sum of all the labels of the same vertex in the s label and the t label starting from the head node is calculated, and the smallest of them is taken as the shortest distance query result. In a single query, calculate dist(s, t) = min(L s (k)+L t (k)), where k is the same vertex in the labels of s and t. Fig.10 As shown, calculate dist(v 13 ,v 16 ), calculate L v13 (v1)+L v16 (v1), L v13 (v2)+L v16 (v2), L v13 (v3)+L v16 The minimum value of (v3) is 5, and we get dist(v 13 ,v 16 )=5.

[0059] Step 3.3: When performing batch queries, the CPU transmits the same batch of queries to the GPU, and executes query step 3.2 in parallel in the GPU, and then returns the results to the CPU. After all threads are executed, the final query results are transferred back to the main memory to output the shortest distance results of large-scale query requests. In particular, if the GPU does not have the final label, the query is executed on the CPU side, and the query strategy is as follows: according to the number of threads actually supported by the CPU as the parallel granularity, each thread is evenly divided into all shortest distance queries, all shortest distance calculations in a single thread are used as the calculation amount of a single thread, and parallel query calculations are performed to output the shortest distance results of large-scale query requests.

[0060] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A road network batch shortest distance query method based on hop-labeling, characterized in that: The following steps are included: Step 1: Use the graph partitioning method to divide the road network into a multi-layer tree-like partitioning structure, and then obtain the partition rank tree. Determine the parallelizable contraction order through the partition rank tree, use the CPU-GPU hybrid vertex contraction method to contract all vertices, and output the decomposition tree Tree-Decomposition; Step 2: The main memory allocates the final space required for labels to all vertices of the decomposition tree. The label construction device is selected according to the final label space size. The label construction is performed using the parallel label calculation method of the CPU or GPU. Combined with the label pruning strategy, the final 2-hop label that can execute the shortest path query is obtained. Step 3: After obtaining the batch shortest distance query request that needs to be responded to in the road network, the batch shortest distance query is parallelized based on 2-hop, and the shortest distance result of the batch query request is output.

2. A road network batch shortest distance query method based on hop-labeling as claimed in claim 1, characterized in that: The CPU-GPU hybrid vertex contraction of the road network includes the following steps: Step 1.1: Using the topological information of the graph, the original road network graph is divided into two subgraphs with similar number of points in the subgraph according to the METIS static graph partitioning algorithm. The same graph partitioning is continued for each subgraph. After several iterations, a hierarchical tree structure of graph partitioning is formed. This structure is called a partition tree. Step 1.2, using the hierarchical graph partitioning structure partition tree Partition-Tree, starting from the bottom layer, determine whether all the neighbors of the vertices in the subgraph are inside the subgraph; if so, determine it as a non-boundary point, otherwise determine it as a boundary point; if the vertex is determined to be a non-boundary point for the first time, record the vertex as a vertex that needs to be shrunk in the subgraph, and remove the vertex from the entire graph; after all layers from bottom to top perform this judgment, the vertex records obtained will become a structure that is consistent with the partition tree Partition-Tree and unique to the vertices inside the tree, and this structure is called a partition rank tree; Step 1.3: After obtaining the partition rank tree, the spatial upper bound NUB (Node-Upper-Bound) of each vertex of each subgraph in the partition is calculated and allocated in the main memory from bottom to top. The calculation formula is: NUB Gi (v i )=|V i |+|N out (v i )|; Among them, |V i | indicates G i The number of vertices in the subgraph, |N out (v i )| represents the vertex v i The number of neighbor points that are not in the subgraph; Step 1.4: After obtaining NUB, transfer NUB to the global memory of GPU, and then perform vertex contraction optimized by DTH on GPU; after contracting 8-10 layers on GPU according to the order determined by the partition rank tree, transfer the incomplete tree decomposition back to the main memory of CPU, and then perform global contraction of the remaining vertices optimized by DTH on CPU; DTH will participate in the sorting strategy of vertex contraction order, in decomposing vertex v i When its neighbor v j The tree height DTH is determined as DTH(v j )=max(DTH(v j ),DTH(v i )+1); The final sorting strategy used is: Top-level sorting: DTH(v j )+Degree(v j ), the second level sorting: Degree(v j ), the third level sorting: v j ; After this step is executed, the tree decomposition is output.

3. A method for batch shortest distance query of road network based on hop-labeling as claimed in claim 1, characterized in that: The size of the final label space is used as the basis for selecting the label construction device. If the actual space occupied during label construction exceeds the upper limit of the GPU's global memory, the label construction is implemented on the CPU, otherwise it is implemented on the GPU.

4. A method for batch shortest distance query of road network based on hop-labeling as claimed in claim 1, characterized in that: The 2-hop tag that can perform the shortest path query is established in the following way: Step 2.1, using the decomposition tree obtained after shrinking in step 1, perform bottom-up label space estimation, the estimated value is the tree height value of each vertex in the decomposition tree, and allocate the space required for the final labels of all vertices in the main memory; Step 2.2: After obtaining the actual label space size of all vertices through step 2.1, if the actual space occupied during label construction exceeds the upper limit of the GPU's global memory, then choose to implement label construction on the CPU, otherwise choose to implement label construction on the GPU; the strategies for executing label construction on the CPU or GPU are: The parallel construction strategy of the CPU is as follows: after the space allocation of vertex labels is completed, the data obtained from the tree decomposition is placed in the labels in sequence according to the level of the vertices. On the CPU, label construction starts from the root node of the tree decomposition, and the vertex granularity is used as the parallel granularity. The label calculation of all adjacent points in the vertex is used as the workload of a single thread to perform parallel label construction; The parallel construction strategy on the GPU is as follows: after the space allocation of vertex labels is completed, the data obtained from tree decomposition is placed in the labels in sequence according to the level of the vertices; then, the labels that incorporate the decomposition tree information are transmitted to the GPU; label construction starts from the root node of the tree decomposition, and the label calculation of the vertex's neighboring points is used as the parallel granularity and the workload of a single thread to perform parallel label construction; Each time a single vertex label is constructed, the calculation of points with a lower order than their neighbors during decomposition is pruned. After this calculation step is completed, a 2-hop label that can respond to the shortest distance query is obtained.

5. The method for batch shortest distance query of a road network based on hop-labeling as claimed in claim 1, characterized in that: Step 3.1: Before querying, transmit the 2-hop label that can perform the shortest path query and the large batch of shortest distance query requests that need to be responded to to the GPU; Step 3.2: In the GPU, a single query is used as the parallel granularity, and the shortest distance calculation of a single query is used as the calculation amount of a single thread to perform parallel 2-hop query calculations. When querying the shortest distance between the starting point s and the end point t in a single query, the sum of all the labels of the same vertex starting from the head node in the s label and the t label is calculated, and the smallest one is taken as the shortest distance query result. The calculation formula is: dist(s, t) = min(L s (k)+L t (k)), where k is the same vertex in the labels of s and t; in particular, if the final label does not exist on the GPU, the query is performed on the CPU side; Step 3.3: When performing batch query, the CPU sends the same batch of queries to the GPU, and the query steps are executed in parallel in the GPU, and then the results are returned to the CPU. After all threads are executed, the final query results are transferred back to the main memory to output the shortest distance results of large-scale query requests. In particular, if the final label does not exist on the GPU, the query is executed on the CPU side, and the query strategy is as follows: the number of threads actually supported by the CPU is used as the parallel granularity, all shortest distance queries are evenly divided into each thread, all shortest distance calculations in a single thread are used as the calculation amount of a single thread, parallel query calculations are performed, and the shortest distance results of batch query requests are output.