Personalized trip planning method and system based on large language model and recall strategy
By analyzing user needs using a large language model and combining an interest point database with a greedy search objective function to optimize itinerary planning, this technology addresses the shortcomings of existing personalized travel solutions and achieves automation and diversification of personalized itinerary planning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANKAI UNIV
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-17
AI Technical Summary
Existing travel planning algorithms cannot fully understand the implicit intentions and complex preferences of users in natural language input, resulting in insufficient personalized travel plans and limited diversity generalization ability, failing to generate optimal itineraries that meet users' multifaceted preferences under global constraints.
By using a large language model to analyze user needs, filtering and clustering through an interest point database, and combining a greedy search objective function and a multi-level nested objective function, we can optimize itinerary planning and build a personalized itinerary planning system.
It enables automatic structuring of users' complex intentions and preferences, effectively filters points of interest, reduces backtracking in itinerary planning, and provides comprehensive and usable itinerary recommendations.
Smart Images

Figure CN121413898B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of trip planning technology, and in particular to a personalized trip planning method and system based on a large language model and recall strategy. Background Technology
[0002] With the development of transportation and tourism, people increasingly prefer personalized travel experiences when traveling. While various travel assistant apps offer abundant point-of-interest (POI) data, covering attractions, dining options, and accommodations, which can help users create a more comprehensive travel plan to some extent, this problem has been conceptualized as the travel route design problem. This is a complex problem that has received widespread attention and in-depth research over the past decade. Traditional algorithms for solving the travel route design problem have two limitations. First, regarding personalized needs, existing itinerary planning algorithms mainly rely on recommendation logic based on fixed rules or simple rating and ranking mechanisms, failing to fully understand the implicit intentions and complex preferences of users in natural language input. This results in the inability to create personalized travel plans for users. For example, users often express vague needs in natural language, such as "want to relax," "like natural scenery," or "hope not to rush," making it difficult for existing recommendation and ranking algorithms to extract structured elements suitable for itinerary planning. Secondly, in terms of diversity generalization, existing algorithms typically design and optimize objective functions to meet user or system requirements, and use integer programming or metaheuristic methods to seek local optima. This approach is still rarely used in user-centered intelligent systems, mainly because manually defining a large number of constraints requires a lot of learning and setup time, which brings unnecessary time and cognitive pressure to users. Furthermore, users' personalized needs are diverse and differentiated, and predefined constraint patterns largely limit the generalization ability of the model, making it impossible to generate optimal routes that satisfy users' various preferences under global constraints, thus limiting their practical application. Summary of the Invention
[0003] This invention aims to at least solve one of the technical problems existing in related technologies. To this end, this invention provides a personalized itinerary planning method and system based on a large language model and recall strategy, thereby providing users with highly satisfactory itinerary planning.
[0004] This invention provides a personalized itinerary planning method based on a large language model and a recall strategy, including:
[0005] S1: Obtain user requirements, extract requirement fields from user requirements, parse the requirement fields and refine the requirement information to obtain target requirement fields;
[0006] S2: Construct an interest point database, filter the interest point database according to the target requirement fields and calculate the interest point recall score, and obtain the initial candidate interest points through the interest point recall score;
[0007] S3: Select a trip planning strategy, cluster the initial candidate points of interest to obtain the first cluster including the cluster boundaries, construct virtual points of interest according to the trip planning strategy and the cluster boundaries, obtain virtual points of interest and merge them into the first cluster to obtain the second cluster, calculate the standard score of the points of interest, and select highly recommended points of interest according to the standard score of the points of interest.
[0008] S4: Use highly recommended interest points to obtain interest point clusters, insert the interest point clusters into the second cluster to obtain the third cluster, calculate the cluster density, rearrange the third cluster according to the cluster density to obtain the fourth cluster and calculate the center turning angle, and re-cluster the fourth cluster according to the center turning angle to obtain the target cluster;
[0009] S5: Construct a greedy search objective function, obtain the initial global optimal solution based on the greedy search objective function and objective clustering, construct a multi-level nested objective function, optimize the initial global optimal solution based on the multi-level nested objective function, and complete the route planning.
[0010] According to the personalized itinerary planning method based on a large language model and recall strategy provided by the present invention, in step S1, a large language model is selected, and the user's needs are decomposed and extracted by the large language model to obtain the requirement fields.
[0011] According to the personalized itinerary planning method based on a large language model and recall strategy provided by the present invention, in step S1, the requirement field is parsed to determine the missing planning requirements, and destination refinement, city filling and schedule allocation are performed based on the missing planning requirements to obtain the target requirement field.
[0012] According to the personalized itinerary planning method based on a large language model and recall strategy provided by the present invention, in step S2, the semantic vector of interest points is extracted from the interest point database to obtain the demand semantic vector of the target demand field, and the cosine similarity between the semantic vector of interest points and the demand semantic vector is calculated to obtain the original candidate interest points.
[0013] Calculate the interest point recall score of the original candidate interest points, and select the initial candidate interest points from the original candidate interest points based on the interest point recall score.
[0014] According to the personalized itinerary planning method based on a large language model and recall strategy provided by the present invention, in step S3, the itinerary planning strategy includes single-city travel, multi-city travel, and city stroll.
[0015] A clustering objective function is constructed, and the initial candidate points of interest are clustered according to the clustering objective function to obtain a first cluster including the clustering boundary. The travel planning strategy is used to determine the accommodation and travel needs. If there are accommodation and travel needs, the surrounding coordinate points of the cluster boundary are obtained, and the virtual points of interest are obtained through the surrounding coordinate points.
[0016] According to the personalized itinerary planning method based on a large language model and recall strategy provided by the present invention, in step S3, the itinerary planning strategy includes single-city travel, multi-city travel, and city stroll.
[0017] A clustering objective function is constructed, and the initial candidate points of interest are clustered according to the clustering objective function to obtain a first cluster including the clustering boundary. The travel planning strategy is used to determine the accommodation and travel needs. If there are accommodation and travel needs, the surrounding coordinate points of the cluster boundary are obtained, and the virtual points of interest are obtained through the surrounding coordinate points.
[0018] According to the personalized itinerary planning method based on a large language model and recall strategy provided by the present invention, in step S4, the cluster density of the third cluster is calculated, the cluster center of the third cluster is updated according to the cluster density to obtain the fourth cluster, the center turning angle of the fourth cluster is calculated, the re-clustering condition is determined, and when the center turning angle satisfies the re-clustering condition, the clustering direction is changed and the fourth cluster is re-clustered to obtain the target cluster.
[0019] According to the personalized itinerary planning method based on a large language model and recall strategy provided by the present invention, in step S5, the greedy search objective function is constructed, and the target cluster is subjected to a greedy random adaptive search based on the greedy search objective function and the target demand field to obtain the initial global optimal solution.
[0020] According to the personalized trip planning method based on a large language model and recall strategy provided by the present invention, in step S5, the initial global optimal solution is optimized according to the trip planning strategy and the multi-layer nested objective function to complete the trip planning.
[0021] This invention also provides a personalized itinerary planning system based on a large language model and recall strategy, including:
[0022] Requirement Fields Module: Used to obtain user requirements, extract requirement fields from user requirements, parse the requirement fields and refine the requirement information to obtain the target requirement fields;
[0023] Interest Point Recall Module: Used to build an interest point database, filter the interest point database according to the target requirement fields and calculate the interest point recall score, and obtain the initial candidate interest points through the interest point recall score;
[0024] Interest Point Clustering Module: Used to select a trip planning strategy, cluster initial candidate interest points to obtain a first cluster including the cluster boundaries, construct virtual interest points according to the trip planning strategy and cluster boundaries, obtain virtual interest points and merge them into the first cluster to obtain a second cluster, calculate the standard score of interest points, and select highly recommended interest points according to the standard score of interest points.
[0025] Interest Point Rearrangement Module: This module is used to obtain interest point clusters using highly recommended interest points, insert the interest point clusters into the second cluster to obtain the third cluster, calculate the cluster density, rearrange the third cluster according to the cluster density to obtain the fourth cluster, calculate the center turning angle, and re-cluster the fourth cluster according to the center turning angle to obtain the target cluster.
[0026] Trip planning module: Used to construct a greedy search objective function, obtain an initial global optimal solution based on the greedy search objective function and objective clustering, construct a multi-level nested objective function, optimize the initial global optimal solution based on the multi-level nested objective function, and complete the trip planning.
[0027] The above-described one or more technical solutions in the embodiments of the present invention have at least one of the following technical effects:
[0028] The personalized itinerary planning method and system based on a large language model and recall strategy provided by this invention parses the demand field through a large language model to automatically structure complex intentions and preferences. It can also cluster points of interest according to different itinerary planning strategies, thereby filtering points of interest and helping users to more effectively meet their travel and accommodation needs in their daily itineraries through virtual points of interest. By using a central turnaround angle, it effectively reduces the turnaround phenomenon in itinerary planning, thus providing users with comprehensive and usable itinerary recommendations.
[0029] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0031] Figure 1 This is a flowchart illustrating the personalized itinerary planning method based on a large language model and recall strategy provided by the present invention.
[0032] Figure 2 This is a schematic diagram of the structure of the personalized itinerary planning system based on a large language model and recall strategy provided by the present invention.
[0033] Figure label:
[0034] 100. Requirement Fields Module; 200. Point of Interest Recall Module; 300. Point of Interest Clustering Module; 400. Point of Interest Reordering Module; 500. Itinerary Planning Module. Detailed Implementation
[0035] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention. The following embodiments are used to illustrate this invention but cannot be used to limit the scope of this invention.
[0036] In the description of the embodiments of the present invention, it should be noted that the terms "first", "second" and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0037] In the description of the embodiments of the present invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "connected" and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in the embodiments of the present invention based on the specific circumstances.
[0038] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0039] The following is combined with Figures 1 to 2 Specific embodiments of the present invention are described below. Figure 1A flowchart illustrating a personalized itinerary planning method based on a large language model and recall strategy is provided, including:
[0040] S1: Obtain user requirements, extract requirement fields from user requirements, parse the requirement fields and refine the requirement information to obtain target requirement fields;
[0041] Furthermore, the objective of this stage is to obtain the requirement fields, parse them, and refine the requirement information to obtain the target requirement fields. Specifically, in step S1, a large language model is selected, and the user requirements are decomposed and extracted using the large language model to obtain the requirement fields.
[0042] In step S1, the requirement field is parsed to determine the missing planning requirements. Based on the missing planning requirements, the destination is refined, the city is filled, and the schedule is allocated to obtain the target requirement field.
[0043] The specific implementation method for the above steps in this embodiment is as follows:
[0044] First, user input text is obtained as the user's requirements. A classifier based on a large language model is used to break down and extract the user's requirements, thus outputting structured fields. These structured fields include city, number of days, preferences, budget, travel schedule, and other constraints. To reduce response latency and improve parsing robustness, multiple agents are called concurrently in parallel mode when outputting fields, and the results are merged and validated after all agents return. If any agent returns an invalid format, parsing failure is returned and the error is logged.
[0045] Next, the requirement fields are parsed. User-inputted requirements may lack key information, or some content may be vague or broad. Therefore, parsing and judgment are needed to identify the missing planning requirements. Based on the missing information, destinations are refined, cities are filled in, and schedules are allocated. Specifically, this includes:
[0046] Travel Duration Missing Estimation: When the travel duration is missing in the requirement field, the system decides whether to enable dynamic duration estimation based on a large language model based on the configuration, and predicts the appropriate number of travel days based on the user's needs.
[0047] City refinement for broad destinations: When users provide only a broad destination such as a province / region without specifying a specific city, the system obtains a list of candidate cities through user query and combines map services to match and supplement the candidate cities with specific locations; a truncation strategy is set for the recommendation results of the large language model to match the number of travel days, thereby obtaining a set of destinations that the user can choose and labeling them.
[0048] City Filling Along Self-Driving Route: For long-distance self-driving scenarios, the system obtains the latitude and longitude of the starting point and destination, retrieves the set of cities along the route between the two points, and replaces or supplements the original destination field for subsequent route planning.
[0049] Automatic allocation of days between cities: The system distributes the number of days of stay evenly based on the total number of days and the number of cities, and then allocates the remaining days to the first few cities in sequence.
[0050] S2: Construct an interest point database, filter the interest point database according to the target requirement fields and calculate the interest point recall score, and obtain the initial candidate interest points through the interest point recall score;
[0051] Furthermore, the objective of this stage is to perform screening and calculate the interest point recall score to obtain initial candidate interest points. Specifically, in step S2, interest point semantic vectors are extracted from the interest point database to obtain the demand semantic vector of the target demand field, and the cosine similarity between the interest point semantic vector and the demand semantic vector is calculated to obtain the original candidate interest points;
[0052] Calculate the interest point recall score of the original candidate interest points, and select the initial candidate interest points from the original candidate interest points based on the interest point recall score.
[0053] The specific implementation method for the above steps in this embodiment is as follows:
[0054] First, an interest point database needs to be built, including the unique identification number, name, hashtag, number of comments, overall rating, latitude and longitude information, and city of each interest point. This information is then converted into an interest point semantic vector. Simultaneously, the target demand fields are also converted into semantic vectors, resulting in a demand semantic vector. This allows for the calculation of the semantic vector for the i-th interest point. and demand semantic vector The i-th cosine similarity between :
[0055]
[0056] in, To calculate the magnitude, here we take the magnitude of the semantic vector. We then select several interest points with the highest cosine similarity as initial candidate interest points.
[0057] Next, the interest point recall score of the j-th original candidate interest point is calculated. :
[0058]
[0059] Where α is the first recall hyperparameter, β is the second recall hyperparameter, and γ is the third recall hyperparameter, and the sum of the three is 1. The distance between the j-th original candidate point of interest and the center of the core city specified in the target demand field. Let j be the number of comments in the interest information of the j-th original candidate interest point. This indicates selecting the original candidate interest point with the most comments among all original candidate interest points. The value of is then used to further select several interest points from the original candidate interest points, and the interest points with the highest recall scores are then obtained to obtain the initial candidate interest points.
[0060] S3: Select a trip planning strategy, cluster the initial candidate points of interest to obtain the first cluster including the cluster boundaries, construct virtual points of interest according to the trip planning strategy and the cluster boundaries, merge the virtual points of interest into the first cluster to obtain the second cluster, calculate the standard score of the points of interest, and select the highly recommended points of interest according to the standard score of the points of interest.
[0061] Furthermore, the objective of this stage is to perform clustering and construct virtual points of interest, and calculate the standard scores for these points of interest to obtain highly recommended points of interest. Specifically, in step S3, the itinerary planning strategies include single-city travel, multi-city travel, and city walks;
[0062] A clustering objective function is constructed, and the initial candidate points of interest are clustered according to the clustering objective function to obtain a first cluster including the clustering boundary. The travel planning strategy is used to determine the accommodation and travel needs. If there are accommodation and travel needs, the surrounding coordinate points of the cluster boundary are obtained, and the virtual points of interest are obtained through the surrounding coordinate points.
[0063] The specific implementation method for the above steps in this embodiment is as follows:
[0064] First, a travel planning strategy needs to be selected based on the content of the target requirement field. In this embodiment, the travel planning strategies include single-city travel, multi-city travel, and city walks. Next, the clustering objective function is constructed:
[0065]
[0066] in, This is the semantic vector of the k-th interest point among the initial candidate interest points. For the semantic vector of the interest point at the selected cluster center, The weighting coefficients for the first cluster are... The weighting coefficients for the second clustering are... For the set spatiotemporal constraint distance, The distribution difference is set, and `min` represents taking the minimum value. To minimize the clustering objective function, cluster centers are selected for spatial clustering, resulting in the first cluster. Each first cluster has a cluster boundary. Then, based on the itinerary planning strategy, it is determined whether there is a need for accommodation and transportation. Urban strolls do not require accommodation and transportation, while single-city and multi-city travel require hotel accommodation or travel to other cities, thus creating a need for accommodation and transportation. When accommodation and transportation are needed, the coordinates of the surrounding points around the cluster boundary in the first cluster are obtained, thus generating virtual points of interest. :
[0067]
[0068] in, For the pre-assigned first The weights of the surrounding coordinate points For the first The coordinates of the surrounding points are used to merge the virtual interest points into the first cluster to obtain the second cluster.
[0069] Next, the Z-Score standardization is performed on the interest point recall score of each interest point in the second cluster to obtain the standard score of the interest point. The interest points with the highest standard scores are regarded as high recommendation interest points, and the others are regarded as low recommendation interest points.
[0070] S4: Use highly recommended interest points to obtain interest point clusters, insert the interest point clusters into the second cluster to obtain the third cluster, calculate the cluster density, rearrange the third cluster according to the cluster density to obtain the fourth cluster and calculate the center turning angle, and re-cluster the fourth cluster according to the center turning angle to obtain the target cluster;
[0071] Furthermore, the objective of this stage is to insert points into the second cluster to obtain a third cluster, rearrange the third cluster to obtain a fourth cluster, calculate the center turning angle, and then perform re-clustering to finally obtain the target cluster. Specifically, in step S4, the number of days spent visiting the city is determined, and the highly recommended points of interest are set according to the number of days spent visiting the city to obtain the interest point cluster. Daily clusters are calculated using the interest point clusters, and non-highly recommended points of interest are inserted into the daily clusters to obtain the third cluster.
[0072] In step S4, the cluster density of the third cluster is calculated, the cluster center of the third cluster is updated according to the cluster density to obtain the fourth cluster, the center turning angle of the fourth cluster is calculated, the re-clustering condition is determined, and when the center turning angle meets the re-clustering condition, the clustering direction is changed and the fourth cluster is re-clustered to obtain the target cluster.
[0073] The specific implementation method for the above steps in this embodiment is as follows:
[0074] First, the number of days for visiting each city needs to be determined, which is obtained from the automatic allocation of days between cities in step S1. Then, in the second clustering, based on the number of days visited, the highly recommended points of interest are evenly divided into several clusters of points of interest. This allows us to calculate the cluster centers of the daily clusters on day d. :
[0075]
[0076] in, The number of highly recommended interest point clusters on day d. This refers to the dimension data of the b-th highly recommended point of interest within the cluster of highly recommended points of interest. This represents the longitude data of the b-th highly recommended point of interest within the high-recommendation point of interest cluster. Daily clusters are obtained by clustering using the cluster centers of the daily clusters. Non-highly recommended points of interest near these daily clusters are then inserted into the daily clusters to obtain the third cluster.
[0077] Next, the cluster density of the third cluster is calculated, which is the ratio of the number of points of interest in the third cluster each day to the total number of points of interest in all third clusters. The third cluster with the higher density is prioritized as the initial third cluster for each city's itinerary, encouraging the system to prioritize high-density, high-priority points of interest in user travel planning. If the differences in cluster density between different third clusters are large, it may result in excessively high density in the early stages of the trip and excessively low density in the later stages, thus affecting the travel experience. Therefore, when the differences in cluster density between different third clusters are too large, the densities of the two immediately following third clusters are added and divided by 2 to obtain a new cluster density. The cluster centers are then updated based on this new density to generate the fourth cluster. When there is only one third cluster following a certain third cluster, the average cluster density of that third cluster and the subsequent third clusters is calculated and used as the new cluster density for these two third clusters to obtain the fourth cluster. If the differences in cluster density between different third clusters are small, the third and fourth clusters are the same.
[0078] While density-based rearrangement strategies can significantly improve the overall rationality of the journey, they can lead to spatial backtracking (i.e., unreasonable round trips). To prevent this, it is necessary to calculate the center turn-off angle of the d-th fourth cluster based on the three adjacent fourth clusters. :
[0079]
[0080] in, The coordinates of the (d+1)th fourth cluster center point are given. Let be the coordinates of the d-th fourth cluster center. The coordinates are the coordinates of the cluster center of the (d+2)th fourth cluster. Then, the re-clustering condition is determined. In this embodiment, the re-clustering condition is:
[0081]
[0082] If the re-clustering condition is met, it means that the route has turned back, and the search direction during clustering needs to be changed to cluster again until the re-clustering condition is no longer met. This is how the target cluster is obtained. If the re-clustering condition is no longer met, the target cluster is the same as the fourth cluster.
[0083] S5: Construct a greedy search objective function, obtain the initial global optimal solution based on the greedy search objective function and objective clustering, construct a multi-level nested objective function, optimize the initial global optimal solution based on the multi-level nested objective function, and complete the route planning.
[0084] Furthermore, the objective of this stage is to perform a greedy search to obtain an initial global optimum, and then optimize the initial global optimum to complete the trip planning. Specifically, in step S5, the greedy search objective function is constructed, and a greedy random adaptive search is performed on the target cluster based on the greedy search objective function and the target requirement field to obtain the initial global optimum.
[0085] In step S5, the greedy search objective function is constructed. In step S5, the initial global optimal solution is optimized according to the trip planning strategy and the multi-layer nested objective function to complete the trip planning.
[0086] The specific implementation method for the above steps in this embodiment is as follows:
[0087] First, we need to construct a greedy search objective function. :
[0088]
[0089] in, The total travel time spent during a day's journey. R is the total waiting time spent during a day's trip, and R is the total number of points of interest visited during the day. The overall score for the e-th interest point is determined based on the interest point standard score, user preferences, density constraints, and other factors. The interest point score weight for the e-th interest point. Assuming travel time weighting, Weighted by waiting time The goal is to maximize the value within the parentheses. The weights for point of interest score, travel time, and waiting time can be adjusted based on the trip planning strategy and user needs.
[0090] Waiting time can be obtained from information such as reviews of points of interest (POIs), while travel time can be calculated based on the distance between POIs and the mode of transportation. When there is no clear optimal mode of transportation between POIs, the distance between two POIs can be calculated first using latitude, longitude, and spherical distance formulas, and then the travel time can be calculated by combining this with the city's average traffic speed. The goal is to maximize the greedy search objective function. Based on the greedy search objective function and the target demand field, a greedy random adaptive search is performed to plan the selection of POIs and travel routes and times for individual cities within the target cluster. During this process, POIs such as dining and accommodation within the same city are also planned, thus obtaining an initial global optimal solution. When the itinerary planning strategy is city walking, the initial global optimal solution can be used as the planning result for the itinerary, without considering accommodation and cross-city travel-related POIs. For single-city and multi-city travel, an initial global optimal solution needs to be obtained for each day's target cluster.
[0091] Here, since virtual points of interest were added in step S3, during the greedy search process, these virtual points of interest are set as nodes with low scores but high path smoothing weights. This provides compact guidance for the search and planning process of points of interest, dynamically expanding or shrinking the neighborhood size during the local search phase, thereby improving the diversity, coherence, and convergence of the itinerary planning. Virtual nodes can also be used to quickly find stations and hotels at cluster boundaries during the greedy search process, serving as connections for users to stay or travel to the next city. Since priority-visited points of interest are usually closer to the cluster center, non-priority-visited points of interest located at the cluster boundaries usually become the last points of interest to be visited. When traveling to the next city, stations near the cluster boundaries usually provide a closer connection. Therefore, virtual points of interest can help quickly plan accommodation and travel-related points of interest. When the dispersion of points of interest in the target cluster is large, accommodation points of interest are prioritized to be closer to the first point of interest in the next day's itinerary.
[0092] When the itinerary planning strategy is multi-city travel, itineraries for other cities also need to be planned. For this purpose, a multi-level nested objective function is established:
[0093]
[0094] Where M is the set of all cities. Let z be the greedy search objective function for the z-th city. The total cost of traveling between multiple cities. Let the weights of the objective function be the weights for the z-th city. The cross-city penalty coefficient is used to optimize the initial global optimal solution for each city based on the multi-layered nested objective function, thus completing the trip planning.
[0095] The personalized itinerary planning device based on a large language model and a recall strategy provided by the present invention will be described below. The personalized itinerary planning device based on a large language model and a recall strategy described below can be referred to in correspondence with the personalized itinerary planning method based on a large language model and a recall strategy described above.
[0096] Figure 2 A schematic diagram illustrating the structure of a personalized itinerary planning system based on a large language model and recall strategy is shown below. Figure 2 As shown, the personalized itinerary planning method based on a large language model and recall strategy, as described above, includes:
[0097] Requirement Field Module 100: Used to obtain user requirements, extract requirement fields from user requirements, parse the requirement fields and refine the requirement information to obtain the target requirement fields;
[0098] Interest Point Recall Module 200: Used to build an interest point database, filter the interest point database according to the target requirement field and calculate the interest point recall score, and obtain the initial candidate interest points through the interest point recall score;
[0099] Interest Point Clustering Module 300: Used to select a trip planning strategy, cluster initial candidate interest points to obtain a first cluster including the cluster boundaries, construct virtual interest points according to the trip planning strategy and cluster boundaries, obtain virtual interest points and merge them into the first cluster to obtain a second cluster, calculate the standard score of interest points, and select highly recommended interest points according to the standard score of interest points.
[0100] Interest Point Rearrangement Module 400: This module is used to obtain interest point clusters using highly recommended interest points, insert the interest point clusters into the second cluster to obtain the third cluster, calculate the cluster density, rearrange the third cluster according to the cluster density to obtain the fourth cluster and calculate the center turning angle, and re-cluster the fourth cluster according to the center turning angle to obtain the target cluster.
[0101] Trip planning module 500: It is used to construct a greedy search objective function, obtain an initial global optimal solution based on the greedy search objective function and objective clustering, construct a multi-level nested objective function, optimize the initial global optimal solution based on the multi-level nested objective function, and complete the trip planning.
[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A personalized trip planning method based on a large language model and a recall strategy, characterized in that, include: S1: Obtain user requirements, extract requirement fields from user requirements, parse the requirement fields and refine the requirement information to obtain target requirement fields; S2: Construct an interest point database, filter the interest point database according to the target requirement fields and calculate the interest point recall score, and obtain the initial candidate interest points through the interest point recall score; S3: Select a trip planning strategy, cluster the initial candidate points of interest to obtain the first cluster including the cluster boundaries, construct virtual points of interest according to the trip planning strategy and the cluster boundaries, obtain virtual points of interest and merge them into the first cluster to obtain the second cluster, calculate the standard score of the points of interest, and select highly recommended points of interest according to the standard score of the points of interest. S4: Use highly recommended points of interest to obtain interest point clusters. In the second cluster, divide the highly recommended points of interest into several interest point clusters on an average basis according to the number of visit days. Insert the interest point clusters into the second cluster. Calculate the daily clusters based on the interest point clusters. Insert the non-highly recommended points of interest near the daily clusters into the daily clusters to obtain the third cluster. Calculate the cluster density. Rearrange the third clusters according to the cluster density to obtain the fourth cluster and calculate the center turning angle. Re-cluster the fourth cluster according to the center turning angle to obtain the target cluster. S5: Construct a greedy search objective function, obtain the initial global optimal solution based on the greedy search objective function and objective clustering, construct a multi-level nested objective function, optimize the initial global optimal solution based on the multi-level nested objective function, and complete the route planning.
2. The personalized itinerary planning method based on a large language model and recall strategy according to claim 1, characterized in that, In step S1, a large language model is selected, and the user requirements are decomposed and extracted using the large language model to obtain the requirement fields. 3.The personalized trip planning method based on a large language model and a recall strategy according to claim 1, wherein, In step S1, the requirement field is parsed to determine the missing planning requirements. Based on the missing planning requirements, the destination is refined, the city is filled, and the schedule is allocated to obtain the target requirement field. 4.The personalized trip planning method based on a large language model and a recall strategy according to claim 1, wherein, In step S2, interest point semantic vectors are extracted from the interest point database to obtain the demand semantic vector of the target demand field. The cosine similarity between the interest point semantic vector and the demand semantic vector is calculated to obtain the original candidate interest points. Calculate the interest point recall score of the original candidate interest points, and select the initial candidate interest points from the original candidate interest points based on the interest point recall score. 5.The personalized trip planning method based on large language model and recall strategy according to claim 1, wherein, In step S3, the itinerary planning strategies include single-city travel, multi-city travel, and city walks; A clustering objective function is constructed, and the initial candidate points of interest are clustered according to the clustering objective function to obtain a first cluster including the clustering boundary. The travel planning strategy is used to determine the accommodation and travel needs. If there are accommodation and travel needs, the surrounding coordinate points of the cluster boundary are obtained, and the virtual points of interest are obtained through the surrounding coordinate points. 6.The personalized trip planning method based on a large language model and a recall strategy according to claim 1, wherein, In step S4, the number of days for city visits is determined, and the highly recommended points of interest are set according to the number of days for city visits to obtain the point of interest cluster. The daily cluster is calculated through the point of interest cluster, and the non-highly recommended points of interest are inserted into the daily cluster to obtain the third cluster.
7. The personalized itinerary planning method based on a large language model and recall strategy according to claim 1, characterized in that, In step S4, the cluster density of the third cluster is calculated, the cluster center of the third cluster is updated according to the cluster density to obtain the fourth cluster, the center turning angle of the fourth cluster is calculated, the re-clustering condition is determined, and when the center turning angle meets the re-clustering condition, the clustering direction is changed and the fourth cluster is re-clustered to obtain the target cluster. 8.The personalized trip planning method based on a large language model and a recall strategy according to claim 1, wherein, In step S5, the greedy search objective function is constructed, and a greedy random adaptive search is performed on the target cluster based on the greedy search objective function and the target requirement field to obtain the initial global optimal solution. 9.The personalized trip planning method based on a large language model and a recall strategy according to claim 1, wherein, In step S5, the initial global optimal solution is optimized according to the trip planning strategy and the multi-layer nested objective function to complete the trip planning.
10. A personalized trip planning system based on large language models and recall strategies for performing the personalized trip planning method based on large language models and recall strategies according to any one of claims 1 to 9, characterized in that, include: Requirement Fields Module: Used to obtain user requirements, extract requirement fields from user requirements, parse the requirement fields and refine the requirement information to obtain the target requirement fields; Interest Point Recall Module: Used to build an interest point database, filter the interest point database according to the target requirement fields and calculate the interest point recall score, and obtain the initial candidate interest points through the interest point recall score; Interest Point Clustering Module: Used to select a trip planning strategy, cluster initial candidate interest points to obtain a first cluster including the cluster boundaries, construct virtual interest points according to the trip planning strategy and cluster boundaries, obtain virtual interest points and merge them into the first cluster to obtain a second cluster, calculate the standard score of interest points, and select highly recommended interest points according to the standard score of interest points. The Point of Interest (POI) rearrangement module is used to obtain POI clusters using highly recommended POIs. In the second cluster, the highly recommended POIs are divided into several POI clusters based on the number of visit days. The POI clusters are then used to insert POIs into the second cluster. Daily clusters are calculated using the POI clusters. Non-highly recommended POIs near the daily clusters are inserted into the daily clusters to obtain the third cluster. The cluster density is calculated. The third cluster is rearranged based on the cluster density to obtain the fourth cluster. The center turning angle is calculated. The fourth cluster is then re-clustered based on the center turning angle to obtain the target cluster. Trip planning module: Used to construct a greedy search objective function, obtain an initial global optimal solution based on the greedy search objective function and objective clustering, construct a multi-level nested objective function, optimize the initial global optimal solution based on the multi-level nested objective function, and complete the trip planning.
Citation Information
Patent Citations
Natural language-based itinerary planning method, system, equipment, product and medium
CN119539450A
Artificial intelligence route guide system and method for smart tourism
CN120893644A