A routing connectivity method to solve local road network separation
Through the progressive random multi-connection construction method, a virtual connection path is constructed and the shortest path is calculated, which solves the routing connectivity problem caused by local road network separation, realizes the connectivity from the start point to the end point, and uses the road as short as possible in the walking distance Network data reduces the complexity of the road network.
Patent Information
- Application Number
- CN202210630473.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-06
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2042-06-06
AI Technical Summary
The existing technology cannot calculate the route from the start point to the end point when dealing with local road network separation, resulting in routing connectivity problems. Especially when road sections are interrupted due to natural disasters or traffic control, map services cannot provide effective routing solutions. plan.
By using the progressive random multi-connection construction method, by constructing the error distance sequence of virtual connection paths at the start and end points, randomly select the end points of the road network to establish a virtual connection path, and use the shortest circuit algorithm to calculate the shortest path, and adjust the error distance range step by step Achieve connectivity.
It effectively solves the routing connectivity problem caused by local road network separation, ensures connectivity from the start point to the end point, and uses road network data in the shortest walking distance, reducing the complexity of the road network.
Smart Images

Figure CN115033765B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a routing connectivity method for solving local road network separation. Background Art
[0002] The highway network is the basic network of national transportation. Road, aviation, shipping, etc. all rely on the highway network to achieve national interconnection. Our country has vigorously developed infrastructure and built a well-connected highway network system. China's highway network can be divided into five technical levels: expressways, first-class highways, second-class highways, third-class highways and fourth-class highways. Generally speaking, the lower-level highway plays the role of connecting the upper-level highway, thereby ensuring the realization of national interconnection under the five-level highway system.
[0003] At present, the instant routing service provided by Baidu or Amap has become a map service frequently used by the public. Map service providers provide routing query services from any starting point to any end point, but when the starting point O or the end point D is not in the road network, which often happens, the existing practice is to establish a route from the starting point O or the end point D to the nearest point P in the road network. O A virtual connecting line can be created, or a virtual connecting road can be established from the starting point O or the end point D to the POI (Point Of Interest, named landmark point). Usually, this virtual connecting road can be completed by walking, such as Figure 8 shown.
[0004] In most cases Figure 8 The method shown can realize the route calculation from any starting point to the end point. However, in actual road networks, there will still be local separation, such as Fig. 9 The figure shows a local regional structure of China's highway network where local road network separation occurs. This situation of local road network separation actually exists in both the local microscopic road network structure and the national road network structure.
[0005] When the road network is partially separated, the lack of connectivity of the local road network will make it impossible to calculate the route from the starting point to the end point. At present, the instant routing service provided by map service providers is based on a very complete connected road network. However, not all companies that need to build independent map services have such complete road network data. In addition, due to natural disasters or traffic control, some sections of the road may be interrupted, and existing map service providers will prompt that there is no reachable route. Fig.10 As shown in the figure, the nearest intersection point to the starting point O is located on the independent road segment l4 instead of the connected road segment l1. The nearest intersection point is P′ O Instead of P O , if from P′ O Calculate the mapping point P to the end point DIf there is a route, the disconnection between section l4 and the main road network will result in the inability to find a route.
[0006] In summary, how to effectively solve the routing connectivity of local road network separation urgently needs to be solved. Summary of the Invention
[0007] To solve the above problems, a progressive random multi-connectivity construction method is provided, which can effectively solve the routing connectivity problem of local road network separation. The present invention adopts the following technical solutions:
[0008] The present invention provides a method for solving the routing connectivity of local road network separation, which is used to calculate the route from any starting point to any ending point when there is local separation in the actual road network. It is characterized by including the following steps: Step S1, collect all the endpoints of the road sections in the road network and record them as set V; Step S2, select the starting point and the ending point in the local road network, and respectively construct the error distance sequences of their respective virtual connecting roads, denoted as dd = {d1, d2,..., d n}, where when i > j, d i > d j ; Step S3, set the initial value of i, and select d i as the current maximum virtual connecting road distance; Step S4, based on the error distance sequence of the starting point, obtain the set of all endpoints in set V whose distances to the starting point are less than d i , and randomly select M points from it to form the starting point distance sequence, and establish M virtual connecting roads of the starting point; Step S5, based on the error distance sequence of the ending point, obtain the set of all endpoints in set V whose distances to the ending point are less than d i , randomly select M points from it to form the ending point distance sequence, and establish M virtual connecting roads of the ending point; Step S6, establish the road network from the starting point to the ending point based on the multiple virtual connecting roads of the starting point and the ending point, calculate and determine whether there is a shortest path from the starting point to the ending point; Step S7, when the judgment in Step S6 is yes, then the starting point and the ending point are connected, and take the current d i as the connectivity obtained by the maximum distance, as the final connectivity result; Step S8, when the judgment in Step S6 is no, judge whether i < n; Step S9, when the judgment in Step S8 is yes, delete all the virtual connecting roads constructed currently, set i = i + 1, and then repeat the remaining steps starting from Step S3; otherwise, end.
[0009] A method for solving the routing connectivity of local road network separation provided by the present invention may also have the following technical feature, wherein, in Step S1, a quadtree structure is used to collect and store all the endpoints of the road sections in the road network.
[0010] The routing connectivity method for solving local road network separation provided by the present invention may also have such a technical feature, wherein, in step S6, the shortest path from the starting point to the end point is calculated by a shortest path algorithm.
[0011] The present invention also provides a computer-readable storage medium for storing a computer program, characterized in that the computer program is configured to implement the above-mentioned routing connectivity method for solving local road network separation when executed.
[0012] Function and Effect of the Invention
[0013] According to a method for solving the routing connectivity of a local road network separation of the present invention, the method first sets respective error distance sequences for the starting point and the end point, selects an initial range according to the error distance sequence, establishes multiple virtual connection roads within the initial range that can connect the starting point and the end point to the road network, and further uses the shortest path algorithm of the complete route to calculate the route from the starting point to the end point connected based on the virtual connection road. As long as the route exists, the starting point and the end point can be connected based on the virtual connection road. If the route does not exist, the virtual connection road can be searched and established progressively in the range from small to large according to the error distance sequence. Thus, the routing connectivity method can solve the routing connectivity of the local road network separation, and the virtual connection road established for auxiliary connectivity can generally be completed by walking. In addition, the connectivity achieved by the above-mentioned iterative method can ensure the shortest walking distance and make the best use of the road network data. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 It is a flow chart of a method for solving routing connectivity problems in a local road network separation according to an embodiment of the present invention;
[0015] Figure 2 is a schematic diagram of the map location and road network location of the starting point selected in the embodiment of the present invention;
[0016] Figure 3 is a schematic diagram of the map location and road network location of the end point selected in an embodiment of the present invention;
[0017] Figure 4 is a schematic diagram of establishing a virtual connection road within a range of 5 kilometers from the end point in an embodiment of the present invention;
[0018] Figure 5 is a schematic diagram of establishing a virtual connection road within 50 kilometers from the end point in an embodiment of the present invention;
[0019] Figure 6 is a schematic diagram of 50 virtual connecting roads randomly selected within a range of 50 kilometers from the end point in an embodiment of the present invention;
[0020] Figure 7 is a schematic diagram of the shortest path from a starting point to an end point established by using the method of the present invention in an embodiment of the present invention;
[0021] Figure 8 It is a virtual connection road schematic diagram from the starting point to the end point established by the existing method;
[0022] Fig. 9 It is a schematic diagram of local disconnection in a five-level road network;
[0023] Fig.10 This is a schematic diagram of the impact of a local separated road network on routing connectivity. DETAILED DESCRIPTION
[0024] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the following is a detailed description of a routing connectivity method for solving local road network separation in combination with embodiments and drawings.
[0025] <Example>
[0026] Figure 1 It is a flow chart of a method for solving routing connectivity problems in a local road network separation according to an embodiment of the present invention.
[0027] like Figure 1 As shown, a method for solving the routing connectivity problem of local road network separation in this embodiment includes the following steps:
[0028] Step S1, using a quadtree structure to store all the endpoints of the road segments in the road network, recorded as a set V.
[0029] Step S2: Select the starting point O and the end point D in the local road network, and construct the error distance sequence of the virtual connecting road based on the starting point and the end point, which is recorded as dd = {d1, d2, ..., d n}, where when i>j, d i >d j .
[0030] In this embodiment, the starting point and the end point are selected in the road network, and the positions are expressed in longitude and latitude coordinates. The longitude and latitude coordinates of the starting point are (117.47595, 31.72594), and the longitude and latitude coordinates of the end point are (118.46832, 32.5609). The error distance sequence is reasonably constructed according to the actual situation displayed by the road network. Taking the end point (118.46832, 32.5609) as an example, the error distance sequence dd = {1, 5, 50} kilometers is set.
[0031] Since the process of establishing the virtual connection road between the starting point and the road network is the same as the process of establishing the virtual connection road of the end point, this embodiment takes the end point as an example, and the process of establishing the virtual connection road of the starting point is not repeated.
[0032] Figure 2 is a schematic diagram of the map location and road network location of the starting point selected in the embodiment of the present invention, and Figure 3 It is a schematic diagram of the map location and road network location of the end point selected in the embodiment of the present invention.
[0033] like Figure 2 and Figure 3 As shown in the figure, the starting point and the end point are not on the road network. If the method in this paper is not used to establish a virtual connection road from the starting point to the road network, it is impossible to calculate the effective path from the starting point to the end point. In addition, from the public road network data map ( Figure 2 and Figure 3 As can be seen from the right figure in the figure, in the road network data, there is a partially separated road network at both the starting point and the end point. The reasons for the separation may be a problem with the public data mapping, or the public road network data is not updated in a timely manner, or there are indeed separated sections at present. Due to the requirements of the transportation business on road conditions, only sections of a certain level that meet specific requirements are selected into the road network, which further increases the possibility of partial separation of sections.
[0034] Step S3, set the initial value of i and select d i It is the current maximum virtual link distance.
[0035] The initial value of i can be set to 0 or 1. In this embodiment, the initial value of i is set to 1. Because the closest distance from the road network data to the end point is more than 3 kilometers, no virtual connection road is found when d1 = 1 kilometer. Therefore, when i = 2, that is, d2 = 5 kilometers is set as the current maximum virtual connection road distance, a virtual connection road is established.
[0036] Step S4, based on the error distance sequence of the starting point, obtain all the nodes from the set V whose distance to the starting point O is less than d i The set of endpoints of And randomly select M points to form the starting point distance sequence PM O = {P1,P2,…,P M}, establish M virtual connection paths from O to Po.
[0037] Step S5, based on the error distance sequence of the end point, obtain from the set V all the nodes whose distance from the end point D is less than d i The set of endpoints of Randomly select M points from it to form the end point distance sequence PM D = {P1,P2,…,P M}, establish M lines from D to P D Virtual connection path.
[0038] Step S6, establishing a road network from the starting point to the end point based on the multiple virtual connecting roads at the starting point and the end point, and calculating and determining whether there is a shortest path from the starting point to the end point.
[0039] The shortest path can be calculated using any shortest path algorithm. In this embodiment, the Dijkstra algorithm is used.
[0040] Step S7: If the result of step S6 is yes, the starting point O and the end point D are connected, and the current d i The connectivity obtained as the maximum distance is taken as the final connectivity result;
[0041] Step S8: when the judgment of step S6 is no, it is judged that i<n.
[0042] In this embodiment, since the initial value of i is set to 1, it is determined that i<n. If the initial value of i is set to 0, this step determines that i<n-1.
[0043] Step S9, when the judgment of step S8 is yes, delete all the currently constructed virtual links, set i=i+1 and repeat the above steps from step S3, otherwise end.
[0044] Figure 4 is a schematic diagram of establishing a virtual connection road within 5 kilometers from the end point in an embodiment of the present invention, and Figure 5 It is a schematic diagram of establishing a virtual connection road within 50 kilometers from the end point in an embodiment of the present invention.
[0045] like Figure 4 As shown in the figure, within the error range of 5 km, multiple endpoints can be found to connect with the road network. Figure 3 It can be seen that Figure 4 The connection points shown all fall on a partially disconnected road network, and the route from the start point to the end point cannot be connected.
[0046] Therefore, when i=i+1, that is, i=3, d3=50 km is the current maximum virtual link distance. Without limiting M, all virtual links connecting the road network to the end point are finally established within a range of 50 km. Figure 5 As shown. Figure 5 It can be seen that if M is set to be infinite, many unnecessary virtual connection paths will be added, which will further increase the computational complexity of the shortest path algorithm.
[0047] Furthermore, if M is limited to 50 and virtual connections are established in ascending order, it is still easy to fall into the following situation: Figure 4 In the partially disconnected road section shown.
[0048] Figure 6It is a schematic diagram of 50 virtual connecting roads randomly selected within a range of 50 kilometers from the end point in an embodiment of the present invention.
[0049] Therefore, this embodiment adopts the method of randomly selecting M virtual connection roads, which can effectively reduce the complexity of the road network while achieving connectivity. Figure 6 shown.
[0050] Figure 7 It is a schematic diagram of the shortest path from a starting point to an end point established by using the method of the present invention in an embodiment of the present invention.
[0051] After the above steps, the routing connectivity problem in the road network with local separation can be solved under the condition of limiting the error distance sequence. The path from the starting point (117.47595, 31.72594) to the end point (118.46832, 32.5609) is finally established as follows: Figure 7 shown.
[0052] As described above, this embodiment provides a method for solving routing connectivity problems in a local road network separation. The method can also be configured as a computer program and stored in a computer storage medium. The computer program is used to enable a computer to execute the steps of the method for solving routing connectivity problems in a local road network separation.
[0053] Example Function and Effect
[0054] According to a routing connectivity method for solving local road network separation provided by this embodiment, the method first sets an error distance sequence for the starting point and the end point, selects an initial range based on the error distance sequence, establishes multiple virtual connection roads within the initial range that enable the starting point and the end point to connect with the road network, and further uses the shortest path algorithm of the complete route to calculate the route from the starting point to the end point connected based on the virtual connection road. As long as the route exists, the starting point and the end point can be connected based on the virtual connection road. If the route does not exist, the method can continue to search and establish the connected virtual connection road in a progressive manner within the range from small to large according to the error distance sequence according to the above process.
[0055] In the embodiment, since the error distance sequence is set, the complexity and disorder caused by the large-scale and indiscriminate search for connecting roads in the existing method are solved. At the same time, since a random selection method is adopted to establish a virtual connecting road within the error range, the complexity of the road network is effectively reduced while achieving connectivity.
[0056] In summary, the routing connectivity method of this embodiment can solve the routing connectivity of local road network separation, and the virtual connection road established for auxiliary connectivity can generally be completed by walking. In addition, the connectivity achieved by the above iteration method can ensure the shortest walking distance and make the best use of road network data.
[0057] The above embodiments are only used to illustrate specific implementation modes of the present invention, and the present invention is not limited to the description scope of the above embodiments.
Claims
1. A method for solving local road network separation in route connectivity, used to calculate the route from any starting point to any end point when there is local separation in the actual road network, characterized in that: The following steps are involved: Step S1, collecting all the endpoints of the road sections in the road network, recorded as a set V; Step S2, select the starting point and the end point in the local road network, and construct the error distance sequence of the virtual connecting road based on the starting point and the end point, which is recorded as dd = {d1, d2, ..., d n }, where when i>j, d i >d j ; Step S3, set the initial value of i and select d i is the current maximum virtual link distance; Step S4, based on the error distance sequence of the starting point, obtain from the set V all the nodes whose distance to the starting point is less than d i The endpoints of the set are randomly selected from M points to form a starting point distance sequence, and M virtual connecting roads of the starting points are established; Step S5, based on the error distance sequence of the end point, obtain from the set V all the nodes whose distance from the end point is less than d i A set of endpoints, randomly select M points from them to form an endpoint distance sequence, and establish M virtual connection paths of the endpoints; Step S6, establishing a road network from the starting point to the end point based on the multiple virtual connecting roads at the starting point and the end point, and calculating and determining whether there is a shortest path from the starting point to the end point; Step S7: If the result of step S6 is yes, the starting point and the end point are connected, and the current d i The connectivity obtained as the maximum distance is taken as the final connectivity result; Step S8: When the judgment in step S6 is no, judge i <n; Step S9, when the judgment of step S8 is yes, delete all the currently constructed virtual links, set i=i+1 and repeat the remaining steps starting from step S3; otherwise, end.
2. A method for solving the routing connectivity problem of local road network separation according to claim 1, characterized in that: include: Wherein, in the step S1, a quadtree structure is used to collect and store all the road segment endpoints in the road network.
3. A method for solving the routing connectivity problem of local road network separation according to claim 1, characterized in that: include: Wherein, in step S6, the shortest path from the starting point to the end point is calculated by a shortest path algorithm.
4. A computer-readable storage medium for storing a computer program, characterized in that: The computer program is configured to implement a routing connectivity method for solving local road network separation according to any one of claims 1 to 3 when executed.
