Route planning method and device, storage medium and program product
Through the automated itinerary planning method, based on the itinerary destination information entered by the user, the itinerary is automatically filtered and recommended, and the optimized itinerary is generated, which solves the problem of cumbersome itinerary planning operations in the existing technology and improves the user's travel experience.
Patent Information
- Application Number
- CN202411510009.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-14
AI Technical Summary
The itinerary planning methods in the prior art are cumbersome, time-consuming and labor-intensive, and greatly consume users' travel enthusiasm.
Provide an automated itinerary planning method, by receiving the itinerary destination information input by the user, obtaining multiple to-be-planned attractions corresponding to the destination, determining the operation time, location, traffic distance and traffic duration of each attraction, and With the optimization goal of maximizing play time, minimizing traffic time and minimizing traffic distance, the target itinerary is automatically generated.
It realizes automatic filtering and recommendation of attractions based on the destination entered by the user, and generates itineraries that meet user needs, reducing the user's manual planning burden and improving the overall itinerary experience.
Smart Images

Figure CN119443445A_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of the present specification relate to the field of computer technology, and in particular, to a trip planning method, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] Itinerary planning aims to arrange the preferred schedule and route for travel or daily activities. Itinerary planning can be applied to personal travel, business travel, daily commuting or any situation that requires time management and resource optimization. The itinerary planning method in the related art is mainly for users to use search engines or other APP (Application) tools in their user devices to find relevant scenic spot information from the Internet, and then manually integrate and determine the itinerary based on the relevant scenic spot information found. This itinerary planning method is cumbersome, time-consuming and labor-intensive, which greatly consumes users' enthusiasm for travel. Summary of the invention
[0003] In view of this, one or more embodiments of the present specification provide a trip planning method, an electronic device, a computer-readable storage medium, and a computer program product.
[0004] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:
[0005] According to a first aspect of one or more embodiments of this specification, a trip planning method is proposed, comprising:
[0006] Receiving itinerary information including a itinerary destination input by a user, and acquiring a plurality of scenic spots to be planned corresponding to the itinerary destination;
[0007] Determine decision information corresponding to the plurality of scenic spots to be planned, the decision information including the operation time period and location information of each of the scenic spots to be planned, the traffic distance between any two of the scenic spots to be planned, and the traffic duration corresponding to the traffic distance indicated by at least one traffic mode;
[0008] The optimization goal is to maximize the total visiting time of the scenic spot, minimize the total transportation time and / or minimize the total transportation distance, and the operating time period of each of the scenic spots to be planned is used as a constraint condition. The itinerary of the multiple scenic spots to be planned is planned according to the decision information to generate a target itinerary.
[0009] According to a second aspect of the embodiments of this specification, an electronic device is provided, including:
[0010] processor;
[0011] a memory for storing processor-executable instructions;
[0012] When the processor executes the executable instructions, it is used to implement the method described in the first aspect.
[0013] According to a third aspect of the embodiments of this specification, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of any of the above methods are implemented.
[0014] According to a fourth aspect of the embodiments of this specification, a computer program product is provided, including a computer program, which implements the steps of any of the above methods when executed by a processor.
[0015] The technical solutions provided by the embodiments of this specification may have the following beneficial effects:
[0016] In the embodiments of this specification, the itinerary information including the itinerary destination input by the user can be received, and multiple scenic spots to be planned corresponding to the itinerary destination can be obtained, and then the decision information corresponding to the multiple scenic spots to be planned can be determined, and finally at least one of maximizing the total playing time of the scenic spot, minimizing the total traffic time and minimizing the total traffic distance is used as the optimization goal, and the operating time period of each scenic spot to be planned is used as a constraint condition, and the itinerary of the multiple scenic spots to be planned is automatically planned according to the decision information to generate a target itinerary. It can automatically filter and recommend scenic spots according to the destination input by the user, and generate an itinerary that meets the user's needs. The user does not have to manually find and arrange each scenic spot; the user only needs to provide the destination, and the computer can complete the complex calculation and planning tasks, reducing the complexity of the user's manual calculation of traffic time and coordination of the opening hours of the scenic spots, thereby reducing the user's planning burden and improving the overall itinerary experience.
[0017] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a schematic diagram of the architecture of a trip planning service system provided by an exemplary embodiment;
[0019] Figure 2 is a flowchart of a trip planning method provided by an exemplary embodiment;
[0020] Figure 3 is a schematic diagram of solving a VRPTW model provided by an exemplary embodiment;
[0021] Figure 4 is a schematic structural diagram of an electronic device provided by an exemplary embodiment;
[0022] Figure 5 It is a block diagram of a trip planning device provided by an exemplary embodiment. DETAILED DESCRIPTION
[0023] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0024] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0025] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0026] Based on the problem that the itinerary planning methods in the related art are cumbersome, time-consuming and laborious, the embodiments of this specification provide an itinerary planning method, in which a computer can receive itinerary information including the itinerary destination input by a user, and obtain multiple scenic spots to be planned corresponding to the itinerary destination, and then determine the decision information corresponding to the multiple scenic spots to be planned, and finally maximize the total play time of the scenic spot, minimize the total traffic time and / or minimize the total traffic distance as the optimization goal, and use the operating time period of each scenic spot to be planned as a constraint condition, automatically plan the itinerary for multiple scenic spots to be planned according to the decision information, and generate a target itinerary. The embodiments of this specification can automatically filter and recommend scenic spots according to the destination input by the user, and generate an itinerary that meets the user's needs, and the user does not have to manually find and arrange each scenic spot. The user only needs to provide the destination, and the computer can complete the complex calculation and planning tasks, which is conducive to reducing the user's planning burden and improving the overall itinerary experience.
[0027] Figure 1 FIG. 1 is a schematic diagram of the architecture of a trip planning service system provided by an exemplary embodiment. Figure 1As shown, the system may include a server 11, a network 12 and several terminals, and the terminals may include a PC (Personal Computer) 13, a mobile phone 14 and the like.
[0028] The server 11 may be a physical server including an independent host, or the server 11 may be a virtual server carried by a host cluster. During operation, the server 11 may run a server-side program of an application to implement the relevant functions of the application. For example, when the server 11 runs a program for a trip planning service, it may be implemented as a corresponding trip planning service platform.
[0029] PC13 and mobile phone 14 are only some types of terminals that users can use. In fact, users can obviously also use terminals such as the following types: tablet devices, laptops, PDAs (Personal Digital Assistants), wearable devices (such as smart glasses, smart watches, etc.), etc., and one or more embodiments of this specification do not limit this. During operation, the terminal can run a program on the client side of a certain application to implement the relevant functions of the application. For example, when the terminal runs the program of the xx service, it can be implemented as a client of the itinerary planning service. Among them, the application program of the client of the above-mentioned itinerary planning service can be started and run on the terminal. The program on the client side can be a native application installed on the terminal, or the program on the client side can be a small program, a quick application or other similar forms. Of course, when using web page technologies such as HTML5 or similar, the relevant functions can be implemented through the page displayed by the browser. The browser here can be an independent browser application or a browser module embedded in certain applications.
[0030] As for the network 12 for interaction between terminals such as PC 13 and mobile phone 14 and server 11, it is possible to select a wired or wireless network to achieve communication based on the communication mode supported by the corresponding terminal, and this specification does not limit this. For example, PC 13 can support both wired and wireless communication, so it can use a wired or wireless network to achieve communication as needed, while mobile phone 14 usually only supports wireless communication, so it can use a wireless network to achieve communication.
[0031] The itinerary planning method provided in the embodiments of this specification can be executed by a server in the itinerary planning service system, or when the computing resources of the terminal are sufficient, the itinerary planning method can also be executed by a terminal in the itinerary planning service system. This embodiment does not impose any restrictions on this and can be specifically set according to the actual application scenario.
[0032] See also Figure 2 , Figure 2A flow chart of a trip planning method is shown, and an exemplary description is given by taking the method executed by a server in a trip planning service system, the method comprising:
[0033] In S201, itinerary information including a travel destination input by a user is received, and a plurality of scenic spots to be planned corresponding to the travel destination are obtained.
[0034] Exemplarily, the itinerary destination is the target location of this itinerary, such as a city, region or country, etc. The server can obtain multiple scenic spots to be planned related to the itinerary destination as the basis for planning this itinerary.
[0035] In a possible implementation, the server can select multiple attractions to be planned from the attraction database corresponding to the itinerary destination according to the user's preference for attractions. The user's preference for attractions includes but is not limited to: (1) attraction type preference: such as cultural and historical categories, natural scenery categories, entertainment and leisure categories, shopping and food categories, etc.; (2) activity type preference: such as the user's preference for outdoor activities, museum visits, city walks, etc.; (3) time preference: such as the user likes morning tours, or prefers afternoon or evening activities; (4) walking or transportation preference: the user may prefer attractions with short walks, or may not mind long transportation connections. The user's preference is often not single, but can be a combination of multiple preferences, such as liking historical and cultural attractions but not wanting to spend too much time on transportation. Therefore, the server can perform comprehensive screening based on multiple preferences.
[0036] The server has a scenic spot database corresponding to the itinerary destination, and the scenic spot database includes basic information of several scenic spots, such as operating time period, scenic spot location, ticket information, feature introduction, etc. The server selects multiple scenic spots to be planned that meet the user's preferences from the scenic spot database by matching the user's preference information and the attributes of the scenic spot. For example, according to the type of scenic spots preferred by the user, such as historical museums, natural landscapes, etc.; for example, according to the user's time preference, exclude scenic spots whose opening hours do not meet the user's itinerary; for example, according to the user's transportation preference, select scenic spots with a short distance or convenient transportation. In this embodiment, by combining the user's preferences, the server can select a combination of scenic spots that better meet the user's personalized needs, improve the pertinence and satisfaction of the itinerary, and the user's play experience is more in line with their interests and habits, increasing the pleasure and experience of the trip. In addition, when users make itineraries, they often face a large number of scenic spot selections and decisions. The server automatically selects scenic spots, reducing the workload of users who need to search, filter and compare by themselves, making itinerary planning simpler and more efficient.
[0037] In another possible implementation, the multiple scenic spots to be planned may also be selected by the user.
[0038] In another possible implementation, a portion of the multiple attractions to be planned is selected by the server from an attraction database corresponding to the itinerary destination based on the user's preferences for the attractions, and another portion of the multiple attractions to be planned is selected by the user. The user's autonomous selection portion can ensure that the user's specific needs are met, such as iconic attractions they really want to visit or places of personal interest. The attractions recommended by the server can provide intelligent suggestions based on the user's preference data and attraction characteristics, including some hidden or niche attractions that the user may not have known about but meet their preferences. This combination ensures both active user selection and new discoveries and surprises for the user; and by allowing the server to automatically select some attractions, the user's planning burden can be reduced, allowing them to focus on the attractions they care about most, saving a lot of time and energy.
[0039] In some embodiments, at least part of the multiple scenic spots to be planned are selected from the scenic spot database corresponding to the itinerary destination. Considering that the travel styles of different users vary greatly, some users like to visit as many scenic spots as possible (compact itinerary), while some users prefer to enjoy the journey leisurely and visit fewer scenic spots (loose itinerary). The itinerary information input by the user may also include the itinerary type; the itinerary type includes a compact itinerary and a loose itinerary. Some users may have limited time and want to visit as many scenic spots as possible in a short time. A compact itinerary can maximize the use of time; if the user has more time or wants to relax and visit, a loose itinerary can help them arrange more comfortably and enjoy every scenic spot calmly.
[0040] If the itinerary type is a compact itinerary, the server can select a first number of attractions to be planned from the attractions database corresponding to the itinerary destination; if the itinerary type is a loose itinerary, the server can select a second number of attractions to be planned from the attractions database corresponding to the itinerary destination; wherein the first number is greater than the second number. In this embodiment, by selecting the itinerary type, the server can more accurately meet the user's travel preferences and make itinerary planning more personalized. The server can quickly determine the number of recommended attractions based on the itinerary type, without the user having to spend a lot of time screening attractions. This automated method not only improves efficiency, but also ensures that the recommendation results are in line with the user's travel style. After the user selects the itinerary type, the user no longer has to manually select too many or too few attractions. The server can provide reasonable recommendations based on the type, reducing the user's decision-making burden.
[0041] For example, in a compact itinerary, the server will select more attractions (the first number) to fill the user's time to ensure that each day is used to the maximum extent. In contrast, in a loose itinerary, the server will select relatively fewer attractions (the second number) to ensure that the user has enough time to relax and experience each attraction. This flexibility ensures that the itinerary matches the user's actual available time and avoids the itinerary being too tight or too loose.
[0042] It can be understood that the embodiments of this specification do not impose any restrictions on the user's input method. It can be input through input devices such as keyboard, mouse, stylus, touch screen, etc., or it can be input through voice device, somatosensory device or gesture recognition device, etc. This embodiment does not impose any restrictions on this.
[0043] After obtaining multiple attractions to be planned, please refer to Figure 2 In S202, decision information corresponding to multiple scenic spots to be planned is determined, and the decision information includes the operating time period and location information of each scenic spot to be planned, the transportation distance between any two scenic spots to be planned, and the transportation time corresponding to the distance indicated by at least one transportation mode.
[0044] Among them, the operating time period of the scenic spot to be planned describes the opening and closing time of the scenic spot. For example, the opening hours of a museum are from 9:00 to 17:00. This information is very important because a core constraint of itinerary planning is that the scenic spot must be visited during the opening hours. The location information of the scenic spot to be planned is the geographical coordinates (latitude and longitude) or address of each scenic spot, which facilitates the subsequent calculation of the transportation distance and travel time between the scenic spots. For example, the location information of the scenic spot to be planned can be obtained from the scenic spot database corresponding to the itinerary destination, or it can also be obtained from other channels. This embodiment does not impose any restrictions on this.
[0045] Through the location information of each scenic spot, the transportation distance between any two scenic spots can be calculated. It can usually be obtained by calling the navigation tool. In addition to the transportation distance, the transportation time for different modes of transportation (such as driving, taking the bus, walking, etc.) for the transportation distance can also be determined. Different means of transportation have different driving speeds, which affects the transportation time between two scenic spots. The server can provide different transportation methods based on user preferences or the geographical distribution of scenic spots, and calculate the corresponding transportation time. For example, for two scenic spots that are close to each other, walking may be a better choice, while for scenic spots that are far away, cars or public transportation may be more suitable.
[0046] In some embodiments, in order to ensure the accuracy of itinerary planning, before itinerary planning is performed, the decision information can be verified based on preset verification rules to determine whether the decision information conforms to the objective situation; if the verification passes, the step of generating the target itinerary is executed; if the verification fails, an itinerary planning error prompt message is output. The role of the verification rules in itinerary planning is to ensure that the itinerary plan generated by the server is based on accurate, reasonable, and realistic decision information, thereby improving the quality and reliability of itinerary planning and avoiding itinerary planning errors caused by erroneous information.
[0047] The embodiments of this specification do not impose any restrictions on the verification rules, and specific settings can be made according to actual application scenarios.
[0048] For example, the verification rules for the operation period of scenic spots: ensure that the opening and closing times of each planned scenic spot are accurate and consistent with the actual operation period. For example, the operation time of a scenic spot is from 9 am to 5 pm. If the decision information shows that the closing time of the scenic spot is 6 pm, it will trigger a verification failure and prompt "the operation time of the scenic spot is wrong."
[0049] Another example is the verification rule for the location information of scenic spots: verify whether the geographical location information of the scenic spot is correct, such as GPS coordinates, the specific address of the scenic spot, etc. For example, if the location information of a certain scenic spot is empty or invalid, the verification fails and the prompt "the location information of the scenic spot is missing or wrong" is displayed; or if the itinerary destination is city A, and the city where the user selects a certain scenic spot is located is city B, the verification fails and the prompt "the scenic spot is not part of the itinerary destination" is displayed.
[0050] For example, the verification of other decision information, such as the departure time and return time of the daily trip provided later, the verification rule is: the departure time of the daily trip must be earlier than the return time. For example, if the departure time of a certain day's trip is later than the return time, the verification fails, and the prompt "the setting of the departure time and return time does not meet the objective situation" is displayed.
[0051] This embodiment can effectively avoid planning errors caused by incorrect operating hours, inaccurate locations, and other incorrect decision-making information through verification rules, and ensure that the itinerary plan conforms to the actual situation. In addition, the verification mechanism can screen unreasonable itineraries in advance to avoid users' itineraries being delayed or unable to complete the tour as planned due to inaccurate information.
[0052] Next, see Figure 2 In S203, the optimization goal is to maximize the total playing time of the scenic spot, minimize the total transportation time and / or minimize the total transportation distance, and the operating time period of each scenic spot to be planned is used as a constraint condition. According to the decision information, itinerary planning is performed for multiple scenic spots to be planned to generate a target itinerary.
[0053] Maximizing the total time spent at an attraction means that the server will try to increase the time users spend at the attraction. This means that under the premise of meeting all constraints, it is prioritized to ensure that users have enough time to visit each attraction, rather than rushing through it. In this way, users can make full use of their limited time and enjoy more tour content.
[0054] Minimizing the total traffic time means that the server will try to reduce the user's traffic time between attractions, so that users can spend more time playing instead of on the road. Minimizing the total traffic distance takes into account that in some cases, users may be more concerned about reducing the traffic distance (for example, hikers may prefer to reduce the walking distance), which is also one of the optimization goals. By minimizing at least one of the traffic time and traffic distance between attractions, unnecessary travel time is reduced, allowing users to move between attractions quickly and efficiently.
[0055] The opening time limit of each attraction is a hard constraint, which means that the planned arrival time must be within the operating hours of the attraction. For example, if the opening hours of an attraction are from 10:00 to 16:00, the server must arrange the visit of the attraction within this time window. By considering the operating time period (opening and closing time) of each attraction, it is ensured that users will not miss important attractions due to arriving too early or too late. The intelligent arrangement of operating hours avoids the occurrence of invalid trips, ensures the rationality of the trip, and improves the overall travel efficiency.
[0056] Based on the above optimization objectives and constraints, the server can plan itineraries for the multiple scenic spots to be planned according to the decision information corresponding to the multiple scenic spots to be planned, and generate a target itinerary that meets the scenic spot operation period and optimization objectives.
[0057] This embodiment can automatically filter and recommend attractions based on the destination entered by the user, and generate an itinerary that meets the user's needs, so that the user does not have to manually find and arrange each attraction. The user only needs to provide the destination, and the server can complete the complex calculation and planning tasks according to the above steps, reducing the complexity of the user manually arranging the order of attractions, calculating traffic time, and coordinating the opening hours of attractions, thereby reducing the user's planning burden and improving the overall itinerary experience.
[0058] In one possible implementation, after determining the decision information corresponding to the multiple scenic spots to be planned, the server does not need to adjust the decision information. It can directly take maximizing the total visit time of the scenic spots, minimizing the total transportation time and / or minimizing the total transportation distance as the optimization goal, and use the operating time period of each scenic spot to be planned as a constraint condition, plan the itinerary for the multiple scenic spots to be planned according to the decision information, and generate a target itinerary.
[0059] In another possible implementation, in order to obtain a more reasonable itinerary arrangement, for example, the user hopes that all the attractions in the same day itinerary are clustered, that is, concentrated in one area. To achieve this goal, after obtaining the decision information corresponding to the multiple attractions to be planned, the server can cluster the multiple attractions to be planned according to the traffic distance between any two attractions to be planned, and obtain a clustering result, wherein the traffic distance between any two attractions to be planned belonging to the same category is less than the traffic distance between any two attractions to be planned belonging to different categories, that is, all attractions to be planned belonging to the same category are geographically close. The clustering process automatically forms reasonable categories by analyzing the distances of all attractions, ensuring that the user's itinerary on the same day is as concentrated and efficient as possible.
[0060] Then, the server adjusts the traffic-related information in the decision information based on the clustering result; specifically, the server can perform at least one of the following adjustment operations: (1) shorten the traffic distance between any two planned scenic spots belonging to the same category, thereby reflecting a higher proximity, and obtain the traffic time corresponding to the shortened traffic distance indicated by at least one transportation mode. (2) expand the traffic distance between any two planned scenic spots belonging to different categories to ensure the rationality of the itinerary planning, and obtain the traffic time corresponding to the expanded traffic distance indicated by at least one transportation mode.
[0061] Finally, the server can take at least one of maximizing the total playing time of the scenic spot, minimizing the total transportation time, and minimizing the total transportation distance as the optimization goal, and take the operating time period of each scenic spot to be planned as the constraint condition, and plan the itinerary for multiple scenic spots to be planned according to the adjusted decision information, so that the scenic spots with the same day itinerary in the generated target itinerary are more clustered. In this implementation method, the clustered itinerary arrangement can significantly reduce the user's travel time between different scenic spots, so that tourists can visit more scenic spots in the same time, ensure the scientificity and rationality of the itinerary planning, and make the final generated target itinerary more in line with the actual situation.
[0062] In some embodiments, in order to make the itinerary planning results feasible, the target itinerary generated by the server based on the above process may include at least one of the following: the visiting time of each attraction, the playing time of each attraction, the transportation method between adjacent attractions, and the transportation time corresponding to the transportation method between adjacent attractions, but not limited to this, so as to help users reasonably allocate time, transportation and play experience.
[0063] The arrival time of each attraction ensures that tourists can visit the attraction during its opening hours. The arrangement of the visit time can be determined based on the following factors: (1) The opening and closing hours of the attraction: The server reasonably arranges the arrival time according to the operating hours of the attraction to avoid users arriving when the attraction is not open. (2) Transportation time and distance: The server will accurately calculate the reasonable arrival time based on the distance between the attractions and the transportation time to avoid affecting the overall arrangement of the itinerary due to transportation time errors. This ensures the operability of the itinerary, avoids wasting time due to the attraction not being open or the arrival time being inappropriate, and also reduces the risk of users waiting time or missing the attraction, making the itinerary smoother.
[0064] The duration of each attraction is determined to ensure that users can fully experience the attraction without being overly rushed or delayed. The duration of the visit can be determined based on the following factors: (1) The type and size of the attraction: The duration of different attractions will vary depending on their size and content. For example, a museum or park may take longer to visit, while some small attractions can be completed in a shorter time. (2) The overall compactness of the itinerary: The server will ensure that the duration of each attraction does not exceed the total itinerary time of the user based on the user's available time, while ensuring that the overall pace of the visit is comfortable and not too rushed or too idle. This optimizes the user's tour experience, ensures that each attraction has enough time to visit, avoids wasting time, and balances the time allocation between different attractions, allowing users to have enough time to experience the charm of each attraction.
[0065] The transportation methods and travel time corresponding to the transportation methods between adjacent attractions can allow users to clearly understand how to move between attractions. The choice of transportation method can be determined based on the following factors: (1) Transportation method selection: The server recommends the most suitable transportation method based on at least one of the user's transportation preferences (such as walking, driving, public transportation, etc.), the user's selected transportation method, and the local traffic conditions. For example, in the city, the subway or bus may be recommended, while in the suburbs, renting a car or walking may be recommended. (2) Transportation time estimation: The server calculates the transportation time between adjacent attractions based on the actual road conditions and distance. This can help users better manage their time and avoid travel delays caused by traffic timeouts. Clear transportation method suggestions are provided to reduce the time and effort of users to find transportation plans on their own.
[0066] For example, suppose the user inputs the destination as city A. The server obtains the following attractions to be planned: a park, b museum, c art gallery, d shopping mall, and plans the itinerary based on the decision information corresponding to these attractions to be planned. The operating time periods of each attraction to be planned are: (1) a park: 9:00-23:00; (2) b museum: 9:00-18:00; (3) c art gallery: 10:00-18:00; (4) d shopping mall: 8:00-19:00.
[0067] According to the distance and transportation mode (walking + subway) between the planned attractions, the server plans as follows: 9:00-11:00 visit Park A → walk from the north gate of Park A to the main gate of Museum B (estimated 25 minutes) → 11:30-13:30 visit Museum B → take the subway from Museum B to Art Gallery C (estimated 28 minutes) → 14:00-15:30 visit Art Gallery C → take the subway from Art Gallery C to Mall D (estimated 29 minutes) → 16:00-17:30 visit Mall D. The server generates feasible and specific itinerary information including the arrival time of the attractions, the tour time, the transportation mode between adjacent attractions, and the transportation time, so as to help users reasonably allocate time, transportation and travel experience.
[0068] In some embodiments, when planning an itinerary, the server can calculate the minimum number of days required to visit multiple planned attractions and the attractions to be visited each day based on the decision information, and then the recommended total number of days for the itinerary can be obtained according to the minimum number of days for the tour; and the recommended return time for the daily itinerary can also be determined based on the visit time and the duration of the last attraction of the day. In other words, the target itinerary can also include at least one of the following: the recommended total number of days for the itinerary, at least one attraction corresponding to the daily itinerary, and the recommended return time for the daily itinerary. The server can then recommend a daily return destination based on this information, without the user having to manually determine the daily return destination. The automated return destination recommendation reduces the user's selection pressure during travel, improves the convenience and comfort of travel, and makes itinerary arrangements smoother.
[0069] In a possible implementation, if the recommended return time of the daily itinerary is later than the preset time point, the server can filter out multiple candidate residential places around the last scenic spot of the daily itinerary based on the location information of the last scenic spot of the daily itinerary, so as to recommend the return place of the daily itinerary according to the multiple candidate residential places. For example, at least one target residential place can be determined from multiple candidate residential places based on the user's preference for residential places, and these target residential places are used as the recommended return places of the daily itinerary. In this embodiment, if the return time is later than the preset time point, the server can filter out residential places close to the last scenic spot, helping users to quickly find suitable accommodation after the tour, thereby improving the convenience of travel; and the recommended residential place is located near the last scenic spot, which can improve the user's sense of security, especially when returning at night, reducing unnecessary travel risks. Among them, the preset time point can be specifically set according to the actual application scenario, such as the preset time point is 9 o'clock, 10 o'clock or 11 o'clock in the evening.
[0070] In another possible implementation, if the recommended return time of the daily itinerary is earlier than the preset time point, the server can determine the time difference between the recommended return time of the daily itinerary and the preset time point, and the target travel time between the last attraction of the daily itinerary and the first attraction of the next day's itinerary. By calculating the time difference and the target travel time, the server can dynamically adjust the recommendation of the return destination to ensure the flexibility and adaptability of the user in the travel.
[0071] In one case, if the target traffic time is greater than the time difference, the server can filter out multiple candidate accommodations around the last scenic spot in the day's itinerary based on the location information of the last scenic spot, so as to recommend the return destination of the daily itinerary. In this embodiment, when the target traffic time is greater than the time difference, the surrounding candidate accommodations are filtered based on the location of the last scenic spot in the day's itinerary, which helps users find suitable accommodation quickly and safely after the tour, reducing unnecessary travel burdens.
[0072] In another case, if the target traffic time is less than the time difference, multiple candidate accommodation places around the first scenic spot of the next day's itinerary are screened based on the location information of the first scenic spot to recommend the return destination of the daily itinerary. In this embodiment, when the target traffic time is less than the time difference, the server can recommend accommodation from the location of the first scenic spot of the next day's itinerary, helping the user to reasonably arrange the next day's itinerary and avoid wasting time due to return delays.
[0073] In another possible implementation, the target itinerary may further include a departure time of the daily itinerary; wherein the departure time of the daily itinerary is specified by the user, for example, the itinerary information input by the user includes the departure time of the daily itinerary; or the departure time of the daily itinerary is automatically determined based on the user's historical travel information. When the departure time of the daily itinerary is known, the server may make a return trip recommendation for the daily itinerary with reference to the departure time of the daily itinerary.
[0074] In one case, if the time difference between the departure time of the next day's itinerary and the visit time of the first scenic spot in the next day's itinerary is greater than the preset duration, the server can filter out multiple candidate residential places around the last scenic spot based on the location information of the last scenic spot in the day's itinerary to recommend the return destination of the daily itinerary. In this embodiment, when the time difference is greater than the preset duration, it indicates that the user has enough time to rest or do activities before visiting the first scenic spot the next day. Therefore, the server recommends the surrounding candidate residential places based on the location of the last scenic spot in the day's itinerary, helping the user to quickly find suitable accommodation and reduce travel pressure; and combined with the next day's itinerary, provide users with personalized return recommendations to meet the needs and preferences of different users and increase travel satisfaction. Among them, the preset duration can be specifically set according to the actual application scenario, such as a preset duration of 1 hour or 2 hours.
[0075] If the time difference between the departure time of the next day's itinerary and the visit time of the first scenic spot in the next day's itinerary is less than or equal to the preset duration, it means that the interval between the departure time of the next day's itinerary and the visit time of the first scenic spot is short. The server can filter out multiple candidate residences around the first scenic spot based on the location information of the first scenic spot in the next day's itinerary to recommend the return destination of the daily itinerary. In this embodiment, when the time difference is less than or equal to the preset duration, the return destination recommended by the server based on the location information of the first scenic spot in the next day's itinerary can ensure that the user can quickly depart for the next scenic spot after returning to the accommodation, which helps the user save transportation time on the next day and improves the efficiency of sightseeing. In addition, combined with the next day's itinerary arrangement, the server provides users with personalized return destination recommendations to meet the needs and preferences of different users and increase travel satisfaction.
[0076] For example, assuming that the planned attractions include 4 attractions A, B, C, and D, based on the known decision information (operating time period and location information of each planned attraction, the transportation distance between any two planned attractions, and the transportation time corresponding to the transportation distance indicated by at least one transportation mode, etc.), it can be calculated that at least 2 days are needed to visit these 4 attractions, assuming that the result is Day1: A->C->D, Day2: B. From this, a recommended value for the total number of days of the itinerary can be obtained, that is, the recommended total number of days of the itinerary is 2 days, and the recommended return time for each day of the itinerary can also be obtained.
[0077] In the first case, if the recommended return time of Day 1 is later than the set 19:00, for example, all the itineraries for the day are completed at 20:00, the residential area around the last attraction D of Day 1 will be recommended as the return destination for Day 1 and the departure place for Day 2, so that users can rest immediately after the trip, avoid extra traffic time, and improve the comfort of the trip.
[0078] In the second case, if the recommended return time of Day 1 is earlier than 19:00, for example, all the itineraries for the day are completed at 18:00, and the travel time between the last attraction of Day 1 and the first attraction of Day 2 is 2 hours, it means that if the user directly stays near the first attraction of Day 2, the rest time of Day 1 will be shortened. In this case, the residence around the last attraction D of Day 1 will be recommended as the return destination of Day 1 and the departure place of Day 2, to ensure that the user has enough rest time on Day 1.
[0079] In the third case, if the recommended return time of Day 1 is earlier than 19:00, for example, all the itineraries for the day are completed at 18:00, and the travel time between the last attraction of Day 1 and the first attraction of Day 2 is half an hour, this indicates that the user has plenty of time to stay near the first attraction of Day 2. In this case, the residence around the first attraction B of Day 2 will be recommended as the return destination for Day 1 and the departure destination for Day 2, ensuring that the user can arrive at the attraction in time the next day, thereby improving the continuity and efficiency of the itinerary.
[0080] In the fourth case, if the departure time of the daily itinerary is known, if the opening time of the first attraction B of Day2 is relatively late, such as 10 am, and the departure time of Day2 is relatively early, assuming 8 am, in this case, the residential area around the last attraction D of Day1 can also be recommended as the return place of Day1 and the departure place of Day2, so as to avoid the user arriving at the attraction too early the next day and having to wait. In the fifth case, if the departure time of the daily itinerary is known, if the opening time of the first attraction B of Day2 is 8:30 am, and the departure time of Day2 is assumed to be 8 am, in this case, the user may not be able to arrive at the attraction in time, then the residential area around the first attraction B of Day2 can be recommended as the return place of Day1 and the departure place of Day2, so as to avoid the user being unable to arrive at the attraction in time the next day and ensure the smooth progress of the trip.
[0081] Each of the above considerations revolves around the user's itinerary, time management, and information about the opening of scenic spots, aiming to provide better return destination recommendations and improve the user's travel experience and satisfaction. This not only optimizes the continuity of the itinerary, but also maximizes the efficiency and fun of the trip.
[0082] In some embodiments, in order to further improve the feasibility and accuracy of itinerary planning, the itinerary information input by the user may also include itinerary arrangement information, and the itinerary arrangement information includes at least one of the following: the total number of days of the itinerary, the departure time and return time of each day's itinerary, and the departure place and return place of each day's itinerary. It is understandable that the itinerary arrangement information is an optional item, and the user can determine whether to input the itinerary arrangement information according to his or her actual needs.
[0083] The decision information corresponding to the multiple scenic spots to be planned obtained by the server may further include itinerary arrangement information, such as the total number of days of the itinerary, the departure time and return time of the daily itinerary, and at least one of the departure place and return place of the daily itinerary, in addition to the operating time period and location information of each scenic spot to be planned, the transportation distance between any two scenic spots to be planned, and the transportation time corresponding to the transportation distance indicated by at least one transportation mode.
[0084] Then, the server can take at least one of maximizing the total playing time of the scenic spot, minimizing the total transportation time and minimizing the total transportation distance as the optimization goal, and take the operating time period and itinerary information of each scenic spot to be planned as the constraint condition, and plan the itinerary for multiple scenic spots to be planned according to the decision information corresponding to the multiple scenic spots to be planned, and generate a target itinerary. Exemplarily, the target itinerary may include at least one of the following: at least one scenic spot corresponding to the daily itinerary, the planning content that conforms to the itinerary information, the visiting time of each scenic spot, the playing time of each scenic spot, the transportation mode between adjacent scenic spots, and the transportation time corresponding to the transportation mode between adjacent scenic spots.
[0085] In this embodiment, by adding the user's itinerary information, such as the daily departure time, return time, departure place and return place, the server can ensure that the itinerary planning is more realistic and avoid invalid or unreasonable time arrangements. For example, if the user leaves late or returns early every day, the server will automatically optimize the tour route, reduce unnecessary long-distance transportation, give priority to nearby attractions, and avoid arranging attractions outside the departure or return time.
[0086] By combining the total number of days in the trip and the daily departure and return time, the server can reasonably allocate the number of attractions and the duration of play each day to avoid the trip being too tight or too loose, and ensure that the planned itinerary is feasible. For example, if the total number of days in the user's trip is 5 days, the server can reasonably arrange the number of attractions each day, so that the user can fully experience multiple attractions within a limited number of days, and avoid too many or too few attractions per day.
[0087] By considering the daily departure and return points, the server can intelligently design routes to avoid unnecessary turns or detours, minimize travel time, and maximize the user's play time. For example, if the user's departure and return points are different every day, the server will arrange the attractions to be visited in sequence, reducing the number of detours and ensuring the shortest travel time each time.
[0088] By combining the daily departure and return times with the opening hours of the attractions, the server can accurately plan the visit time for each attraction, ensuring that users visit the attractions during their opening hours, and avoiding the situation where the attractions are not open or have been closed when they arrive. For example, if the operating hours of an attraction are from 10:00 to 18:00, the server will plan the visit time based on the user's daily departure time and the distance to the attraction, ensuring that users can fully visit the attraction.
[0089] By automatically planning accurately based on the user's itinerary information and the operating hours and transportation duration of the scenic spots, the user does not need to manually make complex time arrangements or transportation plans. The server automatically provides users with reasonable itineraries. Users only need to enter the daily departure and return time, and the server will automatically generate a complete itinerary plan including detailed visit time, transportation methods, etc., reducing the user's planning pressure.
[0090] For example, suppose the user enters the following itinerary information: (1) Destination: City B; (2) Itinerary type: Flexible itinerary; (3) Total number of days: 3 days; (4) Daily itinerary: Departure time 10:00 on the first day, return time 18:00; departure time 9:00 on the second day, return time 17:00; departure time 8:30 on the third day, return time 16:30; (5) Departure and return destination: The departure destination for each day is the hotel, and the return destination is the hotel.
[0091] The server determines multiple planned scenic spots corresponding to city B, including scenic spots A, B, C, D, E, and F. Then the following information is obtained, including: (1) The operating time period of scenic spot A is 9:00-17:30; the operating time period of scenic spot B is 8:30-18:00; the operating time period of scenic spot C is 10:00-16:00; the operating time period of scenic spot D is 9:30-17:00; the operating time period of scenic spot E is 9:00-17:30; the operating time period of scenic spot F is 8:30-18:00. (2) Transportation information: the distance between scenic spots and the corresponding transportation time, which is based on the distance and transportation method between adjacent scenic spots.
[0092] The server combines the user's daily schedule, scenic spot operating hours, and traffic duration to plan the daily itinerary and ensure that the user's departure and return time requirements are met. The generated target itinerary is as follows:
[0093] Day 1, departure time: 10:00 from the hotel; planned attractions: Attraction C and Attraction D, arrival time at Attraction C is 10:30, and the tour duration is 2 hours; departure for Attraction D at 12:30, arrival time at Attraction D is 13:00, and the tour duration is 3 hours, leaving at 16:00; return: return to the hotel from Attraction D, arrive at 17:00; transportation method: select the default transportation method.
[0094] Day 2, departure time: depart from the hotel at 9:00; planned attractions: Attraction A and Attraction B, arrival time at Attraction A is 9:30, the tour duration is 2 hours, and the departure time is 11:30; arrival time at Attraction B is 12:00, the tour duration is 4 hours, and the departure time is 16:00; return: return to the hotel from Attraction B, arrive at 17:00; transportation method: select the default transportation method.
[0095] Day 3, departure time: depart from the hotel at 8:30; planned attractions: Attraction F and Attraction E, Attraction F: arrival time 9:00, playing time 3 hours, departure 12:00, Attraction E arrival time 12:30, playing time 3 hours, departure 15:30; Return: return to the hotel from Attraction E, arrive at 16:00; Transportation mode: select the default transportation mode.
[0096] It can be seen that in the above example, based on the user's daily departure time and return time, the server automatically plans the visit time and duration of each scenic spot to ensure that the play time of each scenic spot is maximized. For example, attractions C and D on the first day are arranged with sufficient play time, and the experience will not be affected by insufficient time. And because the user has chosen a loose itinerary, the server plans fewer attractions for the user every day to ensure that the itinerary is relaxed and not tense, so that the user can visit each attraction in depth and avoid the itinerary being too rushed. The user only needs to enter basic itinerary information, such as destination, itinerary type, daily departure and return time, etc., and the server can automatically generate a detailed itinerary plan, which greatly reduces the user's planning work. The server automatically considers details such as the operating hours of the scenic spots to ensure the rationality of the planning results.
[0097] In some embodiments, in order to meet the user's customized needs, for example, the user needs to set the date, arrival time and duration of the visit for certain attractions, such as specifying that certain attractions are visited at night. The itinerary information input by the user may also include itinerary customization information, and the itinerary customization information includes at least one of the following: at least one attraction to be planned selected by the user, the date, duration and arrival time of the visit for at least one attraction to be planned selected by the user, and the mode of transportation selected by the user. It is understandable that the itinerary customization information is optional, and the user can determine whether to input the itinerary customization information according to his or her actual needs.
[0098] When the server obtains decision information corresponding to multiple scenic spots to be planned, in addition to the operating time period and location information of each scenic spot to be planned, the transportation distance between any two scenic spots to be planned and the transportation time corresponding to the transportation distance indicated by at least one transportation mode, it can also further include itinerary customization information, such as at least one scenic spot to be planned selected by the user, the visit date, visit duration, arrival time of at least one scenic spot to be planned selected by the user, and the transportation mode selected by the user.
[0099] Then, the server can take at least one of maximizing the total playing time of the scenic spot, minimizing the total transportation time and minimizing the total transportation distance as the optimization goal, and take the operating time period of each scenic spot to be planned and the itinerary customization information as the constraint conditions, and plan the itinerary for multiple scenic spots to be planned according to the decision information corresponding to the multiple scenic spots to be planned, and generate a target itinerary. Exemplarily, the target itinerary may include at least one of the following: planning content that conforms to the itinerary customization information, the visiting time of each scenic spot, the playing time of each scenic spot, the transportation mode between adjacent scenic spots, and the transportation time corresponding to the transportation mode between adjacent scenic spots.
[0100] In this embodiment, the user can specify the specific time of visit, arrival time, duration of visit, and mode of transportation for certain attractions, so that the itinerary can be designed completely according to the user's preferences. For example, if the user wants to visit a nighttime attraction at night, the server will arrange it according to the user's customized settings and coordinate with the planned time of other attractions. Such functions ensure that the itinerary fully meets the user's expectations and provides a highly customized travel experience.
[0101] Although users have customized requirements for certain attractions, the server will still balance between optimization goals such as maximizing play time, minimizing traffic time, and minimizing traffic distance. By combining the user's customized needs and intelligent optimization algorithms, it ensures that both the user's preferences are met and efficient planning can be achieved in the overall itinerary. For example, the server can reasonably arrange transportation methods and reduce unnecessary traffic time based on meeting the user's customized requirements.
[0102] Users can enter custom requirements, and the server will take those into account and automatically handle the rest of the itinerary details. For parts that are not clearly specified, such as moving between attractions where no transportation is provided, the server will automatically select a better transportation method and balance the time and distance of the entire trip. In this way, users don't have to worry about every detail, but only need to focus on key custom requirements, saving time and energy.
[0103] And through efficient optimization and personalized customization of itineraries, users can feel greater freedom and comfort during their travels; users are no longer restricted to fixed itineraries, but can flexibly adjust various aspects of the itinerary according to their interests, preferences and specific experience needs, thereby improving travel satisfaction.
[0104] Continuing with the above example, assume that the user specifies the following custom requirements in the itinerary of City B: Visit night attraction X from 18:00 to 20:00 on the first night. Arrive at attraction Y at 9:00 on the second morning, play for 3 hours, and then go to other attractions. When planning, the server will give priority to these custom information, ensure that the end time of other itineraries on the first day is earlier than 18:00, and arrange reasonable transportation from the hotel to night attraction X. The planning of the second day will ensure that you arrive at attraction Y on time at 9:00 in the morning, and arrange the order of visiting other attractions on the day according to the remaining time and traffic distance. Itinerary custom information makes itinerary planning more flexible and personalized, and meets the special needs of users on the basis of maximizing the playing time and optimizing the traffic efficiency. This method can significantly improve the feasibility of planning and user experience, so that users have greater freedom and choice in their travels, while relying on the server to ensure the overall efficiency and rationality of the itinerary.
[0105] It is understandable that the user can input at least one of the itinerary arrangement information and the travel schedule information according to his / her own needs, and this embodiment does not impose any limitation on this.
[0106] In some embodiments, in order to further improve the flexibility of itinerary planning and the ability to meet user needs, a classification mechanism for required attractions and alternative attractions is introduced. Specifically, for the above-mentioned multiple attractions to be planned, the server can divide each attraction to be planned into required attractions or alternative attractions based on the user's preference for the attractions. Alternatively, each attraction to be planned can be divided into alternative attractions or attractions to be planned by the user through the terminal. Alternatively, a part of the attractions to be planned can be classified by the server based on the user's preference for the attractions, and each attraction to be planned in the part of the attractions to be planned can be divided into required attractions or alternative attractions, and the user can divide another part of the attractions to be planned into required attractions and alternative attractions through the terminal. In this embodiment, the classification method of required attractions and alternative attractions can be selected by the user through the terminal, or it can be automatically classified by the server according to the user's preference. This hybrid method combines the advantages of personalized customization and intelligent planning, which not only gives users full choice, but also reduces the decision-making burden of users. For example, the server can automatically recommend must-see attractions based on the user's historical travel records, interest preferences and other data. At the same time, users can manually adjust the classification of certain attractions. In this mode, itinerary planning can not only meet the user's personalized needs, but also make full use of the system's intelligent optimization functions.
[0107] After obtaining the decision information corresponding to the multiple scenic spots to be planned, the server takes at least one of maximizing the total visiting time of the scenic spots, minimizing the total transportation time and minimizing the total transportation distance as the optimization goal, and takes the operating time period of each scenic spot to be planned and the fact that the scenic spots to be planned that are required scenic spots must be planned within the target itinerary as constraints, and plans the itinerary for the multiple scenic spots to be planned according to the decision information to generate a target itinerary; wherein, because there is a possibility that the alternative scenic spots are not planned, the number of scenic spots included in the target itinerary is less than or equal to the total number of scenic spots to be planned.
[0108] In this embodiment, by dividing the scenic spots into required scenic spots and alternative scenic spots, the server can give priority to the scenic spots that users most want to visit during the planning process, and for the alternative scenic spots, it can be flexibly selected according to the actual situation of time, distance and itinerary arrangement. This mechanism can ensure that the itinerary planning can not only meet the core needs of users, but also make flexible adjustments according to actual conditions, thereby improving the adaptability of the itinerary. For example, when time or traffic does not allow visiting all scenic spots, the server can give priority to planning the required scenic spots to ensure that the key experience is achieved.
[0109] By dividing attractions into mandatory and alternative categories, the server can use time and resources more efficiently. In the planning process, mandatory attractions are the targets that must be arranged, which can ensure that users have a better travel experience within a limited time, while alternative attractions are optional items and will only be included in the itinerary if there is sufficient time or smooth traffic. This strategy makes the itinerary more compact and reasonable, and effectively avoids the problem of insufficient travel time or too tight itinerary caused by arranging too many attractions.
[0110] During the planning process, the server will make decisions based on the classification of required and alternative attractions, as well as factors such as transportation time and attraction operation time. If there is insufficient time or transportation conditions, alternative attractions may not be planned into the final itinerary, which can ensure the rationality and smoothness of the itinerary. For example, if the required attractions require a long time to play and are geographically dispersed, then alternative attractions may be excluded first to avoid the problem of an overly compact itinerary.
[0111] Continuing with the above example, suppose the user selects 5 attractions during the trip to city B, 3 of which are required attractions marked by the user (such as popular attractions A, B, and C), and the other 2 are alternative attractions (such as D and E). The server automatically divides the two categories according to the user's preferences, and gives priority to ensuring the arrangement of the three attractions A, B, and C when planning the itinerary, while trying to arrange the visit of D and E according to time and distance conditions. If time or traffic does not allow, only one of the alternative attractions may be arranged or none of them may be arranged, thereby ensuring the rationality and efficiency of the entire itinerary. By dividing the attractions into required and alternative, the server can flexibly arrange the itinerary, ensuring that the core attractions that users are most looking forward to can be visited, and can flexibly handle the alternative attractions according to the actual situation. This planning method not only enhances the flexibility of the itinerary, but also improves the overall experience of the user, while ensuring the feasibility and efficiency of the itinerary.
[0112] In some embodiments, the following is an exemplary description of the method of generating the target trip:
[0113] See also Figure 3 , the server can build a decision model according to the decision information; then solve the decision model based on the optimization goal and constraints, and use the solution of the decision model as the target itinerary.
[0114] Exemplarily, the decision model may be a VRPTW model or a TSPTW model, but is not limited thereto and may be other types of decision models.
[0115] Take the VRPTW model for example: VRPTW (Vehicle Routing Problem with TimeWindows) was originally used in the field of logistics to optimize the service or delivery routes of vehicles between multiple customers while meeting the time window constraints of each customer. When this model is applied to itinerary planning in the embodiments of this specification, the scenic spot is equivalent to the "customer", the tourist's means of transportation (such as a vehicle or public transportation) is equivalent to the "vehicle", and the opening time window of each scenic spot is similar to the customer's service time window.
[0116] Building the VRPTW model:
[0117] 1. Define nodes: The user's departure and return points are the "warehouses" in the VRPTW model, which are the starting and ending nodes of the trip. Attraction nodes, each attraction to be planned is equivalent to a "customer" with a fixed location (coordinates) and time window constraints (operating hours of the attraction). The required attractions must be in the final path, and the alternative attractions are flexibly selected according to the optimization goals and constraints.
[0118] 2. Time window restriction: The opening time window of each planned scenic spot limits the time range that tourists can visit. For example, if the opening hours of scenic spot A are from 9 am to 5 pm, then tourists can only visit the scenic spot during this time period. This time window restriction is used as a constraint in the VRPTW model.
[0119] 3. Traffic information: (1) Distance between nodes: the traffic distance between two attractions or between the starting point and the attraction; (2) Traffic mode and time: including the travel time under different transportation modes (such as driving, bus, etc.), which serves as the edge weight in the VRPTW model and affects the optimization selection of the path.
[0120] 4. Optimization objectives: (1) Minimize travel time: The optimization objective can be to minimize the total travel time to reduce the time tourists spend on the road; (2) Minimize travel distance: Reduce the total distance of the entire trip and plan the trip according to the most convenient route; (3) Maximize the duration of the trip: Ensure that tourists stay as long as possible at the scenic spot to enhance the travel experience. The optimization objective can be at least one of the above three.
[0121] 5. Constraints: (1) Time window constraint: Each to-be-planned scenic spot must be visited during its operating hours. Required scenic spots must meet the time window constraint to ensure that they appear in the itinerary. (2) Transportation mode constraint: Select the transportation mode according to the user's transportation preference, or according to the transportation mode selected by the user. (3) Itinerary customization information: If the user specifies the date, duration, and arrival time of a specific scenic spot, this information will also become a constraint. (4) Itinerary arrangement information: If the user specifies the total number of days of the itinerary, the departure and return times of each day's itinerary, and the departure and return locations of each day's itinerary, this information will also become a constraint. (5) Required scenic spot constraint: The to-be-planned scenic spots that are required scenic spots must be planned within the target itinerary. Among them, transportation mode constraint, itinerary customization information, itinerary arrangement information, and required scenic spot constraint are optional constraints, which can be selected based on the actual application scenario.
[0122] After constructing the VRPTW model, the server will use the preset solution algorithm to solve it and find the optimal path and schedule. The solution algorithm includes but is not limited to: (1) Exact algorithms, such as dynamic programming and integer linear programming, can obtain the optimal solution, but the computational complexity is high and it is suitable for small-scale problems. (2) Approximate algorithms, such as genetic algorithms, simulated annealing algorithms, ant colony algorithms, etc., can find approximate optimal solutions within a reasonable time and are suitable for large-scale itinerary planning. (3) Heuristic algorithms, such as taboo search or branch and bound methods, can quickly generate feasible solutions and gradually optimize them to approach the optimal solution. The server solves the VRPTW model through these algorithms and generates a target itinerary that satisfies all constraints and achieves the optimization goal.
[0123] By converting the itinerary planning process into a VRPTW model, the server can generate an optimal itinerary based on at least the time window constraint, allowing users to efficiently visit attractions within a limited time. The flexibility of optimization objectives and constraints improves the feasibility and personalized experience of the itinerary, while reducing the complexity of manual planning by users.
[0124] Exemplarily, TSPTW (Traveling Salesman Problem with Time Windows) is a traveling salesman problem with time windows. When this model is applied to itinerary planning in the embodiments of this specification, it can be used to determine a target itinerary to ensure that users visit various attractions within the specified time. For example, if the opening hours of a museum are from 9:00 to 17:00, tourists must arrive and visit within this time period. The TSPTW model can reasonably arrange the order of visiting attractions while complying with the operating time restrictions of each attraction to improve the efficiency of the itinerary and the satisfaction of tourists. The construction process of the TSPTW model is similar to the above process. For details, please refer to the description in the relevant technology, which will not be repeated here.
[0125] In some embodiments, if the decision model constructed by the server does not have a feasible solution, the following steps are repeated until the decision model is successfully solved: adjusting the constraints, updating the above decision information based on the adjusted constraints, constructing a new decision model based on the updated decision information, and re-solving the new decision model based on the optimization objectives and the adjusted constraints. In this embodiment, if the decision model constructed by the server cannot obtain a feasible solution during the initial solution, the constraints will be adjusted to reconstruct and solve the new decision model until a feasible itinerary is generated. This process can ensure the flexibility of itinerary planning. Even if the initial constraints are too strict or complex, the server can eventually generate a reasonable itinerary by gradually relaxing the constraints.
[0126] For example, see Figure 3 , the server can re-build the decision model and solve it again after adjusting the constraints. At this time, the decision model may be able to successfully find a feasible solution due to the increased flexibility after adjustment. If a feasible solution cannot be obtained after solving it again, the server will continue to adjust the constraints and gradually relax some restrictions until the model can be solved successfully.
[0127] Exemplarily, the constraint condition may be adjusted in at least one of the following ways:
[0128] In the first possible implementation, if the constraint condition includes the return time of the daily itinerary, the server can delay the return time of at least one day's itinerary. In this embodiment, by delaying the return time of the daily itinerary, the server can effectively alleviate the time conflict caused by the tight schedule and ensure that the user has more time to complete the play activities. This method can ensure that the user can reduce the itinerary reduction caused by insufficient time while maintaining the experience of visiting the main attractions, thereby improving the feasibility of itinerary planning. It is particularly suitable for scenarios where users want to be compact but do not want to reduce the number of attractions to visit.
[0129] In a second possible implementation, if the constraint condition includes the duration of the visit to the scenic spot to be planned selected by the user, the server can shorten the duration of the visit to at least one scenic spot to be planned selected by the user. In this embodiment, by shortening the duration of the visit to at least one scenic spot selected by the user, the server can reduce the time consumption of a single scenic spot while ensuring that the user experiences the core scenic spot. This method is suitable for scenarios where the user wants to visit more scenic spots but cannot take into account the detailed visit arrangements for each scenic spot in terms of time. It allows the server to optimize time allocation to make the itinerary more compact and more operational.
[0130] In a third possible implementation, if the constraints include the mode of transportation selected by the user, the server can change the mode of transportation selected by the user, such as changing walking to subway travel. In this embodiment, by changing the mode of transportation selected by the user, the server can significantly reduce the travel time between attractions, especially by replacing walking or other slower modes of transportation with faster options (such as subway or taxi). This is particularly effective in large cities or when attractions are dispersed, ensuring that users can visit more attractions within a limited time and maximize the travel time of the trip.
[0131] In a fourth possible implementation, if the constraint condition includes that the planned scenic spots that are required scenic spots must be planned in the target itinerary, the server may modify at least one of the multiple required scenic spots to be planned as an alternative scenic spot. In this embodiment, when there are multiple required scenic spots, and these scenic spots cause the itinerary to be unable to be completed on time, the server may adjust some of the required scenic spots to alternative scenic spots, giving priority to ensuring the most important experience for the user. This adjustment ensures the flexibility of the itinerary, avoids itinerary failures caused by too many required scenic spots, and can help users allocate time and resources more reasonably.
[0132] Exemplarily, the server can determine the type of each required attraction among multiple attractions to be planned; if the number of required attractions of the same type is greater than the specified number, the server can modify at least one required attraction of that type to an alternative attraction. For example, if the user selects two must-see museums, one museum will be set as an optional attraction for re-solving. In this embodiment, when the user selects multiple attractions of the same type (such as multiple museums or multiple parks), the server can automatically reduce the number of attractions of the same type according to the type of attraction and the needs of the user, so as to avoid itinerary duplication and ensure the diversity of itineraries.
[0133] Exemplarily, the server can obtain the evaluation information of each required scenic spot among the multiple scenic spots to be planned, and modify the required scenic spots whose evaluation information does not meet the preset evaluation conditions to alternative scenic spots. In this embodiment, by referring to the evaluation information of the scenic spots, the server can intelligently optimize the scenic spot selection to ensure that users give priority to visiting scenic spots with higher evaluations and improve the overall experience quality. Among them, the evaluation information of each required scenic spot can be obtained from the relevant tourism platform or evaluation website, and this implementation does not impose any restrictions on this.
[0134] Exemplarily, the server can determine all the scenic spots to be planned as candidate scenic spots. By setting all the scenic spots to be planned as candidate scenic spots, the server can obtain a larger adjustment space, making the itinerary more flexible and convenient for re-planning.
[0135] By adjusting constraints in a variety of ways, the server can effectively optimize the process of itinerary planning, ensure that user needs are met to the greatest extent possible, reduce the generation of infeasible itineraries, and provide users with a more efficient and intelligent planning experience. This adjustment mechanism improves the flexibility, adaptability and success rate of itinerary planning, allowing users to enjoy intelligent personalized services without tedious manual modifications.
[0136] In some embodiments, when there are multiple types of decision models that can be constructed, the corresponding type of decision model can be selected according to actual needs. For example, when the decision information contains itinerary information (such as the total number of days of the trip, the departure time and return time of the daily trip, and the departure and return places of the daily trip, etc.), a VRPTW model can be constructed based on the decision information and the VRPTW model can be solved; when the decision information does not contain itinerary information, a TSPTW model can be constructed based on the decision information.
[0137] In some cases, when the decision model considers two or more optimization objectives at the same time, the solution of the decision model may not meet expectations. For example, when the VRPTW model is solved with the optimization objectives of maximizing the total playing time of the scenic spot, minimizing the total transportation time and minimizing the total transportation distance at the same time, the problem of too tight daily schedule may occur. In this case, the VRPTW model can be solved with the optimization objectives of minimizing the total transportation time and minimizing the total transportation distance to obtain the above-mentioned order of playing for the multiple scenic spots to be planned, and then other optimization algorithms can be used again to maximize the playing time, effectively avoiding the day's schedule being too tight and ending too early. But not limited to this.
[0138] In some embodiments, see Figure 3 , if the solution of the decision model is based on the optimization goal and constraint conditions, in other words, the first solution of the decision model is a feasible solution, which indicates that the user's needs and itinerary arrangements are achievable under the existing constraints. In this case, the server can directly output the target itinerary. The target itinerary includes information such as the visit time, play time, and transportation method of each attraction, which fully meets the user's requirements and optimization goals.
[0139] If the solution of the decision model is obtained based on the optimization goal and the adjusted constraints, in other words, the decision model solves a feasible solution only after the constraints are adjusted. The possible adjustments include extending the return time, shortening the tour duration, changing the mode of transportation, or adjusting the required attractions to alternative attractions. In this case, the server can generate itinerary suggestion information based on the adjusted constraints, and output the target itinerary and itinerary suggestion information. In this embodiment, by providing itinerary suggestion information after adjusting the constraints, the user can more clearly understand which adjustments are necessary and why these adjustments can improve the feasibility and efficiency of the itinerary. The itinerary suggestion information provides decision support for users, allowing them to choose itineraries more confidently based on understanding the feasibility.
[0140] Itinerary suggestion information refers to the additional suggestions and information provided by the server to users after the target itinerary is generated, based on the adjusted constraints and optimization goals. These suggestions are intended to help users better understand the itinerary planning options and how to optimize their travel experience.
[0141] For example, if the user originally planned to visit five attractions, but due to time constraints, the server can suggest: "Considering your return time, you can choose to visit attractions A and B first, and the other attractions C and D can be used as alternatives."
[0142] For example, if the server finds that the mode of transportation selected by the user may result in a longer travel time, it can suggest: "It is recommended that you use the subway instead of walking. The subway trip from attraction A to attraction B will save about 20 minutes."
[0143] For example, if the user's schedule is tight, the server may prompt: "In order to avoid congestion during peak hours, it is recommended that you advance your departure time by 1 hour so that you can arrive at the first attraction smoothly."
[0144] The various technical features in the above embodiments can be arbitrarily combined as long as there is no conflict or contradiction between the combinations of features. However, due to space limitations, they are not described one by one. Therefore, any combination of the various technical features in the above embodiments also falls within the scope of this specification.
[0145] In some embodiments, the embodiments of this specification also provide an electronic device, including: a processor; a memory for storing processor executable instructions; wherein the processor implements any of the above methods by running the executable instructions.
[0146] Figure 4 is a schematic structural diagram of a device provided by an exemplary embodiment. Figure 4At the hardware level, the device includes a processor 402, an internal bus 404, a network interface 406, a memory 408, and a non-volatile memory 410, and may also include hardware required for other functions. One or more embodiments of this specification may be implemented based on software, such as the processor 402 reading the corresponding computer program from the non-volatile memory 410 into the memory 408 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0147] Please refer to Figure 5 , the trip planning device can be applied to Figure 4 The device shown in the figure is used to implement the technical solution of this specification. The itinerary planning device may include:
[0148] The to-be-planned scenic spot acquisition module 501 is used to receive the itinerary information including the itinerary destination input by the user, and acquire a plurality of to-be-planned scenic spots corresponding to the itinerary destination.
[0149] The decision information determination module 502 is used to determine the decision information corresponding to the multiple scenic spots to be planned, and the decision information includes the operating time period and location information of each of the scenic spots to be planned, the traffic distance between any two of the scenic spots to be planned, and the traffic duration corresponding to the traffic distance indicated by at least one traffic mode.
[0150] The itinerary planning module 503 is used to maximize the total playing time of the scenic spot, minimize the total transportation time and / or minimize the total transportation distance as the optimization goal, and use the operating time period of each of the scenic spots to be planned as a constraint condition, plan the itinerary for the multiple scenic spots to be planned according to the decision information, and generate a target itinerary.
[0151] In one implementation, the target itinerary includes at least one of the following: the visiting time of each scenic spot, the visiting time of each scenic spot, the transportation mode between adjacent scenic spots, and the transportation time corresponding to the transportation mode between the adjacent scenic spots.
[0152] In one implementation, the target itinerary further includes at least one of the following: a recommended total number of days for the itinerary, at least one attraction corresponding to a daily itinerary, and a recommended return time for the daily itinerary.
[0153] The device also includes a return destination recommendation module, which is used to screen out multiple candidate residential places around the last attraction in the daily itinerary based on the location information of the last attraction in the daily itinerary if the recommended return time of the daily itinerary is later than a preset time point, so as to recommend the return destination of the daily itinerary.
[0154] The device also includes a return destination recommendation module, which is also used to determine the time difference between the recommended return time of the daily itinerary and the preset time point, as well as the target transportation time between the last scenic spot in the daily itinerary and the first scenic spot in the next day's itinerary if the recommended return time of the daily itinerary is earlier than the preset time point; if the target transportation time is greater than the time difference, multiple candidate residential places around the last scenic spot in the daily itinerary are screened out based on the location information of the last scenic spot in the day's itinerary to recommend the return destination of the daily itinerary; if the target transportation time is less than the time difference, multiple candidate residential places around the first scenic spot in the next day's itinerary are screened out based on the location information of the first scenic spot in the next day's itinerary to recommend the return destination of the daily itinerary.
[0155] In one implementation, the target itinerary further includes at least one of the following: a recommended total number of days for the itinerary, at least one attraction corresponding to a daily itinerary, and a departure time for the daily itinerary; wherein the departure time for the daily itinerary is specified by the user or determined based on the user's historical travel information.
[0156] The device also includes a return destination recommendation module, which is used to, in the process of recommending the return destination of the daily itinerary, if the time difference between the departure time of the next day's itinerary and the visiting time of the first scenic spot in the next day's itinerary is greater than a preset duration, screen out multiple candidate residential places around the last scenic spot in the day's itinerary based on the location information of the last scenic spot, so as to recommend the return destination of the daily itinerary; if the time difference between the departure time of the next day's itinerary and the visiting time of the first scenic spot in the next day's itinerary is less than or equal to the preset duration, screen out multiple candidate residential places around the first scenic spot in the next day's itinerary based on the location information of the first scenic spot, so as to recommend the return destination of the daily itinerary.
[0157] In one implementation, the plurality of attractions to be planned are selected from an attraction database corresponding to the travel destination according to the user's preference for attractions, and / or the plurality of attractions to be planned include at least one attraction to be planned selected by the user.
[0158] In one implementation, the itinerary information also includes an itinerary type; the itinerary type includes a compact itinerary and a loose itinerary; the module 501 for acquiring attractions to be planned is specifically used for: if the itinerary type is the compact itinerary, selecting a first number of attractions to be planned from the attractions database corresponding to the itinerary destination; if the itinerary type is the loose itinerary, selecting a second number of attractions to be planned from the attractions database corresponding to the itinerary destination; wherein the first number is greater than the second number.
[0159] In one implementation, the device also includes a scenic spot clustering module, which is used to cluster the multiple scenic spots to be planned according to the traffic distance between any two of the scenic spots to be planned to obtain a clustering result; wherein the traffic distance between any two scenic spots to be planned belonging to the same category is less than a preset distance; and based on the clustering result, the traffic-related information in the decision information is adjusted.
[0160] The itinerary planning module 503 is specifically used to plan itineraries for the multiple scenic spots to be planned according to the adjusted decision information.
[0161] Exemplarily, the scenic spot clustering module is specifically used to shorten the traffic distance between any two of the scenic spots to be planned that belong to the same category, and obtain the traffic time corresponding to the shortened traffic distance indicated by at least one transportation mode; and / or, to expand the traffic distance between any two of the scenic spots to be planned that belong to different categories, and obtain the traffic time corresponding to the expanded traffic distance indicated by at least one transportation mode.
[0162] In one implementation, the itinerary information also includes itinerary scheduling information, and the itinerary scheduling information includes at least one of the following: the total number of itinerary days, the departure time and return time of each day's itinerary, and the departure place and return place of each day's itinerary; the constraint conditions also include the itinerary scheduling information, and the decision information also includes the itinerary scheduling information; wherein the target itinerary also includes: at least one attraction corresponding to the daily itinerary and planning content that complies with the itinerary scheduling information.
[0163] In one implementation, the itinerary information also includes itinerary customization information, and the itinerary customization information includes at least one of the following: at least one to-be-planned scenic spot selected by the user, the visit date, visit duration, arrival time of at least one to-be-planned scenic spot selected by the user, and the transportation method selected by the user; the constraint conditions also include the itinerary customization information, and the decision information also includes the itinerary customization information; wherein the target itinerary includes planning content that complies with the itinerary customization information.
[0164] In one implementation, the multiple attractions to be planned are divided into required attractions and alternative attractions according to the user's preference for the attractions, and / or the multiple attractions to be planned are divided into required attractions and alternative attractions according to the user's selection operation; the constraint conditions also include: the attractions to be planned that are required attractions must be planned within the target itinerary; the number of attractions included in the target itinerary is less than or equal to the total number of attractions to be planned.
[0165] In one implementation, the itinerary planning module 503 is specifically configured to construct a decision model according to the decision information; solve the decision model based on the optimization objective and the constraint conditions, and use the solution result of the decision model as the target itinerary.
[0166] In one implementation, the itinerary planning module 503 is further used to, if the decision model has no feasible solution, repeatedly perform the following steps until the decision model is successfully solved: adjust the constraints, update the decision information based on the adjusted constraints, build a new decision model based on the updated decision information, and re-solve the new decision model based on the optimization objective and the adjusted constraints.
[0167] In one implementation, the decision model includes at least one of the following: a VRPTW model and a TSPTW model.
[0168] In one implementation, it also includes a constraint adjustment module, which is used to: delay the return time of at least one day's trip; or modify at least one required attraction among multiple attractions to be planned to be an alternative attraction; or shorten the visiting time of at least one attraction to be planned selected by the user; or change the transportation method selected by the user.
[0169] In one implementation, the constraint adjustment module is specifically used to: determine the type of each required attraction among the multiple attractions to be planned; if the number of required attractions belonging to the same type is greater than a specified number, at least one required attraction of the type is modified to an alternative attraction; or, obtain evaluation information of each required attraction among the multiple attractions to be planned, and modify the required attractions whose evaluation information does not meet the preset evaluation conditions to alternative attractions.
[0170] In one implementation, it also includes an output module, which is used to output the target itinerary if the solution result of the decision model is obtained based on the optimization target and the constraint conditions; if the solution result of the decision model is obtained based on the optimization target and the adjusted constraint conditions, generate itinerary suggestion information based on the adjusted constraint conditions, and output the target itinerary and the itinerary suggestion information.
[0171] In one implementation, it also includes a verification module, which is used to verify the decision information based on preset verification rules to determine whether the decision information conforms to the objective situation; if the verification passes, the step of generating the target itinerary is executed; if the verification fails, an itinerary planning error prompt message is output.
[0172] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.
[0173] Based on the same concept as the above method, this specification also provides a computer-readable storage medium on which computer instructions are stored. When the instructions are executed by a processor, the steps of the method described in any of the above embodiments are implemented.
[0174] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0175] Based on the same concept as the above method, this specification also provides a computer program product, including a computer program / instruction, which implements the steps of the method described in any of the above embodiments when executed by a processor.
[0176] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.
Claims
1. A trip planning method, comprising: Receiving itinerary information including a itinerary destination input by a user, and acquiring a plurality of scenic spots to be planned corresponding to the itinerary destination; Determine decision information corresponding to the plurality of scenic spots to be planned, the decision information including the operation time period and location information of each of the scenic spots to be planned, the traffic distance between any two of the scenic spots to be planned, and the traffic duration corresponding to the traffic distance indicated by at least one traffic mode; The optimization goal is to maximize the total visiting time of the scenic spot, minimize the total transportation time and / or minimize the total transportation distance, and the operating time period of each of the scenic spots to be planned is used as a constraint condition. The itinerary of the multiple scenic spots to be planned is planned according to the decision information to generate a target itinerary.
2. According to the method of claim 1, the target itinerary includes at least one of the following: the visiting time of each scenic spot, the playing time of each scenic spot, the transportation mode between adjacent scenic spots, and the transportation time corresponding to the transportation mode between the adjacent scenic spots.
3. The method according to claim 2, wherein the target itinerary further comprises at least one of the following: a recommended total number of days for the itinerary, at least one attraction corresponding to each day of the itinerary, and a recommended return time for each day of the itinerary; The method further comprises: If the recommended return time of the daily itinerary is later than the preset time point, multiple candidate residential places around the last attraction of the daily itinerary are screened out based on the location information of the last attraction of the daily itinerary to recommend the return destination of the daily itinerary.
4. The method according to claim 3, further comprising: If the recommended return time of the daily itinerary is earlier than the preset time point, determine the time difference between the recommended return time of the daily itinerary and the preset time point, and the target travel time between the last attraction of the daily itinerary and the first attraction of the next day's itinerary; If the target travel time is greater than the time difference, multiple candidate residential places around the last scenic spot of the daily itinerary are screened based on the location information of the last scenic spot, so as to recommend a return destination for the daily itinerary; If the target traffic time is less than the time difference, a plurality of candidate residential places around the first scenic spot of the next day's itinerary are screened out based on the location information of the first scenic spot to recommend a return destination for the daily itinerary.
5. The method according to claim 2, wherein the target itinerary further comprises at least one of the following: a total number of days recommended for the itinerary, at least one attraction corresponding to each day of the itinerary, and a departure time for each day of the itinerary; wherein, The departure time of the daily trip is specified by the user or determined based on the user's historical travel information; The method further comprises: In the process of recommending a return destination for a daily itinerary, if the time difference between the departure time of the next day's itinerary and the visit time of the first scenic spot in the next day's itinerary is greater than a preset time length, a plurality of candidate residential places around the last scenic spot in the day's itinerary are screened based on the location information of the last scenic spot to recommend the return destination for the daily itinerary; If the time difference between the departure time of the next day's itinerary and the arrival time of the first attraction in the next day's itinerary is less than or equal to the preset duration, multiple candidate residential places around the first attraction are screened out based on the location information of the first attraction in the next day's itinerary to recommend the return destination of the daily itinerary.
6. According to the method of claim 1, the multiple attractions to be planned are selected from an attraction database corresponding to the itinerary destination based on the user's preference for attractions, and / or the multiple attractions to be planned include at least one attraction to be planned selected by the user.
7. The method according to claim 1, wherein the itinerary information further includes a itinerary type; the itinerary type includes a compact itinerary and a loose itinerary; The acquiring of a plurality of scenic spots to be planned corresponding to the itinerary destination includes: If the itinerary type is the compact itinerary, selecting a first number of attractions to be planned from an attraction database corresponding to the itinerary destination; If the itinerary type is the loose itinerary, selecting a second number of attractions to be planned from the attraction database corresponding to the itinerary destination; Wherein, the first number is greater than the second number.
8. The method according to claim 1, before planning the itinerary for the plurality of scenic spots to be planned according to the decision information, further comprising: Clustering the plurality of scenic spots to be planned according to the traffic distance between any two of the scenic spots to be planned to obtain a clustering result; wherein the traffic distance between any two scenic spots to be planned belonging to the same category is smaller than the traffic distance between any two scenic spots to be planned belonging to different categories; adjusting the traffic-related information in the decision information based on the clustering result; The itinerary planning for the plurality of scenic spots to be planned according to the decision information includes: Itineraries are planned for the plurality of scenic spots to be planned according to the adjusted decision information.
9. The method according to claim 8, wherein adjusting the traffic-related information in the decision information based on the clustering result comprises: Shortening the traffic distance between any two of the to-be-planned scenic spots belonging to the same category, and obtaining the traffic duration corresponding to the shortened traffic distance indicated by at least one traffic mode; and / or, The traffic distance between any two of the to-be-planned areas belonging to different categories is expanded, and a traffic duration corresponding to the expanded traffic distance indicated by at least one traffic mode is obtained.
10. The method according to claim 1, wherein the itinerary information further comprises itinerary arrangement information, wherein the itinerary arrangement information comprises at least one of the following: the total number of days of the itinerary, the departure time and return time of each day of the itinerary, and the departure place and return place of each day of the itinerary; The constraint condition also includes the itinerary arrangement information, and the decision information also includes the itinerary arrangement information; in, The target itinerary also includes: at least one scenic spot corresponding to the daily itinerary and planning content that conforms to the itinerary arrangement information.
11. The method according to claim 1, wherein the itinerary information further includes itinerary customization information, wherein the itinerary customization information includes at least one of the following: at least one scenic spot to be planned selected by the user, a visit date, a visit duration, an arrival time of the at least one scenic spot to be planned selected by the user, and a mode of transportation selected by the user; The constraint condition further includes the itinerary customization information, and the decision information further includes the itinerary customization information; in, The target itinerary includes planning content that conforms to the itinerary custom information.
12. The method according to claim 1, wherein the plurality of scenic spots to be planned are divided into required scenic spots and alternative scenic spots according to the user's preference for the scenic spots, and / or the plurality of scenic spots to be planned are divided into required scenic spots and alternative scenic spots according to the user's selection operation; The constraints also include: The planned attractions that are mandatory attractions must be planned within the target itinerary; The number of attractions included in the target itinerary is less than or equal to the total number of attractions to be planned.
13. The method according to any one of claims 1 to 12, wherein the step of planning an itinerary for the plurality of scenic spots to be planned according to the decision information to generate a target itinerary comprises: Constructing a decision model according to the decision information; The decision model is solved based on the optimization objective and the constraint conditions, and the solution result of the decision model is used as the target trip.
14. The method according to claim 13, further comprising: If the decision model has no feasible solution, repeat the following steps until the decision model is successfully solved: adjust the constraints, update the decision information based on the adjusted constraints, build a new decision model based on the updated decision information, and re-solve the new decision model based on the optimization objective and the adjusted constraints.
15. The method according to claim 13, wherein the decision model comprises at least one of the following: a VRPTW model and a TSPTW model.
16. The method according to claim 14, wherein the adjusting the constraint condition comprises at least one of the following: Delay the return of the trip by at least one day; or Modify at least one mandatory attraction among the multiple attractions to be planned into an alternative attraction; or Shorten the duration of the visit to at least one of the planned scenic spots selected by the user; or Change the user's selected mode of transportation.
17. The method according to claim 16, wherein the step of modifying at least one mandatory scenic spot among the plurality of scenic spots to be planned to be a candidate scenic spot comprises: Determining the type of each required scenic spot among the plurality of scenic spots to be planned; If the number of required attractions of the same type is greater than the specified number, at least one required attraction of the type is modified to an alternative attraction; or, The evaluation information of each required scenic spot among the plurality of scenic spots to be planned is obtained, and the required scenic spots whose evaluation information does not meet the preset evaluation conditions are modified into candidate scenic spots.
18. The method according to claim 13, further comprising: If the solution result of the decision model is obtained based on the optimization goal and the constraint conditions, output the target trip; If the solution result of the decision model is obtained based on the optimization target and the adjusted constraint conditions, itinerary suggestion information is generated based on the adjusted constraint conditions, and the target itinerary and the itinerary suggestion information are output.
19. The method according to any one of claims 1 to 12, before planning the itinerary for the plurality of scenic spots to be planned according to the decision information and generating a target itinerary, further comprising: Verifying the decision information based on preset verification rules to determine whether the decision information conforms to objective conditions; If the verification is passed, the step of generating the target travel is executed; If the verification fails, a trip planning error message will be output.
20. An electronic device, comprising: processor; A memory for storing processor-executable instructions; wherein the processor implements the steps of the method according to any one of claims 1 to 19 by executing the executable instructions.
21. A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 19.
22. A computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 19.