Personalized path planning method sensitive to urban points of interest

By dividing urban areas into grids and building connectivity relationships, combining greedy search and dynamic planning technology, the path planning problem of users accessing multiple types of POIs in order in urban environments is solved, and efficient planning of optimal sequenced paths and personalized needs are achieved.

CN115638803BActive Publication Date: 2025-03-21SOUTHEAST UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211218557.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-06
Publication Date
2025-03-21
Estimated Expiration
2042-10-06

AI Technical Summary

Technical Problem

The existing path planning method cannot effectively solve the need for users to access multiple types of urban points of interest (POI) in order in urban environments, and it is difficult to meet the minimum travel cost requirements.

Method used

By dividing urban areas into grids, building connection relationships between grids and modeling into graphs, using node spacing calculation, POI-first greedy search and dynamic planning technology based on distance upper bounds, we quickly and accurately find the shortest path that meets the user's orderly access to the POI nodes of the specified type.

Benefits of technology

It realizes the optimal sequence path for users to access multiple types of POIs in order in urban environments, meets users' personalized needs, and has great advantages in time complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115638803B_ABST
    Figure CN115638803B_ABST
Patent Text Reader

Abstract

The present invention discloses a personalized path planning method that is sensitive to urban points of interest. The present invention divides the urban area into grids in advance, and then constructs a grid connectivity relationship based on the actual road network, connects each area, and models it into a graph. The path planning problem is modeled as: planning a shortest path that starts from a given starting point, visits multiple locations of different points of interest (POI) types in a user-specified order, and finally arrives at a user-specified destination. The path planning solution is divided into three stages: the first is the node spacing calculation stage, the second is the POI-prioritized greedy search stage, and the third is the dynamic planning stage based on the upper bound of the distance. Through the pre-processed shortest distance, based on the idea of ​​the dynamic programming algorithm, a shortest path that can meet the user's needs to sequentially visit candidate nodes of a specified type is found quickly and accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of urban computing and its application, and in particular to a personalized path planning method that is sensitive to urban points of interest. Background Art

[0002] With the development of geographic information technology and the popularization of smart mobile terminals, path planning services have been integrated into people's daily lives. However, the complexity of travel purposes has made the shortest path unable to meet people's increasingly personalized needs. For example, when a user wants to exercise first and then eat before going home after work, he will visit different types of urban POI areas such as gyms and dining areas in sequence. While meeting the above needs, users often also hope that the travel cost is as low as possible.

[0003] Existing navigation systems can efficiently plan a shortest path based on the starting point, end point and must-go points provided by the user. However, there are usually many candidate nodes that can meet the user's needs to pass through a must-go point. Therefore, existing path planning methods cannot generalize and solve such optimal sequenced path problems based on urban POIs. Specifically: the user's sequential access needs are represented by the type sequence of POIs. In the current urban environment, the user's travel needs are complex: users need to pass through multiple types of POIs in order, and do not pay attention to specific POIs.

[0004] This type of optimal sequenced path planning problem has the characteristics of large search space and high time complexity: in an urban environment, a certain type of POI or POI that can provide a certain service is usually not unique (for example, there are many food restaurants that can provide catering services, and sports and health also include many gymnasiums and fitness centers to choose from), so it is necessary to choose from multiple POIs of the same type. This is a sequenced multi-type combination problem. On the premise of meeting the user's needs for the type of POI they pass through, it is also necessary to find a shorter path, which puts higher requirements on the path planning algorithm. The existing various path planning algorithms cannot meet the needs of passing through multiple types of POIs in order. Therefore, based on the characteristics of this path planning problem, how to efficiently plan the optimal sequenced path based on urban POI is a core problem that the current academic and industrial circles need to solve urgently. Summary of the invention

[0005] Purpose of the invention: In view of the problems existing in the above-mentioned prior art, the present invention proposes a personalized path planning method that is sensitive to urban points of interest, focusing on solving the problem that the path planning function is single in the urban environment and the waypoints cannot be selected according to the POI type. The urban area is divided into grids of uniform size in advance, and the connectivity relationship between the grids is constructed based on the actual road network. The various areas are connected and modeled into a graph. In this way, the path planning problem can be regarded as a path search problem on a graph with a given starting point, an end point, and certain POI types. The first is the node spacing calculation stage, the second is the POI-prioritized greedy search stage, and the third is the dynamic planning stage based on the upper limit of the distance. Through the pre-processed shortest distance, based on the idea of ​​the dynamic programming algorithm, a shortest path that can meet the user's needs for orderly access to POI nodes of a specified type is found quickly and accurately.

[0006] Technical solution: To achieve the purpose of the present invention, the technical solution adopted by the present invention is: a personalized path planning method sensitive to urban points of interest, the method comprising the following steps:

[0007] Step 1. Model the city into a grid graph G(V,E,P), where P represents the set of POI types. p i represents a POI type, such as catering, medical health, sports and fitness, etc.; V represents the grid set obtained by dividing the path planning area into uniform sizes, that is, the node set in G. Set the attribute pois for each node to store the POI types contained in the node in the form of a set, which can be an empty set; E represents the set of paths (edges) between grids: if the node v x and v y Adjacent in space, and there is a road section in the actual road network that passes through the grid area v x and v y , then we construct an edge connecting the two regions in G, denoted as e x,y ∈E, set the weight coefficient e for each edge x,y .w∈R + , which can be regarded as a slave node v x To node v y The travel cost is usually measured by path distance or travel time. For ease of description, it is usually set to 1.

[0008] Step 2: Based on the general multi-source shortest path algorithm, the shortest path between nodes in the region is calculated offline, and the shortest path between nodes is stored in Path. Path = {v x ,v1,v2,…,v y}∈Path,v x ∈V,v y∈V; use Dist to store the corresponding distance, dist(v x ,v y )∈Dist,v x ∈V,v y ∈V;

[0009] Step 3. Enter the user's query, including the starting point s, the end point t, and the list of POI types that the user needs to pass by in order Indicates the type of POI that the user needs to pass through during the trip;

[0010] Step 4. Perform greedy search, greedily find the node closest to the current node that can meet the user's next requirement, update the current node to the node, repeat the above search operation until all user requirements are met, and then find the shortest path from the last node to the user-specified destination, and splice the local paths one by one to form a greedy path. The distance of the path is used as the upper bound of the final solution to assist in the subsequent node screening;

[0011] Step 5. Perform dynamic programming based on the distance upper bound. First, use the distance upper bound of the greedy path to screen all candidate nodes that can meet the user's POI type requirements. Construct a multi-segment graph based on the order of user requirements. Each stage corresponds to a POI type requirement of the user. The problem is converted into the shortest path problem of the multi-segment graph. Finally, the solution is derived based on the idea of ​​dynamic programming.

[0012] Step 6. Calculate the shortest path to the POI returned by dynamic programming Based on Path, the shortest path is continuously constructed from the starting point s until the end point t is reached, and the actual shortest path that meets the user's POI requirements can be returned.

[0013] Furthermore, in step 4, |R| greedy searches are performed. In each greedy search, the nearest neighbor that meets the user's POI requirements is preferentially searched. The specific steps are:

[0014] Step 401. Initialize the variables needed, including: 1. Integer variable i, 0≤i<|R|, indicating the current loop round and the type index that needs to be satisfied currently (the type is represented by R[i], initialized to R[0], that is, the type that needs to be satisfied first). Each loop needs to greedily search the nearest neighbor; 2. start represents the starting point of the greedy search for this loop (initialized to the query starting point s), starting from this node to search for the nearest valid neighbor; 3. Queue Queue with actual path cost as priority, the queue stores the data structure (index, cost), where index represents the grid index of the currently visited node, cost represents the actual cost of reaching the current node from start, and (start, 0) is included in the Queue during initialization; 4. Greedy path distance dist g , initialized to 0; 5. Mark the node visited set visited (initialized to an empty set), and use this data structure to store the nodes visited during a greedy search;

[0015] Step 402. As long as the queue Queue is not empty, take out the nearest neighbor node node from the Queue, and check whether the current node has been visited through visited. If it has been visited, skip the current node and re-execute step 402; otherwise, execute step 403;

[0016] Step 403. Check whether the current node attribute pois contains type R[i]. If it does, end the current greedy search and execute step 405; otherwise, add the neighbors of node to the priority queue Queue and execute step 402;

[0017] Step 404: Repeat steps 402-403 until the current round of greedy search is terminated in advance. If the queue is empty, it indicates that there is no reachable neighbor that meets the user's current needs;

[0018] Step 405. Set start to node.index, clear the queues Queue and Visited, add (start, 0) to the Queue, i←i+1, cost g ←cost g +node.cost, execute step 402 again;

[0019] Step 406. Repeat steps 402-405 until i=|R|, end the greedy search, record the start at this time, and then query the distance dist(start,t) of the shortest path from start to end point t through Dist, cost g ←cost g + dist(start,t), returns cost gAs an upper bound for subsequent searches;

[0020] In step 5, a dynamic programming method based on a distance upper bound is executed. First, the distance upper bound of the greedy path is used to screen all candidate nodes that can meet the user's POI type requirements to construct a multi-segment graph, and then the problem is solved layer by layer based on the dynamic programming idea. The specific steps are:

[0021] Step 501. Use the distance cost of the greedy path g As the upper bound of the distance, we screen candidate nodes of each type required by the user and delete nodes that do not meet the distance constraint: Assume that node v i To meet a user's needs, if dist(s,v i )+dist(v i ,t)>cost g , we can safely delete node v i , and will no longer be considered in the subsequent search process;

[0022] Step 502. Construct a multi-segment graph based on the selected candidate nodes. The starting point of the multi-segment graph is set to s, that is, the starting layer containing the only node s. A node set of |R| layers is constructed between the starting point and the end point. The end point is set to t, that is, the terminating layer containing the only node t. Each layer of node set contains candidate nodes of the corresponding type. Through the previously pre-calculated node spacing, connect edges are constructed between layers and assigned values. edge(v i ,v j )=dist(v i ,v j ), no edges are set within the layer;

[0023] Step 503. Use shortest[i][j] to indicate that starting from the starting point, the nodes satisfy the types R[0], R[1], .., R[i-1] in sequence, and finally reach the jth candidate node of type i. The optimal solution of , where 0≤i≤|R|, 0≤j<|R[i]|; the remaining solutions are not better than or equal to the local optimal solution in terms of distance, and share the optimal solution of the subsequent type (from The optimal solution that satisfies the subsequent type requirements and reaches the destination is impossible to be the global optimal solution, so only the local optimal solution needs to be saved; shortest[i][j] is initialized according to the following formula. For the first satisfied type R[0], the optimal solution that satisfies the type R[0] of the kth candidate node is selected as the starting point s to node The shortest distance:

[0024]

[0025] Step 504. Based on the properties of the optimal substructure, the following formula is derived:

[0026]

[0027] Where |R[i-1]| represents the number of candidate nodes of type R[i-1]. The calculation is performed layer by layer from the starting point according to the formula. After the calculation is completed, the predecessor node table pre is used to retain its predecessor node. Right now Until i = |R|, it reaches the termination layer, at which time shortest[|R|][0] is calculated to be the optimal path distance;

[0028] Step 505. Restore the shortest path based on the predecessor node table pre, starting from the end point t, query pre[|R|][0] to obtain the predecessor node of the end point Keep searching for the previous node until you reach pre[0][0], which is the starting point s. Then, based on a series of previous node connections, you can construct a reverse path. By inverting the path, you can get the shortest path to the POI that meets the user's POI needs.

[0029] Beneficial effects: Compared with the prior art, the technical solution of the present invention has the following beneficial technical effects:

[0030] (1) It can meet the needs of users to visit multiple types of POIs in sequence. Compared with existing methods that can only perform point-to-point or point-through-specified path planning, this method can solve the path planning needs of "visiting POIs of specified categories in sequence", filling the gap in this research field.

[0031] (2) Fast and efficient query. This method has a great advantage in terms of time cost, which is mainly due to the fact that the pre-processed shortest path speeds up the node screening, multi-segment graph construction and path solving in the dynamic planning stage. In addition, when the types of users need to access increase significantly, the time cost of this method will only increase linearly. This is because there is a linear relationship between the number of user POI requirements and the time cost of greedy search, multi-segment graph construction and shortest path solving. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 Flowchart of the greedy search phase with POI priority;

[0033] Figure 2 This is an example diagram of the greedy search phase with POI priority;

[0034] Figure 3 This is the flow chart of the dynamic planning stage based on the distance upper bound;

[0035] Figure 4 This is an example diagram of the dynamic programming stage based on the distance upper bound. DETAILED DESCRIPTION

[0036] The present invention is further illustrated below with reference to the accompanying drawings and specific examples.

[0037] The goal of the present invention is to solve the problem of personalized path planning based on urban POI. This method divides the urban area into grids of uniform size in advance, constructs the connectivity relationship between grids based on the actual road network, connects each area, and models it into a graph. In this way, the path planning problem can be viewed as a path search problem on a graph with a given starting point, an end point, and certain POI types. The first is the node spacing calculation stage, the second is the POI-prioritized greedy search stage, and the third is the dynamic programming stage based on the upper limit of the distance. Through the pre-processed shortest distance, based on the idea of ​​the dynamic programming algorithm, a shortest path that can meet the user's needs for orderly access to POI nodes of a specified type is found quickly and accurately. The specific execution steps are as follows:

[0038] Step 1. Model the city into a grid graph G(V,E,P), where P represents the set of POI types. p i represents a POI type, such as catering, medical health, sports and fitness, etc.; V represents the grid set obtained by dividing the path planning area into uniform sizes, that is, the node set in G. Set the attribute pois for each node to store the POI types contained in the node in the form of a set, which can be an empty set; E represents the set of paths (edges) between grids: if the node v x and v y Adjacent in space, and there is a road section in the actual road network that passes through the grid area v x and v y , then we construct an edge connecting the two regions in G, denoted as e x,y ∈E, set the weight coefficient e for each edge x,y .w∈R + , which can be regarded as a slave node v x To node v y The travel cost is usually measured by path distance or travel time. For ease of description, it is usually set to 1. For example: Figure 2 As shown in Figure 1, the city is divided into 36 small areas, corresponding to 36 nodes, and the attribute pois of each node is the set of POI types contained in the area. Then area v1 contains POIs of types p1 and p5 (sports and fitness and medical health types).

[0039] Step 2: Based on the general multi-source shortest path algorithm, the shortest path between nodes in the region is calculated offline, and the shortest path between nodes is stored in Path. Path = {v x ,v1,v2,…,v y}∈Path,v x ∈V,v y ∈V; use Dist to store the corresponding distance, dist(v x ,v y )∈Dist,v x ∈V,v y ∈V; for example, dist(v1,v8)=2,path(v1,v8)= {v1→v2→v8}; dist(v5,v6)=5,path(v5,v6)= {v5→v4→v 10 →v 11 →v 12 →v6};

[0040] Step 3. Enter the user's query, including the starting point s, the end point t, and the list of POI types that the user needs to pass by in order Indicates the types of POIs that the user needs to pass through during his travel; for example, the user is currently in area s and the final destination is d. The types of POIs that the user needs to pass through in order are R = {p1, p3, p4}, indicating that he wants to visit the nodes of the three types of POIs: sports and fitness, restaurants, and shopping malls.

[0041] Step 4. Perform a greedy search, greedily find the node closest to the current node that can meet the user's next requirement, update the current node to the node, repeat the above search operation until all user requirements are met, and then find the shortest path from the last node to the user's specified destination, and splice the local paths one by one to form a greedy path. The distance of the path is used as the upper bound of the final solution to assist in the subsequent node screening. Figure 2 As shown, the specific steps are:

[0042] Step 401. Initialize the variables needed, including: 1. Integer variable i, 0≤i<|R|, indicating the current loop round and the type index that needs to be satisfied currently (the type is represented by R[i], initialized to R[0], that is, the type that needs to be satisfied first). Each loop needs to greedily search the nearest neighbor; 2. start represents the starting point of the greedy search of this loop (initialized to the query starting point s), starting from this node to search for the nearest valid neighbor; 3. Queue Queue with actual path cost as priority, the queue stores the data structure (index, cost), where index represents the grid index of the currently visited node, cost represents the actual cost of reaching the current node from start, and (start, 0) is included in the Queue during initialization; 4. Greedy path cost cost g , initialized to 0; 5. Mark the node visited set visited (initialized to an empty set), and use this data structure to store the nodes visited during a greedy search;

[0043] Step 402. As long as the queue Queue is not empty, the nearest neighbor node node is taken out from the Queue, and the visited function is used to check whether the current node has been visited. If it has been visited, the current node is skipped and step 402 is executed again; otherwise, step 403 is executed; for example, when i=0, the Queue pops out node s, which has not been visited, and step 403 is executed;

[0044] Step 403. Check whether the current node attribute pois contains type R[i]. If so, end the current greedy search and execute step 405. Otherwise, add the neighbors of node to the priority queue and execute step 402. For example, if node s does not contain type R[0]=p1, add its neighbors v9,v 14 ,v 15 Add to Queue;

[0045] Step 404. Repeat steps 402-403 until the current round of greedy search is terminated in advance. If the queue is empty, it indicates that there is no reachable neighbor that meets the user's current needs. For example, when the node v9 is subsequently popped up, v9.pois = {p1, p2} contains type p1, and the current greedy search ends.

[0046] Step 405. Set start to node.index, clear the queues Queue and Visited, add (start, 0) to the Queue, i←i+1, cost g ←cost g +node.cost, and execute step 402 again; for example, when accessing v9, the i=0 round of greedy search ends, start is set to v9, (v9,0) is added to the Queue, i is set to 1, and cost g Set to 1;

[0047] Step 406. Repeat steps 402-405 until i=|R|, end the greedy search, record the start at this time, and then query the shortest path distance dist(start,t) from start to end point t through Dist, cost g ←cost g + dist(start,t), returns cost g As the upper bound of subsequent searches; for example, when i = |R|, the nearest neighbor of type p4 found from v3 is v4, and the cost g =3, and the shortest path distance from v4 to the end point is 5 through Dist query. g =8;

[0048] Step 5. Perform dynamic programming based on the distance upper bound. First, use the distance upper bound of the greedy path to screen all candidate nodes that can meet the user's POI type requirements. Construct a multi-segment graph based on the order of user requirements. Each stage corresponds to a POI type requirement of the user. Convert the problem into the shortest path problem of the multi-segment graph. Finally, deduce and solve it based on the idea of ​​dynamic programming. Figure 4 As shown, the specific steps are:

[0049] Step 501. Use the distance cost of the greedy path g As the upper bound of the distance, we screen candidate nodes of each type required by the user and delete nodes that do not meet the distance constraint: Assume that node v i To meet a user's needs, if dist(s,v i )+dist(v i ,t)>cost g , we can safely delete node v i , will no longer be considered in the subsequent search process; for example, nodes v1, v5, v9, v 21 ,v 29 Both contain the user's first POI requirement type p1, but because dist(s,v1)+dist(v1,t)=4+8=12>cost g =8, so we can safely delete node v1. Similarly, we can delete nodes v5 and v 29 ;

[0050] Step 502. Construct a multi-segment graph based on the selected candidate nodes. The starting point of the multi-segment graph is set to s, that is, the starting layer containing the only node s. A node set of |R| layers is constructed between the starting point and the end point. The end point is set to t, that is, the terminating layer containing the only node t. Each layer of node set contains candidate nodes of the corresponding type. Through the previously pre-calculated node spacing, connect edges are constructed between layers and assigned values. edge(v i ,v j )=dist(v i ,v j ), no edges are set within the layer;

[0051] Step 503. Use shortest[i][j] to indicate that starting from the starting point, the nodes satisfy the types R[0], R[1], .., R[i-1] in sequence, and finally reach the jth candidate node of type i. The optimal solution of , where 0≤i≤|R|, 0≤j<|R[i]|; the remaining solutions are not better than or equal to the local optimal solution in terms of distance, and share the optimal solution of the subsequent type (from It is easy to prove that it cannot be the global optimal solution, so we only need to save the local optimal solution. This problem satisfies the optimal substructure property.

[0052] Initialize shortest[i][j] according to the following formula. For the first type R[0] that satisfies the condition, select the kth candidate node that satisfies the optimal solution of type R[0] as the starting point s to node The shortest distance:

[0053]

[0054] For example, when i=0, s to candidate nodes v9 and v of type p1 21 The local optimal solutions are 1 and 2, so initialize shortest[0][0]=1, shortest[0][1]=2, pre[0][0]=pre[0][1]=s;

[0055] Step 504. Based on the properties of the optimal substructure, the following formula is derived:

[0056]

[0057] Where |R[i-1]| represents the number of candidate nodes of type R[i-1]. The calculation is performed layer by layer from the starting point according to the formula. After the calculation is completed, the predecessor node table pre is used to retain its predecessor node. Right now Until i = |R|, we reach the termination layer, at which time shortest[|R|][0] is calculated to be the optimal path distance; for example, k=0, shortest[1][0]=1+1=2; k=1, shortest[1][0]=2+4=6; therefore shortest[1][0]=2, Similarly, we can deduce and calculate layer by layer

[0058] Step 505. Restore the shortest path based on the predecessor node table pre, starting from the end point t, query pre[|R|][0] to obtain the predecessor node of the end point Keep searching for the previous node until you reach pre[0][0], which is the starting point s. Then, based on a series of previous node connections, you can construct a reverse path. By inverting the path, you can get the shortest path to the POI that meets the user's POI needs. For example, starting from t, the previous node is Continue to search for the previous node until the starting point s and then invert it to get the shortest path of POI {s→v 21 →v 20→v 21 →t};

[0059] Step 6. Calculate the shortest path to the POI returned by dynamic programming Based on Path, the shortest path is continuously constructed from the starting point s until the end point t is reached, and the actual shortest path that meets the user's POI requirements can be returned. For example, the actual shortest path is (s→v 15 →v 21 →v 20 →v 21 →v 27 →t), whose distance is 6.

Claims

1. A personalized path planning method sensitive to urban points of interest, characterized in that: The method comprises the following steps: Step 1. Model the city into a grid graph G(V,E,P), where P represents the set of POI types. p i represents a POI type; V represents the grid set obtained by dividing the path planning area into uniform sizes, that is, the node set in G. Set the attribute pois for each node to store the POI types contained in the node in the form of a set; E represents the edge set between grids: if the node v x and v y Adjacent in space, and there is a road section in the actual road network that passes through the grid area v x and v y , then we construct an edge connecting the two regions in G, denoted as e x,y ∈E, set the weight coefficient e for each edge x,y .w∈R + , regarded as a slave node v x To node v y The travel cost is measured by path distance or travel time. For ease of description, it is set to 1. Step 2: Calculate the shortest path between nodes in the region offline based on the multi-source shortest path algorithm, and use Path to store the shortest path between nodes. Path = {v x ,v1,v2,…,v y }∈Path,v x ∈V,v y ∈V; use Dist to store the corresponding distance, dist(v x ,v y )∈Dist,v x ∈V,v y ∈V; Step 3. Input the user's query, including the starting point s, the end point t, and the list of POI types that the user needs to pass through in order R = {p1, p2, ..., p |R| }, Indicates the type of POI that the user needs to pass through during the trip; Step 4. Perform greedy search, greedily find the node closest to the current node that can meet the user's next requirement, update the current node to the node, repeat the above search operation until all user requirements are met, and then find the shortest path from the last node to the user-specified destination, and splice the local paths one by one to form a greedy path. The distance of the path is used as the upper bound of the final solution to assist in the subsequent node screening; Step 5. Perform dynamic programming based on the distance upper bound. First, use the distance upper bound of the greedy path to screen all candidate nodes that can meet the user's POI type requirements. Construct a multi-segment graph based on the order of user requirements. Each stage corresponds to a POI type requirement of the user. The problem is converted into the shortest path problem of the multi-segment graph. Finally, the solution is derived based on the idea of ​​dynamic programming. Step 6. According to the shortest path of POI returned by dynamic programming, Based on Path, the shortest path is continuously constructed from the starting point s until the end point t is reached, and the actual shortest path that meets the user's POI requirements can be returned.

2. The personalized path planning method based on city interest point sensitivity according to claim 1, characterized in that: In step 4, perform |R| greedy searches. In each greedy search, the nearest neighbor that meets the user's POI requirements is prioritized. The specific steps are: Step 401. Initialize the variables needed, including:

1. Integer variable i, 0≤i<|R|, indicating the current loop round and the type index that needs to be satisfied currently, the type is represented by R[i], initialized to R[0], that is, the type that needs to be satisfied first, and each loop needs to greedily search the nearest neighbor; 2. start represents the starting point of the greedy search of this loop, initialized to the query starting point s, starting from this node to search for the nearest valid neighbor; 3. Queue Queue with actual path cost as priority, the queue stores the data structure (index, cost), where index represents the grid index of the currently visited node, cost represents the actual cost of reaching the current node from start, and (start, 0) is included in the Queue during initialization; 4. Greedy path cost cost g , initialized to 0; 5. Mark the node visited set visited, initialized to an empty set, and use this data structure to store the nodes visited during a greedy search; Step 402. As long as the queue Queue is not empty, take out the nearest neighbor node node from the Queue, and check whether the current node has been visited through visited. If it has been visited, skip the current node and re-execute step 402; otherwise, execute step 403; Step 403. Check whether the current node attribute pois contains type R[i]. If it does, end the current greedy search and execute step 405; otherwise, add the neighbors of node to the priority queue Queue and execute step 402; Step 404: Repeat steps 402-403 until the current round of greedy search is terminated in advance. If the queue is empty, it indicates that there is no reachable neighbor that meets the user's current needs; Step 405. Set start to node.index, clear the queues Queue and Visited, add (start, 0) to the Queue, i←i+1, cost g ←cost g +node.cost, execute step 402 again; Step 406. Repeat steps 402-405 until i=|R|, end the greedy search, record the start at this time, and then query the shortest path distance from start to end point t through Dist (start, t), cost g ←cost g +dist(start,t), returns cost g Serves as an upper bound for subsequent searches.

3. The personalized path planning method based on city interest point sensitivity according to claim 1, characterized in that: In step 5, a dynamic programming method based on a distance upper bound is executed. First, the distance upper bound of the greedy path is used to screen all candidate nodes that can meet the user's POI type requirements to construct a multi-segment graph, and then the problem is solved layer by layer based on the dynamic programming idea. The specific method is as follows: Step 501. Use the distance cost of the greedy path g As the upper bound of the distance, we screen candidate nodes of each type required by the user and delete nodes that do not meet the distance constraint: Assume that node v i To meet a user's needs, if dist(s,v i )+dist(v i ,t)>cost g , we can safely delete node v i , and will no longer be considered in the subsequent search process; Step 502. Construct a multi-segment graph based on the selected candidate nodes. The starting point of the multi-segment graph is set to s, that is, the starting layer containing the only node s. A node set of |R| layers is constructed between the starting point and the end point. The end point is set to t, that is, the terminating layer containing the only node t. Each layer of node set contains candidate nodes of the corresponding type. Through the previously pre-calculated node spacing, connect edges are constructed between layers and assigned values. edge(v i ,v j )=dist(v i ,v j ), no edges are set within the layer; Step 503. Use shortest[i][j] to indicate that starting from the starting point, the nodes satisfy the types R[0], R[1], .., R[i-1] in sequence, and finally reach the jth candidate node of type i. The local optimal solution of , where 0≤i≤|R|, 0≤j<|R[i]|; the remaining solutions are not better than or equal to the local optimal solution in terms of distance, and start from the same tail node and share the optimal solution of the subsequent type, so it is impossible to become the global optimal solution, so only the local optimal solution needs to be saved; initialize shortest[i][j] according to the following formula, for the first type R[0] that satisfies, select the kth candidate node that satisfies the optimal solution of type R[0] as the starting point s to node The shortest distance: shortest[0][k]=edge(s,v k 0 ),0≤k<|R[0]| Step 504. According to the properties of the optimal substructure, the following formula is obtained: Where |R[i-1]| represents the number of candidate nodes of type R[i-1]. The calculation is performed layer by layer from the starting point according to the formula. After the calculation is completed, the predecessor node table pre is used to retain its predecessor node. Right now Until i = |R|, it reaches the termination layer, at which time shortest[|R|][0] is calculated to be the optimal path distance; Step 505. Restore the shortest path based on the predecessor node table pre, starting from the end point t, query pre[|R|][0] to obtain the predecessor node of the end point Keep searching for the previous node until you reach pre[0][0], which is the starting point s. Then, based on a series of previous node connections, you can construct a reverse path. By inverting the path, you can get the shortest path to the POI that meets the user's POI needs.

Citation Information

Patent Citations

  • Indoor path planning method and device based on automatic road network data extraction, client

    CN109472416A

  • Query method and device for shortest path of graph, electronic equipment and storage medium

    CN110704434A