Multi-destination travel itinerary planning method, system and equipment and storage medium
By receiving user requests, matching attractions and destination cities, generating travel sequences and intercity transportation plans, and optimizing daily travel trajectories and accommodation arrangements, it solves the problems of continuity and cost balance in multi-day itineraries and improves the travel experience.
Patent Information
- Application Number
- CN202510875534.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-10-14
AI Technical Summary
In the existing technology, travel route planning has the problem of ignoring the continuity of multi-day itineraries and failing to effectively balance the distance to attractions, time windows and accommodation replacement costs, resulting in a poor user travel experience.
By receiving user requests, matching attractions and destination cities, generating travel sequences and intercity transportation plans, combining clustering algorithms and shortest path algorithms, optimizing daily travel trajectories and accommodation arrangements, considering user preferences and cost factors, and generating detailed itinerary plans.
Finely design user itineraries, reduce time costs, enhance travel experience, ensure the continuity and rationality of multi-day itineraries, and avoid time conflicts and traffic waste.
Smart Images

Figure CN120782082A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of travel itinerary planning, in particular, to a multi-destination travel itinerary planning method, system, device and storage medium. BACKGROUND
[0002] Online Travel Agency (OTA) is a professional term in the tourism e-commerce industry. It refers to "tourism consumers booking tourism products or services from tourism service providers through the network, and paying through online payment or offline payment, that is, various tourism subjects can market or sell products through the network." The emergence of OTA puts the original traditional travel agency sales model on the network platform, more widely transmits route information, and interactive exchange makes it more convenient for customers to consult and order. At present, the demand of users for the OTA platform is not limited to one-stop booking of air tickets and hotels, but hopes that the OTA platform can provide more comprehensive and detailed travel planning to improve user experience.
[0003] In the field of intelligent travel planning, the time planning of the user's travel itinerary contains many key space-time elements. In terms of space, the travel itinerary involves visiting multiple destination cities, and transportation and accommodation are key elements that affect the overall itinerary arrangement. In terms of time, the business hours of scenic spots, the best play time, and the play duration are all key elements that affect the user's travel arrangement.
[0004] In the prior art, the following problems exist in the travel path planning:
[0005] (1) The traditional algorithm only considers single-day itinerary optimization, ignoring the continuity of multi-day itinerary.
[0006] (2) The factors such as scenic spot distance, time window, and accommodation replacement cost are not effectively balanced.
[0007] Therefore, the present application provides a multi-destination travel itinerary planning method, system, device and storage medium. SUMMARY
[0008] In view of the problems in the prior art, the present application aims to provide a multi-destination travel itinerary planning method, system, device and storage medium, which overcomes the difficulties of the prior art and can finely design the travel, accommodation, play time arrangement and route planning scheme in the user's travel itinerary, reduce the time cost of the user's travel, and improve the experience in the travel itinerary.
[0009] The embodiments of the present application provide a multi-destination travel itinerary planning method, comprising the following steps:
[0010] S110, receiving a travel planning request of a user;
[0011] S120, matching a plurality of related scenic spots and the tourist destination cities to which the scenic spots belong based on the keywords in the tourism planning request;
[0012] S130, generating a tourism sequence based on the tourist destination city play order, an intercity transportation planning between the tourist destination cities, and a tourism sub-planning of each of the tourist destination cities according to at least the transportation information between the tourist destination cities;
[0013] S140, obtaining a daily tourism track, a daily accommodation hotel, and a scenic spot itinerary based on the tourism sequence, the tourism sub-planning, and an intracity transportation planning between the scenic spots in the tourism sub-planning;
[0014] S150, generating a tourism itinerary planning according to the daily tourism track, the scenic spot itinerary, the daily accommodation hotel, and the intercity transportation planning, and feeding back to the user.
[0015] Preferably, the step S110 comprises:
[0016] S111, receiving a text content of a tourism planning request of a user;
[0017] S112, extracting keywords from the text content and combining historical tourism information of the user on a tourism platform to obtain a tourist destination city, a scenic spot, a planned travel date, and a user preference of the user.
[0018] Preferably, the step S120 comprises:
[0019] S121, based on the keywords in the tourism planning request, the keywords including at least one of a city to which a scenic spot and a hotel belong, a scenic spot rating, a scenic spot interest label, a location of the scenic spot and the hotel, a scenic spot business hours, and a scenic spot best play time;
[0020] S122, matching a plurality of related scenic spots and the tourist destination cities to which the scenic spots belong according to the keywords.
[0021] Preferably, the step S130 comprises:
[0022] S131, obtaining an optimal order between the destination cities by a shortest path algorithm according to a transportation distance and a transportation time between the destination cities;
[0023] S132, establishing a tourism sequence of the tourist destination city play order according to the optimal order;
[0024] S133, generating a corresponding intercity transportation planning based on the tourism sequence and a time and price preference coefficient in the user preference;
[0025] S134, obtaining a play time period in each of the tourist destination cities according to the intercity traffic planning;
[0026] S135, selecting relevant scenic spots in the tourist destination cities in the play time period to generate a tourist sub-planning.
[0027] Preferably, the step S135 further comprises:
[0028] S1351, calculating a distance matrix according to the traffic distances between the scenic spots in each of the tourist destination cities;
[0029] S1352, based on the distance matrix, using a multi-round core clustering algorithm to cluster the scenic spots into n clusters according to the planned number of travel days n;
[0030] S1353, for each cluster, calculating a center point of the cluster;
[0031] S1354, calculating the traffic distances between the center points according to the center points of the clusters to obtain a center point distance matrix;
[0032] S1355, applying a shortest path algorithm to calculate the optimal path of the center points according to the center point distance matrix;
[0033] S1356, obtaining a travel trajectory of each cluster according to the optimal path of the center points.
[0034] Preferably, the multi-round core clustering algorithm comprises:
[0035] For p scenic spots, using a clustering algorithm to cluster the p scenic spots into n clusters according to the distance matrix;
[0036] Sorting the n clusters according to the capacities of the clusters from high to low;
[0037] Establishing a new cluster c, gradually merging the n clusters into c, until the number of elements m of the cluster c is greater than max(p*r, n), where r is a value between 0 and 1;
[0038] For c, using a clustering center algorithm with capacity constraints to cluster the m scenic spots into n clusters;
[0039] For a scenic spot k in the p scenic spots that is not in c, finding the nearest point i in c to determine its belonging cluster ci, adding k to the cluster ci, and updating c.
[0040] Preferably, in the step S140, according to the sum of the average distance matrices of each candidate hotel in the tourist destination cities to each scenic spot in the daily travel, selecting the sum with the smallest sum as the daily accommodation hotel.
[0041] The embodiment of the present application also provides a multi-destination travel itinerary planning system for implementing the multi-destination travel itinerary planning method.
[0042] A planning request module receives a travel planning request of a user;
[0043] A city matching module matches a plurality of related scenic spots and the travel destination cities to which the scenic spots belong based on keywords in the travel planning request;
[0044] An intercity planning module generates a travel sequence based on the travel destination city tour sequence, intercity traffic planning between the travel destination cities and travel sub-planning of each travel destination city according to at least the traffic information between the travel destination cities;
[0045] A city planning module obtains a daily travel track, a daily accommodation hotel and a scenic spot itinerary based on the travel sequence, the travel sub-planning and the intracity traffic planning between the scenic spots in the travel sub-planning;
[0046] An itinerary merging module generates a travel itinerary planning according to the daily travel track, the scenic spot itinerary, the daily accommodation hotel and the intercity traffic planning and feeds back to the user.
[0047] The embodiment of the present application also provides a multi-destination travel itinerary planning device, which comprises:
[0048] A processor;
[0049] A memory in which executable instructions of the processor are stored;
[0050] The processor is configured to execute the steps of the multi-destination travel itinerary planning method by executing the executable instructions.
[0051] The embodiment of the present application also provides a computer readable storage medium for storing a program which is executed to implement the steps of the multi-destination travel itinerary planning method.
[0052] The present application aims to provide a multi-destination travel itinerary planning method, system, device and storage medium which can finely design travel, accommodation, tour time arrangement and route planning scheme in a user travel itinerary, fully consider the continuity of multi-day itinerary, effectively balance scenic spot distance, time window and accommodation replacement cost, reduce the time cost of user travel and improve the experience in the travel itinerary. BRIEF DESCRIPTION OF DRAWINGS
[0053] Other features, objects and advantages of the present application will become more apparent from the following detailed description of non-limiting embodiments with reference to the attached drawings.
[0054] Figure 1 is a flow chart of a multi-destination travel itinerary planning method of the present application.
[0055] Figure 2 is a schematic diagram of an implementation process of a multi-destination travel itinerary planning method of the present application.
[0056] Figure 3 is a structural schematic diagram of a multi-destination travel itinerary planning system of the present application.
[0057] Figure 4 is a structural schematic diagram of a multi-destination travel itinerary planning device of the present application.
[0058] Figure 5 is a structural schematic diagram of a computer readable storage medium of an embodiment of the present application. DETAILED DESCRIPTION
[0059] The forgoing detailed description of the application, for clearly, purposes, describes a particular order of implementing steps. However, the application could be implemented in other orders than the order described herein. Also, well-known steps that are known before the present application were not described herein for the purpose of brevity.
[0060] With reference to the accompanying drawings, the principles and applications of the present application are explained hereafter in detail. The present application can be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Please refer to the claims for determining the true scope of the present application.
[0061] In the description of the present application, the expressions "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" are intended to indicate that the specific features, structures, materials, or characteristics included in the embodiment or example are included in at least one embodiment or example of the present application. In addition, the specific features, structures, materials, or characteristics in the expressions can be combined in any appropriate manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine the different embodiments or examples and the features of the different embodiments or examples expressed in the present application without contradiction, and the combination is included in the scope of the present application.
[0062] Furthermore, the terms "first", "second", etc. are used herein only to distinguish one identification entity from another identification entity, do not imply a relative importance or a specific order of corresponding described features, and do not imply a limitation on a number of objects to which the identification entity applies (i.e., a single object or several objects belong to one identification entity). Thus, the identification entity having the "first", "second" attribute can explicitly or implicitly include at least one of the identification entity. In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly specifically defined otherwise.
[0063] For the purpose of clearness of the present application, devices irrelevant to the description are omitted, and the same reference numerals are given to the same or similar constituent elements throughout the description.
[0064] Throughout the specification, when it is said that an element is "connected" to another element, this includes not only the case of "direct connection" but also the case of "indirect connection" in which other elements are interposed therebetween. In addition, when it is said that an element "includes" a constituent element, unless specifically stated to the contrary, other constituent elements are not excluded but it means that other constituent elements can also be included.
[0065] When it is said that an element is "on" another element, this can be directly on the other element, but can also be accompanied by other elements therebetween. When it is said in contrast that an element is "directly on" another element, there are no other elements therebetween.
[0066] Although the terms first, second, etc. can be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first interface and a second interface, etc. are described. Also, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises", "comprising", "includes" and / or "including", when used herein, specify the presence of stated features, steps, operations, elements, components, items, and / or groups thereof, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, items, and / or groups thereof. As used herein, the terms "or" and "and / or" are to be interpreted as inclusive, i.e., as meaning one or any combination of items. Thus, "A, B or C" or "A, B and / or C" means any of the following: A; B; C; A and B; A and C; B and C; A, B and C. An exception to this definition will occur only when a combination of elements, functions, steps or acts are in some way inherently mutually exclusive.
[0067] The specific terms used herein are for the purpose of describing specific embodiments only and are not intended to be limiting of the application. As used herein, singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0068] Although not all defined differently, technical and scientific terms used herein include the technical terms used herein, all terms have the same meaning as the meaning generally understood by the person skilled in the art to which the present application belongs. The terms defined in the commonly used dictionary are additionally explained to have a meaning consistent with the relevant technical literature and the content currently prompted, unless defined, and should not be interpreted as an ideal or very formal meaning.
[0069] Figure 1 is a flowchart of a multi-destination travel itinerary planning method of the present application. As shown in Figure 1 The present application relates to a travel itinerary planning method based on a space-time decision process, belonging to the technical field of intelligent travel planning, which improves the calculation and generation of corresponding travel routes according to travel targets. The multi-destination travel itinerary planning method of the present application comprises:
[0070] S110, receiving a travel planning request of a user;
[0071] S120, matching a plurality of related scenic spots and the tourist destination cities to which the scenic spots belong based on the keywords in the travel planning request;
[0072] S130, generating a travel sequence based on the tourist destination city play order, intercity transportation planning between the tourist destination cities, and travel sub-planning of each tourist destination city according to at least the traffic information between the tourist destination cities;
[0073] S140, obtaining daily travel trajectories, daily accommodation hotels, and scenic spot itineraries based on the travel sequence, travel sub-planning, and intracity transportation planning between scenic spots in the travel sub-planning;
[0074] S150, generating a travel itinerary planning according to the daily travel trajectories, scenic spot itineraries, daily accommodation hotels, and intercity transportation planning, and feeding back to the user.
[0075] The application aims to provide a trip planning method based on user decision-making spatio-temporal process, which automatically optimizes spatio-temporal factors in the trip process. The trip planning method can finely design the travel, accommodation, play time arrangement and route planning scheme in the user's travel, reduce the time cost of the user's travel, help the user avoid time conflicts, route detours and other problems affecting the travel experience in the trip, and improve the experience in the travel trip.
[0076] In a preferred embodiment, the step S110 comprises:
[0077] S111, receiving text content of a travel planning request of a user;
[0078] S112, extracting keywords from the text content and combining historical travel information of the user on a travel platform to obtain a travel destination city, a scenic spot, a planned travel day, and a user preference of the user, but not limited thereto.
[0079] In a preferred embodiment, the step S120 comprises:
[0080] S121, based on the keywords in the travel planning request, the keywords including at least one of a city where a scenic spot and a hotel belong, a scenic spot rating, a scenic spot interest label, a location of the scenic spot and the hotel, a scenic spot business hours, and a scenic spot best play time;
[0081] S122, matching a plurality of related scenic spots and a travel destination city where the scenic spots belong according to the keywords, but not limited thereto.
[0082] In a preferred embodiment, the step S130 comprises:
[0083] S131, according to the traffic distance and the traffic time between the travel destination cities, obtaining an optimal order between the destination cities by a shortest path algorithm;
[0084] S132, establishing a travel sequence of a travel destination city play order according to the optimal order;
[0085] S133, based on the travel sequence and a time and price preference coefficient in the user preference, generating a corresponding intercity traffic planning;
[0086] S134, obtaining a play period in each of the travel destination cities according to the intercity traffic planning;
[0087] S135, selecting related scenic spots in the travel destination cities in the play period to generate a travel sub-planning, but not limited thereto.
[0088] In a preferred embodiment, the step S135 further comprises:
[0089] S1351、According to the traffic distance between the scenic spots in each tourist destination city, a distance matrix is calculated;
[0090] S1352、According to the planned travel days n, based on the distance matrix, a multi-round core clustering algorithm is used to cluster the scenic spots into n clusters;
[0091] S1353、For each cluster, the center point of the cluster is calculated;
[0092] S1354、According to the center point of the cluster, the traffic distance between the center points is calculated to obtain a center point distance matrix;
[0093] S1355、According to the center point distance matrix, a shortest path algorithm is applied to calculate the optimal path of the center points;
[0094] S1356、According to the optimal path of the center points, the travel trajectory of each cluster is obtained, but not limited thereto.
[0095] In a preferred embodiment, the multi-round core clustering algorithm comprises:
[0096] For p scenic spots, according to the distance matrix, a clustering algorithm is used to cluster the p scenic spots into n clusters;
[0097] The n clusters are sorted in descending order according to the capacity of the clusters;
[0098] A new cluster c is established, and the n clusters are gradually merged into c until the number of elements m of the cluster c is greater than max(p*r, n), where r is a value between 0 and 1;
[0099] For c, a clustering center algorithm with capacity constraint is used to cluster the m scenic spots into n clusters;
[0100] For the scenic spot k in the p scenic spots that is not in c, find the nearest point i in c to determine its belonging cluster ci, add k to the cluster ci, and update c, but not limited thereto.
[0101] In a preferred embodiment, in step S140, according to the sum of the average distance matrix of each candidate hotel in the tourist destination city to each scenic spot in the daily travel, the sum with the smallest sum is selected as the daily accommodation hotel, but not limited thereto.
[0102] The specific embodiments of the present application include:
[0103] First, receive the text content of the user's travel planning request, extract keywords from the text content, and combine the user's historical travel information on the travel platform to obtain the user's travel destination city, scenic spot, planned travel days, and user preferences, but not limited to.
[0104] Then, based on the keywords in the travel planning request, the keywords include at least one of the city where the scenic spot and the hotel belong, the scenic spot rating, the scenic spot interest label, the location of the scenic spot and the hotel, the scenic spot business hours, and the best scenic spot playing time; match related several scenic spots and the scenic spot belonging to the travel destination city according to the keywords, but not limited to.
[0105] Next, according to the traffic distance and traffic time between the travel destination cities, the optimal order between the destination cities is obtained by the shortest path algorithm; according to the optimal order, the travel sequence of the travel destination city playing order is established, thereby reducing the user's traffic cost in the intercity traffic situation, and based on the travel sequence and the preference coefficient of time and price in the user preference, the corresponding intercity traffic planning is generated; according to the intercity traffic planning, the playing time period in each travel destination city is obtained (according to the specific traffic departure time or arrival time, a more accurate playing time period is obtained, for example: sometimes it arrives in the target city in the afternoon, obviously due to the real playing time period of the day is greatly reduced, only a few scenic spots can be played, and the accurate playing time period is obtained through the determination of the specific traffic voyage, so that a more suitable indoor travel itinerary can be arranged); in the playing time period in the travel destination city, the related scenic spots are selected to generate a travel sub-planning.
[0106] Among them, according to the traffic distance between the scenic spots in each travel destination city, a distance matrix is calculated; based on the distance matrix, a multi-round core clustering algorithm is used to cluster the scenic spots into n clusters according to the planned travel days n; for each cluster, the center point of the cluster is calculated; according to the center point of the cluster, the traffic distance between the center points is calculated to obtain a center point distance matrix; according to the center point distance matrix, the shortest path algorithm is applied to calculate the optimal path of the center point; according to the optimal path of the center point, the travel trajectory of each cluster is obtained. The multi-round core clustering algorithm includes: for p scenic spots, according to the distance matrix, a clustering algorithm is used to cluster the p scenic spots into n clusters; n clusters are sorted from high to low according to the capacity of the cluster; a new cluster c is established, and n clusters are gradually merged into c until the number of elements m of the cluster c is greater than max(p*r, n), wherein r is a value between 0 and 1; for c, a clustering center algorithm with capacity constraint is used to cluster the m scenic spots into n clusters; for the scenic spots k in the p scenic spots which are not in c, find the nearest point i in c to determine the cluster ci to which it belongs, and add k to the cluster ci and update c.
[0107] Finally, according to the sum of the average distance matrix of each candidate hotel in the tourist destination city to each scenic spot in the daily itinerary, the sum with the smallest sum is selected as the daily accommodation hotel, so that the most suitable hotel can be arranged according to the location of the scenic spot of the day, and the transportation cost of the user between the scenic spots in the city is greatly reduced. A tourism itinerary plan is generated according to the daily tourism track, scenic spot itinerary, daily accommodation hotel and intercity transportation planning, and fed back to the user.
[0108] The problem to be solved by the present application is that in multi-city itinerary planning, the play time of each city is planned according to the city play characteristics, and the experience quality of the user during the play is ensured as much as possible; the user itinerary is reasonably arranged according to the space-time plan of intercity transportation; the user's accommodation demand decision-making link in the tourism process is taken into account, the cost of the user's hotel change is balanced, and the user experience is improved; the transportation time and the scenic spot business hours are taken as strict constraints to plan the tourism itinerary, and time conflicts are avoided.
[0109] The multi-destination tourism itinerary planning method of the present application can finely design the travel, accommodation, play time arrangement and route planning scheme of the user's tourism itinerary, fully consider the continuity of multi-day itinerary, effectively balance the scenic spot distance, time window and accommodation change cost, reduce the time cost of the user's tourism, and improve the experience in the tourism itinerary.
[0110] Figure 2 is a schematic diagram of the implementation process of the multi-destination tourism itinerary planning method of the present application. As Figure 2 shown, in order to achieve the above-mentioned purpose, the present application provides a tourism itinerary planning method based on a space-time decision process, which is executed by an intelligent system, comprising:
[0111] (1) receiving and processing user demand.
[0112] (2) obtaining the basic information and space-time information of scenic spots and hotels, and the available transportation information between scenic spots and the transportation information between tourism destination cities from the basic information database established based on the tourism platform.
[0113] (3) calculating the itinerary of multiple tourism destination cities.
[0114] (4) calculating the daily preliminary track.
[0115] (5) calculating the daily accommodation.
[0116] (6) planning the detailed scenic spot itinerary.
[0117] (7) merging the detailed itinerary of multiple tourism destination cities.
[0118] In a preferred embodiment, the construction method of receiving and processing user demand comprises:
[0119] Based on user input, obtain the user's travel destination city, planned travel days, and user preferences.
[0120] In a preferred embodiment, the basic information and spatio-temporal information of the scenic spots and hotels include, but are not limited to, the city to which the scenic spot or hotel belongs, scenic spot rating, scenic spot interest tags, location of scenic spots and hotels, scenic spot operating hours, and best scenic spot play time.
[0121] In a preferred embodiment, the available transportation information between scenic spots includes, but is not limited to, walking, cycling, driving, taking a taxi, train, airplane, and ship, as well as the corresponding distance and time.
[0122] In a preferred embodiment, the available transportation information between cities includes, but is not limited to, walking, cycling, driving, taking a taxi, train, airplane, and ship, as well as the corresponding distance and time.
[0123] In a preferred embodiment, the multiple travel destination city itineraries include travel destination city play time arrangement, travel destination city sequence arrangement, and travel destination city transportation arrangement.
[0124] In a preferred embodiment, the travel destination city play time arrangement includes:
[0125] According to the number of scenic spots in each city, the total scenic spot play time, and the scenic spot popularity, arrange the play time for each travel destination city.
[0126] Distribute the play time for each city according to the user's planned travel days.
[0127] In a preferred embodiment, the travel destination city sequence arrangement includes
[0128] According to the transportation distance and time between destination cities, apply the shortest path algorithm to calculate the optimal sequence between destination cities.
[0129] In a preferred embodiment, the travel destination city transportation arrangement includes:
[0130] According to user preferences, select the preference coefficients for time and price.
[0131] Combine the play time for each travel destination city and the optimal sequence between travel destination cities to obtain the daily travel destination city arrangement.
[0132] Establish an optimization model and select specific transportation between each travel destination city based on the preference coefficients for time and price.
[0133] In a preferred embodiment, the daily preliminary trajectory is calculated, comprising:
[0134] According to the traffic between cities, the trip is divided into a time period of each single city.
[0135] For each tourist destination city, a trip within the time period is generated.
[0136] In a preferred embodiment, for each tourist destination city, a trip within the time period is generated, comprising:
[0137] According to the traffic distance between attractions, a distance matrix is calculated.
[0138] According to the planned trip days n, based on the distance matrix, a multi-round core clustering algorithm is used to cluster the attractions into n clusters.
[0139] For each cluster, the center point of the cluster is calculated.
[0140] According to the center point of the cluster, the traffic distance between the center points is calculated to obtain the center point distance matrix.
[0141] According to the center point distance matrix, the shortest path algorithm is applied to calculate the optimal path of the center point.
[0142] According to the optimal path of the center point, the trip trajectory of each cluster is obtained.
[0143] In a preferred embodiment, the multi-round core clustering algorithm has the following steps:
[0144] Step 1: For p attractions, according to the distance matrix, a clustering algorithm is used to cluster the p attractions into n clusters.
[0145] Step 2: Sort the n clusters in descending order according to the capacity of the clusters.
[0146] Step 3: Establish a new cluster c, and gradually merge the n clusters into c until the number of elements m of the cluster c is greater than max(p*r, n), where r is a value between 0 and 1.
[0147] Step 4: For c, a clustering center algorithm with capacity constraint is used to cluster the m attractions into n clusters.
[0148] Step 5: For the attractions k in the p attractions that are not in c, find the nearest point i in c to determine its belonging cluster ci, and add k to the cluster ci; and update c.
[0149] In a preferred embodiment, the steps of the clustering center algorithm with capacity constraint are as follows:
[0150] Step 1: Calculate the Euclidean distance of each sample point to all cluster centers.
[0151] Step 2: Initial matching by Hungarian algorithm.
[0152] Step 3: Traverse the matching result, check if the current sample number of each cluster is less than max_size, only the allocation that meets the capacity constraint will be retained.
[0153] Step 4: According to the final allocation result, calculate the new center of each cluster.
[0154] In a preferred embodiment, daily accommodation is calculated, including:
[0155] According to the trajectory of the cluster, calculate the center point of the cluster per day.
[0156] Using dynamic programming algorithm, calculate daily accommodation hotel, steps as follows:
[0157] Step 1: Calculate the average distance matrix of each candidate hotel to each daily itinerary POI
[0158] Step 2: Define the state transition equation:
[0159] dp[i][j] = min(dp[i-1][k] + distance_cost + change_penalty), where i represents the day index, j is the hotel index, and k is the hotel index.
[0160] Step 3: Backtracking module, backtracking from the optimal solution to generate (accommodation point, consecutive days) sequence.
[0161] In a preferred embodiment, detailed scenic spot itinerary is planned, steps as follows:
[0162] Step 1: Preliminary solution:
[0163] Start and end point definition: define the start and end point of each daily tour as the hotel.
[0164] Calculate distance matrix: calculate the distance between scenic spots distance_mat, and the distance between each scenic spot and each cluster center point center_mat. Define the distance matrix:
[0165] mat[i][j][d] = distance_mat[i][j] * w1 + center_mat[j][d], where i is the departure point index, j is the arrival point index, and d is the day index.
[0166] Scenic spot allocation: according to the daily plan, define the daily playable scenic spots, and add the scenic spots of adjacent days to the optional set.
[0167] Step 2: Calculate the daily scenic spot play order list by using the travel path planning algorithm.
[0168] Step 3: Secondary solution, mainly solve the details of the order problem:
[0169] Start and end point definition: The start and end point is updated to the weighted midpoint of the daily start point scenic spot and the hotel.
[0170] Calculate the distance matrix: Define the distance matrix: mat[i][j][d] = distance_mat[i][j].
[0171] Scenic spot allocation: According to the results of the preliminary solution, strictly allocate daily scenic spots.
[0172] Step 4: Use the travel path planning algorithm to generate the play order of each daily scenic spot again.
[0173] Step 5: According to the play time of the scenic spot, the specific time of the trip is deduced to obtain the final trip.
[0174] In a preferred embodiment, the travel path planning algorithm has the following steps:
[0175] Step 1: Define the daily start point and end point.
[0176] Step 2: According to the distance matrix, establish the distance matrix callback function.
[0177] Step 3: Establish time window constraints for each scenic spot.
[0178] Step 4: Configure accessible scenic spots for each day.
[0179] Step 5: Solver solution
[0180] The present application solves the multi-city trip first and then subdivides the trip of each tourist destination city, which ensures the realization of multi-city trip optimization and the continuity between user multi-city trips; adopts a dynamic programming algorithm containing hotel change cost, considers the decision-making process of hotel change in the user's travel process, so that the trip result is closer to the user's real needs; adopts a trip planning algorithm containing strict time constraints, which ensures the time rationality of the user's trip and the minimization of transportation cost.
[0181] Figure 3 is a structural schematic diagram of the multi-destination travel trip planning system of the present application. As Figure 3 shown, the embodiment of the present application also provides a multi-destination travel trip planning system for realizing the multi-destination travel trip planning method described above, and the multi-destination travel trip planning system 5 comprises:
[0182] A planning request module 51 receives a user's travel planning request;
[0183] The city matching module 52 matches a plurality of related scenic spots and the tourist destination cities to which the scenic spots belong based on the keywords in the travel planning request.
[0184] The inter-city planning module 53 generates a travel sequence based on the travel destination city play order, inter-city transportation planning between the travel destination cities, and a travel sub-plan for each of the travel destination cities according to at least the transportation information between the travel destination cities.
[0185] The city planning module 54 obtains a daily travel track, a daily accommodation hotel, and a scenic spot itinerary based on the travel sequence, the travel sub-plan, and the intra-city transportation planning between scenic spots in the travel sub-plan.
[0186] The itinerary merging module 55 generates a travel itinerary plan according to the daily travel track, the scenic spot itinerary, the daily accommodation hotel, and the inter-city transportation planning, and feeds back the travel itinerary plan to the user.
[0187] In a preferred embodiment, the planning request module 51 is configured to receive the text content of the user's travel planning request, extract keywords from the text content, and combine the user's historical travel information on the travel platform to obtain the user's travel destination city, scenic spot, planned travel days, and user preferences, but not limited thereto.
[0188] In a preferred embodiment, the city matching module 52 is configured to match a plurality of related scenic spots and the tourist destination cities to which the scenic spots belong based on the keywords in the travel planning request, the keywords including at least one of the city to which the scenic spot and the hotel belong, the scenic spot rating, the scenic spot interest label, the location of the scenic spot and the hotel, the scenic spot business hours, and the best scenic spot play time, and not limited thereto.
[0189] In a preferred embodiment, the inter-city planning module 53 is configured to obtain the optimal order between the destination cities by a shortest path algorithm according to the transportation distance and the transportation time between the destination cities, establish a travel sequence of the travel destination city play order according to the optimal order, generate a corresponding inter-city transportation plan based on the travel sequence and the time and price preference coefficient in the user preferences, obtain a play period in each of the travel destination cities according to the inter-city transportation plan, and select related scenic spots in the travel destination cities during the play period to generate a travel sub-plan, but not limited thereto.
[0190] In a preferred embodiment, the inter-city planning module 53 is further configured to calculate a distance matrix according to the traffic distance between the attractions in each tourist destination city; based on the distance matrix, adopt a multi-round core clustering algorithm to cluster the attractions into n clusters according to the planned travel days n; for each cluster, calculate the center point of the cluster; according to the center point of the cluster, calculate the traffic distance between the center points to obtain a center point distance matrix; according to the center point distance matrix, apply a shortest path algorithm to calculate the optimal path of the center points; and obtain the travel trajectory of each cluster according to the optimal path of the center points, but not limited thereto.
[0191] In a preferred embodiment, the multi-round core clustering algorithm comprises:
[0192] For p attractions, according to the distance matrix, adopt a clustering algorithm to cluster the p attractions into n clusters;
[0193] Sort the n clusters according to the cluster capacity from high to low;
[0194] Establish a new cluster c, and gradually merge the n clusters into c until the number of elements m of the cluster c is greater than max(p*r, n), where r is a value between 0 and 1;
[0195] For c, adopt a clustering center algorithm with capacity constraint to cluster the m attractions into n clusters;
[0196] For a point k in the p attractions that is not in c, find the nearest point i in c to determine its belonging cluster ci, add k to the cluster ci, and update c.
[0197] In a preferred embodiment, the city planning module 54 is configured to select the sum of the average distance matrix of each candidate hotel in the tourist destination city to each attraction in the daily travel as the sum with the smallest sum as the daily accommodation hotel, but not limited thereto.
[0198] The multi-destination travel itinerary planning system of the present application can finely design the travel, accommodation, play time arrangement and route planning scheme of the user's travel itinerary, fully consider the continuity of multi-day travel, effectively balance the attraction distance, time window and accommodation replacement cost, reduce the time cost of the user's travel, and improve the experience in the travel itinerary.
[0199] The embodiment of the present application also provides a multi-destination travel itinerary planning device comprising a processor and a memory having executable instructions of the processor stored therein. The processor is configured to perform the steps of the multi-destination travel itinerary planning method by executing the executable instructions.
[0200] As shown above, the multi-destination travel itinerary planning device of the embodiment of the present application can finely design the travel, accommodation, play time arrangement and route planning scheme in the user's travel itinerary, fully consider the continuity of multi-day itinerary, effectively balance the distance of scenic spots, time window and accommodation replacement cost, reduce the time cost of user travel, and improve the experience in the travel itinerary.
[0201] Those skilled in the art can understand that various aspects of the present application can be implemented as a system, a method or a program product. Therefore, various aspects of the present application can be embodied as a complete hardware embodiment, a complete software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software aspects, which can be collectively referred to as "circuitry", "module" or "platform" here.
[0202] Figure 4 is a structural schematic diagram of the multi-destination travel itinerary planning device of the present application. The electronic device 600 according to this embodiment of the present application will be described below with reference to Figure 4 . Figure 4 The electronic device 600 shown is merely an example and should not impose any limitation on the functions and use range of the embodiments of the present application.
[0203] As shown in Figure 4 , the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 can include, but are not limited to, at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.
[0204] The storage unit stores program code, which can be executed by the processing unit 610, so that the processing unit 610 performs the steps according to various exemplary embodiments of the present application described in the method part of the present specification. For example, the processing unit 610 can perform the steps as shown in Figure 1 .
[0205] The storage unit 620 can include a readable medium in the form of a volatile storage unit, such as a random access memory (RAM) 6201 and / or a cache memory unit 6202, and can further include a read-only memory (ROM) 6203.
[0206] The storage unit 620 can also include a program / utility 6204 having a set of (at least one) program modules 6205, such as an operating system, one or more application programs, other program modules, and program data, each of which or a combination of which can include implementation of a network environment.
[0207] Bus 630 can be one of several types of bus structures including a memory bus or memory controller, a peripheral bus or external bus, a graphics bus, a processor or local bus using any of a variety of bus structures, etc.
[0208] Electronic device 600 can also communicate with one or more external devices 700 such as a keyboard or pointing device, display, etc.; one or more devices that enable a user to interact with electronic device 600; and / or one or more devices (e.g., modems, routers, networks, etc.) that enable electronic device 600 to communicate with one or more other computing devices. Such communication can occur via Input / Output (I / O) interface 650. Still yet, electronic device 600 can communicate with one or more networks, such as a local area network (LAN), a general wide area network (WAN), and / or a public network (e.g., the Internet) via network adapter 660. As depicted, network adapter 660 can communicate with the other components of electronic device 600 via bus 630. It should be appreciated that although not shown, other hardware and / or software components could be used in conjunction with electronic device 600. These include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.
[0209] The embodiment of the present application also provides a computer readable storage medium for storing a program, the steps of the multi-destination travel itinerary planning method implemented when the program is executed. In some possible implementation manners, various aspects of the present application can also be implemented in the form of a program product, which includes program codes for causing a terminal device to execute the steps of the method according to various exemplary embodiments of the present application described in the above method part of the specification when the program product is run on the terminal device.
[0210] As shown above, the multi-destination travel itinerary planning system of the embodiment of the present application can finely design the travel, accommodation, play time arrangement and route planning scheme in the user travel itinerary, fully consider the continuity of multi-day itinerary, effectively balance the distance of scenic spots, time window and accommodation replacement cost, reduce the time cost of user travel, and improve the experience in the travel itinerary.
[0211] Figure 5 is a structural schematic diagram of the computer readable storage medium of the present application. Referring to Figure 5As shown, a program product 800 for implementing the above-described method according to an embodiment of the present application is described, which can take the form of a portable compact disc read-only memory (CD-ROM) and includes a program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present application is not limited thereto, and in the present document, the readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.
[0212] The program product can take any combination of one or more readable media. The readable media can be a readable signal medium or a readable storage medium. The readable storage medium, for example, can be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of the readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0213] The computer readable storage medium can include a data signal transported, propagated or transmitted, in baseband or as part of a carrier wave, in which readable program code is embodied. Such a propagated signal can take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. The readable storage medium can also be any readable medium that is capable of storing, transmitting or transferring a program for use by or in connection with an instruction execution system, apparatus or device. The program code contained on the readable storage medium can be transmitted using any suitable medium, including, but not limited to, wireless, wire line, optical fiber cable, RF, etc., or any suitable combination thereof.
[0214] The program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, etc., or conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider.
[0215] In summary, the purpose of the present application is to provide a multi-destination travel itinerary planning method, system, device and storage medium, which can finely design the travel, accommodation, play time arrangement and route planning scheme in the user's travel itinerary, fully consider the continuity of multi-day itinerary, effectively balance the distance of scenic spots, time window and accommodation replacement cost, reduce the time cost of user travel, and improve the experience in the travel itinerary.
[0216] The above is a further detailed description of the present application in combination with specific preferred embodiments, and the specific implementation of the present application cannot be limited to these descriptions. For ordinary skilled persons in the technical field to which the present application belongs, some simple deductions or replacements can be made without departing from the concept of the present application, and all of them should be regarded as falling within the protection scope of the present application.
Claims
1. A method for planning a multi-destination travel itinerary, characterized in that: The following steps are involved: S110, receiving a user's travel planning request; S120: Matching a number of related scenic spots and the tourist destination cities to which the scenic spots belong based on the keywords in the tourism planning request; S130, generating a tourism sequence based on the order of visiting the tourism destination cities, an intercity transportation plan between the tourism destination cities, and a tourism sub-plan for each of the tourism destination cities based at least on the transportation information between the tourism destination cities; S140, obtaining a daily travel trajectory, daily accommodation hotel, and scenic spot itinerary based on the travel sequence, the travel sub-plan, and the urban transportation plan between the scenic spots in the travel sub-plan; S150: Generate a travel itinerary plan based on the daily travel trajectory, scenic spot itinerary, daily hotel accommodation, and intercity transportation plan, and feed it back to the user.
2. The multi-destination travel itinerary planning method according to claim 1, wherein: The step S110 includes: S111, receiving the text content of the user's travel planning request; S112: extract keywords from the text content and combine them with the user's historical travel information on the travel platform to obtain the user's travel destination city, attractions, planned travel days, and user preferences.
3. The multi-destination travel itinerary planning method according to claim 1, wherein: The step S120 includes: S121. Based on the keywords in the travel planning request, the keywords include at least one of the city to which the attraction and hotel belong, attraction rating, attraction interest tag, location of the attraction and hotel, attraction business hours, and optimal time to visit the attraction; S122: Match a number of related scenic spots and the tourist destination cities to which the scenic spots belong according to the keyword.
4. The multi-destination travel itinerary planning method according to claim 2, wherein: The step S130 includes: S131, obtaining an optimal sequence between the destination cities using a shortest path algorithm based on the travel distances and travel times between the destination cities; S132, establishing a travel sequence of the order of visiting the tourist destination cities according to the optimal order; S133. Generate a corresponding intercity transportation plan based on the travel sequence and the preference coefficients of time and price in the user's preferences; S134. Obtaining a travel time period in each of the tourist destination cities according to the intercity transportation plan; S135: Select relevant scenic spots in the tourist destination city during the travel period to generate a travel sub-plan.
5. The multi-destination travel itinerary planning method according to claim 4, wherein: The step S135 further includes: S1351. Calculate a distance matrix based on the transportation distances between the scenic spots in each tourist destination city; S1352. Based on the planned number of travel days n, the attractions are clustered into n clusters using a multi-round core clustering algorithm based on the distance matrix; S1353. For each cluster, calculate the center point of the cluster; S1354. Calculate the traffic distances between the center points based on the cluster center points to obtain a center point distance matrix. S1355. Apply the shortest path algorithm based on the center point distance matrix to calculate the optimal path to the center point; S1356. Obtain the travel trajectory of each cluster based on the optimal path of the center point.
6. The multi-destination travel itinerary planning method according to claim 5, wherein: The multi-round core clustering algorithm includes: For p scenic spots, according to the distance matrix, a clustering algorithm is used to cluster the p scenic spots into n clusters; Sort n clusters from high to low according to their capacity; Create a new cluster c and gradually merge n clusters into c until the number of elements m in cluster c is greater than max(p*r,n), where r is a value between 0 and 1; For c, the clustering center algorithm with capacity constraint is used to cluster m attractions into n clusters; For the scenic spot k that is not in c among the p scenic spots, find the nearest point i in c, determine the cluster ci to which it belongs, add k to cluster ci, and update c.
7. The multi-destination travel itinerary planning method according to claim 5, wherein: In step S140 , based on the sum of the average distance matrices from each candidate hotel in the tourist destination city to each attraction in the daily itinerary, the hotel with the smallest sum is selected as the daily accommodation hotel.
8. A multi-destination travel itinerary planning system, used to implement the multi-destination travel itinerary planning method according to claim 1, characterized in that: include: Planning request module, receiving users' travel planning requests; A city matching module, which matches a number of related scenic spots and the tourist destination cities to which the scenic spots belong based on the keywords in the travel planning request; An intercity planning module, which generates, based at least on the traffic information between the tourist destination cities, a tourist sequence based on the order of visiting the tourist destination cities, an intercity traffic plan between the tourist destination cities, and a tourist sub-plan for each of the tourist destination cities; An urban planning module, which obtains daily travel trajectories, daily accommodation hotels, and scenic spot itineraries based on the travel sequence, the travel sub-plan, and the urban transportation plan between the scenic spots in the travel sub-plan; The itinerary merging module generates a travel itinerary plan based on the daily travel trajectory, scenic spot itinerary, daily accommodation hotel and intercity transportation plan, and feeds it back to the user.
9. A multi-destination travel itinerary planning device, characterized in that: include: processor; a memory storing executable instructions for the processor; The processor is configured to execute the steps of the multi-destination travel itinerary planning method according to any one of claims 1 to 7 by executing the executable instructions.
10. A computer-readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps of the multi-destination travel itinerary planning method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Route planning method, device and system
CN121436224A