Tour route recommendation method, device, equipment, storage medium and program product

CN121412442BActive Publication Date: 2026-10-27CHINA MOBILE INFORMATION TECHNOLOGY CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511485721.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-17
Publication Date
2026-10-27
Estimated Expiration
2045-10-17

Smart Images

  • Figure CN121412442B_ABST
    Figure CN121412442B_ABST
Patent Text Reader

Abstract

The application provides a tourism route recommendation method, device, equipment, storage medium and program product, and relates to the technical field of information recommendation. The method comprises the following steps: generating a candidate tourism route data set and a candidate scenic spot data set according to user tourism demand information, a tourism route database and a scenic spot database; generating preliminary tourism route recommendation information according to the candidate tourism route data set, the candidate scenic spot data set and a large language model; and generating target tourism route recommendation information according to a route verification rule and the preliminary tourism route recommendation information. The route verification rule comprises at least one of a route time consumption verification rule, a route distance verification rule and a popular section verification rule. The scheme of the application can solve the problem of lack of combination diversity of tourism routes based on user tourism demand information, a tourism route database and a scenic spot database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information recommendation technology, specifically to a method, apparatus, equipment, storage medium, and program product for recommending travel routes. Background Technology

[0002] In existing technologies, a tourism route recommendation method based on Large Language Model (LLM) and knowledge graphs constructs a complete city and attraction knowledge graph, with cities and attractions within them interconnected. When recommending tourism routes, it automatically generates routes, recommended visit times for each attraction, and travel times between attractions based on attraction recommendation indices. Tourists can modify their routes and customize them according to their preferences. Finally, the generated routes are optimized for time, the order of attractions is readjusted, and a final tourism route planning map is generated. However, this method, based solely on cities and attractions, severely lacks diverse combinations of recommended tourism routes. Summary of the Invention

[0003] At least one embodiment of the present invention provides a method, apparatus, device, storage medium, and program product for recommending travel routes, which addresses the problem of the lack of combination diversity in travel routes in the prior art.

[0004] To solve the above-mentioned technical problems, the present invention is implemented as follows:

[0005] In a first aspect, embodiments of the present invention provide a method for recommending tourist routes, including:

[0006] Based on user travel demand information, travel route database, and attraction database, generate candidate travel route datasets and candidate attraction datasets;

[0007] Based on the candidate tourist route data set, the candidate attraction data set, and the large language model, preliminary tourist route recommendation information is generated.

[0008] Based on the route verification rules and the preliminary travel route recommendation information, target travel route recommendation information is generated; the route verification rules include at least one of the following: route time verification rules, route distance verification rules, and popular road segment verification rules.

[0009] Optionally, the travel route recommendation method, wherein generating target travel route recommendation information based on route verification rules and the preliminary travel route recommendation information includes:

[0010] In the first iteration, based on user travel demand information, route verification rules, and the preliminary travel route recommendation information, the first travel route recommendation information is obtained.

[0011] In the (k+1)th iteration, the recommended travel route information for the (k+1)th iteration is obtained based on the user's travel demand information, the route verification rules, and the travel route recommendation information obtained in the (k)th iteration; k is an integer greater than or equal to 1.

[0012] If the iteration termination condition is met, generate recommended information for the target tourist route.

[0013] Optionally, the travel route recommendation method further includes:

[0014] Obtain the user's input request for travel route recommendations;

[0015] The travel route recommendation request is parsed using a large language model to obtain the user's travel demand information, which includes at least one of positive travel demand information, negative travel demand information, and interest attraction demand information.

[0016] Optionally, the aforementioned travel route recommendation method, wherein generating a candidate travel route dataset and a candidate attraction dataset based on user travel demand information, a travel route database, and an attraction database includes:

[0017] We obtain user travel demand data based on user travel demand information;

[0018] A candidate travel route data set is generated based on the first similarity between the user's travel demand data and each travel route data in the travel route database, and a candidate attraction data set is generated based on the second similarity between the user's travel demand data and each attraction data in the attraction database.

[0019] Optionally, the travel route recommendation method, wherein generating a candidate travel route data set based on a first similarity between user travel demand data and each travel route data in the travel route database, includes:

[0020] If the user's travel demand information includes interest attraction demand information, then multiple first travel route data that match the interest attraction demand information are obtained from the travel route database, and the multiple first travel route data are sorted from largest to smallest according to the first similarity. Based on the first preset number of multiple first travel route data in the ranking, an initial travel route data set is obtained.

[0021] If the user's travel demand information does not include the interest attraction demand information, then the travel route data in the travel route database are sorted from largest to smallest according to the first similarity, and the initial travel route data set is obtained based on the first preset number of travel route data at the top.

[0022] Clustering is performed on the initial tourist route dataset to generate a candidate tourist route dataset.

[0023] Optionally, in the aforementioned travel route recommendation method, each travel route data in the travel route database includes travel route index data, which is generated based on prompt words; and / or,

[0024] Each attraction in the attraction database includes attraction index data, which is generated based on the prompt word engineering.

[0025] Optionally, the aforementioned travel route recommendation method, wherein generating preliminary travel route recommendation information based on the candidate travel route dataset, the candidate attraction dataset, and the large language model includes:

[0026] Based on the user's travel needs information, the candidate travel route set, the candidate attraction data set, and the large language model, preliminary travel route recommendation information is generated.

[0027] Secondly, embodiments of the present invention also provide a travel route recommendation device, comprising:

[0028] The first generation module is used to generate a set of candidate travel routes and a set of candidate attractions based on user travel demand information, a travel route database, and an attraction database.

[0029] The second generation module is used to generate preliminary travel route recommendation information based on the candidate travel route data set, the candidate attraction data set, and the large language model.

[0030] The third generation module is used to generate target travel route recommendation information based on the route verification rules and the preliminary travel route recommendation information; the route verification rules include at least one of the following: route time verification rules, route distance verification rules, and popular road segment verification rules.

[0031] Thirdly, embodiments of the present invention also provide a travel route recommendation device, comprising: a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the processor executes the program or instructions to implement the travel route recommendation method as described in the first aspect.

[0032] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the travel route recommendation method as described in the first aspect.

[0033] Fifthly, embodiments of the present invention also provide a computer program product, including computer instructions, which, when executed by a processor, implement the travel route recommendation method as described in the first aspect.

[0034] Compared with existing technologies, embodiments of the present invention provide a method, apparatus, device, storage medium, and program product for recommending travel routes. The method includes: generating a candidate travel route dataset and a candidate attraction dataset based on user travel demand information, a travel route database, and an attraction database; generating preliminary travel route recommendation information based on the candidate travel route dataset, the candidate attraction dataset, and a large language model; and generating target travel route recommendation information based on route verification rules and the preliminary travel route recommendation information. The route verification rules include at least one of route time verification rules, route distance verification rules, and popular route segment verification rules. This improves the diversity and accuracy of the target travel route recommendation information, meeting the diverse needs of users. Attached Figure Description

[0035] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0036] Figure 1 This is a flowchart illustrating the travel route recommendation method described in an embodiment of the present invention;

[0037] Figure 2 This is a schematic diagram of the modules of the travel route recommendation device according to an embodiment of the present invention;

[0038] Figure 3 This is a hardware block diagram of the routing recommendation device described in an embodiment of the present invention. Detailed Implementation

[0039] The terms "first," "second," etc., used in this invention are used to distinguish similar objects, not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of the invention can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same class, not limited in number; for example, the first object can be one or more. Furthermore, the "or" in this invention indicates at least one of the connected objects. For example, "A or B" covers three scenarios: Scenario 1: including A but not B; Scenario 2: including B but not A; Scenario 3: including both A and B. The character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0040] Please refer to Figure 1 This invention provides a method for recommending tourist routes, including:

[0041] Step 101: Based on user travel demand information, travel route database, and attraction database, generate a candidate travel route data set and a candidate attraction data set;

[0042] In one embodiment, optionally, before step 101, the method further includes:

[0043] Obtain the user's input request for travel route recommendations;

[0044] The travel route recommendation request is parsed using a large language model to obtain the user's travel demand information, which includes at least one of positive travel demand information, negative travel demand information, and interest attraction demand information.

[0045] The user can input a travel route recommendation request in natural language.

[0046] In this embodiment of the invention, the travel route recommendation request is parsed based on prompt word engineering and a pre-trained large language model to obtain user travel demand information. Specifically, prompt words are used to allow the pre-trained large language model to perform semantic parsing on the travel route recommendation request, extracting at least one of the user's positive travel demand information, negative travel demand information, and interest attraction demand information.

[0047] It should be noted that the positive tourism demand information is used to indicate the activities or attractions that users prefer; the negative tourism demand information is used to indicate the activities or attractions that users avoid; and the interest attraction demand information is the activities or attractions that users want to visit.

[0048] The positive tourism demand information, the negative tourism demand information, and the interest attraction demand information can all be in the form of sets. Therefore, the positive tourism demand information can be a set of positive tourism demands, the negative tourism demand information can be a set of negative tourism demands, and the interest attraction demand information can be a set of interest attraction demands. Here, the following formula (1) is used to represent the mapping process of obtaining the user's tourism demand information:

[0049] (1);

[0050] in, This represents a positive set of tourism demand. This represents a set of negative tourism demand. This represents a collection of requests for attractions of interest. This indicates a user-input request for a travel route recommendation. This indicates that a large language model is used to perform semantic parsing on the user's input request for travel route recommendations.

[0051] In one embodiment, optionally, before step 101, the method further includes:

[0052] The tourism route database is constructed based on the historical tourism route data set. Each tourism route data in the tourism route database includes historical tourism route data and descriptive text corresponding to the historical tourism route data.

[0053] Construct the scenic spot database, wherein each scenic spot data in the scenic spot database includes at least one of the following: scenic spot name, descriptive text corresponding to the scenic spot name, and geographical location corresponding to the scenic spot name.

[0054] It should be noted that, since the tourist route database includes historical tourist route data, it also includes attraction data. However, the number of attraction data in the tourist route database is less than the number of attraction data in the attraction database, which includes all attraction data.

[0055] Optionally, each travel route data in the travel route database includes travel route index data, which is generated based on prompt word engineering; and / or,

[0056] Each attraction in the attraction database includes attraction index data, which is generated based on the prompt word engineering.

[0057] In this embodiment of the invention, for each piece of tourism route data in the tourism route database, firstly, semantic parsing is performed on the historical tourism route data and the corresponding descriptive text in the tourism route data according to the prompt word engineering, to generate tourism route index data corresponding to the historical tourism route data, and then the tourism route index data is added to the tourism route data.

[0058] For each attraction data in the attraction database, firstly, semantic parsing is performed on at least one of the attraction name, the description text corresponding to the attraction name, and the geographical location corresponding to the attraction name in the attraction data according to the prompt word engineering, to generate attraction index data corresponding to the attraction name, and then the attraction index data is added to the attraction data.

[0059] It is understood that the embodiments of the present invention construct a tourist route database and a scenic spot database based on the retrieval enhancement generation method, which can improve the diversity and accuracy of target tourist recommendation information.

[0060] In one implementation method, optionally, a candidate travel route data set and a candidate attraction data set are generated based on user travel demand information, a travel route database, and an attraction database, including:

[0061] Obtain user travel demand data based on user travel demand information;

[0062] A candidate travel route data set is generated based on the first similarity between the user's travel demand data and each travel route data in the travel route database, and a candidate attraction data set is generated based on the second similarity between the user's travel demand data and each attraction data in the attraction database.

[0063] In this embodiment of the invention, user travel demand data can be obtained based on a text embedding model (e.g., BERT) and user travel demand information. The user travel demand data can be a user travel demand vector, including at least one of a positive travel demand vector, a negative travel demand vector, and a demand vector for attractions of interest.

[0064] Furthermore, for each piece of tourism route data in the tourism route database, a tourism route index vector can be obtained based on the text embedding model and the tourism route index data in the tourism route data.

[0065] For each scenic spot data in the scenic spot database, a scenic spot index vector can be obtained based on the text embedding model and the scenic spot index data in the scenic spot data.

[0066] It should be noted that the first similarity between the user's travel demand data and each travel route data in the travel route database is essentially the first similarity between the user's travel demand vector and the travel route index vector of each travel route data in the travel route database.

[0067] The second similarity between the user's travel demand data and each attraction data in the attraction database is essentially the second similarity between the user's travel demand vector and the attraction index vector of each attraction data in the attraction database.

[0068] Therefore, the travel route recommendation method described in this embodiment of the invention enables diversified retrieval based on index enhancement for the travel route database and the attraction database, generating a candidate travel route database and a candidate attraction data set.

[0069] Here, since the user travel demand vector may include at least one of a positive travel demand vector, a negative travel demand vector, and a demand vector for attractions of interest, the first similarity is determined based on at least one of the similarity between the positive travel demand vector and the travel route index vector, the similarity between the negative travel demand vector and the travel route index vector, and the similarity between the demand vector for attractions of interest and the travel route index vector; the second similarity is determined based on at least one of the similarity between the positive travel demand vector and the attraction index vector, the similarity between the negative travel demand vector and the attraction index vector, and the similarity between the demand vector for attractions of interest and the attraction index vector.

[0070] It should also be noted that the first and second similarities mentioned above can be obtained by calculating the cosine similarity, as shown in the following formula (2):

[0071] (2);

[0072] in, Indicates the first The first similarity of each travel route data point, or Indicates the first The second similarity between the data of each attraction; This represents a positive tourism demand vector; This represents a negative tourism demand vector; Indicates the first A tourist route index vector for a tourist route data set, or Indicates the first Each attraction's index vector is a set of attraction data.

[0073] Furthermore, for each travel route data in the travel route database, a travel route data vector can be obtained based on the text embedding model and the travel route data. Similarly, for each attraction data in the attraction database, an attraction data vector is obtained based on the text embedding model and the attraction data. These travel route data vectors and attraction data vectors may be used in the subsequent generation of candidate travel route datasets and candidate attraction datasets, but will not be discussed further here.

[0074] In one implementation, optionally, a candidate travel route data set is generated based on a first similarity between user travel demand data and each travel route data in the travel route database, including:

[0075] If the user's travel demand information includes interest attraction demand information, then multiple first travel route data that match the interest attraction demand information are obtained from the travel route database, and the multiple first travel route data are sorted from largest to smallest according to the first similarity. Based on the first preset number of multiple first travel route data in the ranking, an initial travel route data set is obtained.

[0076] If the user's travel demand information does not include the interest attraction demand information, then the travel route data in the travel route database are sorted from largest to smallest according to the first similarity, and the initial travel route data set is obtained based on the first preset number of travel route data at the top.

[0077] Clustering is performed on the initial tourist route dataset to generate a candidate tourist route dataset.

[0078] It should be noted that, since it has been stated that the interest attraction demand information can be a set of interest attraction demands, the above step of obtaining the initial travel route data set can be replaced by: if the user travel demand information includes a set of interest attraction demands, then obtain multiple first travel route data that match the set of interest attraction demands in the travel route database, and sort the multiple first travel route data in descending order of the first similarity, and obtain the initial travel route data set based on the first preset number of first travel route data in the ranking.

[0079] If the user's travel demand information does not include the set of desired attractions, then the travel route data in the travel route database are sorted from largest to smallest according to the first similarity, and the initial travel route data set is obtained based on the first preset number of travel route data at the top.

[0080] Specifically, the steps for obtaining the initial tourist route data set can be represented by the following formula (3):

[0081] (3);

[0082] in, This represents the initial set of tourist route data; Indicates the first The first similarity of each travel route data; This represents a collection of requests for attractions of interest. Indicates the first Data on individual tourist routes; This represents the total amount of data in the tourism route database; Indicates the first preset quantity; This indicates that multiple first-sounding travel route data are sorted from highest to lowest based on their first similarity score.

[0083] Next, the K-means clustering algorithm can be used to cluster the initial tourist route dataset to generate a candidate tourist route dataset. This will eliminate similar tourist route data and enable diversified retrieval of candidate tourist route data based on clustering algorithms, thus generating a candidate tourist route dataset.

[0084] Specifically, the steps for generating the candidate tourist route dataset can be represented by the following formulas (4) and (5):

[0085] (4);

[0086] (5);

[0087] in, This represents the set of candidate tourist routes. This refers to the K-means clustering algorithm; The number of clusters can be obtained by taking into account the silhouette coefficient, which comprehensively measures the density of a sample within its own cluster and its separation from the nearest cluster. Indicates the first A vector of tourist route data.

[0088] In one implementation, optionally, a candidate attraction data set is generated based on a second similarity between the user's travel demand data and each attraction data in the attraction database, including:

[0089] The scenic spot data in the scenic spot database are sorted from largest to smallest according to the second similarity, and an initial scenic spot data set is obtained based on the top second preset number of scenic spot data.

[0090] Clustering is performed on the initial set of scenic spot data to generate a set of candidate scenic spot data.

[0091] The steps for obtaining the initial set of scenic spot data can be represented by the following formula (6):

[0092] (6);

[0093] in, This represents the initial set of attraction data; Indicates the first The second similarity between the data of each attraction; This represents the total amount of data in the scenic spot database; This indicates the second preset quantity (the second preset quantity can be equal to the first preset quantity mentioned above). This indicates that multiple scenic spot data are sorted from largest to smallest according to the second similarity.

[0094] Specifically, the steps for generating the candidate scenic spot dataset can be represented by the following formulas (7) and (8):

[0095] (7);

[0096] (8);

[0097] in, This represents the set of candidate scenic spots. This refers to the K-means clustering algorithm; The number of clusters can be obtained by taking into account the silhouette coefficient, which comprehensively measures the density of a sample within its own cluster and its separation from the nearest cluster. Indicates the first A vector of attraction data.

[0098] Step 102: Generate preliminary travel route recommendation information based on the candidate travel route data set, the candidate attraction data set, and the large language model;

[0099] In one implementation method, optionally, preliminary travel route recommendation information is generated based on the candidate travel route data set, the candidate attraction data set, and the large language model, including:

[0100] Based on the user's travel needs information, the candidate travel route set, the candidate attraction data set, and the large language model, preliminary travel route recommendation information is generated.

[0101] Here, by inputting the user's travel demand information, the candidate travel route set, and the candidate attraction data set into the large language model, the preliminary travel route recommendation information can be output.

[0102] Specifically, the steps for generating preliminary travel route recommendation information can be represented by the following formula (9):

[0103] (9);

[0104] in, This indicates preliminary travel recommendations; This represents a positive set of tourism demand. This represents a set of negative tourism demand. This represents a collection of requests for attractions of interest. This represents the set of candidate tourist routes and the set of candidate attractions.

[0105] Step 103: Generate target travel route recommendation information based on the route verification rules and the preliminary travel route recommendation information; the route verification rules include at least one of the following: route time verification rules, route distance verification rules, and popular road segment verification rules.

[0106] In this embodiment of the invention, the route verification rule can be understood as a spatiotemporal constraint verification tool used to evaluate the value of a tourist route recommendation information, and can be specifically expressed by the following formula (10):

[0107] (10);

[0108] in, This indicates the value of a travel route recommendation; This indicates the route time, which is the total time taken for the recommended travel route, along with the corresponding route time verification rules. This represents the route distance, specifically the total distance of the recommended travel routes, along with the corresponding route distance verification rules. This represents popular routes, which are consecutive sequences of attractions that are frequently included in the tourist route database, and corresponds to the popular route verification rules.

[0109] The route verification rule, i.e., the spatiotemporal constraint verification tool, is used for multiple iterations until the iteration termination condition is met, at which point the target tourist route recommendation information is generated. The single-round spatiotemporal constraint verification tool can be formally expressed as the following formula (11):

[0110] (11);

[0111] in, This represents the travel route recommendation information output by the large language model; This indicates the value of the travel route recommendation information obtained by validating the travel route recommendation information output by the large language model using route validation rules.

[0112] In one implementation method, optionally, target tourist route recommendation information is generated based on route verification rules and the preliminary tourist route recommendation information, including:

[0113] In the first iteration, based on the user's travel demand information, the route verification rules, and the preliminary travel route recommendation information, the first travel route recommendation information is obtained.

[0114] In the (k+1)th iteration, the recommended travel route information for the (k+1)th iteration is obtained based on the user's travel demand information, the route verification rules, and the travel route recommendation information obtained in the (k)th iteration; k is an integer greater than or equal to 1.

[0115] If the iteration termination condition is met, generate recommended information for the target tourist route.

[0116] In this embodiment of the invention, during the first iteration, the user's travel demand information, preliminary travel recommendation information, and the value of the preliminary travel recommendation information obtained by verifying the preliminary travel recommendation information using route verification rules are input into the large language model to generate the first travel route recommendation information, as shown in the following formula (12):

[0117] (12);

[0118] in, This indicates the recommended first travel route; This indicates preliminary travel recommendations; This indicates the value of the initial travel route recommendation information.

[0119] The first tourist recommendation information is verified according to the route verification rules, as shown in the following formula (13):

[0120] (13);

[0121] in, This represents the value of the travel route recommendation information obtained in the k-th iteration.

[0122] Furthermore, in the (k+1)th iteration, the user's travel demand information, the travel route recommendation information obtained in the (k)th iteration, and the value obtained by verifying the travel route recommendation information obtained in the (k)th iteration using the route verification rule are input into the large language model to generate the travel route recommendation information obtained in the (k+1)th iteration, as shown in the following formula (14):

[0123] (14);

[0124] in, This represents the travel route recommendation information obtained in the (k+1)th round; This represents the recommended travel routes obtained in the k-th round; This represents the value of the travel route recommendation information obtained in the k-th iteration.

[0125] If the iteration termination condition is met, target travel route recommendation information is generated. The iteration termination condition can be preset, such as ending the iteration when the number of iterations reaches a preset number of iterations, or ending the iteration when the confidence level reaches a preset confidence level.

[0126] Here, after constructing the route verification rules, in order to improve the verification efficiency and the accuracy of the target tourism recommendation information, the route verification rules can be trained by reinforcement learning, wherein the reward function is set as shown in the following formula (15):

[0127] (15);

[0128] in, , as well as These are adjustable hyperparameters, which can be obtained through grid search; The value of travel route recommendations is measured by the maximum frequency of popular routes. The time verification score for the recommended travel route information; the distance verification score for the recommended travel route information, are specifically expressed by the following formulas (16) to (18):

[0129] (16);

[0130] (17);

[0131] (18);

[0132] in, Indicates a sub-segment; This represents the route distance required to generate travel route recommendations using a large language model. This represents the shortest path between locations corresponding to travel route recommendations generated by a large language model. This indicates the longest acceptable travel time among the user's travel needs. This represents the time required for the large language model to generate travel route recommendation information.

[0133] In summary, the travel route recommendation method described in this invention is essentially a diversified travel route recommendation method based on retrieval enhancement generation methods and tool learning. First, it obtains a candidate travel route database and a candidate attraction database based on diversified retrieval strategies using clustering algorithms, thereby improving the diversity and scientific rigor of the target travel route recommendation information. Furthermore, it designs a multi-round iteration based on route verification rules to improve the accuracy of the target travel route recommendation information generated by the large language model, thus better meeting the diverse needs of users.

[0134] Please refer to Figure 2 This invention also provides a travel route recommendation device, comprising:

[0135] The first generation module 201 is used to generate a candidate travel route data set and a candidate attraction data set based on user travel demand information, a travel route database, and an attraction database.

[0136] The second generation module 202 is used to generate preliminary travel route recommendation information based on the candidate travel route data set, the candidate attraction data set, and the large language model.

[0137] The third generation module 203 is used to generate target travel route recommendation information based on the route verification rules and the preliminary travel route recommendation information; the route verification rules include at least one of the following: route time verification rules, route distance verification rules, and popular road segment verification rules.

[0138] Optionally, in the aforementioned travel route recommendation device, the third generation module 203 is specifically used for:

[0139] In the first iteration, based on user travel demand information, route verification rules, and the preliminary travel route recommendation information, the first travel route recommendation information is obtained.

[0140] In the (k+1)th iteration, the recommended travel route information for the (k+1)th iteration is obtained based on the user's travel demand information, the route verification rules, and the travel route recommendation information obtained in the (k)th iteration; k is an integer greater than or equal to 1.

[0141] If the iteration termination condition is met, generate recommended information for the target tourist route.

[0142] Optionally, the tourist route recommendation device further includes:

[0143] The acquisition module is used to acquire user-input travel route recommendation requests;

[0144] The acquisition module is used to parse the travel route recommendation request according to the large language model to obtain the user's travel demand information, which includes at least one of positive travel demand information, negative travel demand information, and interest attraction demand information.

[0145] Optionally, in the aforementioned travel route recommendation device, the first generation module 201 includes:

[0146] The "Get" unit is used to obtain user travel demand data based on user travel demand information.

[0147] The generation unit is configured to generate a candidate travel route data set based on a first similarity between the user's travel demand data and each travel route data in the travel route database, and to generate a candidate attraction data set based on a second similarity between the user's travel demand data and each attraction data in the attraction database.

[0148] Optionally, in the aforementioned travel route recommendation device, the generation unit is specifically used for:

[0149] If the user's travel demand information includes interest attraction demand information, then multiple first travel route data that match the interest attraction demand information are obtained from the travel route database, and the multiple first travel route data are sorted from largest to smallest according to the first similarity. Based on the first preset number of multiple first travel route data in the ranking, an initial travel route data set is obtained.

[0150] If the user's travel demand information does not include the interest attraction demand information, then the travel route data in the travel route database are sorted from largest to smallest according to the first similarity, and the initial travel route data set is obtained based on the first preset number of travel route data at the top.

[0151] Clustering is performed on the initial tourist route dataset to generate a candidate tourist route dataset.

[0152] Optionally, in the aforementioned travel route recommendation device, each travel route data in the travel route database includes travel route index data, which is generated based on prompt words; and / or,

[0153] Each attraction in the attraction database includes attraction index data, which is generated based on the prompt word engineering.

[0154] Optionally, in the aforementioned travel route recommendation device, the second generation module 202 is specifically used for:

[0155] Based on the user's travel needs information, the candidate travel route set, the candidate attraction data set, and the large language model, preliminary travel route recommendation information is generated.

[0156] It should be noted that the apparatus provided in the embodiments of the present invention can implement all the method steps implemented in the above-mentioned travel route recommendation method embodiments and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiments and the beneficial effects will not be described in detail.

[0157] This invention also provides a travel route recommendation device, such as... Figure 3 As shown, it includes:

[0158] The processor 301, memory 302, transceiver 303, and programs or instructions stored in the memory 302 and executable on the processor 301; when the processor 301 executes the programs or instructions, it implements the various processes of the above-described travel route recommendation method embodiments and achieves the same technical effect. To avoid repetition, these will not be described again here.

[0159] The transceiver 303 is used to receive and send data under the control of the processor 301.

[0160] Among them, Figure 3 In this context, the bus architecture can include any number of interconnected buses and bridges, specifically connecting various circuits of one or more processors represented by processor 301 and memory represented by memory 302. The bus architecture can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface. Transceiver 303 can be multiple elements, including transmitters and receivers, providing a unit for communicating with various other devices over a transmission medium. For different user equipment, the user interface 304 can also be an interface capable of connecting external or internal devices, including but not limited to keypads, displays, speakers, microphones, joysticks, etc.

[0161] The processor 301 is responsible for managing the bus architecture and general processing, while the memory 302 can store the data used by the processor 301 when performing operations.

[0162] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the above-described travel route recommendation method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0163] This invention also provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, they implement the various processes of the above-described travel route recommendation method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.

[0164] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0165] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0166] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.

Claims

1. A method for recommending tourist routes, characterized in that, include: Based on user travel demand information, travel route database, and attraction database, generate candidate travel route datasets and candidate attraction datasets; Based on the candidate tourist route data set, the candidate attraction data set, and the large language model, preliminary tourist route recommendation information is generated. In the first iteration, the user's travel demand information, the preliminary travel route recommendation information, and the value obtained by verifying the preliminary travel route recommendation information using route verification rules are input into the large language model to obtain the first travel route recommendation information. In the (k+1)th iteration, the user's travel demand information, the travel route recommendation information obtained in the kth iteration, and the value obtained by verifying the travel route recommendation information obtained in the kth iteration using the route verification rules are input into the large language model to obtain the travel route recommendation information obtained in the (k+1)th iteration. If the iteration termination condition is met, the target travel route recommendation information is generated; where k is an integer greater than or equal to 1; the route verification rules include at least one of route time verification rules, route distance verification rules, and popular route segment verification rules.

2. The method according to claim 1, characterized in that, The method further includes: Obtain the user's input request for travel route recommendations; The travel route recommendation request is parsed using a large language model to obtain the user's travel demand information, which includes at least one of positive travel demand information, negative travel demand information, and interest attraction demand information.

3. The method according to claim 1, characterized in that, Based on user travel demand information, travel route databases, and attraction databases, candidate travel route datasets and candidate attraction datasets are generated, including: We obtain user travel demand data based on user travel demand information; A candidate travel route data set is generated based on the first similarity between the user's travel demand data and each travel route data in the travel route database, and a candidate attraction data set is generated based on the second similarity between the user's travel demand data and each attraction data in the attraction database.

4. The method according to claim 3, characterized in that, Based on the first similarity between user travel demand data and each travel route data in the travel route database, a candidate travel route data set is generated, including: If the user's travel demand information includes interest attraction demand information, then multiple first travel route data that match the interest attraction demand information are obtained from the travel route database, and the multiple first travel route data are sorted from largest to smallest according to the first similarity. Based on the first preset number of multiple first travel route data in the ranking, an initial travel route data set is obtained. If the user's travel demand information does not include the interest attraction demand information, then the travel route data in the travel route database are sorted from largest to smallest according to the first similarity, and the initial travel route data set is obtained based on the first preset number of travel route data at the top. Clustering is performed on the initial tourist route dataset to generate a candidate tourist route dataset.

5. The method according to claim 1, characterized in that, Each travel route data in the travel route database includes travel route index data, which is generated based on prompt word engineering; and / or, Each attraction in the attraction database includes attraction index data, which is generated based on the prompt word engineering.

6. The method according to claim 1, characterized in that, Based on the candidate tourist route dataset, the candidate attraction dataset, and the large language model, preliminary tourist route recommendation information is generated, including: Based on the user's travel demand information, the candidate travel route data set, the candidate attraction data set, and the large language model, preliminary travel route recommendation information is generated.

7. A tourist route recommendation device, characterized in that, include: The first generation module is used to generate a set of candidate travel routes and a set of candidate attractions based on user travel demand information, a travel route database, and an attraction database. The second generation module is used to generate preliminary travel route recommendation information based on the candidate travel route data set, the candidate attraction data set, and the large language model. The third generation module is used to input the user's travel demand information, the preliminary travel route recommendation information, and the value obtained by verifying the preliminary travel route recommendation information using route verification rules into the large language model during the first iteration to obtain the first travel route recommendation information. During the (k+1)th iteration, the user's travel demand information, the travel route recommendation information obtained in the kth iteration, and the value obtained by verifying the travel route recommendation information obtained in the kth iteration using the route verification rules are input into the large language model to obtain the travel route recommendation information obtained in the (k+1)th iteration. If the iteration termination condition is met, the target travel route recommendation information is generated. Here, k is an integer greater than or equal to 1. The route verification rules include at least one of route time verification rules, route distance verification rules, and popular route segment verification rules.

8. A tourist route recommendation device, characterized in that, include: A processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the processor, when executing the program or instructions, implements the travel route recommendation method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the travel route recommendation method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the travel route recommendation method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Cloud tourism personalized route recommendation method based on multi-agent collaboration and RAG retrieval

    CN120671938A