Multi-mode traffic route planning method, device, equipment and medium
By improving the A* algorithm and introducing the right of road attributes and global heuristic values, combined with user preferences, the local optimal problem in multi-modal traffic travel path planning is solved, and path diversity and user satisfaction are improved.
Patent Information
- Application Number
- CN202411810269.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-18
AI Technical Summary
The prior art is difficult to effectively combine different travel modes for path planning in multi-modal traffic travel scenarios, resulting in insufficient satisfaction with the planning results.
By improving the A* algorithm, using static road network diagrams and road rights attributes, recursively searching for travel paths between bus stations, and introducing global heuristics to evaluate path superiority, and filtering the optimal paths based on users' travel preferences.
It effectively improves the diversity of path planning and user satisfaction, avoids the problem of traditional A* algorithms falling into local optimality, simplifies data processing and improves the scalability of the system.
Smart Images

Figure CN119642845A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of path planning, and in particular to a multi-modal transportation travel route planning method, device, equipment and medium. Background Art
[0002] At present, with the continuous development of public transportation systems, users face greater route planning challenges when traveling in cities using multi-modal transportation. For example, between the departure point and the destination, it may involve the connection of multiple modes of transportation (such as bus, subway, walking, etc.).
[0003] Traditional route planning methods usually plan the travel path with the shortest travel time based on a single transportation mode. Some existing technologies combine walking planning with a single transportation model, or receive the travel mode selected by the user in advance to give the optimal travel path for the travel mode selected by the user. However, the optimal path obtained above often cannot fully consider the comprehensive use of multiple travel modes to better meet the travel needs and preferences of users, resulting in insufficient user satisfaction with the planning results. In addition, although the existing path planning algorithms (such as the classic A* algorithm) perform well in single-mode path optimization, in multi-mode traffic scenarios, due to the complexity of the scenario, it is easy to fall into local optimality, so it is difficult to effectively combine different travel modes for path planning.
[0004] Therefore, when faced with large-scale path planning scenarios, how to combine multiple travel modes into path planning and ensure the effectiveness of the solution to improve user satisfaction is a technical problem that needs to be solved. Summary of the invention
[0005] The present application provides a multi-modal transportation route planning method, device, equipment and medium to solve the technical problem of how to combine multiple travel modes into path planning and ensure the effectiveness of the solution, thereby improving user satisfaction.
[0006] In order to solve the above technical problems, in a first aspect, an embodiment of the present application provides a multi-modal transportation route planning method, comprising:
[0007] According to the departure coordinates and the destination coordinates input by the user, determine a first bus stop closest to the departure coordinates and a second bus stop closest to the destination coordinates;
[0008] According to the preset static road network diagram, a recursive search is performed from the first bus station by using an improved A* algorithm, and according to the right of way attributes of each first traffic route from the current recursive bus station to each corresponding adjacent bus station, the global heuristic value of each second traffic route from the current recursive bus station to the second bus station is calculated, and the first several adjacent bus stations with better global heuristic values are retained as the starting bus stations of the current recursion, until several travel paths from several first bus stations to the second bus station are obtained, and the recursive search is terminated; wherein, the static road network diagram is composed of all the bus stations as nodes and the first traffic routes of two adjacent bus stations as edges; the right of way attributes are the travel mode determined according to the distance corresponding to the first traffic route;
[0009] The user's travel preference is obtained, and an optimal travel path is selected from the plurality of travel paths according to the travel preference.
[0010] Compared with the prior art, the embodiments of the present application have the following beneficial effects: by using bus stations as the starting point and end point of path planning, the currently available open source bus route map can be effectively utilized for the modeling of subsequent static network diagrams, reducing the time cost of collecting and organizing traffic network data, and simplifying the node data that needs to be traversed for path planning, effectively improving the time required for subsequent path search through the improved A* algorithm, and improving the scalability of the subsequent path planning system; introducing a global heuristic value in the recursive search, and obtaining the global heuristic value from the current recursive bus stop to the second bus stop by calculating the road right attributes of adjacent bus stops, so as to better evaluate the superiority of the entire travel path, and combining the multiple recursive nodes retained during the recursion, effectively avoiding the problem of the traditional A* algorithm falling into the local optimum due to the characteristics of the greedy algorithm; at the same time, introducing the road right attribute, effectively enables the improved A* algorithm to introduce a variety of travel modes, improve the diversity of travel plans, and further screen the travel path in combination with the user's travel preferences, thereby improving the user's satisfaction with the path planning results.
[0011] In some embodiments of the first aspect of the present application, determining, according to the departure coordinates and the destination coordinates input by the user, a first bus stop closest to the departure coordinates and a second bus stop closest to the destination coordinates comprises:
[0012] According to the coordinates input by the user, a preset binary tree is searched to obtain the bus stop closest to the coordinates; wherein the binary tree recursively uses longitude and latitude as partition dimensions alternately, and in each recursion, the bus stop with the median is selected as the subtree root node for partitioning according to the current partition dimension sorting.
[0013] Compared with the prior art, the above embodiment has the following beneficial effects: by constructing a binary tree through alternating division of longitude and latitude, the complexity of the geographic space is reduced, the search scope can be quickly narrowed, and the efficiency of the nearest neighbor site search and the accuracy of positioning can be significantly improved in large-scale data sets or complex geographical distribution scenarios; the above binary tree structure is further utilized to organize and search for bus stops through coordinates, which reduces the calculation time for determining the nearest bus stop and improves retrieval efficiency.
[0014] In some embodiments of the first aspect of the present application, the right-of-way attribute is a travel mode determined according to a distance corresponding to the first traffic route, including:
[0015] Determining a plurality of first traffic routes between two adjacent bus stops through the static road network diagram;
[0016] Determining whether each of the first transportation routes can be traveled via public transportation;
[0017] If travel is possible by public transportation, the corresponding public transportation is determined as the road right attribute of the first transportation route; otherwise, the travel distance interval to which the distance of the first transportation route belongs is determined according to several preset travel distance intervals, and the travel mode corresponding to the travel distance interval is used as the road right attribute of the first transportation route.
[0018] Compared with the prior art, the above embodiment has the following beneficial effects: the road right attributes are calculated according to the characteristics of the vehicle and the distance interval, the decision-making basis for the travel mode selection is refined, and an effective basis is provided for adding non-public transportation travel modes in the subsequent path planning; at the same time, in order to avoid the wrong choice of transportation mode, by collecting all feasible transportation routes between two stations, the corresponding road right attributes are set for each transportation route, so as to improve the accuracy of the subsequent travel mode selection between the two stations.
[0019] In some embodiments of the first aspect of the present application, the step of calculating the global heuristic value of each second traffic route from the current recursive bus stop to the second bus stop according to the right-of-way attribute of each first traffic route from the current recursive bus stop to each corresponding adjacent bus stop includes:
[0020] According to the average travel speed of each first traffic route from the current recursive bus stop to the corresponding adjacent bus stop corresponding to the road right attribute, combined with the distance of each first traffic route, the first heuristic value of each first traffic route is obtained, and the third traffic route with the best first heuristic value is retained;
[0021] According to the static road network diagram, the shortest travel time from each of the adjacent bus stops to the second bus stop in a single travel mode is obtained as a second heuristic value corresponding to the adjacent bus stop;
[0022] The first heuristic value corresponding to the third traffic route is added to the second heuristic value corresponding to the adjacent bus stop to obtain the global heuristic value corresponding to the second traffic route.
[0023] Compared with the prior art, the above embodiment has the following beneficial effects: by introducing a hierarchical calculation method of the first heuristic value and the second heuristic value in long path planning, the accuracy of the global heuristic value is enhanced and the search results are optimized; at the same time, by combining the travel speed and distance to comprehensively calculate the heuristic value, the travel efficiency and distance cost are taken into account, thereby improving the overall performance of the algorithm; finally, when pruning by the global heuristic value, a number of feasible nodes are retained to avoid the algorithm from falling into a local optimal solution, thereby improving the superiority of the final path planning result.
[0024] In a second aspect, an embodiment of the present application further provides a multi-modal transportation route planning device, including: a bus stop search module, a travel path acquisition module, and a travel path screening module;
[0025] The bus stop search module is used to determine the first bus stop closest to the departure coordinates and the second bus stop closest to the destination coordinates according to the departure coordinates and the destination coordinates input by the user;
[0026] The travel path acquisition module is used to recursively search from the first bus station through an improved A* algorithm according to a preset static road network diagram, calculate the global heuristic value of each second traffic route from the current recursive bus station to the second bus station according to the road right attributes of each first traffic route corresponding to each adjacent bus station, retain the first several adjacent bus stations with better global heuristic values as the starting bus stations of the current recursion, until several travel paths from several first bus stations to the second bus station are obtained, and terminate the recursive search; wherein the static road network diagram is composed of all the bus stations as nodes and the first traffic routes of two adjacent bus stations as edges; the road right attribute is a travel mode determined according to the distance corresponding to the first traffic route;
[0027] The travel path screening module is used to obtain the user's travel preference and screen the optimal travel path from the multiple travel paths according to the travel preference.
[0028] In some embodiments of the second aspect of the present application, determining, according to the departure coordinates and the destination coordinates input by the user, a first bus stop closest to the departure coordinates and a second bus stop closest to the destination coordinates comprises:
[0029] According to the coordinates input by the user, a preset binary tree is searched to obtain the bus stop closest to the coordinates; wherein the binary tree recursively uses longitude and latitude as partition dimensions alternately, and in each recursion, the bus stop with the median is selected as the subtree root node for partitioning according to the current partition dimension sorting.
[0030] In some embodiments of the second aspect of the present application, the right-of-way attribute is a travel mode determined according to a distance corresponding to the first traffic route, including:
[0031] Determining a plurality of first traffic routes between two adjacent bus stops through the static road network diagram;
[0032] Determining whether each of the first transportation routes can be traveled via public transportation;
[0033] If travel is possible by public transportation, the corresponding public transportation is determined as the road right attribute of the first transportation route; otherwise, the travel distance interval to which the distance of the first transportation route belongs is determined according to several preset travel distance intervals, and the travel mode corresponding to the travel distance interval is used as the road right attribute of the first transportation route.
[0034] In some embodiments of the second aspect of the present application, the calculating, according to the right-of-way attributes of each first traffic route from the current recursive bus stop to each corresponding adjacent bus stop, the global heuristic value of each second traffic route from the current recursive bus stop to the second bus stop includes:
[0035] According to the average travel speed of each first traffic route from the current recursive bus stop to the corresponding adjacent bus stop corresponding to the road right attribute, combined with the distance of each first traffic route, the first heuristic value of each first traffic route is obtained, and the third traffic route with the best first heuristic value is retained;
[0036] According to the static road network diagram, the shortest travel time from each of the adjacent bus stops to the second bus stop in a single travel mode is obtained as a second heuristic value corresponding to the adjacent bus stop;
[0037] The first heuristic value corresponding to the third traffic route is added to the second heuristic value corresponding to the adjacent bus stop to obtain the global heuristic value corresponding to the second traffic route.
[0038] In a third aspect, the present application also provides a terminal device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the above-mentioned multi-modal transportation route planning method when executing the computer program.
[0039] In a fourth aspect, the present application also provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned multi-modal transportation route planning method. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A schematic diagram of a flow chart of a multi-modal transportation route planning method provided in some embodiments of the present application;
[0041] Figure 2 Another schematic diagram of a multi-modal transportation route planning method provided in some embodiments of the present application;
[0042] Figure 3 This is a schematic diagram of the structure of a multi-modal transportation route planning device provided in some embodiments of the present application. DETAILED DESCRIPTION
[0043] At present, with the continuous development of public transportation systems, users face great challenges in route planning when traveling in cities using multi-modal transportation. For example, between the departure point and the destination, multiple modes of transportation may be involved (such as buses, subways, walking, etc.). However, when planning routes, existing technologies usually need to generate planned routes corresponding to different travel modes multiple times. It is impossible to include multiple travel modes in one planned route to improve travel efficiency, and therefore cannot meet the diverse travel needs of users.
[0044] In order to solve the above technical problems, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0045] Embodiment 1
[0046] Please refer to Figure 1 , a multi-modal transportation route planning method provided in an embodiment of the present application, including S10 to S30, specifically including:
[0047] S10: According to the departure coordinates and the destination coordinates input by the user, determine a first bus stop closest to the departure coordinates and a second bus stop closest to the destination coordinates.
[0048] Further, in some embodiments of the present application, determining the first bus stop closest to the departure coordinates and the second bus stop closest to the destination coordinates according to the departure coordinates and the destination coordinates input by the user includes:
[0049] According to the coordinates input by the user, a preset binary tree is searched to obtain the bus stop closest to the coordinates; wherein the binary tree recursively uses longitude and latitude as partition dimensions alternately, and in each recursion, the bus stop with the median is selected as the subtree root node for partitioning according to the current partition dimension sorting.
[0050] By constructing a binary tree through alternating division of longitude and latitude, the complexity of geographic space is reduced, and the search scope can be quickly narrowed. In scenarios with large-scale data sets or complex geographical distribution, the efficiency of searching for nearest neighbor sites and the accuracy of positioning can be significantly improved. The above binary tree structure is further used to organize and search for bus stops through coordinates, which reduces the calculation time for determining the nearest bus stop and improves retrieval efficiency.
[0051] Preferably, in some embodiments of the present application, the longitude and latitude information of each bus stop can first be obtained through an open source official website to obtain information such as the name of the bus stop, the route, the route name, the route operating hours, etc.; wherein, the bus stop includes but is not limited to bus stops for buses, subways, passenger ships and other modes of transportation; further, through the bus stop information obtained as above, the longitude and latitude data of each station is obtained from an open source electronic map, and the accessible transportation routes between any two stations are obtained at the same time.
[0052] Preferably, in some embodiments of the present application, a KD-Tree model is used to segment and model the collected bus stops to obtain a binary tree, which can be specifically performed through the following preferred implementations:
[0053] S11: Express all bus stops in latitude and longitude;
[0054] S12: If the current recursive layer is the nth layer of the KD-Tree, and the division basis of the n-1th layer is longitude, the nth layer uses latitude, and the n+1th layer uses longitude, and the longitude and latitude are used alternately as the division dimensions of each layer;
[0055] S13: According to the partitioning dimension obtained in S12, all bus stops of the subtree under the current node are sorted. If the current partitioning dimension is longitude, and the subtree to be partitioned is the left subtree of the KD-Tree root node, all bus stops in the left subtree are sorted according to longitude, and the bus stop in the middle of the sorting result is taken as the root node of the left subtree (that is, the left child node of the KD-Tree root node), and all bus stops on the left and right sides of the middle are taken as the data of the left and right subtrees of the root node of the left subtree respectively;
[0056] S14: First, recursively search the subtree where the user input coordinates are located (i.e., the subtree on the side where the coordinates are closer to the current dimension), and under the partitioning dimension of the current node, determine whether the partitioning dimension of the coordinates is smaller than the partitioning dimension of the current node. If so, enter the left subtree, otherwise enter the right subtree;
[0057] S15: Recursively search until a leaf node is found. Once a leaf node (i.e., a node without child nodes) is reached, the leaf node is used as the current nearest neighbor candidate and its distance from the coordinate is recorded. This process ensures that a path from the root node to the leaf node is found, which includes the candidate point closest to the coordinate.
[0058] S16: backtrack and check other subtrees. When backtracking, check the distance between the current node and the coordinate. If the current node is closer to the coordinate than the known nearest neighbor candidate point, update the nearest neighbor candidate point.
[0059] S17: After backtracking to the parent node, recurse the subtree on the other side of the parent node until all nodes are recursively completed, and then return the neighbor candidate point closest to the coordinate as the selected bus stop.
[0060] S20: According to a preset static road network diagram, recursively search from the first bus station by improving the A* algorithm, calculate the global heuristic value of each second traffic route from the current recursive bus station to the second bus station according to the right of way attribute of each first traffic route from the current recursive bus station to each corresponding adjacent bus station, retain the first several adjacent bus stations with better global heuristic values as the starting bus stations of the current recursion, until several travel paths from several first bus stations to the second bus station are obtained, and terminate the recursive search; wherein, the static road network diagram is composed of all the bus stations as nodes and the first traffic routes between two adjacent bus stations as edges; the right of way attribute is a travel mode determined according to the distance corresponding to the first traffic route.
[0061] Preferably, in some embodiments of the present application, a static road network diagram can be obtained through the following preferred implementation methods: a topological diagram is established based on the longitude and latitude data of each station obtained from an open source electronic map, and the accessible traffic routes between each two stations, wherein there can be multiple connecting edges between two stations to represent different traffic travel routes, wherein each traffic travel route is the optimal traffic travel route under different travel modes, and the traffic travel route can be obtained through the existing open source electronic map (if public transportation such as buses, subways, passenger ships, etc. is required, it is determined that the two stations can be reached directly without transfer, and then the corresponding edges are established between the corresponding two nodes in the static road network diagram); bus stations are used as nodes of the static road network diagram, and the route data corresponding to the connecting edges between the two nodes (distance, bus stations, rail transit stations, longitude and latitude coordinates of road intersections, and the connection relationship between bus lines, rail transit lines and road intersections, the distance between stations, and the right of way attributes of the corresponding traffic routes) are added to the connecting edges.
[0062] Furthermore, in some embodiments of the present application, the right-of-way attribute is a travel mode determined according to the distance corresponding to the first traffic route, including:
[0063] Determining a plurality of first traffic routes between two adjacent bus stops through the static road network diagram;
[0064] Determining whether each of the first transportation routes can be traveled via public transportation;
[0065] If travel is possible by public transportation, the corresponding public transportation is determined as the road right attribute of the first transportation route; otherwise, the travel distance interval to which the distance of the first transportation route belongs is determined according to several preset travel distance intervals, and the travel mode corresponding to the travel distance interval is used as the road right attribute of the first transportation route.
[0066] The right-of-way attributes are calculated based on the characteristics of the vehicle and the distance interval, which refines the decision-making basis for travel mode selection and provides an effective basis for adding non-public transportation travel modes in subsequent path planning. At the same time, in order to avoid incorrect selection of transportation modes, all feasible transportation routes between two stations are collected, and corresponding right-of-way attributes are set for each transportation route to improve the accuracy of subsequent travel mode selection between the two stations.
[0067] Preferably, in some embodiments of the present application, the right-of-way attributes of each first traffic route in two bus stops can be obtained by the following preferred implementations:
[0068] S21: Determine the connection edges corresponding to each first traffic route from the static road network graph, and read distance information from the connection edges (at this time, the connection edges in the static road network graph have not yet been added with road right attributes);
[0069] S22: According to a preset travel distance interval (such as a walking travel distance interval can be set to 0 to 1 km, a bicycle travel distance interval can be set to 1 km to 3 km, etc.), determine the travel distance interval to which the distance of the first traffic route belongs, and add the travel mode corresponding to the corresponding travel distance interval in the corresponding connecting edge, wherein since the first traffic route is the shortest travel route obtained according to different travel modes, the shortest travel route distance may not conform to the preset travel distance interval, resulting in the same right of way attributes of multiple first traffic routes at two bus stops, at this time, the connecting edge corresponding to the shortest first traffic route is retained in the static road network diagram; in addition, since the distance of some connecting edges does not belong to any travel distance interval, the connecting edge is deleted from the static road network diagram at this time to prevent subsequent unreasonable travel mode planning;
[0070] S23: S22 is repeatedly executed until the right-of-way attributes of all first traffic routes are set.
[0071] Further, in some embodiments of the present application, the step of calculating the global heuristic value of each second traffic route from the current recursive bus stop to the second bus stop according to the right-of-way attributes of each first traffic route from the current recursive bus stop to each corresponding adjacent bus stop includes:
[0072] According to the average travel speed of each first traffic route from the current recursive bus stop to the corresponding adjacent bus stop corresponding to the road right attribute, combined with the distance of each first traffic route, the first heuristic value of each first traffic route is obtained, and the third traffic route with the best first heuristic value is retained;
[0073] According to the static road network diagram, the shortest travel time from each of the adjacent bus stops to the second bus stop in a single travel mode is obtained as a second heuristic value corresponding to the adjacent bus stop;
[0074] The first heuristic value corresponding to the third traffic route is added to the second heuristic value corresponding to the adjacent bus stop to obtain the global heuristic value corresponding to the second traffic route.
[0075] Preferably, in some embodiments of the present application, when path planning is performed based on the improved A* algorithm, according to the static road network diagram, starting from the determined first bus stop, the next node to be recursed is selected based on a priority queue (the priority queue stores all adjacent bus stops of the current recursive bus stop, and is sorted and obtained by calculating the global heuristic value of the current recursive bus stop to reach the second bus stop through its adjacent bus stops).
[0076] Preferably, in some embodiments of the present application, the first heuristic value may also be obtained by combining the travel time, monetary cost and comfort loss of the first traffic route in a linear weighted manner.
[0077] Preferably, in some embodiments of the present application, through pruning operation, in each recursion, only the first few adjacent bus stops with better heuristic values in the priority queue are retained, and after pruning, the retained candidate adjacent bus stops will be sorted again according to the heuristic values to enter the next round of recursive search.
[0078] S30: Acquire the user's travel preference, and select the optimal travel path from the plurality of travel paths according to the travel preference.
[0079] Preferably, in some embodiments of the present application, after obtaining several travel paths, the priority of each travel path can be recalculated according to the weight settings of travel time, monetary cost and comfort loss coefficient selected by the user.
[0080] Preferably, in some embodiments of the present application, a first heuristic value can be calculated during a recursive search based on the user's choice of weight settings for travel time, monetary cost, comfort loss coefficient, etc., so that several travel paths that meet the user's preferences can be directly obtained during the recursive search.
[0081] Preferably, in some embodiments of the present application, during the path search process, based on the time when the current user inputs the coordinates, it is necessary to consider whether the current recursive search path conforms to the traffic operation period, whether the transfer waiting time will cause delays, and prevent the planned route from being infeasible.
[0082] refer to Figure 2 , is another flow chart of a multi-modal transportation route planning method provided in an embodiment of the present application, which includes:
[0083] S40: Obtain traffic data through open source bus routes, customized shuttle routes, subway routes, and guest routes;
[0084] S50: further analyzing and processing the traffic data to obtain a static road network diagram and a KD-Tree model;
[0085] S60: Matching the starting and ending bus stops corresponding to the coordinates input by the user through KD-Tree, and further searching for several travel routes from the starting to the ending bus stops through an improved A* algorithm based on the bus stops combined with the static road network graph;
[0086] S70: Recommend a travel route based on user preference.
[0087] In summary, it can be seen that the multi-modal transportation route planning method provided by the embodiment of the present application has the following beneficial effects: using the bus station as the starting point and end point of the path planning, the existing open source bus route map can be effectively used for the modeling of the subsequent static network map, reducing the time cost of collecting and organizing the traffic network data, and simplifying the node data that needs to be traversed for the path planning, effectively improving the time required for the subsequent path search through the improved A* algorithm, and improving the scalability of the subsequent path planning system; introducing a global heuristic value in the recursive search, by calculating the road right attributes of the adjacent bus stops, obtaining the global heuristic value from the current recursive bus stop to the second bus stop, so as to better evaluate the superiority of the entire travel path, combined with the multiple recursive nodes retained during the recursion, effectively avoiding the problem of the traditional A* algorithm falling into the local optimum due to the characteristics of the greedy algorithm; at the same time, introducing the road right attribute, effectively enables the improved A* algorithm to introduce a variety of travel modes, improve the diversity of travel plans, and further screen the travel path in combination with the user's travel preferences, so as to improve the user's satisfaction with the path planning results.
[0088] Embodiment 2
[0089] refer to Figure 3 , a multi-modal transportation route planning device provided in an embodiment of the present application, includes: a bus stop search module 11, a travel path acquisition module 12 and a travel path screening module 13.
[0090] Further, in some embodiments of the present application, the bus stop search module 11 is used to determine the first bus stop closest to the departure coordinates and the second bus stop closest to the destination coordinates according to the departure coordinates and the destination coordinates input by the user; the travel path acquisition module 12 is used to recursively search from the first bus stop according to the preset static road network diagram by improving the A* algorithm, calculate the global heuristic value of each second traffic route from the current recursive bus stop to the second bus stop according to the right of way attributes of each first traffic route corresponding to each adjacent bus stop, retain the first several adjacent bus stops with better global heuristic values as the starting bus stops of the current recursion, until several travel paths from the first bus stop to the second bus stop are obtained, and the recursive search is terminated; wherein the static road network diagram is composed of all the bus stops as nodes and the first traffic routes of two adjacent bus stops as edges; the right of way attributes are the travel mode determined according to the distance corresponding to the first traffic route; the travel path screening module 13 is used to obtain the user's travel preference, and screen the optimal travel path from the several travel paths according to the travel preference.
[0091] Furthermore, in some embodiments of the present application, determining the first bus stop closest to the departure coordinates and the second bus stop closest to the destination coordinates based on the departure coordinates and the destination coordinates input by the user includes: searching a preset binary tree based on the coordinates input by the user to obtain the bus stop closest to the coordinates; wherein the binary tree recursively uses longitude and latitude as partitioning dimensions alternately, and in each recursion, selects the median bus stop as the subtree root node for partitioning by sorting according to the current partitioning dimension.
[0092] Furthermore, in some embodiments of the present application, the road right attribute is a travel mode determined according to the distance corresponding to the first traffic route, including: determining a number of first traffic routes between two adjacent bus stops through the static road network map; judging whether each of the first traffic routes can be traveled by public transportation; if it is possible to travel by public transportation, determining the corresponding public transportation as the road right attribute of the first traffic route; otherwise, according to a number of preset travel distance intervals, determining the travel distance interval to which the distance of the first traffic route belongs, and using the travel mode corresponding to the travel distance interval as the road right attribute of the first traffic route.
[0093] Further, in some embodiments of the present application, the global heuristic value of each second traffic route from the current recursive bus stop to the second bus stop is calculated according to the road right attributes of each first traffic route from the current recursive bus stop to the corresponding adjacent bus stop, including: obtaining the first heuristic value of each first traffic route according to the average travel speed corresponding to the road right attributes of each first traffic route from the current recursive bus stop to the corresponding adjacent bus stop, combined with the distance of each first traffic route, and retaining the third traffic route with the best first heuristic value; obtaining the shortest travel time from each adjacent bus stop to the second bus stop under a single travel mode according to the static road network diagram as the second heuristic value corresponding to the adjacent bus stop; adding the first heuristic value corresponding to the third traffic route and the second heuristic value corresponding to the adjacent bus stop to obtain the global heuristic value corresponding to the second traffic route.
[0094] It can be understood that the above-mentioned device item embodiments correspond to the method item embodiments of the present invention. A multimodal transportation route planning device provided by the embodiment of the present invention can implement any method item embodiment of the present invention, that is, the multimodal transportation route planning method provided in embodiment one.
[0095] In summary, it can be seen that the multi-modal transportation route planning device provided by the embodiment of the present application has the following beneficial effects: using the bus station as the starting point and end point of the path planning, the existing open source bus route map can be effectively used for the modeling of the subsequent static network map, reducing the time cost of collecting and organizing traffic network data, and simplifying the node data that needs to be traversed for path planning, effectively improving the time required for subsequent path search through the improved A* algorithm, and improving the scalability of the subsequent path planning system; introducing a global heuristic value in the recursive search, by calculating the road right attributes of the adjacent bus stops, obtaining the global heuristic value from the current recursive bus stop to the second bus stop, so as to better evaluate the superiority of the entire travel path, combined with the multiple recursive nodes retained during the recursion, effectively avoiding the problem of the traditional A* algorithm falling into the local optimum due to the characteristics of the greedy algorithm; at the same time, introducing the road right attribute, effectively enables the improved A* algorithm to introduce multiple travel modes, improve the diversity of travel plans, and further screen the travel path in combination with the user's travel preferences, so as to improve the user's satisfaction with the path planning results.
[0096] Embodiment 3
[0097] Based on the above-mentioned embodiment of the multimodal transportation route planning method, another embodiment of the present application provides a multimodal transportation route planning terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the multimodal transportation route planning method of any embodiment of the present application is implemented.
[0098] Exemplarily, in this embodiment, the computer program may be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the multi-modal transportation route planning device.
[0099] The multi-mode transportation route planning device may be a computing device such as a desktop computer, a notebook, a palm computer, a cloud server, etc. The multi-mode transportation route planning terminal device may include, but is not limited to, a processor and a memory.
[0100] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The processor is the control center of the multi-modal transportation route planning device, and uses various interfaces and lines to connect the various parts of the entire multi-modal transportation route planning device. The memory may be used to store the computer program and / or module, and the processor implements various functions of the multi-modal transportation route planning device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory and may also include non-volatile memory, such as a hard disk, an internal memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0101] Embodiment 4
[0102] Based on the above-mentioned embodiment of the multimodal transportation route planning method, another embodiment of the present application provides a storage medium, wherein the storage medium includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the multimodal transportation route planning method of any embodiment of the present application.
[0103] In this embodiment, the storage medium is a computer-readable storage medium, and the computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0104] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of protection of the present application.
Claims
1. A multi-modal transportation route planning method, characterized in that: include: According to the departure coordinates and the destination coordinates input by the user, determine a first bus stop closest to the departure coordinates and a second bus stop closest to the destination coordinates; According to the preset static road network diagram, a recursive search is performed from the first bus station by using an improved A* algorithm, and according to the right of way attributes of each first traffic route from the current recursive bus station to each corresponding adjacent bus station, the global heuristic value of each second traffic route from the current recursive bus station to the second bus station is calculated, and the first several adjacent bus stations with better global heuristic values are retained as the starting bus stations of the current recursion, until several travel paths from several first bus stations to the second bus station are obtained, and the recursive search is terminated; wherein, the static road network diagram is composed of all the bus stations as nodes and the first traffic routes of two adjacent bus stations as edges; the right of way attributes are the travel mode determined according to the distance corresponding to the first traffic route; The user's travel preference is obtained, and an optimal travel path is selected from the plurality of travel paths according to the travel preference.
2. A multi-modal transportation route planning method as claimed in claim 1, characterized in that: The step of determining, according to the departure coordinates and the destination coordinates input by the user, a first bus stop closest to the departure coordinates and a second bus stop closest to the destination coordinates comprises: According to the coordinates input by the user, a preset binary tree is searched to obtain the bus stop closest to the coordinates; wherein the binary tree recursively uses longitude and latitude as partition dimensions alternately, and in each recursion, the bus stop with the median is selected as the subtree root node for partitioning according to the current partition dimension sorting.
3. A multi-modal transportation route planning method as claimed in claim 1, characterized in that: The right-of-way attribute is a travel mode determined according to the distance corresponding to the first traffic route, including: Determining a plurality of first traffic routes between two adjacent bus stops through the static road network diagram; Determining whether each of the first transportation routes can be traveled via public transportation; If travel is possible by public transportation, the corresponding public transportation is determined as the road right attribute of the first transportation route; otherwise, the travel distance interval to which the distance of the first transportation route belongs is determined according to several preset travel distance intervals, and the travel mode corresponding to the travel distance interval is used as the road right attribute of the first transportation route.
4. A multi-modal transportation route planning method as claimed in claim 1, characterized in that: The step of calculating the global heuristic value of each second traffic route from the current recursive bus stop to the second bus stop according to the right of way attributes of each first traffic route from the current recursive bus stop to each corresponding adjacent bus stop includes: According to the average travel speed of each first traffic route from the current recursive bus stop to the corresponding adjacent bus stop corresponding to the road right attribute, combined with the distance of each first traffic route, the first heuristic value of each first traffic route is obtained, and the third traffic route with the best first heuristic value is retained; According to the static road network diagram, the shortest travel time from each of the adjacent bus stops to the second bus stop in a single travel mode is obtained as a second heuristic value corresponding to the adjacent bus stop; The first heuristic value corresponding to the third traffic route is added to the second heuristic value corresponding to the adjacent bus stop to obtain the global heuristic value corresponding to the second traffic route.
5. A multi-modal transportation route planning device, characterized in that: include: Bus station search module, travel route acquisition module and travel route screening module; The bus stop search module is used to determine the first bus stop closest to the departure coordinates and the second bus stop closest to the destination coordinates according to the departure coordinates and the destination coordinates input by the user; The travel path acquisition module is used to recursively search from the first bus station through an improved A* algorithm according to a preset static road network diagram, calculate the global heuristic value of each second traffic route from the current recursive bus station to the second bus station according to the road right attributes of each first traffic route corresponding to each adjacent bus station, retain the first several adjacent bus stations with better global heuristic values as the starting bus stations of the current recursion, until several travel paths from several first bus stations to the second bus station are obtained, and terminate the recursive search; wherein the static road network diagram is composed of all the bus stations as nodes and the first traffic routes of two adjacent bus stations as edges; the road right attribute is a travel mode determined according to the distance corresponding to the first traffic route; The travel path screening module is used to obtain the user's travel preference and screen the optimal travel path from the multiple travel paths according to the travel preference.
6. A multi-modal transportation route planning device as claimed in claim 5, characterized in that: The step of determining, according to the departure coordinates and the destination coordinates input by the user, a first bus stop closest to the departure coordinates and a second bus stop closest to the destination coordinates comprises: According to the coordinates input by the user, a preset binary tree is searched to obtain the bus stop closest to the coordinates; wherein the binary tree recursively uses longitude and latitude as partition dimensions alternately, and in each recursion, the bus stop with the median is selected as the subtree root node for partitioning according to the current partition dimension sorting.
7. A multi-modal transportation route planning device as claimed in claim 5, characterized in that: The right-of-way attribute is a travel mode determined according to the distance corresponding to the first traffic route, including: Determine a plurality of first traffic routes between two adjacent bus stops through the static road network diagram; Determining whether each of the first transportation routes can be traveled via public transportation; If travel is possible by public transportation, the corresponding public transportation is determined as the road right attribute of the first transportation route; otherwise, the travel distance interval to which the distance of the first transportation route belongs is determined according to several preset travel distance intervals, and the travel mode corresponding to the travel distance interval is used as the road right attribute of the first transportation route.
8. A multi-modal transportation route planning device as claimed in claim 5, characterized in that: The step of calculating the global heuristic value of each second traffic route from the current recursive bus stop to the second bus stop according to the right of way attributes of each first traffic route from the current recursive bus stop to each corresponding adjacent bus stop includes: According to the average travel speed of each first traffic route from the current recursive bus stop to the corresponding adjacent bus stop corresponding to the road right attribute, combined with the distance of each first traffic route, the first heuristic value of each first traffic route is obtained, and the third traffic route with the best first heuristic value is retained; According to the static road network diagram, the shortest travel time from each of the adjacent bus stops to the second bus stop in a single travel mode is obtained as a second heuristic value corresponding to the adjacent bus stop; The first heuristic value corresponding to the third traffic route is added to the second heuristic value corresponding to the adjacent bus stop to obtain the global heuristic value corresponding to the second traffic route.
9. A terminal device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, a multi-modal transportation travel route planning method as described in any one of claims 1 to 4 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute a multi-modal transportation travel route planning method as described in any one of claims 1 to 4.
Citation Information
Cited By
Path planning method, system and equipment based on multi-mode traffic and storage medium
CN121026170A