Search

CN-121981410-A - Language-driven travel planning method and device based on neural symbol fusion

CN121981410ACN 121981410 ACN121981410 ACN 121981410ACN-121981410-A

Abstract

The invention belongs to the technical field of intelligent planning, and relates to a language-driven travel planning method and device based on neural symbol fusion, which are used for constructing a travel planning environment database, extracting a semi-structured constraint set from travel demands input by a user by utilizing a large language model, converting the semi-structured constraint set into an executable symbol constraint set by utilizing a mixed translation strategy, searching a candidate traffic set meeting departure city executable symbol constraint, destination city executable symbol constraint, departure time executable symbol constraint and arrival time executable symbol constraint in the travel planning environment database, searching a candidate accommodation set meeting destination city executable symbol constraint, arrival time executable symbol constraint and accommodation executable symbol constraint in the travel planning environment database, and searching a travel plan meeting travel duration executable symbol constraint, total expense executable symbol constraint, scenic spot executable symbol constraint and dining executable symbol constraint in the environment database.

Inventors

  • ZHU SHUWEI
  • GUO ZIHAO
  • YANG BO
  • WEI JIAXIN
  • DING JIANYANG
  • FANG WEI
  • LU HENGYANG

Assignees

  • 江南大学

Dates

Publication Date
20260505
Application Date
20260408

Claims (10)

  1. 1. A method for language-driven travel planning based on neural symbol fusion, comprising: constructing a travel planning environment database containing urban travel resource information, inter-city traffic data, accommodation data, catering data and entity alias mapping data; Extracting the travel requirement input by a user into a semi-structured constraint set comprising a departure city, a destination city, travel time, the number of people traveling and a hard constraint list by using a large language model, and converting the semi-structured constraint set into an executable symbol constraint set by using a mixed translation strategy, wherein the hard constraint list adopts a key value pair form to represent the total cost, scenic spots, lodging and catering constraint in the travel requirement; Searching a travel planning environment database for a candidate traffic set meeting the executable symbol constraint of a departure city, the executable symbol constraint of a destination city, the executable symbol constraint of departure time and the executable symbol constraint of arrival time; Searching a travel planning environment database for a candidate accommodation set meeting the objective city executable symbol constraint, the arrival time executable symbol constraint and the accommodation executable symbol constraint; Searching an environment database for travel plans meeting travel duration executable symbol constraints, total fare executable symbol constraints, scenic spot executable symbol constraints and catering executable symbol constraints based on the candidate traffic set and the candidate accommodation set by using a depth-first search algorithm and a constraint-guided rearrangement mechanism.
  2. 2. The neural symbol fusion based language driven travel planning method of claim 1, wherein constructing a travel planning environment database containing urban travel resource information, inter-urban traffic data, accommodation data, dining data, and entity alias mapping data comprises: constructing an urban tourist resource information set based on tourist attractions of each city, geographic positions of each tourist attraction, business hours, ticket prices and recommended playing time; Constructing an inter-city traffic data set based on a plurality of traffic records including departure cities, destination cities, traffic types, departure times, arrival times, traffic fares and travel time lengths; constructing accommodation data sets based on the names of the hotels, the cities, the geographic positions, house type codes, house type prices and scores; constructing a dining data set based on the names of all restaurants, the cities, the geographic positions, the types of dishes, the consumption of people and business hours; constructing an entity alias data set based on the mapping relation between the names of all tourist attractions and the aliases of all tourist attractions; And obtaining a travel planning environment database based on the urban travel resource information set, the inter-city traffic data set, the accommodation data set, the catering data set and the entity alias data set.
  3. 3. The neural symbol fusion based language driven travel planning method of claim 2, wherein converting the semi-structured constraint set into the executable symbol constraint set using a hybrid translation strategy comprises: defining a constraint template library of related constraints of scenic spots, dining, accommodation, traffic and expense; for each semi-structured constraint in the semi-structured constraint set, matching the constraint template in the constraint template library by adopting a template matching algorithm; If the matching is successful, extracting parameters in the semi-structured constraint and filling the parameters into corresponding constraint templates to generate executable symbol constraint corresponding to the semi-structured constraint; If the matching fails, translating the semi-structured constraint into an executable symbol constraint by using a large language model, and repairing the translated executable symbol constraint by using an automatic repairing device to obtain an executable symbol constraint corresponding to the semi-structured constraint; Performing multistage analysis on tourist attraction names in the executable symbol constraint by using an entity analyzer so as to match the tourist attraction names in the entity alias data set, and replacing the tourist attraction names in the executable symbol constraint with the tourist attraction names obtained by matching in the entity alias data set after the matching is successful; Based on all executable symbol constraints, a set of executable symbol constraints is obtained.
  4. 4. The method for language-driven travel planning based on neurosignal fusion of claim 3, further comprising validating and repairing the executable symbol constraint set after obtaining the executable symbol constraint set, and specifically comprising: Performing abstract syntax tree parsing on each executable symbol constraint in the executable symbol constraint set, and executing in a sandbox environment to verify the operation correctness of each executable symbol constraint; Detecting an executable symbol constraint set based on an implicit rule set and automatically injecting missing implicit constraints; consistency verification is carried out on the semi-structured constraint set and the executable symbol constraint set so as to verify that each semi-structured constraint has corresponding executable symbol constraint; If the executable symbol constraint cannot be operated and/or consistency verification fails, inputting the inoperable executable symbol constraint and/or the corresponding semi-structured constraint of the executable symbol constraint which is missing into a large language model for restoration, generating a new executable symbol constraint, adding the new executable symbol constraint into an executable symbol constraint set, and returning to verify and restore the executable symbol constraint set again; wherein the implicit rule set comprises: When the travel time length is greater than or equal to 2, the accommodation executable symbol constraint set must contain accommodation executable symbol constraint; when there are total cost constraints in the hard constraint list of the semi-structured constraint set, the total cost executable symbol constraints must be contained in the executable symbol constraint set; when the number of the tourist persons is greater than or equal to 1, the executable symbol constraint set must contain the executable symbol constraint of the number of the tourist attractions tickets and the executable symbol constraint of the number of the transportation tickets.
  5. 5. The neural symbol fusion-based language driven travel planning method of claim 2, wherein searching the environmental database for travel plans that satisfy travel duration executable symbol constraints, total fare executable symbol constraints, sight executable symbol constraints, and dining executable symbol constraints based on the candidate traffic set and the candidate accommodation set using a depth-first search algorithm and a constraint-guided reordering mechanism, comprises: selecting optimal traffic candidates from the candidate traffic sets, selecting optimal accommodation candidates from the candidate accommodation sets, and initializing a planning node T=1; Matching the type of the T-th planning node according to the planning time by using a state transition rule, wherein the type of the planning node corresponding to T=1 is breakfast, the type of the planning node corresponding to T=2 is tourist attractions, the type of the planning node corresponding to T=3 is Chinese, the type of the planning node corresponding to T=4 is tourist attractions, and the type of the planning node corresponding to T=5 is dinner; Searching a candidate set meeting the executable symbol constraint of the planning node in an environment database based on the type of the T planning node, and searching a candidate traffic scheme from the position of the planning result of the T-1 planning node to the position of each candidate in the candidate set in the environment database; if the candidate traffic scheme corresponding to the candidate item has the ending time of the planning result of the T-1 planning node with the departure time being more than or equal to the starting time of the corresponding candidate item and the arrival time being less than or equal to the starting time of the corresponding candidate item, the candidate traffic scheme is used as an optimal traffic scheme, and the candidate item is used as a target candidate item; Utilizing a reordering algorithm to arrange all target candidates according to a descending order of the quantization scores, and selecting the first target candidate after the ordering and an optimal traffic scheme of the target candidate as a planning result of a T planning node; and updating the planning nodes T=T+1, returning to the reuse state transition rule, and matching the type of the T-th planning node according to the planning time until T=5, and obtaining the daily travel plan based on the optimal traffic candidate, the optimal accommodation candidate and the planning result of each planning node.
  6. 6. The neural symbol fusion based language driven travel planning method of claim 5, wherein selecting optimal traffic candidates from the candidate traffic sets and selecting optimal accommodation candidates from the candidate accommodation sets comprises: And respectively sequencing the traffic candidates in the candidate traffic set and the accommodation candidates in the candidate accommodation set by using a constraint satisfaction scoring function and a reordering algorithm, and selecting the first traffic candidate and the first accommodation candidate after sequencing to obtain the optimal traffic candidate and the optimal accommodation candidate.
  7. 7. The neural symbol fusion based language driven travel planning method of claim 5, further comprising, after searching the environmental database for candidate sets that satisfy the executable symbol constraints of the planning node: Pruning the candidate set by using a budget lower bound pruning strategy and a time window pruning strategy, and removing candidates of which the sum of planned node cost, candidate cost and minimum cost of the remaining unplanned nodes does not meet the total cost executable symbol constraint and/or the simulation activity time length is greater than or equal to 23 hours after the candidates are executed on the basis of the planned nodes.
  8. 8. The method of claim 5, wherein when the target candidate set is an empty set, updating t=t-1, returning to reuse the state transition rule to match the type of the T-th planning node according to the planning time, and searching again to obtain the target candidate set and the quantization score that each target candidate item satisfies the executable symbol constraint set; And arranging all target candidates according to a quantitative score descending order by using a reordering algorithm, and selecting the ith target candidate after the ordering and an optimal traffic scheme of the target candidate as a planning result of the type of the T planning node, wherein i is more than or equal to 2.
  9. 9. The neural sign fusion based language driven travel planning method of claim 5, further comprising, after deriving the daily travel plan: taking a daily travel plan, an optimal traffic candidate and an optimal accommodation candidate in the travel duration as the travel plan; Constructing a time non-overlapping constraint based on the fact that the time of each two adjacent activity plans is not overlapped, constructing an operation time constraint based on the fact that the time of each activity plan is within the operation time corresponding to the activity, constructing a space connectivity constraint based on the fact that the time difference between each two adjacent activity plans is larger than or equal to traffic time, and constructing an activity integrity constraint based on the fact that each daily travel plan comprises breakfast, lunch, dinner and tourist attractions; judging whether the travel plan meets the time non-overlapping constraint, the business time constraint, the space connectivity constraint and the activity integrity constraint; If the time non-overlapping constraint and/or business time constraint and/or space connectivity constraint and/or activity integrity constraint are not met, searching daily travel plans, optimal traffic candidates and optimal accommodation candidates in the travel duration again; if the time non-overlapping constraint, business time constraint, space connectivity constraint and activity integrity constraint are met, taking the travel plan as input, executing an executable symbol constraint set, and judging whether the travel plan meets all executable symbol constraints; If all executable symbol constraints are not satisfied, re-searching daily travel plans, optimal traffic candidates, and optimal accommodation candidates within the travel duration.
  10. 10. A neuro-symbol fusion based language-driven travel planning apparatus, comprising: The database construction module is used for constructing a travel planning environment database containing urban travel resource information, inter-city traffic data, accommodation data, catering data and entity alias mapping data; The system comprises a natural language translation module, a hard constraint list, a judgment function and a user-input module, wherein the natural language translation module is used for extracting travel demands input by a user into a semi-structured constraint set comprising a departure city, a destination city, travel time, the number of travel people and a hard constraint list, and converting the semi-structured constraint set into an executable symbol constraint set by utilizing a hybrid translation strategy, wherein the hard constraint list adopts a key value pair form to represent total cost, scenic spots, accommodation and catering constraints in the travel demands; The traffic layer searching module is used for searching a candidate traffic set meeting the executable symbol constraint of the departure city, the executable symbol constraint of the destination city, the executable symbol constraint of the departure time and the executable symbol constraint of the arrival time in the travel planning environment database; the accommodation layer searching module is used for searching a candidate accommodation set meeting the objective city executable symbol constraint, the arrival time executable symbol constraint and the accommodation executable symbol constraint in the travel planning environment database; and the travel plan generating module is used for searching the travel plans meeting the travel duration executable symbol constraint, the total expense executable symbol constraint, the scenic spot executable symbol constraint and the catering executable symbol constraint in the environment database based on the candidate traffic set and the candidate accommodation set by utilizing a depth-first searching algorithm and a constraint guiding rearrangement mechanism.

Description

Language-driven travel planning method and device based on neural symbol fusion Technical Field The invention relates to the technical field of intelligent planning, in particular to a language-driven travel planning method and device based on neural symbol fusion. Background Travel planning is one of core application scenes in travel industry and smart city construction, relates to coordinated scheduling of various resources such as traffic, accommodation, catering, scenic spots and the like, and needs to generate personalized travel schemes for users under the condition of meeting multiple constraint conditions such as budget, time, preference and the like. With the vigorous development of the global travel industry and the increasing demands of people for personalized services, the research of an automatic travel planning system is widely focused by academia and industry, and how to provide high-quality and personalized travel planning services for massive users by utilizing an artificial intelligence technology becomes a key technical problem to be solved in the intelligent travel field. From the standpoint of computational complexity, the trip planning problem is essentially a constrained combinatorial optimization problem, given the trip needs of the user (including destination, time, budget, preferences, etc.), the system needs to select the appropriate combination from a large number of alternative transportation, accommodation, dining venue, and tourist attractions, and arrange the order of time reasonably, ultimately generating a complete trip scenario meeting all constraints. The solution space scale of the problem grows exponentially along with the number of selectable resources, belongs to the NP difficult problem category, the traditional operation research method (such as integer linear programming, constraint satisfaction problem solver and the like) can ensure the optimality of the solution, but always faces the dilemma of insufficient calculation efficiency when facing large-scale examples, and the heuristic search algorithm (such as genetic algorithm, simulated annealing and the like) can find an approximate solution within acceptable time, but is difficult to process complex natural language constraint expression, and needs to manually convert user requirements into formalized constraint expression. In recent years, large language model (Large Language Model, LLM) technology has made breakthrough progress, and models represented by GPT, claude, deepSeek and the like exhibit strong natural language understanding and generating capabilities. The models learn rich world knowledge and language reasoning capability by pre-training on massive text data, and provide a new technical path for constructing an intelligent system capable of directly understanding natural language requirements of users. Researchers begin to explore a method for directly generating a travel plan by using a large language model, however, the pure large language model method has significant limitations in travel planning, firstly, an autoregressive generation mechanism of the large language model determines that the optimization target is the consistency and fluency of a language, but not meets constraint conditions corresponding to the requirements of users, secondly, the large language model cannot backtrack like a traditional search algorithm, once wrong selection is made at a certain decision point, the follow-up correction is difficult, and experimental research shows that the constraint satisfaction rate of the pure large language model method on complex travel planning tasks is less than 50%, and the requirements of practical application are difficult to meet. For this reason, a neural symbol fusion technical route is also proposed in the prior art, a neural network is utilized to translate a natural language query of a user into a formalized symbolic representation (such as a logic constraint, a domain specific language and the like), then a symbol reasoning engine or a planner is utilized to search for an optimal solution on the premise of meeting the constraint, but the translation accuracy of the natural language to the symbol language is only about 70%, which directly affects the quality of a finally generated travel plan, and since a search algorithm does not have sequencing and scoring capabilities, each node searching needs to invoke a large model based on the node recommendation candidate points and candidate paths, so that the invoking times of the large model and the number of searched nodes are in a linear growth relationship, and format abnormality or fact errors (route, scenic spot or error information which does not exist in recommendation) can occur each time when the large model is invoked, and the errors are accumulated continuously in the searching process, which finally results in low travel planning efficiency and planning quality. In summary, the existing travel planning method based on the