A shortest path query method based on adaptive topology optimization

By expanding and optimizing the urban rail transit topology map using an adaptive topology optimization method, the problems of query errors and low efficiency of Dijkstra's method at transfer stations are solved, and more accurate and faster shortest path queries are achieved.

CN118113735BActive Publication Date: 2026-07-14BEIJING UNIV OF POSTS & TELECOMM

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING UNIV OF POSTS & TELECOMM
Filing Date
2024-01-31
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing methods for finding the shortest path in urban rail transit are prone to errors or inefficiency when dealing with transfer stations. In particular, Dijkstra's method fails to accurately evaluate the merits of different paths when considering transfer times, resulting in inaccurate query results and high computational cost.

Method used

An adaptive topology optimization method is adopted to expand and optimize the urban rail transit topology map. By adding virtual nodes and splitting stations, vehicular and pedestrian passages are distinguished, the topology map structure is simplified, the concept of transfer stations is abandoned, and Dijkstra's method is used to find the shortest path.

Benefits of technology

It improves the accuracy and efficiency of route queries, enabling rapid response to user query needs in large-scale rail transit networks and providing reliable and efficient navigation solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118113735B_ABST
    Figure CN118113735B_ABST
Patent Text Reader

Abstract

The present application provides a shortest path query method based on adaptive topology optimization, which can be used in rail transit environment. The present application splits the transfer station into a non-complete graph, and sets the travel time and transfer time as the weight of the edge in the topology graph. In the shortest path query process, the present application does not need to judge the transfer attribute of the station and calculate the transfer time additionally, avoiding the error of the query result caused by the transfer time. In view of the problem that splitting the transfer station into a complete graph leads to low efficiency, the present application optimizes the topology structure of the road network, and improves the efficiency of the shortest path query. In addition, the present application increases the virtual station and its line, and distinguishes the driving path from the pedestrian transfer path, avoiding the error caused by the confusion of the driving path and the pedestrian transfer path after splitting the transfer station.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of shortest path query technology, and in particular to a shortest path query method based on adaptive topology optimization. Background Technology

[0002] Urban rail transit is an important component of urban public transportation systems, characterized by large capacity, high speed, punctuality, low pollution, and safety and comfort, giving it unique advantages in alleviating traffic congestion in large cities. Transfer stations are transportation hubs that facilitate passengers traveling between different lines without leaving the station. As the urban rail transit network structure becomes increasingly complex, the number of transfer stations increases, making urban rail transit route query processes more complex, computationally intensive, and time-consuming.

[0003] The common method for finding the shortest path in urban rail transit is Dijkstra's algorithm. Dijkstra's algorithm is a classic query method for solving the single-source shortest path problem in a graph, which involves finding the shortest path from a starting node to all other nodes in a given weighted directed graph. The basic idea of ​​Dijkstra's algorithm is to repeatedly select the node closest to the starting node and update the distances of its adjacent nodes until the shortest path from the starting node to the target node is found or all nodes have been traversed. This query method uses a greedy strategy, selecting the nearest unvisited node to the starting node as an intermediate node each time and continuously optimizing the path by updating the distance table. However, the greedy strategy only focuses on the distance between adjacent nodes and ignores the transfer time at the same node, which may lead to erroneous results such as finding a non-shortest path. To address this error, researchers currently employ three main methods for preprocessing transfer stations:

[0004] The first method is Dijkstra's algorithm based on stations, which requires determining whether the current station is a transfer station. If the current station is a transfer station, the shortest path is recalculated based on the type of transfer station and the transfer time. While this first approach can avoid the errors caused by the classic Dijkstra's algorithm based on stations, it adds the process of determining whether it is a transfer station, thus resulting in a more complex query process and lower efficiency.

[0005] The second method is to fully unfold the map of the transfer stations. All transfer stations are arranged according to the map of the station. The transfer route is broken down into 2n ordinary stations, with connections between them. The cost of traveling between stations is equal to the transfer cost in the corresponding direction. While this method avoids the error caused by transfer time in Dijkstra's method, it may lead to situations where actual passage is impossible due to confusion between vehicular and pedestrian routes.

[0006] The third method is Dijkstra's algorithm, which operates on edges (paths). This method iterates through each edge, starting from the origin, selecting the next vertex on the current shortest path, and then updating the weights of the edges adjacent to that vertex to find an even shorter path. This method uses a priority queue to maintain the order of candidate paths, ensuring that the shortest path is always processed. However, Dijkstra's algorithm, which operates on edges, also needs to consider transfer times in real-time when querying the shortest path problem, thus suffering from slow speed and low efficiency.

[0007] Therefore, how to improve the efficiency of the shortest path query method while ensuring accuracy has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0008] To address the issues of errors or inefficiency caused by transfer time, this invention proposes a shortest path query method based on adaptive topology optimization.

[0009] This invention is achieved through the following technical solution:

[0010] A shortest path query method based on adaptive topology optimization includes station information, cross-section information, and transfer information; the station information includes stations... Transfer attributes and associated lines The transfer attribute is either a transfer station or a non-transfer station; the cross-sectional information includes the line to which it belongs. Originating station O, ending station D, travel time The transfer information includes stations. Switch out the line Switching to the new line Change direction Change direction Transfer time ,in (0 represents no distinction between uplink and downlink, 1 represents uplink, 2 represents downlink), characterized in that the steps of the shortest path query method based on adaptive topology optimization are as follows:

[0011] A1: Import the station information, the cross-sectional information, and the transfer information;

[0012] A2: Traverse all sites;

[0013] A3: Check the transfer attribute of the current station; if the current station's transfer attribute is not a transfer station, continue traversing the current station's adjacent stations; if the current station's transfer attribute is a transfer station, modify the current station and its associated line. ;

[0014] A4: Check if all sites have been traversed. If the current site has not been traversed, return to A3; if all sites have been traversed, use Dijkstra's method to find the shortest path.

[0015] Furthermore, if the current site is a site The transfer attribute refers to the transfer station and the line to which it belongs. The upstream adjacent station Downlink adjacent stations In step A3, modifying the current station line includes the following steps:

[0016] B1: On the line Delete the site mentioned above and all its affiliated lines;

[0017] B2: Determine the site On the corresponding line Are the up and down points the same?

[0018] If the site On the corresponding line If the uplink and downlink locations are the same, add a split site. The site With the site The stations are connected separately. With the site The running times between them are respectively

[0019] , ;

[0020] If the site On the corresponding line The uplink and downlink locations are different, so add a virtual site. The site With the site Connected separately; the stations With the site The running times between them are respectively

[0021] , ;

[0022] Add upstream split site and downstream split sites The site With the site Connection; the site With the site The running times between them are respectively

[0023] , ;

[0024] B3: The site With the line The above-mentioned sites Split sites The stations are connected separately. With the site The running times between them are respectively

[0025] , ;

[0026] Further, in step B2, the station is determined. On the corresponding line The steps to determine if the uplink and downlink locations are the same are as follows:

[0027] like or Then the site On the corresponding line The uplink and downlink locations are different; otherwise, the station On the corresponding line The up and down points are the same.

[0028] The beneficial effects of this invention are:

[0029] This invention first expands and optimizes the urban rail transit topology map. Different splitting methods are selected for different station types, simplifying the complete urban rail transit topology map. To address the error of confusing vehicle and pedestrian passages in the complete urban rail transit topology map, virtual nodes and their connecting lines are added to distinguish between vehicle and pedestrian passages.

[0030] By expanding and optimizing the urban rail transit topology map using the method proposed in this invention, the process of querying routes no longer requires separate consideration of transfer stations. This allows for a more accurate evaluation of the merits of candidate routes, avoiding errors in query results caused by long transfer times in traditional methods. Furthermore, when handling large-scale rail transit networks, optimized data structures are employed, effectively improving query efficiency and ensuring a rapid response for users searching for the shortest rail transit path. This invention overcomes the limitations of traditional query methods while providing a more reliable and efficient navigation solution for rail transit travel. Attached Figure Description

[0031] Figure 1 An optimized topology map for a double-track transfer station E where all the up and down points of each line are in the same location;

[0032] Figure 2 An optimized topology diagram for a double-line transfer station E where the up and down points of only one line are in the same location;

[0033] Figure 3 This is an optimized topology diagram for a double-track transfer station E where the up and down points of each line are not in the same location;

[0034] Figure 4 An optimized topology map for a three-line interchange station G where all the up and down points of each line are in the same location;

[0035] Figure 5 An optimized topology diagram for a three-line interchange station G where only the up and down points of two of its lines are in the same location;

[0036] Figure 6 An optimized topology diagram for a three-line interchange station G where only one of its lines has both up and down points in the same location;

[0037] Figure 7 An optimized topology diagram for a three-line interchange station G where the up and down points of each line are not in the same location;

[0038] Figure 8 An optimized topology diagram for two adjacent double-track transfer stations D and E, where the up and down points of each line are in the same location;

[0039] Figure 9 An optimized topology diagram for two adjacent double-track transfer stations D and E, where the up and down points of only one line are in the same location;

[0040] Figure 10 An optimized topology diagram for two adjacent double-track transfer stations D and E where the up and down points of their respective lines are not in the same location;

[0041] Figure 11 For two adjacent double-line transfer stations D and E, the up and down points of all lines belonging to E are in the same location, while only one line belonging to D has the up and down points in the same location.

[0042] Figure 12 For two adjacent double-track transfer stations D and E, the up and down points of all lines belonging to E are in the same location, while the up and down points of all lines belonging to D are not in the same location.

[0043] Figure 13 For two adjacent double-line transfer stations D and E, E has only one line whose up and down points are in the same location, while the up and down points of all lines belonging to D are not in the same location.

[0044] Figure 14A comparison chart showing the running time of different query methods when performing shortest path queries under the same conditions.

[0045] Figure 15 This is a comparison chart showing the sum of the number of objects traversed when performing shortest path queries using different query methods under the same conditions.

[0046] Figure 16 This is a flowchart of the shortest path query method based on adaptive topology optimization. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0048] In one specific embodiment: Suppose the site information includes the site... Transfer attributes and associated lines The transfer attribute is either a transfer station or a non-transfer station; the cross-sectional information includes the line to which it belongs. Originating station O, ending station D, travel time Transfer information includes stations. Switch out the line Switching to the new line Change direction Change direction Transfer time ,in (0 represents no distinction between uplink and downlink, 1 represents uplink, and 2 represents downlink). The steps of the shortest path query method based on adaptive topology optimization are as follows:

[0049] Step 1: Import the station information, the cross-sectional information, and the transfer information;

[0050] Step 2: Traverse all sites;

[0051] Step 3: Check if the current station's transfer attribute is a transfer station;

[0052] If the current site If it is a transfer station, iterate through the adjacent stations of the current station;

[0053] If the current site The transfer attribute is transfer station, belonging to the line. Uplink adjacent stations Downlink adjacent stations ;

[0054] Step 3-1: On the line Delete the site mentioned above and all its affiliated lines;

[0055] Step 3-2: If and Then the site On the corresponding line The uplink and downlink locations are the same; add a split site. The site With the site The stations are connected separately. With the site The running times between them are respectively

[0056] , ;

[0057] like or Then the site On the corresponding line The uplink and downlink locations are different, so add a virtual site. The site With the site Connected separately; the stations With the site The running times between them are respectively

[0058] , ;

[0059] Add upstream split site and downstream split sites The site With the site Connection; the site With the site The running times between them are respectively

[0060] , ;

[0061] Step 3-3: The site With the line The above-mentioned sites Split sites The stations are connected separately. With the site The running times between them are respectively

[0062] , ;

[0063] Step 4: Check if all sites have been traversed. If the current site has not been traversed, return to step 3; if all sites have been traversed, use Dijkstra's algorithm to find the shortest path.

[0064] Note: Due to potential errors in actual measurements, the judgment conditions in step 3-2 are therefore... Can be modified to ,in For a predetermined time value, a relatively small absolute value is generally chosen. Judgment conditions. , can be modified to .

[0065] In practical implementation, based on the rail transit topology map, adjacent stations can be divided into two cases. The first case is that adjacent stations have only one transfer station, and the second case is that adjacent stations are both transfer stations. Figure 1 — Figure 13 In the diagram, the dashed line represents the transfer time, and the solid line represents the travel time.

[0066] 1. There is only one transfer station between two adjacent stations.

[0067] 1) Two-line transfer

[0068] Assuming station E has the transfer attribute of a transfer station and belongs to only two lines, then

[0069] ① The uplink and downlink points of the two lines belonging to station E are both at the same location on the line (i.e., the uplink and downlink points are the same). The optimized topology is as follows: Figure 1 As shown.

[0070] ② Station E has exactly one line whose uplink and downlink points are in the same location. The optimized topology is as follows: Figure 2 As shown.

[0071] ③ The uplink and downlink locations of the two lines belonging to station E are not in the same location. The optimized topology is as follows: Figure 3 As shown.

[0072] 2) Three-line transfer

[0073] Assuming station G has the transfer attribute of a transfer station and belongs to three lines, then:

[0074] ① The uplink and downlink points of the three lines belonging to station G are all at the same location on the line. The optimized topology is as follows: Figure 4 As shown.

[0075] ② Station G has exactly two routes whose uplink and downlink points are in the same location. The optimized topology is as follows: Figure 5 As shown.

[0076] ③ Station G has exactly one line whose uplink and downlink points are in the same location. The optimized topology is as follows: Figure 6 As shown.

[0077] ④ The uplink and downlink locations of the three lines belonging to station G are not in the same location. The optimized topology is as follows: Figure 7 As shown.

[0078] 2. Both adjacent stations are transfer stations.

[0079] Assume station E has the transfer attribute of a transfer station and belongs to two lines; assume station D has the transfer attribute of a transfer station and belongs to two lines, then:

[0080] ① The uplink and downlink points of all lines belonging to stations E and D are at the same location on the same line. The optimized topology is as follows: Figure 8 As shown.

[0081] ② Both stations E and D have exactly one line whose uplink and downlink points are in the same location. The optimized topology is as follows: Figure 9 As shown.

[0082] ③ The uplink and downlink points of all lines belonging to stations E and D are not in the same location. The optimized topology is as follows: Figure 10 As shown.

[0083] ④ Station E has exactly one line whose up and down points are at the same location, while the up and down points of all lines belonging to Station D are at the same location on that line. The optimized topology is as follows: Figure 11 As shown.

[0084] ⑤ The uplink and downlink points of the lines belonging to station E are not in the same location, while the uplink and downlink points of all lines belonging to station D are in the same location. The optimized topology is as follows: Figure 12 As shown.

[0085] ⑥ The uplink and downlink points of the line belonging to station E are not in the same location, while station D has exactly one line whose uplink and downlink points are in the same location. The optimized topology is as follows: Figure 13 As shown.

[0086] The invention and other path query methods were simulated and compared using Python. The operating environment was a computer equipped with an Intel Core i7 processor (2.2GHz), 16GB of RAM, and 1TB of hard disk space. The operating system was Windows 10 Home Chinese Edition, and the programming language was Python 3.9.2. The dataset came from the Beijing Rail Transit System and included the topology and transfer time information of rail transit lines.

[0087] The traditional shortest path method based on Dijkstra's method is compared with the present invention.

[0088] Data collection: Select the rail transit network of Beijing and obtain the station information, line information, distance or time data between stations, and transfer information of the urban rail transit system.

[0089] Method Implementation: Implement two query methods respectively, and construct the corresponding data structure and method logic based on the collected data.

[0090] Performance evaluation: The implemented query method was used to perform path queries on multiple sets of start and end points. Since the query time of a single query may have errors, each experiment was repeated 1000 times, and performance indicators such as query time, path length or time were recorded.

[0091] Results analysis: The performance of the two query methods was compared under different conditions, including indicators such as correctness, query time, and path quality.

[0092] The simulation results are shown in Table 1.

[0093] Table 1 Comparison of two shortest path methods based on Dijkstra's algorithm

[0094]

[0095] As shown in Table 1, regarding path correctness, the traditional shortest path query method based on Dijkstra has 2 sets of correct results and 3 sets of incorrect results, while the query results of the present invention are all correct. Regarding query speed, the query speed of the present invention is faster than that of the traditional shortest path query method based on Dijkstra in 3 sets of experiments.

[0096] Meanwhile, to further verify the performance of the query method, this invention is compared with ordinary Dijkstra's algorithm, Dijkstra's algorithm with edge traversal, and the transfer station expansion query method.

[0097] First, use the same sets of 30, 60, 90, 120, and 150 respectively. (Between origin and destination) Shortest path queries are performed using four different query methods. The runtime results for each query method are as follows: Figure 14 As shown in the figure. It can be seen that the running time of the four query methods all increases with... The time required for the standard Dijkstra's algorithm increases with the number of steps taken. While this method has the shortest total running time, its result may not always be the shortest path. The edge-traversing Dijkstra's algorithm provides the correct result, but it has the longest running time. The transfer station expansion query method and the method described in this invention have roughly the same total running time, but the result may not always be correct, while the method described in this invention provides the correct result. Therefore, this invention achieves a relatively fast running speed while ensuring the accuracy of the result.

[0098] Secondly, to demonstrate that the runtime of querying the shortest path is related to the number of objects traversed in each run of the query method, the four query methods were tested with the same number of data points (50, 100, 150, 200, and 250). The sum of the number of objects traversed during the shortest path query is counted, and the result is as follows: Figure 15 As shown, Dijkstra's method for traversing edges traverses the most objects, while the ordinary Dijkstra's method traverses the fewest. The number of objects traversed is basically the same for the transfer station expansion query method and the present invention. These results are consistent with the runtime of the four query methods.

[0099] Based on the above results, the following conclusions are drawn:

[0100] 1. Path Correctness Comparison: By comparing the correctness of the paths returned by the two query methods, the traditional shortest path query method based on Dijkstra's method can generally find the correct shortest path. However, when the transfer time at a certain station in the path is long, the query does not consider the shortest path after adding the travel cost to the transfer time, resulting in a non-optimal path selection. This invention abandons the concept of transfer stations and sets the transfer time as the travel time of the path. Therefore, the returned path remains correct even when the transfer time at a certain station is long.

[0101] 2. Query Time Comparison: The average query time for both methods under different query sizes was recorded. The results show that the query time difference between the traditional shortest path query method based on Dijkstra's algorithm and the method of this invention is not significant. This is because the traditional shortest path query method based on Dijkstra's algorithm needs to consider whether the traversed stations are transfer stations; if so, the transfer time needs to be added to the travel time. In contrast, the method of this invention needs to execute Dijkstra's algorithm within a larger search space.

[0102] Before using Dijkstra's method to find the shortest path, this invention preprocesses the topology graph and eliminates the concept of transfer stations. Although the optimized topology graph is more complex than the original graph, the elimination of logical judgments and processing of transfer stations simplifies the calculation process of the query path, saving path-finding time and ensuring the correctness of the shortest path.

Claims

1. A shortest path query method based on adaptive topology optimization, comprising station information, cross-section information, and transfer information; wherein the station information includes stations The information includes transfer attributes and the line to which the information belongs, wherein the transfer attributes are either transfer stations or non-transfer stations; the cross-sectional information includes the line to which the information belongs. Originating station O, ending station D, travel time The transfer information includes the stations. Switch out the line Switching to the new line Change direction Change direction Transfer time ,in The value can be 0, 1, or 2, where 0 represents no distinction between uplink and downlink, 1 represents uplink, and 2 represents downlink. Its characteristic is that... The steps of the shortest path query method based on adaptive topology optimization are as follows: A1: Import the station information, the cross-sectional information, and the transfer information; A2: Traverse all sites; A3: Check the transfer attributes of the current station; If the current station's transfer attribute is a non-transfer station, then continue traversing the current station's adjacent stations; If the current station's transfer attribute is a transfer station, then assume the current station is a station. Then the line belongs to Uplink adjacent stations Downlink adjacent stations Modify the current site The specific steps for the routes and their associated routes include: B1: On the line Delete the site mentioned above and all its affiliated lines; B2: Determine the site On the corresponding line Are the up and down points the same? If the site On the corresponding line If the uplink and downlink locations are the same, add a split site. The site With the site The stations are connected separately. With the site The running times between them are respectively , , the subscript in this formula The value can be 1 or 2; If the site On the corresponding line The uplink and downlink locations are different, so add a virtual site. The site With the site Connected separately; the stations With the site The running times between them are respectively , , the subscript in this formula The value can be 1 or 2; Add upstream split site and downstream split sites The site With the site Connection; the site With the site The running times between them are respectively , , The subscript in this formula Values or subscript equal to subscript ; B3: The site With the line The above-mentioned sites Split sites The stations are connected separately. With the site The running times between them are respectively , , The subscript in this formula Values In this formula, the superscript With superscript They are not equal; A4: Check if all sites have been traversed; if the current site has not been traversed, return to A3; if all sites have been traversed, use Dijkstra's algorithm to find the shortest path.

2. The shortest path query method based on adaptive topology optimization according to claim 1, characterized in that, In step B2, the site is determined. On the corresponding line Whether the uplink and downlink locations are the same, including the following steps: like or Then the site On the corresponding line The uplink and downlink locations are different; otherwise, the station On the corresponding line The up and down points are the same.