Large-scale road network rapid path planning method, system, equipment and medium

By shrinking the nodes with an entry and exit degree of 1 and sorting the importance in large-scale road network path planning, combined with the A* algorithm, the problems of long preprocessing time and large storage space in the existing technology are solved, and fast path planning is achieved, which is suitable for on large-scale road networks.

CN118583181APending Publication Date: 2024-09-03CENT SOUTH UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410347532.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-26
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Existing large-scale road network path planning methods have great challenges in pre-processing time and storage space. Especially when facing ultra-large-scale road networks, the solution efficiency is low and the storage requirements are huge.

Method used

A fast path planning method for large-scale road networks is adopted. By shrinking nodes with an access degree of 1 and adding shortcut edges, the nodes are iteratively shrunk using importance ranking, and the shortcut edge information is stored in two data structures and used in path search. Use the A* algorithm for planning, and finally obtain the optimal path through unpacking.

Benefits of technology

It significantly reduces preprocessing time and storage space requirements, improves solution efficiency, and can obtain optimal path solutions within a limited time, making it suitable for large-scale road networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118583181A
    Figure CN118583181A
Patent Text Reader

Abstract

The invention discloses a large-scale road network rapid path planning method, system and device and a medium. The method comprises the steps of road network preprocessing, wherein all nodes with the access degree being 1 in an original road network G1 are shrunk; performing importance ranking on the remaining nodes, iteratively selecting the node with the lowest importance for contraction until the number of the contracted nodes meets the requirement, and storing G1 and the contracted road network G2; respectively storing messages of nodes and corresponding edges which generate shortcut edges and do not generate shortcut edges when the nodes are shrunk in two data structures; path searching: searching an equivalent starting point and an equivalent ending point which respectively correspond to the starting point and the ending point in the G2, and then performing path planning based on an A * algorithm to obtain an optimal path based on the G2; and path unpacking: unpacking all shortcut edges in the optimal path based on G2 to obtain a final path. The road network preprocessing time can be shortened, the storage space can be saved, and the path planning efficiency is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of path planning technology, and in particular to a method, system, equipment and medium for rapid path planning of a large-scale road network. Background Art

[0002] In the process of path planning, each place or destination in real life is first abstracted as a node, and each road section connected to the node is converted into an arc segment. The arc segments and nodes are combined to form an abstract network. The starting point and the end point are input, and the algorithm is used to calculate on this network to obtain the path plan on the actual road network. The calculation efficiency (i.e. the time required for calculation) is related to the number of nodes that need to be traversed during the algorithm to obtain the final path plan.

[0003] At present, path planning algorithms can be divided into classic algorithms, guided algorithms, and hierarchical algorithms. The most common classic algorithm is the Dijkstra algorithm, which basically traverses all nodes in the road network and compares all routes to find the classic algorithm for the shortest path problem between two points. Although the classic algorithm can obtain an exact solution (that is, the optimal path in fact), the solution efficiency is low, especially for large-scale road network scenarios, which takes a lot of time. From a macro perspective, the route of the optimal path in a road network with dense sections is actually a straight line between two points, which means that as long as the selected nodes do not deviate too far from this straight line, the final path is no different from the optimal path, so there is a guided algorithm. This type of algorithm sets the destination or search direction so that in the process of node traversal, the nodes that deviate from the destination or direction are ignored and these nodes are not traversed. At the expense of a certain solution accuracy, it can greatly improve the solution efficiency; the guided algorithm has a certain accuracy in small-scale road network scenarios, but when facing large-scale road network scenarios, the error is large and it cannot be well applied. Hierarchical algorithms are designed for large-scale paths. Before path planning, they use the node topology properties to determine which nodes are not important enough, and continuously shrink nodes from the road network to reduce the number of nodes in the road network. In this way, in the subsequent path planning process, even when facing a large-scale road network, only a small number of nodes need to be traversed to obtain the optimal solution.

[0004] The hierarchical algorithm is mainly designed to deal with the long time required for accurate path planning in large-scale road networks. The main core is to condense large-scale road networks without losing road network information, that is, to reduce the number of nodes and arcs in the road network. The algorithm can be divided into two steps (road network preprocessing and path planning): First, the importance of nodes is evaluated according to the topological attributes of nodes in the network, and the nodes with the smallest importance are shrunk according to the node importance. When the current node and the arc connected to the node are directly deleted, the road network information will be lost, which will easily make it difficult to find the road during subsequent path planning. Therefore, new arcs need to be added to maintain the connectivity of the road network. At the same time, in order to avoid the starting point being shrunk and not found in the road network during path planning, it is necessary to form a road network and retain it for each node shrunk. Each time the road network is saved, a level is formed. Once a node needs to be found, it is directly located in the highest level of the road network where the node still exists, and path planning is performed. This is the most time-saving. But even so, the final path cannot correspond to the real road network one by one, because there are some newly added virtual arcs in the path, so the hierarchical algorithm also includes an unpacking method. In the process of shrinking nodes, the information about which newly added arcs correspond to the original deleted arcs is stored in advance. When unpacking, it only needs to determine whether the arc is a virtual arc (shortcut edge). Once there is a shortcut edge in the path planning plan, it is replaced with two edges that generate the shortcut until a path without any shortcuts is obtained, and finally an optimal path that conforms to the actual situation is generated. However, the existing hierarchical algorithm has the following technical problems:

[0005] Technical problem 1: The preprocessing time is very long. Each node is judged and shrunk. Even when facing simple nodes, the same method is still used for processing, which takes a long time.

[0006] Technical problem 2: Each time the node is contracted, not only the relevant information of the quick edge needs to be stored, but also the road network diagram generated after each contraction of the node needs to be stored. The required storage space is very large, and as the contraction scale and node scale increase, the required space scale also increases.

[0007] Technical problem three: When facing larger or super-large-scale road networks, the solution efficiency is still low. First, because the road network preprocessing method is single, the more nodes there are, the longer the road network preprocessing time is; second, because the path planning method finally adopted is bidirectional Dijkstra, it is still necessary to traverse a large number of nodes to obtain the optimal solution, and the solution efficiency is low. Summary of the invention

[0008] The purpose of the present invention is to provide a large-scale road network fast path planning method, system, device and medium to solve at least one of the technical problems existing in the existing large-scale road network path planning method.

[0009] In a first aspect, a large-scale road network fast path planning method is provided, comprising the following steps:

[0010] Road network preprocessing: shrink all nodes with an in-and-out degree of 1 in the original road network G1, and add corresponding shortcut edges; sort the remaining nodes by importance, and iteratively select the nodes with the lowest importance for shrinking until the number of shrunk nodes reaches the shrinkage requirement, and store the original road network G1 and the road network G2 after shrinkage; during the node shrinkage process, store the information of all nodes and corresponding edges that generate shortcut edges when the nodes are shrunk in the first data structure, and store the information of all nodes and corresponding edges that do not generate shortcut edges when the nodes are shrunk in the second data structure;

[0011] Path search: First, search for equivalent starting points and equivalent end points corresponding to the starting point and end point respectively in G2, and then perform path planning based on the A* algorithm in G2 to obtain the optimal path based on G2;

[0012] Path unpacking: Based on the information stored in the first data structure, all shortcut edges in the optimal path based on G2 are unpacked to obtain the final path.

[0013] According to the first aspect, in a possible implementation manner, the road network preprocessing includes the following steps:

[0014] S1: Get the original road network G1;

[0015] S2: Contract all nodes q with in-degree 1 in G1, and add shortcut edges corresponding to each contracted node q in G2; use the node p located upstream of node q and connected to it as the index, and store the information of node q, the endpoint of the shortcut edge, and the corresponding edge in the first data structure L con The corresponding position of

[0016] S3: Obtain the importance sequence of all uncontracted nodes based on importance sorting, and select the node i with the lowest importance;

[0017] S4: Perform local search, if node j exists n To node b n The shortest path is (j n ,i,b n ), then go to the next step, otherwise, go to S6;

[0018] S5: Contract node i and add a node j to G2 nTo node b n The shortcut edge of the node j n to node i and node i to node b n The sum of the weights of ;

[0019] S6: If SC i >0, go to the next step; otherwise, shrink node i and jump to S8; where SC i Indicates the number of shortcut edges to be generated by the node i to be contracted;

[0020] S7: With j n As index, node i and node b n , and the corresponding edge information is stored in the first data structure L con At the corresponding position in the sequence, delete node i from the importance sequence and jump to S9;

[0021] S8: Using the node number located upstream of node i and connected to it as the index, store the information of node i, the node located downstream of node i and connected to it, and the edge in the second data structure L del At the corresponding position in the sequence, delete node i from the importance sequence;

[0022] S9: Repeat S3 to S8 until the shrinkage scale reaches the shrinkage requirement;

[0023] S10: Store the road network G2 after shrinkage.

[0024] According to the first aspect, in a possible implementation manner, the importance of a node is defined as:

[0025] IM i =CT i -ED i +UN i

[0026] Where, IM i represents the importance of node i, CT i , ED i 、UN i They represent the contraction cost, edge difference, and uniformity of node i respectively;

[0027] Among them, the edge difference ED of node i i Calculated by the following formula:

[0028] ED i =k i -SC i

[0029]

[0030] In the formula, k irepresents the connectivity of node i, Respectively represent the out-degree and in-degree of node i; SC i Indicates the number of shortcut edges to be generated by the node i to be contracted;

[0031] Uniformity UN of node i i Calculated by the following formula:

[0032] UN i =H iP +H Pi

[0033] In the formula, H iP represents the total number of directed edges from node i to nodes in the contracted node set P, H Pi represents the total number of directed edges from nodes in the contracted node set P to node i;

[0034] The contraction cost CT of node i i Calculated by the following formula:

[0035] CT i =T i +SC i

[0036] Where, T i Represents the witness path set U of node i i The number of nodes included in all witness paths.

[0037] According to the first aspect, in a possible implementation, during the road network preprocessing process, the importance sequence adopts a delayed update strategy, and the process is as follows:

[0038] A1: Initialize a, set t; a represents the number of changes of the top node in the importance sequence, represents the delay update trigger threshold, and t represents the time interval for checking the importance sequence;

[0039] A2: Shrink and delete the top node of the importance sequence S, where the node with the smallest importance is placed at the top of the importance sequence;

[0040] A3: Determine whether the contraction scale meets the contraction requirements. If not, proceed to the next step; if yes, end;

[0041] A4: Recalculate the importance of the nodes connected to the deleted node, update the importance sequence, and obtain the updated importance sequence S new ;

[0042] A5: Determine the importance sequence S after deleting the top node and the updated importance sequence S newAre the top vertices in the middle the same? If so, jump to A2; if not, a=a+1, and go to the next step;

[0043] A6: Determine whether the running time t' is greater than or equal to t. If so, proceed to the next step; if not, jump to A2;

[0044] A7: Determine whether a is greater than If yes, go to the next step; if no, jump to A2;

[0045] A8: Recalculate the importance of all remaining nodes and sort them to generate a new importance sequence S, and jump to A1.

[0046] According to the first aspect, in a possible implementation, in searching G2 for an equivalent starting point and an equivalent end point corresponding to the starting point and the end point respectively, the equivalent starting point is searched by the following method:

[0047] B1: Determine whether the starting point u1 is in G2. If so, the starting point u1 is stored in the Route list as its own equivalent node. If the starting point u1 is not in G2, it indicates that the starting point u1 is shrunk and proceeds to the next step.

[0048] B2: Initialize the OPEN list to store the nodes that are allowed to be accessed; initialize the CLOSE list to store the nodes that have been visited and passed; take the starting point u1 as the current node, and include the starting point u1 in the CLOSE list, store the other nodes connected to it in the OPEN list, and take the starting point u1 as the parent node of other nodes, and search for the node u with the lowest cost from the OPEN list n As the next node; judge node u n Is it in G2? If so, node u n If it is an equivalent starting point, jump to B7, otherwise jump to the next step;

[0049] B3: Traverse all nodes in the OPEN list to determine whether these nodes can connect node u n As the parent node, reduce its cost, if possible, update the cost of these nodes, and change the current node u n As the new parent node; otherwise, do nothing and go to the next step;

[0050] B4: for the current node u n , in G1, search for u n The surrounding nodes that can be reached are included in the OPEN list. n As the parent node of these nodes, and update their cost;

[0051] B5: In the OPEN list, select the node u with the lowest cost n+1As the next node, the previous node u n As node u n+1 The parent node is deleted from the OPEN list and stored in the CLOSE list instead;

[0052] B6: Determine node u n+1 Is it in G2? If so, node u n+1 If it is an equivalent starting point, jump to the next step; otherwise, jump to B3;

[0053] B7: According to the parent node setting, traverse forward to the shrunk starting point u1, and store the path formed during the traversal process into the Route list. The shrunk starting point is processed.

[0054] The same principle as that of searching for an equivalent starting point is used to search for an equivalent end point in G2.

[0055] According to the first aspect, in a possible implementation, the cost function F(m) in the A* algorithm is expressed as follows:

[0056] F(m)=G(m)+H(m)

[0057] G(m)=ω1*d(m)+ω2*t(m)+ω3*o(m)

[0058]

[0059] P(m,h)=ω1c mh x mh +ω2r mh x mh +ω3b mh x mh

[0060]

[0061] In the formula, G(m) represents the actual cost from the starting point to the current node m, H(m) represents the estimated cost from the current node m to the end point; d(m), t(m), o(m) represent the distance cost, time cost, and fuel cost from the starting point to the current node m, respectively; ω1, ω2, ω3 represent the weights corresponding to the distance cost, time cost, and fuel cost, respectively; D(m), v, They represent the distance cost, average speed and average fuel consumption from the current node m to the end point, respectively. m ,y m ) represents the coordinates of the current node m, (x dest ,y dest ) represents the coordinates of the end point; P(m,h) represents the actual cost from the current node m to the next node h, w' represents the minimum actual cost weight from the current node to the next node, k1,…,kn ,h∈K m , K m represents the set of all nodes that the current node m can reach; c mh 、r mh 、b mh Respectively represent the distance cost, time cost, and fuel consumption cost from the current node m to the next node h; x mh is a 0-1 variable. If the road passes through node m to node h, then x mh =1, otherwise x mh =0.

[0062] According to the first aspect, in a possible implementation manner, path unpacking includes the following process:

[0063] Assume that the optimal path based on G2 is R = (v1, v2…v n …v N ), the nodes included in the optimal path are all nodes in G2, the number of nodes is N, and L con (v n )=(v n ,ST1(v n )…ST m (v n )…ST M (v n )) indicates that the storage location is in v n The contraction edge information of v n is the node index, the dataset ST m (v n ) includes the shrunk node T m , the end point of the contraction edge P m , and node v n The contraction edge (v n ,T m ) and (T m ,P m ), M represents the number of contraction edges, then the specific process of path unpacking is as follows:

[0064] C1: Search for nodes in R one by one. If the node v n If the edge with the starting point does not exist in G1, jump to the next step; if the entire R is traversed and there is no edge that only exists in G2, the unpacking is completed and the final path is output;

[0065] C2: Let v n+1 v n The next node in R, in L con (v n ), traverse all ST m (v n ), find then+1 Node P of the same node m , jump to the next step;

[0066] C3: The corresponding shrunk node T m Insert into the optimal path R, and its insertion position is at node v n After that, jump to C1.

[0067] In a second aspect, a large-scale road network fast path planning system is provided, comprising:

[0068] The road network preprocessing module is used to: shrink all nodes with an in-and-out degree of 1 in the original road network G1, and add corresponding shortcut edges; sort the remaining nodes by importance, and iteratively select the nodes with the lowest importance for shrinking until the number of shrunk nodes reaches the shrinkage requirement, and store the original road network G1 and the road network G2 after the shrinkage is completed; during the node shrinkage process, store the information of all nodes and corresponding edges that generate shortcut edges when the nodes are shrunk in the first data structure, and store the information of all nodes and corresponding edges that do not generate shortcut edges when the nodes are shrunk in the second data structure;

[0069] The path search module is used to: first search for an equivalent starting point and an equivalent end point corresponding to the starting point and the end point respectively in G2, and then perform path planning based on the A* algorithm in G2 to obtain an optimal path based on G2;

[0070] The path unpacking module is used to: unpack all shortcut edges in the optimal path based on G2 based on the information stored in the first data structure to obtain a final path.

[0071] In a third aspect, an electronic device is provided, including:

[0072] a memory having a computer program stored thereon;

[0073] A processor is used to load and execute the computer program to implement the large-scale road network rapid path planning method as described in any one of the first aspects.

[0074] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for rapid path planning of a large-scale road network as described in any one of the first aspects is implemented.

[0075] The present invention proposes a large-scale road network fast path planning method, system, device and medium, which has the following beneficial effects:

[0076] (1) In the prior art, each time a node is shrunk, not only the relevant information of the shortcut edge needs to be stored, but also the road network diagram generated after each node is shrunk. The required storage space is very large, and the larger the scale of the shrunk and the scale of the node, the larger the required space. The present invention designs two data structures to store the information of the node and the corresponding edge after each shrunk, and uses the node number as its storage location. Even if it is unpacked later, the shortcut edge can be quickly converted into a road section in the actual road network. This can solve the problem of the starting point and the end point being shrunk, and the problem of unpacking. In addition, there is no need to store the road network after each node is shrunk, saving a lot of space.

[0077] (2) In the prior art, the preprocessing time is very long. Each node is judged and shrunk. Even when facing simple nodes, the same method is still used for processing, which takes a long time. However, the present invention can judge in advance which nodes will definitely be shrunk, and the topological attribute of the node is single, with an in-and-out degree of 1. For example, some nodes between highway entrances and exits will definitely pass through the middle node as long as the shortest path passes through this entrance and exit. The present invention directly shrinks these nodes in advance without judging their node importance, thereby reducing the preprocessing time.

[0078] (3) In the prior art, when faced with larger or ultra-large-scale road networks, the solution efficiency is still low. First, the road network preprocessing method is single, and the more nodes there are, the longer the road network preprocessing time is; second, the path planning method finally adopted is bidirectional Dijkstra, which still needs to traverse a large number of nodes to obtain the optimal solution, and the solution efficiency is low. The present invention takes into account that the A* algorithm is a heuristic algorithm, which can quickly obtain the final path plan, but cannot solve a more accurate solution, especially in large-scale road networks, and the error generated is large. Therefore, the present invention has further improved the cost function of the A* algorithm, so that even when faced with a large number of nodes, a better path plan can be obtained within a limited time. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0080] Figure 1 This is a flow chart of a large-scale road network fast path planning method provided by an embodiment of the present invention;

[0081] Figure 2 is an example of a road network provided by an embodiment of the present invention;

[0082] Figure 3 is a flow chart of a delayed update strategy provided by an embodiment of the present invention;

[0083] Figure 4 It is a schematic diagram of starting point processing based on the improved A* algorithm provided by an embodiment of the present invention; Figure 5 is a road network distribution map of Hubei Province provided by an embodiment of the present invention; Figure 6 It is a schematic diagram of the solution time of each algorithm of a small-scale example provided by an embodiment of the present invention; Figure 7 It is a schematic diagram of the solution time of each algorithm of a large-scale example provided by an embodiment of the present invention; Figure 8 It is a schematic diagram of the time of solving before and after using different improvement strategies provided by an embodiment of the present invention; Fig. 9 It is a schematic diagram of the solution time of each algorithm under the minimum preference of travel distance for a large-scale example provided by an embodiment of the present invention; Fig.10 It is a schematic diagram of the solution time of each algorithm under the minimum preference of travel time for a large-scale example provided by an embodiment of the present invention; Fig.11 It is a schematic diagram of the solution time of each algorithm under the preference of minimum travel fuel consumption cost for a large-scale example provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0084] To make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described in detail below. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other implementation methods obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.

[0085] A large-scale road network is represented as a directed graph G = (V, A), where V is a node set, including road intersections, user starting points, and end points, and the edge set A = {(i, j)|i, j∈V, i≠j}, including road segments, and edge (i, j) represents the road segment from node i to node j. This paper considers three different preference modes: driving distance, driving time, and fuel consumption, and assigns multiple weight attributes (c, r, b) to each edge, where c represents the actual length of the segment (i.e., distance cost), r represents the time required to pass the segment (i.e., time cost), and b represents the fuel consumption generated by passing the segment (i.e., fuel consumption cost). Considering the large-scale road network fast path planning problem with multiple user preferences, that is, finding a road in G with O as the starting point and D as the end point with the shortest possible driving distance, the shortest possible driving time, or the lowest possible fuel consumption of the vehicle, a multi-objective planning model considering the multiple preferences of users is constructed.

[0086] In the user preference scenario, the present invention calculates the importance of each node and obtains the importance sequence based on the multiple weight attributes of the edge, shrinks the node with the smallest importance, and updates the importance sequence through the node importance delay update strategy until the predetermined shrinkage scale is reached. Finally, the path search algorithm is used for path planning based on the shrinking road network, and the real path planning solution is obtained through the path unpacking algorithm. The main solution process is as follows: Figure 1 shown.

[0087] The present invention makes the following improvements to the traditional stratification algorithm:

[0088] (1) When the number of nodes and edges is large, the preprocessing stage will consume a lot of time. To reduce the time consumed in the preprocessing stage, during the node contraction process, nodes with both in-degree and out-degree 1 are preprocessed in advance to reduce the node importance calculation and sorting time of these nodes.

[0089] (2) In terms of path search algorithm, the BiDijkstra algorithm used in the traditional hierarchical algorithm is abandoned, and the A* algorithm is used for path planning. The actual future cost of the current node is considered in the estimation function to reduce the algorithm error;

[0090] (3) The traditional hierarchical algorithm needs to form a road network layer after each node is shrunk. Each road network layer is saved, which wastes a huge amount of storage space resources. This paper sets up two data structures to store the information generated during the node contraction process, so that only the initial road network and the road network after contraction need to be saved;

[0091] (4) Based on different user preferences, the multiple weight attributes of the edges are determined. In the path planning stage, the multiple weight factors of the edges are used as a basis to enable the path search algorithm to obtain a path that is more in line with the user's travel preferences.

[0092] The technical solution of the present invention is described in detail below in conjunction with specific embodiments.

[0093] like Figure 1 As shown, an embodiment of the present invention provides a large-scale road network fast path planning method, comprising the following steps:

[0094] Road network preprocessing: shrink all nodes with in-degree 1 (both in-degree and out-degree are 1) in the original road network G1, and add corresponding shortcut edges; sort the remaining nodes by importance, and iteratively select the nodes with the lowest importance to shrink until the number of shrunk nodes reaches the shrinkage requirement, and store the original road network G1 and the road network G2 after shrinkage; during the node shrinkage process, store the information of all nodes and corresponding edges that generate shortcut edges when the nodes are shrunk in the first data structure, and store the information of all nodes and corresponding edges that do not generate shortcut edges when the nodes are shrunk in the second data structure;

[0095] Path search: First, search for equivalent starting points and equivalent end points corresponding to the starting point and end point respectively in G2, and then perform path planning based on the A* algorithm in G2 to obtain the optimal path based on G2;

[0096] Path unpacking: Based on the information stored in the first data structure, all shortcut edges in the optimal path based on G2 are unpacked to obtain the final path.

[0097] More specifically, the road network preprocessing process mainly includes node sorting, node shrinking and delay updating.

[0098] Node sorting: It is to calculate the importance of each node and form an importance sequence from small to large. The nodes with higher ranking can be called the top nodes of the priority sequence. The nodes with higher ranking are more likely to be shrunk. In this embodiment, the calculation of node importance is based on three indicators: edge difference, uniformity and shrinkage cost.

[0099] Taking node i as an example, let U i represents the witness path set of node i, let Represented by node j n Directed edges pointing to node i, which form a node set J; Indicates that node i points to node b n Directed edges are connected to construct node set B from these points. Based on the BiDijkstra algorithm, the shortest path from each node in node set J to each node in node set B is searched. n To node b n The shortest path is expressed as j n ∈J,b n ∈B and j n ,bn ∈V, this process is called local search. Setting the local search limit number n-hop limits the number of nodes that can be traversed during the search for the shortest path, thereby speeding up the node sorting process and avoiding local search traversing the entire road network. n To b n The shortest path is (j n ,i,b n ), then the node i to be contracted needs to add a corresponding shortcut edge to ensure the connectivity of the road network; otherwise, the shortest path searched is called the witness path and is included in the set U i , at this time, the node and the surrounding arcs are directly contracted, and there is no need to add new arcs to ensure the connectivity of the road network. i Indicates the number of shortcut edges to be generated by the node i to be contracted, k i Represents the connectivity of node i, including out-degree and in-degree The calculation formula of the margin difference is as follows:

[0100] ED i =k i -SC i (1)

[0101]

[0102] In the formula, ED i represents the edge difference of node i.

[0103] Using only edge differences to calculate node importance will slow down subsequent path searches and path unpacking. Figure 2 If only the edge difference is considered, then i1, i2 to i k , will all be contracted to node y. When searching for the shortest path from i1 to y, the path needs to be unpacked layer by layer, which greatly affects the efficiency of shortest path planning. Therefore, node uniformity is introduced, as shown in the following formula:

[0104]

[0105] In the formula, UN i represents the uniformity of node i, H iP represents the total number of directed edges from node i to nodes in the contracted node set P, H Pi represents the total number of directed edges from the nodes in the collapsed node set P to node i; n represents the number of nodes in the set P, Represents the contracted node p n Directed edges pointing to node i; Indicates that node i points to the contracted node p n The directed edges of .

[0106] The more nodes there are in a large-scale road network, the longer the preprocessing time required. To avoid too long preprocessing time, the shrinkage cost indicator is introduced, and the number of nodes passed by the local search represents the required shrinkage processing time. The shrinkage cost CT of node i i Defined as:

[0107] CT i =T i +SC i (4)

[0108] Where, T i Represents the witness path set U of node i i The number of nodes included in all witness paths in SC i Is the number of nodes used to make up for the lack of witness path set.

[0109] After obtaining the calculation methods of each indicator, the node importance is defined as follows:

[0110] IM i =CT i -ED i +UN i (5)

[0111] Where, IM i Represents the importance of node i.

[0112] Node contraction: Taking the highway as an example, when the shortest path passes through the exit and entry points of the highway, it will definitely pass through the node with an in-degree of 1 in the middle. Since the traditional hierarchical algorithm takes a long time to contract, this paper does not sort the nodes with an in-degree of 1 first, but directly performs the node contraction step to accelerate the efficiency of contracting the road network. Let G1 = (V1, A1) represent the original road network, and G2 = (V2, A2) represent the road network after contraction. Using the first data structure L con With the second data structure L del , establish the connection between G1 and G2, avoid storing the current road network graph after each node contraction, the specific steps of node contraction are described as follows:

[0113] S1: Get the original road network G1;

[0114] S2: Contract all nodes q with in-degree 1 in G1, and add shortcut edges corresponding to each contracted node q in G2; take the node p located upstream of node q and connected to it as the index, and store the node q, the end point of the shortcut edge, and the corresponding edge information (including edge (p, q) and edge (q, t, t is the node located downstream of node q and connected to it) in the first data structure L con The corresponding position of

[0115] S3: Obtain the importance sequence of all uncontracted nodes based on importance sorting, and select the node i with the lowest importance;

[0116] S4: Perform local search, if node j exists n To node b n The shortest path is (j n ,i,b n ), then go to the next step, otherwise, go to S6;

[0117] S5: Contract node i and add a node j to G2 n To node b n The shortcut edge of the node j n to node i and node i to node b n The sum of the weights of ;

[0118] S6: If SC i >0, go to the next step; otherwise, shrink node i and jump to S8; where SC i Indicates the number of shortcut edges to be generated by the node i to be contracted;

[0119] S7: With j n As index, node i and node b n And the corresponding edge information is stored in the first data structure L con At the corresponding position in the importance sequence, node i is deleted and the process is skipped to S9; wherein the edge information includes edge (j n ,i) and edge (i,b n );

[0120] S8: Using the node number located upstream of node i and connected to it as the index, store the node i, the node located downstream of node i and connected to it, and the corresponding edge information in the second data structure L del At the corresponding position in the second data structure L, node i is deleted from the importance sequence; del It can ensure that information is not lost;

[0121] S9: Repeat S3 to S8 until the shrinkage scale reaches the shrinkage requirement;

[0122] S10: Store the road network G2 after shrinkage.

[0123] The importance sequence adopts a delayed update strategy. The importance sequence puts the node with the smallest importance at the top and shrinks the top node. In the importance sequence, the nodes connected to the deleted node (the shrunken node) need to recalculate their importance and partially update the importance sequence. Let the importance sequence before the local update be S, and the importance sequence after the local update be S new, let a be the number of top node transformations in the importance sequence, is the delay update trigger threshold, and t is the time interval for checking the importance sequence. new If the top nodes of are different, the value of a increases. Every time t, check whether a is different from If The importance of all remaining nodes is recalculated to generate a new importance sequence. Otherwise, the sequence is locally updated and the next node is contracted. Figure 3 As shown, the delayed update process is as follows:

[0124] A1: Initialize a, set t; a represents the number of changes of the top node in the importance sequence, represents the delay update trigger threshold, and t represents the time interval for checking the importance sequence;

[0125] A2: Shrink and delete the top node of the importance sequence S, where the node with the smallest importance is placed at the top of the importance sequence;

[0126] A3: Determine whether the contraction scale meets the contraction requirements. If not, proceed to the next step; if yes, end;

[0127] A4: Recalculate the importance of the nodes connected to the deleted node, update the importance sequence, and obtain the updated importance sequence S new ;

[0128] A5: Determine the importance sequence S after deleting the top node and the updated importance sequence S new Are the top vertices in the middle the same? If so, jump to A2; if not, a=a+1, and go to the next step;

[0129] A6: Determine whether the running time t' is greater than or equal to t. If so, proceed to the next step; if not, jump to A2;

[0130] A7: Determine whether a is greater than If yes, go to the next step; if no, jump to A2;

[0131] A8: Recalculate the importance of all remaining nodes and sort them to generate a new importance sequence S, and jump to A1.

[0132] Path search: Due to the large amount of information in large-scale road networks, the traditional hierarchical algorithm uses the BiDijkstra algorithm for path planning, which requires traversing more nodes and is difficult to plan within a limited time. The A* algorithm uses the heuristic function to plan the shortest path, and only needs to traverse fewer nodes to obtain the final path plan, and its solution speed is fast. This embodiment takes into account the user's multiple preference requirements for the shortest travel distance, the shortest travel time, and the lowest fuel consumption. The improved A* algorithm is used to plan the path for the shrunk road network, and P(m,h) is included in the estimated cost H(m) of the current node value. When calculating the estimated cost of the current node, the minimum actual cost from the current node to the next node is considered, and the weight w' is used to control the proportion of P(m,h) to H(m), thereby affecting the path planning solution. The value of w' is related to the scale of the road network. The cost function F(m) of the improved A* algorithm is expressed as follows:

[0133] F(m)=G(m)+H(m) (6)

[0134] G(m)=ω1*d(m)+ω2*t(m)+ω3*o(m) (7)

[0135]

[0136] P(m,h)=ω1c mh x mh +ω2r mh x mh +ω3b mh x mh (9)

[0137]

[0138] In the formula, G(m) represents the actual cost from the starting point to the current node m, H(m) represents the estimated cost from the current node m to the end point; d(m), t(m), o(m) represent the distance cost, time cost, and fuel cost from the starting point to the current node m, respectively; ω1, ω2, ω3 represent the weights corresponding to the distance cost, time cost, and fuel cost, respectively; D(m), v, They represent the straight-line distance cost, average speed and average fuel consumption from the current node m to the end point, respectively. m ,y m ) represents the coordinates of the current node m, (x dest ,y dest ) represents the coordinates of the end point; P(m,h) represents the actual cost from the current node m to the next node h, w' represents the minimum actual cost weight from the current node to the next node, k1,…,k n ,h∈K m , K mrepresents the set of all nodes that the current node m can reach; c mh 、r mh 、b mh Respectively represent the distance cost, time cost, and fuel consumption cost from the current node m to the next node h; x mh is a 0-1 variable. If the road passes through node m to node h, then x mh =1, otherwise x mh =0.

[0139] It is worth noting that in the process of path search, the user's starting point or end point is often ranked high in the importance sequence, and the starting point or end point has been shrunk. In the traditional hierarchical algorithm, if this happens, it is necessary to find a layer where both the starting point and the end point have not been shrunk, and perform the shortest path planning in this layer, which will waste a lot of road network preprocessing time. In this embodiment, the starting point or end point is converted into a node that can perform the shortest path planning, that is, an equivalent starting point and an equivalent end point corresponding to the starting point and the end point are searched in G2. Figure 4 For example, the starting point is the shrunk node u1, and the improved A* algorithm is used to search the path from the initial start point to the end point in G1 until the node u in G2 is found. k When , stop searching and set the current node u k As the starting point, use the improved A* algorithm to complete the remaining path planning. Similarly, the end point is processed in the same way. Let V i is the edge set from point i in G1 to other nodes, L open is the set of points that the A* algorithm passes through during calculation, P i is the parent node of point i, Representative point j n The equivalent starting point search method is used as an example to illustrate the process of equivalent starting point search, which includes the following steps:

[0140] B1: Determine whether the starting point u1 is in G2. If so, the starting point u1 is stored in the Route list as its own equivalent node. If the starting point u1 is not in G2, it indicates that the starting point u1 is shrunk and proceeds to the next step.

[0141] B2: Initialize the OPEN list to store the nodes that are allowed to be accessed; initialize the CLOSE list to store the nodes that have been visited and passed; take the starting point u1 as the current node, and include the starting point u1 in the CLOSE list, store the other nodes connected to it in the OPEN list, and take the starting point u1 as the parent node of other nodes, and search for the node u with the lowest cost from the OPEN list n As the next node; judge node u n Is it in G2? If so, node u nIf it is an equivalent starting point, jump to B7, otherwise jump to the next step;

[0142] B3: Traverse all nodes in the OPEN list to determine whether these nodes can connect node u n As the parent node, reduce its cost, if possible, update the cost of these nodes, and change the current node u n As the new parent node; otherwise, do nothing and go to the next step;

[0143] B4: for the current node u n , in G1, search for u n The surrounding nodes that can be reached are included in the OPEN list. n As the parent node of these nodes, and update their cost;

[0144] B5: In the OPEN list, select the node u with the lowest cost n+1 As the next node, the previous node u n As node u n+1 The parent node is deleted from the OPEN list and stored in the CLOSE list instead;

[0145] B6: Determine node u n+1 Is it in G2? If so, node u n+1 If it is an equivalent starting point, jump to the next step; otherwise, jump to B3;

[0146] B7: According to the parent node setting, traverse forward to the shrunk starting point u1, and the path formed during the traversal process is stored in the Route list. The shrunk starting point is handled.

[0147] The method for searching for an equivalent end point in G2 is the same as the method for searching for an equivalent starting point in principle, and will not be described in detail here.

[0148] Path unpacking: The path planning obtained by searching on the contracted graph is not the actual road network path, and the path needs to be unpacked to obtain the real road network path. For this reason, once there is a shortcut edge in the planned path, the two edges that generate the shortcut edge are used to replace it until a path without any shortcut edges is obtained. Specifically, path unpacking includes the following process:

[0149] Assume that the optimal path based on G2 is R = (v1, v2…v n …v N ), the nodes included in the optimal path are all nodes in G2, the number of nodes is N, and L con (v n )=(v n ,ST1(v n )…ST m(v n )…ST M (v n )) indicates that the storage location is in v n The contraction edge information of v n is the node index, the dataset ST m (v n ) includes the shrunk node T m , the end point of the contraction edge P m , and node v n The contraction edge (v n ,T m ) and (T m ,P m ), M represents the number of contraction edges, then the specific process of path unpacking is as follows:

[0150] C1: Search for nodes in R one by one. If the node v n If the edge with the starting point does not exist in G1, jump to the next step; if the entire R is traversed and there is no edge that only exists in G2, the unpacking is completed and the final path is output;

[0151] C2: Let v n+1 v n The next node in R, in L con (v n ), traverse all ST m (v n ), find the n+1 Node P of the same node m , jump to the next step;

[0152] C3: The corresponding shrunk node T m Insert into the optimal path R, and its insertion position is at node v n After that, jump to C1.

[0153] The large-scale road network fast path planning method proposed in the above embodiment has the following beneficial effects:

[0154] (1) In the prior art, each time a node is contracted, not only the relevant information of the shortcut edge needs to be stored, but also the road network graph generated after each node contraction needs to be stored. The storage space required is very large, and as the contraction scale and node scale increase, the required space scale also increases. However, this solution designs two data structures to store the information of the node and the corresponding edge after each contraction, and uses the node number as its storage location. Even if it is unpacked later, the shortcut edge can be quickly converted into a road segment in the actual road network. This can solve the problem of the starting point and the end point being contracted, and the problem of unpacking can also be solved. In addition, there is no need to store the road network after each node contraction, saving a lot of space.

[0155] (2) In the prior art, the preprocessing time is very long. Each node is judged and shrunk. Even when facing simple nodes, the same method is still used for processing, which takes a long time. However, this solution can judge in advance which nodes will definitely be shrunk, and the topological attribute of the node is single, with an in-and-out degree of 1. For example, some nodes between highway entrances and exits will definitely pass through the middle node as long as the shortest path passes through this entrance and exit. The present invention directly shrinks these nodes in advance without judging their node importance, thereby reducing the preprocessing time.

[0156] (3) In the prior art, when faced with larger or ultra-large-scale road networks, the solution efficiency is still low. First, the road network preprocessing method is single. The more nodes there are, the longer the road network preprocessing time is. Second, the path planning method finally adopted is bidirectional Dijkstra, which still needs to traverse a large number of nodes to obtain the optimal solution, and the solution efficiency is low. This solution takes into account that the A* algorithm is a heuristic algorithm and can quickly obtain the final path plan, but it cannot solve a more accurate solution, especially in large-scale road networks, and the error generated is large. Therefore, this solution also makes further improvements to the cost function of the A* algorithm, so that even when faced with a large number of nodes, a better path plan can be obtained within a limited time.

[0157] (4) Based on different user preferences, the multiple weight attributes of the edges are determined. In the path planning stage, the multiple weight factors of the edges are used as a basis to enable the path search algorithm to obtain a path that is more in line with the user's travel preferences.

[0158] The embodiment of the present invention also provides a large-scale road network fast path planning system, including:

[0159] The road network preprocessing module is used to: shrink all nodes with an in-degree of 1 (both the in-degree and the out-degree are 1) in the original road network G1, and add corresponding shortcut edges; sort the remaining nodes by importance, and iteratively select the nodes with the lowest importance for shrinking until the number of shrunk nodes reaches the shrinkage requirement, and store the original road network G1 and the road network G2 after the shrinkage is completed; during the node shrinkage process, store the information of all nodes and corresponding edges that generate shortcut edges when the nodes are shrunk in the first data structure, and store the information of all nodes and corresponding edges that do not generate shortcut edges when the nodes are shrunk in the second data structure;

[0160] The path search module is used to: first search for an equivalent starting point and an equivalent end point corresponding to the starting point and the end point respectively in G2, and then perform path planning based on the A* algorithm in G2 to obtain an optimal path based on G2;

[0161] The path unpacking module is used to: unpack all shortcut edges in the optimal path based on G2 based on the information stored in the first data structure to obtain a final path.

[0162] It should be understood that the functional unit modules in various embodiments of the present invention may be concentrated in one processing unit, or each unit module may exist physically separately, or two or more unit modules may be integrated in one unit module, and may be implemented in the form of hardware or software.

[0163] An embodiment of the present invention further provides an electronic device, including:

[0164] a memory having a computer program stored thereon;

[0165] A processor is used to load and execute the computer program to implement the large-scale road network fast path planning method as described in the above embodiment.

[0166] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for rapid path planning of a large-scale road network as described in the above embodiment is implemented.

[0167] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.

[0168] The effect of the technical solution of the present invention is further illustrated below in conjunction with some test examples based on Hubei Province road network data.

[0169] Hubei Province road network distribution Figure 5 As shown in Figure 1, it includes 151,568 nodes and 291,834 road sections. Examples of different sizes are extracted from the road network for measurement. The algorithm parameters are shown in Table 1. The larger the value of n-hop, the lower the average connectivity of each node in the contracted road network, but the longer the search time. Through sensitivity analysis, the n-hop value of 4 is the best; the contraction scale of 0.5 represents the proportion of the number of contracted nodes to the total number of nodes. Using a random generation method, different combinations of start and end points are selected to test examples of different sizes.

[0170] Table 1

[0171]

[0172] First, a small-scale example test is carried out and its results are analyzed. A small-scale road network containing 2000 nodes and 2899 directed road segments is selected for testing. Among them, the distance between the farthest two points is 21.42km, the ratio of the weights of different preferences is 1:1:1, and w' is 40. The improved hierarchical algorithm (ECH-A*) provided by the present invention is tested, and compared with the above-mentioned Dijkstra algorithm, Bidijkstra algorithm, and traditional hierarchical algorithm (CH-BiDijkstra). The comparison results are shown in Table 2. All five algorithms obtain the optimal solution in the small-scale example test, proving that the ECH-A* algorithm can solve the optimal path in a small-scale road network. The solution time of all examples is shown in Table 2. Figure 6 As shown, the average solution time of each algorithm is 0.0067s, 0.0043s, 0.0043s, 0.0033s, and 0.0009s, respectively. The results show that the Dijkstra algorithm has the longest solution time, and the solution time for different examples fluctuates greatly, while the improved ECH-A* algorithm in this paper has the shortest solution time and the smallest fluctuation. In addition, compared with the Bidijkstra algorithm, the average solution time of the ECH-A* algorithm is 1 / 3 of that of the Bidijkstra algorithm. It can be seen that the comparative experimental results verify the effectiveness of the improved ECH-A* algorithm of the present invention in solving path planning problems in small-scale road networks.

[0173] Table 2

[0174]

[0175] Secondly, a large-scale case test was conducted and its results were analyzed. It contains 151568 nodes and 291834 road sections. The weight ratio of different preferences is 1:1:1, and the value of w' is 3500. In the results of solving large-scale test cases by five algorithms (as shown in Table 3), the improved ECH-A* algorithm and A* algorithm both obtained the optimal solutions of 9 cases in the large-scale case test. Since the Dijkstra algorithm, BiDijkstra and CH-BiDijkstra algorithms can all obtain exact solutions, the solutions obtained by the exact algorithm in the table are the solutions obtained by the CH-BiDijkstra algorithm. Gap is the relative deviation between the solution obtained by each algorithm and the exact solution (Gap = 100 × (solved - exact solution) / exact solution). The average Gap of the ECH-A* algorithm is 2.92%, and the average Gap of the A* algorithm is 7.94%. The solution quality of the ECH-A* algorithm is better than that of the A* algorithm. Figure 7The solution time of all examples of Dijkstra algorithm, BiDijkstra algorithm, A* algorithm, CH-BiDijkstra algorithm and CH-A* is shown. The average solution time of all examples is 8.042s, 4.615s, 0.212s, 1.272s and 0.053s respectively. The results show that the ECH-A* algorithm has the shortest solution time in large-scale road networks and the smallest fluctuation in the time for solving each example, while the Dijkstra algorithm has the longest solution time and the fluctuation in the time for solving each example is large. When solving large-scale examples, the ECH-A* algorithm has a shorter solution time than the A* and BiDijkstra algorithms, which reflects the superiority of the ECH-A* algorithm in solving large-scale road network path planning problems. This is because during the road network preprocessing process, the ECH-A* algorithm shrinks the large-scale road network, so that the path planning process does not need to traverse too many nodes. At the same time, compared with the unimproved A* algorithm, the actual path situation is considered in the estimated cost function, so that the solution obtained by the ECH-A* algorithm is closer to the optimal solution.

[0176] Table 3

[0177]

[0178] In addition, the improved strategy proposed in this paper is verified. The improved hierarchical algorithm (ECH-A*) is compared with the hierarchical algorithm after only improving the road network preprocessing strategy (ECH-A*1) and the hierarchical algorithm after only improving the A* algorithm (ECH-A*2). Figure 8 As shown, the average solution time for all feasible solutions of the examples is 0.053s, 0.078s, and 0.129s, respectively. In addition, the road network shrinkage time after the improved road network preprocessing strategy is 43.63s, while it is 518.26s before the improvement. The shrinkage efficiency of the improved road network preprocessing is greatly improved. The results in Table 4 show that the average relative deviation of ECH-A* is 2.92%, the ECH-A*1 algorithm is 6.05%, and the ECH-A*2 algorithm is 4.23%. It shows that both the improved A* algorithm and the improved node shrinkage strategy are effective, and after combining the two improved methods, the ECH-A* algorithm with better performance in solving large-scale road network path planning problems can be obtained.

[0179] Table 4

[0180]

[0181] Finally, a large-scale case test was conducted under the multi-preference mode, and the results were analyzed. Using different algorithms, under three different preference objectives of minimum travel distance, minimum travel time, and minimum travel fuel consumption cost, the test results of 24 cases randomly extracted from the road network were obtained (as shown in Tables 5, 6, and 7).

[0182] Under the preference of minimum travel distance, the weight ratio of different preferences is 1:0:0. From Table 5, we can see that the ECH-A* algorithm obtains the optimal solution of 15 cases with an average relative deviation of 0.59%, and the A* algorithm obtains the optimal solution of 10 cases with an average relative deviation of 1.67%. The solution time of Dijkstra algorithm, BiDijkstra algorithm, A* algorithm, CH-BiDijkstra algorithm and ECH-A* algorithm for all cases is shown in Figure 5. Fig. 9 As shown, the average solution times are 6.871s, 3.017s, 0.142s, 1.491s, and 0.063s, respectively, indicating the high efficiency of the ECH-A* algorithm proposed in this paper.

[0183] Table 5

[0184]

[0185] Under the user preference of minimum travel time, the weight ratio of different preferences is 0:1:0. As can be seen from Table 6, the ECH-A* algorithm obtains the optimal solution for 17 cases, and the A* algorithm obtains the optimal solution for 12 cases; the average deviation of the ECH-A* algorithm is 1.84%, and that of the A* algorithm is 3.16%. The solution time of the Dijkstra algorithm, BiDijkstra algorithm, A* algorithm, CH-BiDijkstra algorithm and ECH-A* algorithm is as follows Fig.10 As shown, the average solution time for feasible solutions of all examples is 7.308s, 2.496s, 0.159s, 0.990s, and 0.076s, respectively.

[0186] Table 6

[0187]

[0188] Under the preference for minimum travel fuel consumption cost, the weight ratio of different preference objective functions is 0:0:1. As can be seen from Table 7, the ECH-A* algorithm obtains the optimal solution for 17 examples, and the A* algorithm obtains the optimal solution for 11 examples; among them, the average relative deviation of the ECH-A* algorithm is 1.15%, and that of the A* algorithm is 4.23%. The average solution time of the Dijkstra algorithm, BiDijkstra algorithm, A* algorithm, CH-BiDijkstra algorithm and ECH-A* algorithm to solve the feasible solutions of all examples are 7.134s, 1.694s, 0.143s, 0.985s, and 0.064s respectively. The solution time of all examples is as follows Fig.11 shown.

[0189] Table 7

[0190]

[0191]

[0192] By comparing the three tables horizontally, it can be found that all algorithms can obtain corresponding path planning solutions for user needs under different objectives. The ECH-A* algorithm and the A* algorithm have a fast solution speed because their path search algorithms contain heuristic functions to avoid traversing too many nodes in the path planning process. Moreover, the gap between the ECH-A* algorithm and the optimal solution is small. The relative deviation between the solutions obtained under different objectives and the optimal solution is less than 1%, and a higher quality solution can be obtained. Under different user preferences, the ECH-A* algorithm has the fastest solution speed, and the fluctuation of the solution time is small. The solution time of most examples does not exceed 0.1s. The results show that the improved ECH-A* algorithm can well meet the needs of users for fast path planning of large-scale road networks under different preferences, ensure the quality of its solution, and have a good solution speed.

[0193] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0194] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0195] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0196] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0197] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A fast path planning method for large-scale road networks, It is characterized in that The steps include: Road network preprocessing: The original road network G 1 All nodes with in-and-out degrees of 1 are contracted, and corresponding shortcut edges are added; the remaining nodes are sorted by importance, and the nodes with the lowest importance are iteratively selected for contraction until the number of contracted nodes reaches the contraction requirement. 1 and the road network G after contraction 2 During the node shrinking process, the information of all nodes and corresponding edges that generate shortcut edges when the node is shrunk is stored in the first data structure, and the information of all nodes and corresponding edges that do not generate shortcut edges when the node is shrunk is stored in the second data structure; Path search: First in G 2 Search for the equivalent starting point and equivalent end point corresponding to the starting point and end point respectively in G, and then 2 In the path planning based on A* algorithm, we get 2 The optimal path of Path unpacking: Based on the information stored in the first data structure, the G 2 Unpack all shortcut edges in the optimal path to get the final path.

2. The large-scale road network fast path planning method according to claim 1, It is characterized in that The road network preprocessing comprises the following steps: S1: Get the original road network G 1 ; S2: G 1 All nodes q with in-degree 1 in G are contracted. 2 Add a shortcut edge corresponding to each contracted node q in the first data structure L; take the node p located upstream of the node q and connected to it as the index, store the node q, the shortcut edge endpoint, and the corresponding edge information in the first data structure L con The corresponding position of S3: Obtain the importance sequence of all uncontracted nodes based on importance sorting, and select the node i with the lowest importance; S4: Perform local search, if node j exists n To node b n The shortest path is (j n ,i,b n ), then go to the next step, otherwise, go to S6; S5: Contract node i, in G 2 Add a node j n To node b n The shortcut edge; S6: If SC i >0, go to the next step; otherwise, shrink node i and jump to S8; where SC i Indicates the number of shortcut edges to be generated by the node i to be contracted; S7: With j n As index, node i and node b n , and the corresponding edge information is stored in the first data structure L con At the corresponding position in the sequence, delete node i from the importance sequence and jump to S9; S8: Using the node number located upstream of node i and connected to it as the index, store the node i, the node located downstream of node i and connected to it, and the corresponding edge information in the second data structure L del At the corresponding position in the sequence, delete node i from the importance sequence; S9: Repeat S3 to S8 until the shrinkage scale reaches the shrinkage requirement; S10: store the road network G after shrinking 2 .

3. The large-scale road network fast path planning method according to claim 1 or 2, It is characterized in that The importance of a node is defined as: IM i =CT i -ED i +UN i Where, IM i represents the importance of node i, CT i , ED i 、UN i They represent the contraction cost, edge difference and uniformity of node i respectively.

4. The large-scale road network fast path planning method according to claim 2, It is characterized in that During the road network preprocessing process, the importance sequence adopts a delayed update strategy, and the process is as follows: A1: Initialize a, set t; a represents the number of changes of the top node in the importance sequence, represents the delay update trigger threshold, and t represents the time interval for checking the importance sequence; A2: Shrink and delete the top node of the importance sequence S, where the node with the smallest importance is placed at the top of the importance sequence; A3: Determine whether the contraction scale meets the contraction requirements. If not, proceed to the next step; if yes, end; A4: Recalculate the importance of the nodes connected to the deleted node, update the importance sequence, and obtain the updated importance sequence S new ; A5: Determine the importance sequence S after deleting the top node and the updated importance sequence S new Are the top vertices in the middle the same? If so, jump to A2; if not, a=a+1, and go to the next step; A6: Determine whether the running time t' is greater than or equal to t. If so, proceed to the next step; if not, jump to A2; A7: Determine whether a is greater than If yes, go to the next step; if no, jump to A2; A8: Recalculate the importance of all remaining nodes and sort them to generate a new importance sequence S, and jump to A1.

5. The large-scale road network fast path planning method according to claim 1, It is characterized in that In G 2 In the search for the equivalent starting point and equivalent end point corresponding to the starting point and end point respectively, the equivalent starting point is searched by the following method: B1: Determine the starting point u 1 Is it in G 2 If it exists, then the starting point u 1 As its own equivalent node, it is stored in the Route list; if the starting point u 1 Not in G 2 In the example, it indicates that the starting point u 1 Be contracted and go to the next step; B2: Initialize the OPEN list to store the nodes that are allowed to be accessed; initialize the CLOSE list to store the nodes that have been visited and passed; 1 As the current node, and the starting point u 1 Include it in the CLOSE list, store other nodes connected to it in the OPEN list, and put the starting point u 1 As the parent node of other nodes, search for the node u with the minimum cost from the OPEN list n As the next node; judge node u n Is it in G 2 If it exists, node u n If it is an equivalent starting point, jump to B7, otherwise jump to the next step; B3: Traverse all nodes in the OPEN list to determine whether these nodes can connect node u n As the parent node, reduce its cost, if possible, update the cost of these nodes, and change the current node u n As the new parent node; otherwise, do nothing and go to the next step; B4: for the current node u n , in G 1 , search for u n The surrounding nodes that can be reached are included in the OPEN list. n As the parent node of these nodes, and update their cost; B5: In the OPEN list, select the node u with the lowest cost n+1 As the next node, the previous node u n As node u n+1 The parent node is deleted from the OPEN list and stored in the CLOSE list instead; B6: Determine node u n+1 Is it in G 2 If it exists, node u n+1 It is an equivalent starting point, jump to the next step; Otherwise, jump to B3; B7: According to the parent node setting, traverse forward to the contracted starting point u 1 , the path formed by the traversal process is stored in R, and the case where the starting point is shrunk is handled; Using the same principle as searching for an equivalent starting point, 2 Search for equivalent endpoints in .

6. The large-scale road network fast path planning method according to claim 1, It is characterized in that The cost function F(m) in the A* algorithm is expressed as follows: F(m)=G(m)+H(m) G(m)=ω 1 *d(m)+ω 2 *t(m)+ω 3 *o(m) P(m,h)=ω 1 c mh x mh +oh 2 r mh x mh +oh 3 b mh x mh Where G(m) represents the actual cost from the starting point to the current node m, H(m) represents the estimated cost from the current node m to the end point; d(m), t(m), and o(m) represent the distance cost, time cost, and fuel cost from the starting point to the current node m, respectively; ω 1 ,ω 2 ,ω 3 Respectively represent the weights corresponding to distance cost, time cost and fuel consumption cost; D(m), v, They represent the distance cost, average speed and average fuel consumption from the current node m to the end point, respectively. m ,y m ) represents the coordinates of the current node m, (x dest ,y dest ) represents the coordinates of the end point; P(m,h) represents the actual cost from the current node m to the next node h, w, represents the minimum actual cost weight from the current node to the next node, k 1 ,…,k n ,h∈K m , K m represents the set of all nodes that the current node m can reach; c mh 、r mh 、b mh Respectively represent the distance cost, time cost, and fuel consumption cost from the current node m to the next node h; x mh is a 0-1 variable. If the road passes through node m to node h, then x mh =1, otherwise x mh =0.

7. The large-scale road network fast path planning method according to claim 2, It is characterized in that Path unpacking includes the following processes: Assume that based on G 2 The optimal path is R = (v 1 ,v 2 …v n …v N ), the nodes included in the optimal path are all G 2 The number of nodes in L is N. con (v n )=(v n ,ST 1 (v n )…ST m (v n )…ST M (v n )) indicates that the storage location is in v n The contraction edge information of n is the node index, the dataset ST m (v n ) includes the shrunk node T m , the end point of the contraction edge P m , and node v n The contraction edge (v n ,T m ) and (T m ,P m ), M represents the number of contraction edges, then the specific process of path unpacking is as follows: C1: Search for nodes in R one by one. If the node v n The edge with the starting point does not exist in G 1 , skip to the next step; If we traverse the entire R, there is no 2 If there are no edges in , the unpacking is completed and the final path is output; C2: Let v n+1 v n The next node in R, in L con (v n ), traverse all ST m (v n ), find the n+1 Node P of the same node m , jump to the next step; C3: The corresponding shrunk node T m Insert into the optimal path R, and its insertion position is at node v n After that, jump to C1.

8. A fast path planning system for large-scale road networks, It is characterized in that include: The road network preprocessing module is used to convert the original road network G 1 All nodes with in-and-out degrees of 1 are contracted, and corresponding shortcut edges are added; the remaining nodes are sorted by importance, and the nodes with the lowest importance are iteratively selected for contraction until the number of contracted nodes reaches the contraction requirement. 1 and the road network G after contraction 2 During the node shrinking process, the information of all nodes and corresponding edges that generate shortcut edges when the node is shrunk is stored in the first data structure, and the information of all nodes and corresponding edges that do not generate shortcut edges when the node is shrunk is stored in the second data structure; The path search module is used to: first, in G 2 Search for the equivalent starting point and equivalent end point corresponding to the starting point and end point respectively in G, and then 2 In the path planning based on A* algorithm, we get 2 The optimal path of The path unpacking module is used to: based on the information stored in the first data structure, 2 Unpack all shortcut edges in the optimal path to get the final path.

9. An electronic device, It is characterized in that include: a memory having a computer program stored thereon; A processor is used to load and execute the computer program to implement the large-scale road network rapid path planning method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the large-scale road network fast path planning method as described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Snapshot output method of effective path in network, electronic equipment and storage medium

    CN121093870A