Tour route planning method and device
By using the Floyd algorithm and the optimal waypoint bridging algorithm, the shortest and least repetitive tour route is generated, solving the problems of path redundancy and computational complexity in existing technologies, and realizing fast tour route planning that fits the actual terrain.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN HONGXIN TECH SERVICE CO LTD
- Filing Date
- 2025-04-28
- Publication Date
- 2026-06-26
AI Technical Summary
Existing technologies cannot efficiently plan optimal routes that include multiple necessary points, have high computational complexity, and result in redundant and impractical routes, making it difficult to develop suitable tour routes.
The Floyd algorithm is used to calculate the shortest path. Combined with the optimal waypoint bridging and correction algorithm, the shortest tour route with the least repetition is generated, covering all specified points. Points are marked on a GIS map and directed paths are generated, eliminating redundant road segments that are directly or indirectly repeated.
It enables the rapid generation of tour routes that cover all specified points, have the shortest path, the least repetition, and adapt to dynamic needs. It is compatible with terrain features and provides optimal path planning based on actual scenarios.
Smart Images

Figure CN120445207B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of route planning technology, and more particularly to a method and apparatus for planning tourist routes. Background Technology
[0002] Nowadays, more and more people are taking their families to amusement parks during their leisure time.
[0003] Amusement parks, such as scenic spots and amusement parks, are often built against mountains and by water, or are filled with high-rise buildings. This determines the complexity of their route planning. In addition, with many attractions within the park, it is often difficult for tourists to plan their own routes reasonably.
[0004] How to develop suitable tour routes based on tourists' individual needs is an urgent problem to be solved. Summary of the Invention
[0005] This invention provides a tour route planning method and apparatus to solve the shortcomings of existing technologies, such as the inability to efficiently plan optimal paths with multiple essential points, high computational complexity, path redundancy, and insufficient practicality. It enables the rapid generation of tour routes that cover all specified points, have the shortest path, the least repetition, and adapt to dynamic needs.
[0006] In a first aspect, the present invention provides a method for planning tour routes, comprising:
[0007] Step 1: Construct a GIS map of the amusement park, marking entrances, exits, intersections, and play points as uniquely identified locations;
[0008] Step 2: Connect the points to generate a directed path, which includes unidirectional and bidirectional paths;
[0009] Step 3: Use the Floyd algorithm to calculate the shortest path between any two points and generate the shortest path set RS;
[0010] Step 4: Receive the user's input of the starting point, ending point, and set of traversable points. Generate a planned route using the optimal pathpoint bridging and correction algorithm, specifically including:
[0011] Step 401: Extract the shortest route R from the starting point to the ending point from the shortest route set RS. In the set of traversed points, the points included by the path of route R are the traversed points, denoted as point set S1. The points not included by the path of route R are the untraversed points, denoted as point set S2.
[0012] Step 402: Traverse all pairs of points in set S2 to form the shortest path set RSTemp. Select the shortest path with the highest effective path rate and the lowest repetition rate from set RSTemp as the bridging path RT.
[0013] Step 403: Traverse all adjacent point pairs (P) in the shortest route R i ,P j ), where (P i ,P j The list does not include points that the user does not require to be traversed. Perform the following operations:
[0014] Insert the path to be bridged RT into point P. i With point P j Candidate routes are generated between them;
[0015] The optimization evaluation value of the candidate routes is calculated according to the preset path optimization rules;
[0016] Select the adjacent point pair with the best optimization evaluation value as the optimal bridging point pair, and generate a new route R by inserting RT to update, and iterate until all traversed points are covered;
[0017] Step 404: Perform duplicate path correction on the final generated route, and remove redundant road segments that are directly or indirectly repeated.
[0018] According to a tour route planning method provided by the present invention, the method further includes: overlaying the planned route onto the GIS map for visualization.
[0019] The tour route planning method provided by the present invention further includes: making differentiated adjustments to the path length based on the actual terrain.
[0020] According to the tour route planning method provided by the present invention, the repetition rate K and effective rate V of each route in the set RSTemp are calculated as follows:
[0021] Effective path rate V = (Route waypoints ∩ Set S2) / Number of route waypoints
[0022] The repetition rate K = (route waypoints ∩ set S1) / number of route waypoints.
[0023] According to a tour route planning method provided by the present invention, the optimization evaluation value of the candidate route is calculated according to the preset path optimization rules, and the adjacent point pair with the best optimization evaluation value is selected as the optimal bridging point pair. Specifically, the difference between the total length of the candidate route and the total length of the original route R is calculated as the length increment; the adjacent point pair with the smallest length increment is selected as the optimal bridging point pair.
[0024] According to a tour route planning method provided by the present invention, a method for eliminating directly repeated redundant road segments includes: if there is a closed loop sub-path in the path consisting of at least two identical points X, then delete all intermediate nodes between the first repeated point X and the last repeated point X in the closed loop, and retain the last repeated point X and its subsequent path.
[0025] According to a tour route planning method provided by the present invention, a method for eliminating indirectly repeated redundant road segments includes: if there are at least three identical points X in the path, and the sub-path between the first two points X repeats after the subsequent points X, then all intermediate nodes between the first repeated point X and the second repeated point X are deleted, and the last repeated point X and its subsequent path are retained.
[0026] Secondly, the present invention also provides a tour route planning device, comprising:
[0027] The first processing module is used to construct a GIS map of the amusement park, marking entrances, exits, intersections, and play points as uniquely identified locations;
[0028] The second processing module is used to connect the points to generate a directed path, which includes a one-way path and a two-way path.
[0029] The third processing module is used to calculate the shortest path between any two points using the Floyd algorithm and generate the shortest route set RS.
[0030] The fourth processing module is used to receive the user's input of the starting point, ending point, and set of traversed points, and to generate a planned route through an optimal pathpoint bridging and correction algorithm. Specifically, this includes:
[0031] Extract the shortest route R from the starting point to the ending point from the shortest route set RS. In the set of traversed points, the points included by the path of route R are the traversed points, denoted as point set S1. The points not included by the path of route R are the untraversed points, denoted as point set S2.
[0032] Traverse all pairs of points in set S2 to form the shortest path set RSTemp. Select the shortest path with the highest effective path rate and the lowest repetition rate from set RSTemp as the bridging path RT.
[0033] Traverse all adjacent point pairs (P) in the shortest path R i ,P j ), perform the following operations:
[0034] Insert the path to be bridged RT into point P. i With point P j Candidate routes are generated between them;
[0035] The optimization evaluation value of the candidate routes is calculated according to the preset path optimization rules;
[0036] Select the adjacent point pair with the best optimization evaluation value as the optimal bridging point pair, and generate a new route R by inserting RT to update, and iterate until all traversed points are covered;
[0037] The final generated route undergoes duplicate path correction, eliminating redundant road segments that are directly or indirectly repeated.
[0038] Thirdly, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the above-described tour route planning methods.
[0039] Fourthly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the tour route planning method as described above.
[0040] The tour route planning method and apparatus provided by this invention have the following beneficial effects:
[0041] (1) The present invention can quickly generate tour routes that cover all specified points, have the shortest path, the fewest repetitions, and adapt to dynamic needs.
[0042] (2) This invention can generate online maps based on GIS, mark all tourist spots and intersections as points, connect the connectable points to form directed paths, calculate the length of each path, and form basic geographic data.
[0043] (3) The present invention is compatible with the opposite asymmetric path generated based on the terrain, which is more in line with the actual scenario.
[0044] (4) This invention provides an optimal waypoint bridging and correction algorithm based on the shortest path, which can plan the waypoints that meet the needs of users to visit some or all of the attractions in the venue using the shortest path at an extremely fast speed. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0046] Figure 1 This is a flowchart illustrating the tour route planning method provided by the present invention;
[0047] Figure 2 This is a schematic diagram of the annotated map provided by the present invention;
[0048] Figure 3 This is a schematic diagram of the path basic data provided by the present invention;
[0049] Figure 4 This is a schematic diagram of the shortest route provided by the present invention;
[0050] Figure 5 This is a flowchart illustrating the optimal path point bridging and correction algorithm provided by this invention.
[0051] Figure 6 This is a schematic diagram of the route planning results provided by the present invention;
[0052] Figure 7 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0054] It should be noted that in the description of the embodiments of the present invention, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. The terms "upper," "lower," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. Unless otherwise expressly specified and limited, the terms "installed," "connected," and "linked" should be interpreted broadly, for example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two elements. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0055] The terms "first," "second," etc., used in this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more.
[0056] The following is combined with Figures 1-7 The present invention describes the tour route planning method and apparatus provided in the embodiments of the present invention.
[0057] Figure 1 This is a flowchart illustrating the tour route planning method provided by the present invention, as shown below. Figure 1 As shown, including but not limited to the following steps:
[0058] Step 1: Construct a GIS map of the amusement park, marking entrances, exits, intersections, and play points as uniquely identified locations;
[0059] Step 2: Connect the points to generate a directed path, which includes unidirectional and bidirectional paths;
[0060] Step 3: Use the Floyd algorithm to calculate the shortest path between any two points and generate the shortest path set RS;
[0061] Step 4: Receive the user's input of the starting point, ending point, and set of traversable points. Generate a planned route using the optimal pathpoint bridging and correction algorithm, specifically including:
[0062] Step 401: Extract the shortest route R from the starting point to the ending point from the shortest route set RS. In the set of traversed points, the points included by the path of route R are the traversed points, denoted as point set S1. The points not included by the path of route R are the untraversed points, denoted as point set S2.
[0063] Step 402: Traverse all pairs of points in set S2 to form the shortest path set RSTemp. Select the shortest path with the highest effective path rate and the lowest repetition rate from set RSTemp as the bridging path RT.
[0064] Step 403: Traverse all adjacent point pairs (Pi, Pj) in the shortest route R, where (Pj, P ... i ,P j The list does not include points that the user does not require to be traversed. Perform the following operations:
[0065] Insert the path RT to be bridged between point Pi and point Pj to generate candidate routes;
[0066] The optimization evaluation value of the candidate routes is calculated according to the preset path optimization rules;
[0067] Select the adjacent point pair with the best optimization evaluation value as the optimal bridging point pair, and generate a new route R by inserting RT to update, and iterate until all traversed points are covered;
[0068] Step 404: Perform duplicate path correction on the final generated route, and remove redundant road segments that are directly or indirectly repeated.
[0069] This invention provides a tour route planning method that can quickly generate tour routes that cover all specified points, have the shortest path, the least repetition, and adapt to dynamic needs.
[0070] The above technical solution will be described below with reference to specific embodiments.
[0071] (1) Create an online map of the amusement park based on aerial topographic maps or by connecting with existing manufacturer map services.
[0072] (2) Mark the attractions, intersections and entrances / exits, and record them as locations.
[0073] Each location is named using a combination of letters and numbers, where the letter E indicates an entrance / exit, C indicates an intersection, P indicates a play point, and the numbers indicate the sequence number.
[0074] When a certain point is both an intersection and a tourist attraction, the tourist attraction shall prevail.
[0075] (3) Mark the path, calculate the path length, and correct the data.
[0076] Figure 2 This is a schematic diagram of the annotated map provided by the present invention, such as... Figure 2 As shown, the paths include: a one-way path, where you can only walk in the direction of the arrow; and a two-way path, where you can walk back and forth.
[0077] Calculate the length of each path based on geographic coordinate data.
[0078] Based on the actual terrain, path lengths are adjusted accordingly. For example, the length of the uphill and downhill paths may be the same, but the physical exertion and time may differ. Here, the distance data is standardized to a uniform length for easier calculation by lengthening or shortening the data. Figure 2 The path between P9 and P10, and the path between P10 and P11.
[0079] (4) Generate basic path data.
[0080] Each bidirectional arrow generates two paths; each unidirectional arrow generates one path. For example... Figure 3 As shown, Figure 3 This is a schematic diagram of the path basic data provided by the present invention.
[0081] (5) Use the Floyd algorithm to obtain the shortest route between any two points, form a route set RS, and store it.
[0082] The Floyd algorithm, also known as the interpolation method, is an algorithm that uses dynamic programming to find the shortest path between multiple source points in a given weighted graph.
[0083] Waypoints are the set of points along the shortest route from the starting point to the ending point. They include both the starting and ending points and consist of several points of interest (P), intersections (C), and entrances / exits (E). For example... Figure 4 As shown, Figure 4 This is a schematic diagram of the shortest route provided by the present invention.
[0084] (6) Based on your own needs, input the starting point Start, the ending point End, and several other points you want to pass through (denoted as the traversal point set Pass), and use the optimal waypoint bridging and correction algorithm to obtain the planned route.
[0085] Figure 5 This is a flowchart illustrating the optimal path point bridging and correction algorithm provided by this invention. See [link / reference]. Figure 5 The calculation process of the optimal path point bridging and correction algorithm is as follows:
[0086] 1. From the set of shortest routes RS, find the shortest route between the starting point Start and the ending point End (if the starting point is also the ending point, then the path point is that point and the length is 0), and denote it as route R.
[0087] 2. In the set of points Pass, the points included by the route R are the visited points, denoted as point set S1. The points not included by the route R are the unvisited points, denoted as point set S2.
[0088] 3. From the untraversed point set S2, take any two points, such as X and Y, with X as the starting point and Y as the ending point, and obtain the shortest route between X and Y from the shortest route set RS.
[0089] Permutations and Combinations Obtain the shortest routes RTemp(X,Y) between all two points in S2. These shortest routes form the set RSTemp.
[0090] Calculate the effective path rate and repeated path rate for each route in RSTemp:
[0091] Effective path rate V = (Route path points ∩ Untraversed point set S2) / Number of route path points, that is, the number of points in the covered set S2 in each route / the total number of path points in each route.
[0092] The repetition rate K = (route path points ∩ set of visited points S1) / number of route path points, that is, the number of points in set S1 covered by each route / the total number of path points for each route.
[0093] 4. Calculate and obtain the route with the highest effective path rate V and the lowest repetition rate K in RSTemp, and use it as the route to be bridged RT.
[0094] 5. Obtain waypoints from route R. Before calculation, exclude points not in the set Pass of traversed points. Then, select two adjacent points in sequence, i.e., adjacent point pairs (P... i ,P j ), bridge RT and calculate the length increment.
[0095] The bridging method is as follows: For example, P1 and P2, disconnect all connections between P1 and P2, then connect P1 to the starting point of the route to be bridged RT, and connect P2 to the ending point of the route to be bridged RT to form a new route. Calculate the length of the new route (candidate route), subtract the length of R, and obtain the length increment of P1 and P2 after bridging RT.
[0096] Calculate P1 and P2, P2 and P3, and so on until the last two adjacent points P. n-1 and P n The length increment after bridging RT is taken as the two adjacent points with the smallest length increment, and then the bridging is performed to form a new route R.
[0097] 6. Check if the path points of the new route R contain all the traversal points. If yes, return. Otherwise, repeat steps 2, 3, 4, and 5 until R contains all the traversal points.
[0098] 7. Correction of route R: Remove duplicate routes in route R.
[0099] There are two types of repetition.
[0100] Direct repetition: A path point between two identical points is repeated after the second point. Specifically, if a closed-loop sub-path exists consisting of at least two identical points X, all intermediate nodes between the first and last repeated point X in the closed loop are deleted, retaining the last repeated point X and its subsequent paths. For example, in ABCABCEF, the point (BC) between the two A's is repeated after the second A; therefore, ABC including the first A needs to be removed, ultimately forming ABCEF.
[0101] Indirect repetition: A route with three identical points, where the points between the first and second points are repeated after the third point, is an indirectly repetitive route. Specifically, if a path contains at least three identical points X, and the sub-path between the first two points X repeats after a subsequent point X, then all intermediate nodes between the first and second repeating points X are deleted, and the last repeating point X and its subsequent paths are retained. For example, in ABCAEFABC, the points between the first and second points A (BC, i.e., intermediate nodes) are repeated after the third point A. Therefore, ABC, including the first point A, needs to be removed, ultimately forming AEFABC.
[0102] (7) Online map display of route planning results.
[0103] I hope to enter the park from E1 and exit from E3, passing through all the attractions.
[0104] The optimal route plan was obtained through calculation:
[0105] The distance from E1 to E3 is 4282, and the waypoints are:
[0106] E1->P1->C1->P18->C1->C2->P2->C5->P3->P4->P5->C8->C9->P6->C9->P7->C9->P8->P9->P10->P11->P12->C11->C10->P 14->P15->P16->P17->C7->C12->P13->C12->C7->P19->P21->C4->P23->C4->C3->P22->C3->C4->P21->P19->P20->C13->E3
[0107] The effect is shown in Figure 6. Figure 6 This is a schematic diagram of the route planning results provided by the present invention.
[0108] On the other hand, the present invention also provides a tour route planning device, comprising:
[0109] The first processing module is used to construct a GIS map of the amusement park, marking entrances, exits, intersections, and play points as uniquely identified locations;
[0110] The second processing module is used to connect the points to generate a directed path, which includes a one-way path and a two-way path.
[0111] The third processing module is used to calculate the shortest path between any two points using the Floyd algorithm and generate the shortest route set RS.
[0112] The fourth processing module is used to receive the user's input of the starting point, ending point, and set of traversed points, and to generate a planned route through an optimal pathpoint bridging and correction algorithm. Specifically, this includes:
[0113] Extract the shortest route R from the starting point to the ending point from the shortest route set RS. In the set of traversed points, the points included by the path of route R are the traversed points, denoted as point set S1. The points not included by the path of route R are the untraversed points, denoted as point set S2.
[0114] Traverse all pairs of points in set S2 to form the shortest path set RSTemp. Select the shortest path with the highest effective path rate and the lowest repetition rate from set RSTemp as the bridging path RT.
[0115] Traverse all adjacent point pairs (P) in the shortest path R i ,P j ), perform the following operations:
[0116] Insert the path to be bridged RT into point P. i With point P j Candidate routes are generated between them;
[0117] The optimization evaluation value of the candidate routes is calculated according to the preset path optimization rules;
[0118] Select the adjacent point pair with the best optimization evaluation value as the optimal bridging point pair, and generate a new route R by inserting RT to update, and iterate until all traversed points are covered;
[0119] The final generated route undergoes duplicate path correction, eliminating redundant road segments that are directly or indirectly repeated.
[0120] The tour route planning method and apparatus provided by this invention have the following beneficial effects:
[0121] (1) The present invention can quickly generate tour routes that cover all specified points, have the shortest path, the fewest repetitions, and adapt to dynamic needs.
[0122] (2) This invention can generate online maps based on GIS, mark all tourist spots and intersections as points, connect the connectable points to form directed paths, calculate the length of each path, and form basic geographic data.
[0123] (3) The present invention is compatible with the opposite asymmetric path generated based on the terrain, which is more in line with the actual scenario.
[0124] (4) This invention provides an optimal waypoint bridging and correction algorithm based on the shortest path, which can plan the waypoints that meet the needs of users to visit some or all of the attractions in the venue using the shortest path at an extremely fast speed.
[0125] It should be noted that the tour route planning device provided in this embodiment of the invention can execute the tour route planning method described in any of the above embodiments during specific operation, and this embodiment will not elaborate on this.
[0126] Figure 7 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 7 As shown, the electronic device may include a processor 710, a communication interface 720, a memory 730, and a communication bus 740. The processor 710, communication interface 720, and memory 730 communicate with each other via the communication bus 740. The processor 710 can call logical instructions from the memory 730 to execute a tour route planning method.
[0127] Furthermore, the logical instructions in the aforementioned memory 730 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0128] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the tour route planning method provided in the above embodiments.
[0129] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0130] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for planning tourist routes, characterized in that, include: Step 1: Construct a GIS map of the amusement park, marking entrances, exits, intersections, and play points as uniquely identified locations; Step 2: Connect the points to generate a directed path, which includes unidirectional and bidirectional paths; Step 3: Use the Floyd algorithm to calculate the shortest path between any two points and generate the shortest path set RS; Step 4: Receive the user's input of the starting point, ending point, and set of traversable points. Generate a planned route using the optimal pathpoint bridging and correction algorithm, specifically including: Step 401: Extract the shortest route R from the starting point to the ending point from the shortest route set RS. In the set of traversed points, the points included by the path of route R are the traversed points, denoted as point set S1. The points not included by the path of route R are the untraversed points, denoted as point set S2. Step 402: Traverse all pairs of points in set S2 to form the shortest path set RSTemp. Select the shortest path with the highest effective path rate and the lowest repetition rate from set RSTemp as the bridging path RT. Step 403: Traverse all adjacent point pairs (P) in the shortest route R i ,P j ), where (P i ,P j The list does not include points that the user does not require to be traversed. Perform the following operations: Insert the path to be bridged RT into point P. i With point P j Candidate routes are generated between them; The optimization evaluation value of the candidate routes is calculated according to the preset path optimization rules; Select the adjacent point pair with the best optimization evaluation value as the optimal bridging point pair, and generate a new route R by inserting RT to update, and iterate until all traversed points are covered; Step 404: Perform duplicate path correction on the final generated route, and remove redundant road segments that are directly or indirectly repeated. The repetition rate K and effective rate V for each route in the set RSTemp are calculated as follows: Effective path rate V = (Route waypoints ∩ Set S2) / Number of route waypoints Repeat path rate K = (Route waypoints ∩ set S1) / Number of route waypoints; Specifically, the optimization evaluation value of the candidate routes is calculated according to the preset path optimization rules, and the adjacent point pair with the best optimization evaluation value is selected as the optimal bridging point pair. The difference between the total length of the candidate route and the total length of the original route R is calculated as the length increment; The pair of adjacent points with the smallest length increment is selected as the optimal bridging point pair.
2. The tour route planning method according to claim 1, characterized in that, Also includes: The planned route is overlaid onto the GIS map for visualization.
3. The tour route planning method according to claim 1, characterized in that, Also includes: The path length is adjusted differently based on the actual terrain.
4. The tour route planning method according to claim 1, characterized in that, Methods for eliminating directly duplicated redundant road segments include: If there is a closed-loop sub-path consisting of at least two identical points X, then delete all intermediate nodes between the first and last identical points X in the closed loop, and retain the last identical point X and its subsequent paths.
5. The tour route planning method according to claim 1, characterized in that, Methods for eliminating indirectly redundant road segments include: If there are at least three identical points X in the path, and the sub-path between the first two points X repeats after the subsequent points X, then delete all intermediate nodes between the first and second identical points X, and keep the last identical point X and its subsequent path.
6. A tour route planning device for implementing the tour route planning method as described in any one of claims 1 to 5, characterized in that, include: The first processing module is used to construct a GIS map of the amusement park, marking entrances, exits, intersections, and play points as uniquely identified locations; The second processing module is used to connect the points to generate a directed path, which includes a one-way path and a two-way path. The third processing module is used to calculate the shortest path between any two points using the Floyd algorithm and generate the shortest route set RS. The fourth processing module is used to receive the user's input of the starting point, ending point, and set of traversed points, and to generate a planned route through an optimal pathpoint bridging and correction algorithm. Specifically, this includes: Extract the shortest route R from the starting point to the ending point from the shortest route set RS. In the set of traversed points, the points included by the path of route R are the traversed points, denoted as point set S1. The points not included by the path of route R are the untraversed points, denoted as point set S2. Traverse all pairs of points in set S2 to form the shortest path set RSTemp. Select the shortest path with the highest effective path rate and the lowest repetition rate from set RSTemp as the bridging path RT. Traverse all adjacent point pairs (P) in the shortest path R i ,P j ), perform the following operations: Insert the path to be bridged RT into point P. i With point P j Candidate routes are generated between them; The optimization evaluation value of the candidate routes is calculated according to the preset path optimization rules; Select the adjacent point pair with the best optimization evaluation value as the optimal bridging point pair, and generate a new route R by inserting RT to update, and iterate until all traversed points are covered; The final generated route undergoes duplicate path correction, eliminating redundant road segments that are directly or indirectly repeated.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the tour route planning method as described in any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the tour route planning method as described in any one of claims 1 to 5.