Route planning method, device, readable medium and electronic device
Through the comprehensive consideration of real-time tourist flow and distance length between attractions, the passenger flow weight value and evaluation value model are used, combined with simulated annealing algorithm to optimize the tour route, the problem of crowded attractions caused by the shortest distance in the existing technology is solved, and the tour experience is improved.
Patent Information
- Application Number
- CN202111405432.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-24
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2041-11-24
AI Technical Summary
The existing tour route planning methods mainly consider the shortest distance, which will affect the tourist experience when the tourist traffic is large, making it difficult to avoid congestion.
Based on real-time tourist flow and distance length between attractions, the optimal tour route is determined through the passenger flow weight value and evaluation value model, and the route is generated by combining the simulated annealing algorithm to optimize the tour order to reduce congestion.
While shortening the tour distance, avoid tourists from going to attractions with large traffic, improve the tour experience, and ensure that tourists are low in crowded attractions by evaluating the route with the smallest value.
Smart Images

Figure CN114091763B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a route planning method, device, readable medium and electronic device. Background Art
[0002] With the vigorous development of the tourism industry, Internet technology is being used more and more widely in the tourism industry, such as planning the order of sightseeing for tourists to visit various scenic spots in the scenic area to save tourists' sightseeing time, monitoring the passenger flow of each scenic spot, etc. At present, the solution obtained in the process of planning the sightseeing route is usually the shortest sightseeing route. In this way, although it can reduce the distance for tourists to visit the scenic area, when there are many tourists in some scenic spots, tourists still follow the shortest sightseeing route, which will affect the tourists' sightseeing experience. Summary of the invention
[0003] In view of this, the embodiments of the present application provide a route planning method, device, readable medium and electronic device, which plan the visiting order of each scenic spot based on the real-time tourist flow of each scenic spot and the length of the tour route between each scenic spot. In this way, it can shorten the user's tour distance while avoiding tourists from visiting scenic spots when the tourist flow of scenic spots is large, thereby improving the tourists' tour experience.
[0004] In a first aspect, an embodiment of the present application provides a route planning method, which is applied to an electronic device, the method comprising: generating multiple tour routes for multiple scenic spots to be visited; obtaining the real-time number of tourists at each scenic spot, and determining the passenger flow weight value of each scenic spot in each tour route based on the real-time number of tourists at each scenic spot, wherein the passenger flow weight value of each scenic spot in each tour route increases with the increase of the real-time number of tourists at each scenic spot; determining an evaluation value of each tour route based on the passenger flow weight value of each scenic spot in each tour route and the tour distance between each scenic spot, wherein the evaluation value of each tour route increases with the increase of the total tour distance of each tour route and the sum of the passenger flow weight values of each scenic spot in each tour route; determining the optimal tour route among each tour route according to the evaluation value of each tour route.
[0005] The route planning method provided in the embodiment of the present application is used to determine the tour route, while taking into account the total tour distance and the passenger flow of each scenic spot. This can shorten the tourists' tour distance and avoid tourists visiting a scenic spot when the passenger flow of the scenic spot is large, thereby improving the tourists' tour experience.
[0006] In a possible implementation of the first aspect, determining the optimal tour route among the tour routes based on the evaluation values of the tour routes includes: taking the tour route with the smallest evaluation value among the tour routes as the optimal tour route.
[0007] That is, in the embodiment of the present application, the tour route with the smallest evaluation value among all the tour routes, that is, the route with a short tour distance and a low degree of congestion experienced by tourists when visiting various scenic spots, is used as the optimal tour route. This shortens the tourists' tour distance and avoids tourists visiting a scenic spot when the tourist flow at the scenic spot is large, thereby improving the tourists' tour experience.
[0008] In a possible implementation of the first aspect above, the passenger flow weight value of each scenic spot in each tour route is determined based on the real-time number of tourists at each scenic spot, including: determining the passenger flow weight value of each scenic spot in each tour route according to the real-time number of tourists at each scenic spot, the tourist carrying capacity of the scenic spot and the visiting order of each scenic spot in each tour route.
[0009] In a possible implementation of the first aspect, the passenger flow weight value of each scenic spot in each tour route is determined by the following formula:
[0010]
[0011] Among them, Q(k, n) is the passenger flow weight value of the kth scenic spot in the tour route when the real-time number of tourists is n, N is the tourist carrying capacity of the kth scenic spot, n is the real-time number of tourists in the kth scenic spot, e is a natural constant, and a and b are a constant.
[0012] In a possible implementation of the first aspect above, the evaluation value of each tour route is determined by the following formula:
[0013]
[0014] Among them, Q(k, n) is the passenger flow weight value of the kth scenic spot in the tour route when the real-time number of tourists is n, M is the total number of multiple scenic spots to be visited, the scenic spot passenger flow weight, d(k-1, k) is the tour distance between the k-1th scenic spot and the kth scenic spot in the tour route, and d(0, 1) is the tour distance between the tour starting point and the first scenic spot in the tour route.
[0015] In a possible implementation of the first aspect, the optimal tour route among the tour routes is determined according to the evaluation values of the tour routes by using a simulated annealing algorithm.
[0016] In a possible implementation of the first aspect, the method further includes: displaying an optimal tour route.
[0017] That is, in the embodiment of the present application, the electronic device can display the determined optimal tour route on the display screen of the electronic device, so that tourists can visit various attractions according to the optimal tour route, thereby improving the tourists' tour experience.
[0018] In a second aspect, an embodiment of the present application provides a route planning device, the device comprising:
[0019] A route planning module is used to generate multiple tour routes for multiple scenic spots to be visited, and determine the optimal tour route among the tour routes according to the evaluation values of each tour route, wherein the evaluation value of each tour route increases with the increase of the total tour distance of each tour route and the sum of the passenger flow weight values of each scenic spot in each tour route;
[0020] Parameter acquisition module, used to obtain the real-time number of tourists at each scenic spot;
[0021] The tour route evaluation module is used to determine the passenger flow weight value of each scenic spot in each tour route based on the real-time number of tourists at each scenic spot, and to determine the evaluation value of each tour route based on the passenger flow weight value of each scenic spot in each tour route and the tour distance between each scenic spot.
[0022] In a possible implementation of the second aspect above, the route planning module uses the one with the smallest evaluation value among the tour routes as the optimal tour route.
[0023] In a possible implementation of the second aspect above, the tour route evaluation module determines the passenger flow weight value of each scenic spot in each tour route based on the following method: according to the real-time number of tourists at each scenic spot, the tourist carrying capacity of the scenic spot and the tour order of each scenic spot in each tour route, the passenger flow weight value of each scenic spot in each tour route is determined.
[0024] In a possible implementation of the second aspect, the tour route evaluation module determines the passenger flow weight value of each scenic spot in each tour route by using the following formula:
[0025]
[0026] Among them, Q(k, n) is the passenger flow weight value of the kth scenic spot in the tour route when the real-time number of tourists is n, N is the tourist carrying capacity of the kth scenic spot, n is the real-time number of tourists in the kth scenic spot, e is a natural constant, and a and b are a constant.
[0027] In a possible implementation of the second aspect, the tour route evaluation module determines the evaluation value of each tour route by using the following formula:
[0028]
[0029] Among them, Q(k, n) is the passenger flow weight value of the kth scenic spot in the tour route when the real-time number of tourists is n, M is the total number of multiple scenic spots to be visited, the scenic spot passenger flow weight, d(k-1, k) is the tour distance between the k-1th scenic spot and the kth scenic spot in the tour route, and d(0, 1) is the tour distance between the tour starting point and the first scenic spot in the tour route.
[0030] In a possible implementation of the second aspect, the route planning module determines the optimal tour route among the tour routes according to the evaluation values of the tour routes through a simulated annealing algorithm.
[0031] In a third aspect, an embodiment of the present application provides a readable medium having instructions stored thereon, which, when executed on an electronic device, enables the electronic device to implement any route planning method provided by the first aspect and various implementations of the first aspect.
[0032] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a memory for storing instructions executed by one or more processors of the electronic device; and a processor, which is one of the processors of the electronic device, for executing the instructions stored in the memory so that the electronic device implements any one of the route planning methods provided by the first aspect and various implementations of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 According to some embodiments of the present application, a schematic diagram of a route planning scenario is shown;
[0034] Figure 2 According to some embodiments of the present application, a schematic flow chart of a route planning method is shown;
[0035] Figure 3 According to some embodiments of the present application, a schematic flow chart of a route planning method based on a simulated annealing algorithm is shown;
[0036] Figure 4 According to some embodiments of the present application, a schematic diagram of the structure of a route planning device 20 is shown;
[0037] Figure 5 According to some embodiments of the present application, a schematic structural diagram of an electronic device 100 is shown. DETAILED DESCRIPTION
[0038] Illustrative embodiments of the present application include, but are not limited to, route planning methods, apparatus, readable media, and electronic devices.
[0039] Figure 1According to some embodiments of the present application, an application scenario diagram of a route planning method is shown. Figure 1 As shown, scenic spot 10 includes 5 scenic spots, namely, scenic spot A, scenic spot B, scenic spot C, scenic spot D, and scenic spot E, wherein the real-time number of tourists in scenic spot A is 50 and the tourist carrying capacity is 100, the real-time number of tourists in scenic spot B is 80 and the tourist carrying capacity is 90, the real-time number of tourists in scenic spot C is 190 and the tourist carrying capacity is 200, the real-time number of tourists in scenic spot D is 20 and the tourist carrying capacity is 90, and the real-time number of tourists in scenic spot E is 40 and the tourist carrying capacity is 100. If the route is planned according to the shortest route, the tour order of tourist 01 is scenic spot A→scenic spot B→scenic spot C→scenic spot E→scenic spot D. However, from the real-time number of tourists and the tourist carrying capacity of each scenic spot, it can be seen that the number of tourists in scenic spots B and scenic spots C is relatively large, and tourist 01's visit to scenic spots B and scenic spots C may affect the tour experience of tourist 01 due to the large number of tourists.
[0040] In view of this, the embodiment of the present application provides a route planning method, in which the electronic device 100 carried by the tourist 01 obtains parameters such as the number of tourists at each scenic spot, the tourist carrying capacity, the tour distance between each scenic spot, and the location information of the tourist 01, performs multiple route planning, generates multiple tour routes, and evaluates each tour route through an evaluation model, and takes the tour route with the lowest evaluation value as the optimal tour route. For example, in Figure 1 In the scene shown in , tourist 01 can have 25 tour routes to choose from, and the electronic device 100 can evaluate the 25 tour routes through the evaluation model, and take the tour route with the smallest evaluation value, for example, the tour route: scenic spot A→scenic spot E→scenic spot D→scenic spot C→scenic spot B as the optimal tour route. Among them, the evaluation model can evaluate the planned tour route based on the real-time number of tourists at each scenic spot, the tourist carrying capacity, and the tour distance between each scenic spot. The lower the evaluation value, the shorter the total tour distance of the tour route, the lower the degree of congestion of each scenic spot when tourists go to each scenic spot, and the higher the tourist's tour experience. The tour route determined by the route planning method provided in the embodiment of the present application can shorten the tourist's tour distance while avoiding tourists from visiting the scenic spot when the passenger flow of the scenic spot is large, thereby improving the tourist's tour experience.
[0041] It can be understood that in some embodiments, the above evaluation model includes a passenger flow weight sub-model, which is used to characterize the degree of influence of the number of tourists at each scenic spot on the tourists' tour experience. The smaller the output value of the passenger flow weight sub-model (hereinafter referred to as the passenger flow weight value), the lower the crowding level of the scenic spot and the better the tourists' tour experience. For example, in some embodiments, the passenger flow weight sub-model can be constructed based on the logistic growth model. Specifically, the passenger flow weight value Q (k, n) of the k-th tourist attraction (hereinafter referred to as attraction k) in the tour route to be evaluated can be characterized by formula (1):
[0042]
[0043] Among them, Q(k,n) is the passenger flow weight value of scenic spot k, N is the tourist carrying capacity of scenic spot k, and n is the real-time number of tourists at scenic spot k. is a correction factor used to characterize the change in the number of tourists of scenic spot k as the order of the scenic spot in the tour route to be evaluated, a and b are constants, for example, in some embodiments, a=2 and b=1.5.
[0044] It is understandable that in other embodiments, the correction factor T(k) may also take other forms that can characterize the change in the number of tourists at the scenic spot k as the order of the scenic spot in the tour route to be evaluated, which is not limited here.
[0045] It can be understood that in other embodiments, the coefficients in the above formula (1) can also be adjusted, for example
[0046] From formula (1), it can be determined that when k is constant, that is, when the order of sightseeing spot k in the tour route to be evaluated is determined: if the real-time number of tourists n is less than half of the tourist carrying capacity N of the scenic spot, the value of Q(k, n) is a constant a, that is, the increase in the number of tourists does not affect the tourists' sightseeing experience; if the real-time number of tourists n is greater than or equal to half of the tourist carrying capacity N of the scenic spot, the value of Q(k, n) increases rapidly and exceeds a stable value, that is, the increase in the number of tourists rapidly reduces the tourists' sightseeing experience, and tends to a stable value when the number of tourists increases to a certain extent.
[0047] In some embodiments, the passenger flow weight sub-model shown in the above formula (1) can be used to characterize the degree of influence of the number of tourists at each scenic spot on the tourists' sightseeing experience, and in the process of route planning, a tour route is determined with a smaller passenger flow weight value and a shorter tour distance as the optimization goal. For example, the evaluation model including the above passenger flow weight sub-model can determine the evaluation value C of the tour route to be evaluated by the following formula (2):
[0048]
[0049] Among them, M is the total number of attractions in the route to be evaluated, d(k-1, k) is the tour distance between attractions k-1 and attraction k, and d(0, 1) is the tour distance from the starting point of the tour to attraction 1.
[0050] In the process of route planning based on formula (2), the electronic device can perform route planning based on simulated annealing algorithm, genetic algorithm, ant colony algorithm, particle swarm algorithm, neural network algorithm, etc., generate multiple tour routes, evaluate each generated tour route based on the evaluation model shown in formula (2), and take the tour route with the smallest evaluation value as the optimal tour route. It can be seen from formula (2) that the evaluation value C decreases with the decrease of the total tour distance of the tour route to be evaluated and the weight factor of each scenic spot, that is, the smaller the evaluation value C is, the smaller the total tour distance of tourists is, and the smaller the crowding degree of each scenic spot is when tourists arrive at each scenic spot. In this way, the optimal tour route determined based on formula (2) can shorten the tour distance of tourists while avoiding visiting the scenic spot when the passenger flow of the scenic spot is large, thereby improving the tourists' tour experience.
[0051] Combine the following Figure 1 The scenario shown introduces the technical solution of the embodiment of the present application in detail.
[0052] Specifically, Figure 2 According to some embodiments of the present application, a flow chart of a route planning method is shown. The execution subject of the method is an electronic device 100, which can be an electronic device carried by tourists, a guide device set in a scenic spot 10, or a management server of the scenic spot, etc., which is not limited here. Figure 2 As shown, the process includes the following steps:
[0053] S201: Obtain parameter information and the starting point of each scenic spot in the scenic area 10. That is, the electronic device 100 obtains parameter information for route planning, including but not limited to the tourist carrying capacity of each scenic spot in the scenic area, the real-time number of tourists at each scenic spot, the tour distance between each scenic spot, and the location information of tourists.
[0054] It can be understood that in some embodiments, the number of tourists at each attraction can be obtained through the ticket gates at each attraction, the number of tourists at each attraction can be obtained through the cameras at each attraction, and the number of tourists at each attraction can be obtained through infrared detection devices installed at the entrance / exit of each attraction, without limitation here.
[0055] It can be understood that in some embodiments, parameters such as the tourist carrying capacity of each scenic spot, the tour distance between each scenic spot, etc. can be stored in the management server of the scenic spot, and the electronic device 100 can obtain parameters such as the tourist carrying capacity of each scenic spot, the tour distance between each scenic spot, etc. from the management server of the scenic spot.
[0056] It is understood that in some embodiments, the starting point of the tour may be the current location of the tourist. The current location of the tourist may be obtained through the global positioning system (GPS) of the electronic device carried by the tourist, or may be obtained by receiving wireless signals such as ultra-wideband (UWB) signals and wireless local area network (WLAN) signals through the electronic device carried by the tourist, which is not limited in the embodiments of the present application.
[0057] It is understood that in other embodiments, the starting point of the tour can also be specified by the tourist. For example, the tourist can input the starting point of the tour through the application in the electronic device 100.
[0058] S202: Perform route planning based on parameter information of each scenic spot to generate multiple tour routes, and evaluate the generated multiple tour routes through an evaluation model to obtain evaluation values of each tour route, and select the tour route with the smallest evaluation value as the optimal tour route.
[0059] For example, the electronic device 100 can perform route planning based on a simulated annealing algorithm, a genetic algorithm, an ant colony algorithm, a particle swarm algorithm, a neural network algorithm, etc. to generate multiple tour routes, and based on an evaluation model, such as the evaluation model shown in formula (2), evaluate each generated tour route to obtain an evaluation value for each tour route, and select the tour route with the smallest evaluation value as the optimal tour route.
[0060] The following uses the simulated annealing algorithm as an example to introduce the detailed process of the electronic device 100 determining the optimal tour route.
[0061] Specifically, Figure 3 According to some embodiments of the present application, a schematic diagram of a process of performing route planning based on a simulated annealing algorithm is shown. The execution subject of the method is an electronic device 100, such as Figure 3 As shown, the process includes the following steps:
[0062] S202a: Initialize iterative parameters. That is, the electronic device 100 determines iterative parameters for route planning, including the current temperature T i and the termination temperature T s Where T iIt is used to determine whether the newly generated tour route is the better tour route when the evaluation value of the newly generated tour route is higher than the evaluation value of the better tour route, and after each round of iterative solution of route planning is completed, T i Reduce according to the preset method, for example, after completing a round of route planning iteration, T i Reduce ΔT until T i ≤T s Terminate the iteration if .
[0063] S202b: Randomly determine a tour route and use the tour route as a better tour route. That is, the electronic device 100 randomly determines a tour route as a better tour route during the iterative solution of the first round of route planning for comparison during the iterative solution process. Figure 1 In the scene shown, it can be determined that route S1: Scenic Spot A→Scenic Spot B→Scenic Spot C→Scenic Spot D→Scenic Spot E is a better sightseeing route.
[0064] S202c: Determine a new tour route, and determine the difference ΔC between the evaluation value of the new tour route and the evaluation value of the current tour route based on the evaluation model. That is, the electronic device 100 determines a new tour route, and calculates the difference ΔC between the evaluation value of the new tour route and the evaluation value of the better tour route, so as to determine whether the determined new tour route is better than the better tour route.
[0065] For example, in some embodiments, the electronic device 100 may randomly generate a new tour route, and determine the difference ΔC between the evaluation value of the new tour route and the evaluation value of the better tour route based on the evaluation model shown in formula (2). Figure 1 In the scenario shown in the figure, the new tour route determined is route S2: Scenic Spot A → Scenic Spot E → Scenic Spot D → Scenic Spot C → Scenic Spot B. Based on formula 2, it can be known that the evaluation value of route S1 is C S1 The evaluation value of route S2 is: 46.0060, C S2 is 45.6206, so the difference ΔC=C S2 -C S1 =-45.6206-46.0060=0.3854.
[0066] S202d: Determine whether the difference ΔC is greater than 0. If the difference ΔC is greater than 0, it means that the better tour route is better than the determined new tour route, and go to step S202f; otherwise, it means that the determined new tour route is better than the better tour route, and go to step S202e.
[0067] S202e: Determine the new tour route as a better tour route. That is, the electronic device 100 determines the new tour route as a better tour route when the new tour route is better than the better tour route. For example, the evaluation value C of the route S2 is S1 Subtract the evaluation value C of route S1 S2 If the difference ΔC=0.3854>0, route S2 is taken as the better tour route, and the evaluation value of the determined new tour route is compared with that of route S2 in the next iterative calculation process.
[0068] S202f: Judgment Is it greater than a random number in [0,1]. When the preferred tour route is better than the determined new tour route, the electronic device 100 determines to use the new tour route as the preferred tour route or not to change the preferred tour route according to the Metropolis acceptance criterion. If the new tour route is greater than a random number in [0,1], the new tour route is taken as the preferred tour route and the process goes to step S202e; otherwise, the preferred tour route is not changed and the process goes to step S202g.
[0069] S202g: Determine whether the preset number of iterations has been reached. That is, the electronic device 100 determines whether the current temperature is T i Whether the number of iterations under the condition of has reached the preset number of iterations, if it has reached, it means that when the current temperature is T i If the iterative solution is completed, go to step S202h; otherwise, it means that the current temperature is T i If the iterative solution is not completed, go to step S202c to continue the iterative solution.
[0070] It can be understood that, in some embodiments, the preset number of iterations can be preset in the memory of the electronic device 100, and read from the memory by the electronic device 100 during the route planning process.
[0071] S202h: Determine whether the termination condition is met. That is, the electronic device 100 determines whether the termination condition of the iterative solution is met. If the termination condition is met, it goes to step S202j to output the route planning result; otherwise, it goes to step S202i to continue the next round of iterative solution.
[0072] It can be understood that, in some embodiments, the termination condition may include at least one of the following conditions:
[0073] Current temperature T i Less than or equal to the termination temperature T s ;
[0074] The optimal tour route is not updated for the preset termination number of consecutive iterations.
[0075] It can be understood that, in some embodiments, the preset termination number can be preset in the memory of the electronic device 100, and read from the memory by the electronic device 100 during the route planning process.
[0076] S202i: Lower the current temperature T i , reset the preset number of iterations to perform the next round of calculation. When the electronic device 100 determines that the termination condition has not been met, it lowers the current temperature T i , reset the preset number of iterations and perform the next round of iterative calculations. For example, in some embodiments, the formula T i =T i -ΔT reduces the current temperature by T i and with the new T i Carry out the next round of iterative calculation.
[0077] S202j: Taking the better tour route as the optimal tour route. That is, when the electronic device 100 determines that the termination condition is met, the better tour route is taken as the optimal tour route.
[0078] It can be understood that in some embodiments, after the electronic device 100 determines the optimal tour route, it can also display the optimal tour route on the electronic device 100 to facilitate tourists to visit the scenic spot according to the optimal tour route.
[0079] It can be understood that the execution process of the aforementioned step S201 and step S202 is only an example. In other embodiments, the running order of some steps can be changed, and some steps can be merged or split, which is not limited here.
[0080] It can be understood that the execution order of the aforementioned steps S202a to S202j is only an example. In other embodiments, the execution order of some steps can be changed, and some steps can be merged or split, which is not limited here.
[0081] The tour route determined by the route planning method provided in the embodiment of the present application can shorten the tourists' tour distance while avoiding tourists from visiting the scenic spot when the tourist flow is large, thereby improving the tourists' tour experience.
[0082] The present application also provides a route planning device, which can obtain parameters such as the number of tourists at each scenic spot, the tourist carrying capacity, the tour distance between each scenic spot, and the location information of tourist 01, perform multiple route planning, generate multiple tour routes, and evaluate each tour route through an evaluation model (such as the evaluation model shown in formula (2) above), and use the tour route with the lowest evaluation value as the optimal tour route. Figure 4As shown, the route planning device 20 includes a scenic spot passenger flow acquisition module 21, an evaluation model generation module 22 and a tour route planning module 23. Among them:
[0083] The parameter acquisition module 21 is used to obtain parameters such as the real-time number of tourists at each scenic spot, the tourist carrying capacity, the tour distance between the scenic spots, and the location information of tourists.
[0084] The tour route evaluation module 22 is used to obtain the passenger flow weight value of each scenic spot in the tour route to be evaluated based on the real-time number of tourists at each scenic spot and the tourist carrying capacity of each scenic spot obtained by the parameter acquisition module 21, and then determine the evaluation value of the tour route to be evaluated based on the passenger flow weight value of each scenic spot in the tour route to be evaluated and the tour distance between the scenic spots. For example, the evaluation value of the route to be evaluated is determined based on the evaluation model shown in the aforementioned formula (2), so that the tour route planning module 23 can determine the optimal tour route with the smallest evaluation value according to the evaluation value generated by the tour route evaluation module 22 during the route planning process.
[0085] The tour route planning module 23 is used to generate multiple tour routes, and based on the evaluation values of each tour route determined by the tour route evaluation module 22, the tour route with the smallest evaluation value is used as the optimal tour route. Figure 3 In the illustrated embodiment, a plurality of tour routes are generated by a simulated annealing algorithm, and based on the evaluation values of the tour routes determined by the tour route evaluation module 22, the tour route with the smallest evaluation value is selected as the optimal tour route.
[0086] It is understood that the specific technical details of the route planning device 20 for route planning can be referred to in the previous Figure 2 The embodiments shown in Figure 3 are not described in detail here.
[0087] Understandably, Figure 4 The structure of the route planning device 20 shown is only an example. In other embodiments, the route planning device 20 may include more or fewer modules, or some modules may be split or combined, which is not limited here.
[0088] The route planning device 20 provided in the embodiment of the present application can shorten the tourists' sightseeing distance and avoid tourists from visiting a scenic spot when the tourist flow at the scenic spot is large, thereby improving the tourists' sightseeing experience.
[0089] further, Figure 5 According to some embodiments of the present application, a schematic diagram of the structure of an electronic device 100 is shown. Figure 5As shown, the electronic device 100 may include one or more processors 101, a system memory 102, a non-volatile memory (NVM) 103, an input / output (I / O) device 104, a communication interface 105, and a system control logic 106 for coupling the processor 101, the system memory 102, the non-volatile memory 103, the communication interface 104, and the input / output (I / O) device 105. Among them:
[0090] Processor 101 may include one or more single-core or multi-core processors. In some embodiments, processor 101 may include any combination of general-purpose processors and special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, processor 101 may be used to execute instructions to determine the optimal route among multiple tour routes.
[0091] The system memory 102 is a volatile memory, such as a random-access memory (RAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), etc. The system memory is used to temporarily store data and / or instructions. For example, in some embodiments, the system memory 102 can be used to store relevant instructions of the evaluation model, and can also be used to store data such as the real-time number of tourists at each scenic spot, the tourist carrying capacity, and the tour distance between each scenic spot.
[0092] The non-volatile memory 103 may include one or more tangible, non-temporary computer-readable media for storing data and / or instructions. In some embodiments, the non-volatile memory 103 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as a hard disk drive (HDD), a compact disc (CD), a digital versatile disc (DVD), a solid-state drive (SSD), etc. In some embodiments, the non-volatile memory 103 may also be a removable storage medium, such as a secure digital (SD) memory card. In other embodiments, the non-volatile memory 103 may be used to store relevant instructions of the evaluation model, and may also be used to store data such as the real-time number of tourists at each attraction, the tourist carrying capacity, and the tour distance between attractions.
[0093] In particular, the system memory 102 and the non-volatile memory 103 may respectively include: a temporary copy and a permanent copy of the instruction 107. The instruction 107 may include: when executed by at least one of the processors 101, the electronic device 100 implements the route planning method provided by each embodiment of the present application.
[0094] The input / output (I / O) device 104 may include a visitor interface, so that the visitor can interact with the electronic device 100. For example, in some embodiments, the input / output (I / O) device 104 may include an output device such as a display screen for displaying the determined optimal tour route, and may also include input devices such as a keyboard, a mouse, and a touch screen. The visitor can interact with the electronic device 100 through the visitor interface and input devices such as a keyboard, a mouse, and a touch screen, for example, to enter the starting point of the tour.
[0095] The communication interface 105 may include a transceiver for providing a wired or wireless communication interface for the electronic device 100, and then communicating with any other suitable device through one or more networks. In some embodiments, the communication interface 105 may be integrated into other components of the electronic device 100, for example, the communication interface 105 may be integrated into the processor 101. In some embodiments, the electronic device 100 may communicate with other devices through the communication interface 105, for example, communicating with ticket gates, cameras, infrared detection devices, etc. at various attractions to obtain the real-time number of tourists at each attraction.
[0096] System control logic 106 may include any suitable interface controller to provide any suitable interface with other modules of electronic device 100. For example, in some embodiments, system control logic 106 may include one or more memory controllers to provide interfaces to system memory 102 and non-volatile memory 103.
[0097] In some embodiments, at least one of the processors 101 may be packaged together with the logic of one or more controllers for the system control logic 106 to form a system in package (SiP). In other embodiments, at least one of the processors 101 may also be integrated with the logic of one or more controllers for the system control logic 106 on the same chip to form a system-on-chip (SoC).
[0098] It can be understood that the electronic device 100 can be any electronic device that can implement the relevant functions of route planning, including but not limited to mobile phones, computers, servers, tablet computers, handheld computers, etc., and the embodiments of the present application are not limited thereto.
[0099] Understandably, Figure 5The structure of the electronic device 100 shown does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0100] The various embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device and at least one output device.
[0101] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
[0102] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.
[0103] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including, but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Therefore, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a machine (e.g., computer) readable form.
[0104] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
[0105] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.
[0106] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0107] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be apparent to those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.
Claims
1. A route planning method, applied to an electronic device, characterized in that: include: Generate multiple tour routes for multiple scenic spots to be visited; The real-time number of tourists at each of the scenic spots is obtained, and based on the real-time number of tourists at each of the scenic spots, the passenger flow weight value of each scenic spot in each of the tour routes is determined, wherein the passenger flow weight value of each scenic spot in each of the tour routes increases with the increase in the real-time number of tourists at each of the scenic spots, and the passenger flow weight value of each scenic spot in each of the tour routes is determined by the following formula: , Wherein, Q(k, n) is the passenger flow weight value of the kth scenic spot in the tour route when the number of real-time tourists is n, N is the tourist carrying capacity of the kth scenic spot, n is the real-time number of tourists of the kth scenic spot, e is a natural constant, a and b are a constant, and a=2, b=1.5; Based on the passenger flow weight value of each scenic spot in each tour route and the tour distance between each scenic spot, the evaluation value of each tour route is determined, wherein the evaluation value of each tour route increases with the increase of the total tour distance of each tour route and the sum of the passenger flow weight value of each scenic spot in each tour route, and the evaluation value of each tour route is determined by the following formula: , Wherein, Q(k, n) is the passenger flow weight value of the kth scenic spot in the tour route when the number of real-time tourists is n, M is the total number of the multiple scenic spots to be visited, d(k-1, k) is the tour distance between the k-1th scenic spot and the kth scenic spot in the tour route, and d(0, 1) is the tour distance between the tour starting point and the first scenic spot in the tour route; Determine the best tour route among the tour routes according to the evaluation values of the tour routes, wherein determining the best tour route among the tour routes comprises: The optimal tour route among the tour routes is determined by a simulated annealing algorithm, wherein the optimal tour route is determined by the following method: Determine iterative parameters for route planning, determine iterative termination conditions according to the iterative parameters, iteratively compare the evaluation values of the tour routes, and determine the optimal tour route among the tour routes when the iterative termination conditions are met, wherein the iterative parameters include a current temperature and a termination temperature, the current temperature decreases as each round of iterative solution of route planning is completed, and the termination conditions include at least one of the following conditions: the current temperature is less than or equal to the termination temperature; no new optimal tour route is updated for a preset number of consecutive termination iterations; Furthermore, the iterative comparison of the evaluation values of the tour routes includes: Randomly selecting a route from the plurality of tour routes as a preferred tour route; A route is selected from the plurality of tour routes to compare the evaluation value with the preferred tour route, and the route with the smaller evaluation value in the comparison is updated as a new preferred tour route.
2. The method according to claim 1, characterized in that Determining the best tour route among the tour routes according to the evaluation values of the tour routes comprises: The one with the smallest evaluation value among the tour routes is taken as the optimal tour route.
3. The method according to claim 2, characterized in that Determining the passenger flow weight value of each attraction in each tour route based on the real-time number of tourists at each attraction includes: The passenger flow weight value of each scenic spot in each of the tour routes is determined according to the real-time number of tourists at each of the scenic spots, the tourist carrying capacity of the scenic spots, and the tour order of each scenic spot in each of the tour routes.
4. The method according to claim 1, characterized in that: Also includes: The optimal tour route is displayed.
5. A route planning device, characterized in that: The device comprises: The route planning module is used to generate multiple tour routes for multiple scenic spots to be visited, and determine the optimal tour route among the tour routes according to the evaluation values of the tour routes, wherein the evaluation value of each tour route increases with the increase of the total tour distance of each tour route and the sum of the passenger flow weight values of each scenic spot in each tour route. The determining of the optimal tour route among the tour routes comprises: The optimal tour route among the tour routes is determined by a simulated annealing algorithm, wherein the optimal tour route is determined by the following method: Determine iterative parameters for route planning, determine iterative termination conditions according to the iterative parameters, iteratively compare the evaluation values of the tour routes, and determine the optimal tour route among the tour routes when the iterative termination conditions are met, wherein the iterative parameters include a current temperature and a termination temperature, and the current temperature decreases as each round of iterative solution of route planning is completed. The termination condition includes at least one of the following conditions: the current temperature is less than or equal to the termination temperature; no new optimal tour route is updated after a preset number of consecutive termination iterations; Furthermore, the iterative comparison of the evaluation values of the tour routes includes: Randomly selecting a route from the plurality of tour routes as a preferred tour route; Selecting a route from the plurality of tour routes to compare the evaluation value with the preferred tour route, and updating the route with a smaller evaluation value in the comparison as a new preferred tour route; The tour route evaluation module determines the passenger flow weight value of each scenic spot in each tour route by the following formula: , Wherein, Q(k, n) is the passenger flow weight value of the kth scenic spot in the tour route when the number of real-time tourists is n, N is the tourist carrying capacity of the kth scenic spot, n is the real-time number of tourists of the kth scenic spot, e is a natural constant, a and b are a constant, and a=2, b=1.5; The tour route evaluation module determines the evaluation value of each tour route by the following formula: , Wherein, Q(k, n) is the passenger flow weight value of the kth scenic spot in the tour route when the number of real-time tourists is n, M is the total number of the multiple scenic spots to be visited, d(k-1, k) is the tour distance between the k-1th scenic spot and the kth scenic spot in the tour route, and d(0, 1) is the tour distance between the tour starting point and the first scenic spot in the tour route; A parameter acquisition module, used to obtain the real-time number of tourists at each of the scenic spots; The tour route evaluation module is used to determine the passenger flow weight value of each scenic spot in each tour route based on the real-time number of tourists at each scenic spot, and to determine the evaluation value of each tour route based on the passenger flow weight value of each scenic spot in each tour route and the tour distance between each scenic spot.
6. The device according to claim 5, characterized in that The route planning module uses the one with the smallest evaluation value among the tour routes as the optimal tour route.
7. The device according to claim 6, characterized in that The tour route evaluation module determines the passenger flow weight value of each scenic spot in each tour route based on the following method: The passenger flow weight value of each scenic spot in each of the tour routes is determined according to the real-time number of tourists at each of the scenic spots, the tourist carrying capacity of the scenic spots, and the tour order of each scenic spot in each of the tour routes.
8. A readable medium, characterized in that The readable medium stores instructions, which, when executed on an electronic device, enable the electronic device to execute the route planning method according to any one of claims 1 to 4.
9. An electronic device, characterized in that: include: a memory for storing instructions executed by one or more processors of the electronic device; and a processor, which is one of the processors of the electronic device, configured to execute instructions stored in the memory to implement the route planning method according to any one of claims 1 to 4.
