Real-time tourism suggestion generation system and method based on large language model and real-time data capture
By combining large language models and real-time data crawling technology, user needs are obtained in real time and customized travel suggestions are generated, which solves the problem of insufficient real-time and practicality of travel suggestions in the existing technology, and realizes the satisfaction of user personalized needs and the real-time generation of travel suggestions.
Patent Information
- Application Number
- CN202411820497.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-04
AI Technical Summary
The existing technology relies on fixed static scenic spot data and knowledge graphs, and cannot make real-time adjustments based on the actual situation of users during the travel process, resulting in insufficient real-time and practicality of tourism suggestions.
By combining large language models and real-time data crawling technology, we can obtain user needs in real time and crawl and retrieve relevant real-time data and static information from external web pages and knowledge bases to filter, organize and generate real-time travel suggestions.
It realizes the generation of customized travel suggestions based on users' personalized needs, improves the real-time and practicality of travel suggestions, and allows users to obtain effective travel plan recommendations anytime, anywhere.
Smart Images

Figure CN119760230A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of information recommendation, and specifically to text generation, large language models, information capture, natural language processing and the like, and in particular to a real-time travel suggestion generation system and method based on a large language model and real-time data capture. Background Art
[0002] Large language models are large-scale neural network models built by using deep learning technology and self-supervised learning of large amounts of unlabeled text data. These models perform well in a variety of natural language processing tasks, including but not limited to text generation, sentiment classification, reading comprehension, and dialogue systems. Representative large language models include OpenAI's ChatGPT and GPT-4, Alibaba's Tongyi Qianwen, Baidu's Wenxin Yiyan, Tsinghua University's ChatGLM, and ByteDance's Doubao.
[0003] Data scraping technology involves the process of extracting data from the output generated by another program by a computer program. In the field of web scraping, this technology extracts valuable information from websites through applications. Common implementation methods include using tools such as crawlers and APIs to obtain data from data sources. Real-time data scraping further requires that the scraped data information is real-time.
[0004] Text generation refers to the process of automatically generating human-understandable text, which usually involves receiving structured data, text or images and generating text associated with input instructions. As a vertical field application of text generation, travel advice generation uses text generation technology to provide travel advice. The knowledge base of the large language model comes from the knowledge learned from the training data and the knowledge obtained from retrieval enhancement. In order to generate travel advice that meets user needs, relevant knowledge data needs to be injected into the large language model, and in order to achieve travel advice available anytime and anywhere, multi-channel real-time data capture is required.
[0005] Existing technologies mostly rely on fixed static scenic spot data and knowledge graphs, and complete the navigation task through large language model training or retrieval enhancement, which limits the real-time nature of the information and is only applicable to pre-trip planning, but cannot be adjusted according to the actual situation during the trip. For example, CN118410987A discloses a smart tourism system based on a large language model, which uses a crawler to crawl scenic spot data, train a large language model, and then combines static data for navigation. CN117407606B discloses a tourist route recommendation method based on a large language model and a knowledge graph, which forms a tourist route by pre-constructing a knowledge graph and then retrieval enhancement with a large language model. CN118069812A discloses a navigation method based on a large language model, which matches questions from a scenic spot FAQ library and uses a large language model to polish and give navigation answers.
[0006] In summary, the existing technologies train or enhance retrieval of large language models based on pre-captured tourism knowledge, but none of them take into account the real-time and practical needs of users when making travel recommendations, and are insufficient to generate travel recommendations that are readily available to users. Summary of the invention
[0007] The purpose of the present invention is to provide a real-time travel suggestion generation system and method based on a large language model and real-time data capture in order to solve the above problems. The present invention generates travel suggestions that meet the needs of users according to their individual needs by combining a large language model and real-time data capture technology. This method can generate travel suggestions conveniently and quickly anytime and anywhere, provide users with real-time travel plan recommendations, overcome the limitations of the existing technology, and improve the real-time and practicality of travel suggestions.
[0008] The present invention achieves the above-mentioned purpose through the following technical solutions:
[0009] A real-time travel suggestion generation system based on large language model and real-time data capture, including:
[0010] User interaction module: used to interact with users, obtain user needs and give responses in real time;
[0011] Demand extraction module: used to extract user needs in the user interaction module and distinguish user needs into subject needs, restriction needs, and real-time needs;
[0012] Data import module: crawl relevant real-time data from external web pages according to user needs, and import relevant static information from external knowledge bases;
[0013] Data processing module: filter and organize the information obtained by importing data into the module according to user needs; including data filter, data organizer and prompt word generator;
[0014] The data filter is used to filter the static information related to the topic and the initial real-time data of the topic according to the restriction requirements of the user;
[0015] The data organizer is used to organize the filtered subject-related static information and the filtered real-time data;
[0016] The prompt word generator: splices the information processed by the data filter and the data organizer into prompt words of the large language model;
[0017] Large language model calling module: used to call the data in the prompt word generator, generate real-time travel suggestions, and input the data into the user interaction module to complete user interaction.
[0018] A further solution is that the user interaction module is used to interact with the user;
[0019] The data import module at least includes:
[0020] Retriever: used to retrieve and return relevant content in external knowledge bases based on subject requirements;
[0021] Real-time data crawler: used to crawl real-time data from external web pages according to subject requirements and real-time requirements.
[0022] Another aspect of the present invention provides a method for generating real-time travel suggestions based on a large language model and real-time data capture, comprising the following steps:
[0023] Step 1: Obtain user needs;
[0024] Step 2: Extract user requirements through the requirement extractor, and distinguish user requirements into subject requirements, restriction requirements, and real-time requirements;
[0025] Step 3: Based on the user's topic needs and real-time needs, relevant real-time data is captured from external web pages through a real-time data crawler to obtain the initial real-time data of the topic;
[0026] Step 4: Based on the user's subject requirements, the retriever retrieves static information related to the subject requirements from the external knowledge base to obtain subject-related static information;
[0027] Step 5: Through the data filter, based on the user's restriction requirements, the topic-related static information and the topic's initial real-time data are filtered to obtain the filtered topic-related static information and the filtered real-time data;
[0028] Step 6: Use a data organizer to organize the filtered topic-related static information and the filtered real-time data to obtain the static information and real-time information necessary for generating suggestions;
[0029] Step 7: Use the prompt word generator to combine the static information and real-time information necessary for generating suggestions into prompt words for the large language model;
[0030] Step 8: Input the prompt words into the large language model to generate real-time travel suggestions and output them to the user in real time.
[0031] A further solution is that in step 1, obtaining user needs at least includes: obtaining user needs through user interviews, questionnaires, user observations, competitive product analysis, data analysis, and social media monitoring.
[0032] A further solution is that in step 2, the subject requirements, restriction requirements, and real-time requirements are distinguished by the requirement extractor, which at least includes:
[0033] The requirement extractor is used to extract subject requirements, restriction requirements and real-time requirements from user requirements;
[0034] The subject demand refers to the subject of travel suggestions in user demand;
[0035] The restriction requirements refer to the restrictions on travel suggestions in the user's requirements, including at least time, budget, travel mode, travel rhythm, etc.;
[0036] The real-time demand refers to the real-time requirement included in the travel suggestions in the user's demand.
[0037] A further solution is that in step 3, the real-time data is captured from external web pages based on the user's subject requirements by a real-time data capturer to obtain the subject initial real-time data, which at least includes:
[0038] Grab real-time data from specific external web pages based on topic requirements and real-time needs;
[0039] According to the topic requirements, crawl the knowledge related to the topic requirements from external web pages.
[0040] A further solution is that in step 4, based on the user's subject requirements, the retriever retrieves static information related to the subject requirements from an external knowledge base to obtain subject-related static information, which at least includes:
[0041] The external knowledge base includes static information on possible travel advice topics;
[0042] If there is external knowledge, the knowledge related to the subject requirements can be retrieved from the external knowledge through a retriever.
[0043] A further solution is that in step 5, the subject-related static information and the subject-related initial real-time data are filtered through a data filter based on the user's restriction requirements to obtain the filtered subject-related static information and the filtered real-time data, which at least include:
[0044] The data filter is used to filter part of the information that does not meet the restriction requirements from the subject-related static information and the subject initial real-time data;
[0045] Based on the restriction requirements of the user, part of the subject-related static information that does not meet the restriction requirements is filtered out to obtain the filtered subject-related static information;
[0046] Based on the restriction requirements of the user, part of the data in the initial real-time data of the subject that does not meet the restriction requirements is filtered out to obtain the filtered real-time data.
[0047] A further solution is that in step 6, the filtered subject-related static information and the filtered real-time data are sorted by a data sorter to obtain static information and real-time information necessary for generating suggestions, which at least include:
[0048] The necessary static information and real-time information are used to store key information;
[0049] The data organizer is used to fill the filtered subject-related static information and the filtered real-time data into the slots and values, and dynamically adjust the number of slots.
[0050] Another aspect of the present invention provides a storage medium having a computer program stored thereon, wherein the computer program is used to implement the above-mentioned method for generating real-time travel suggestions based on a large language model and real-time data capture.
[0051] The beneficial effects of the present invention are:
[0052] The present invention discloses a real-time travel suggestion generation system and method based on a large language model and real-time data capture, which generates customized travel suggestions according to the personalized needs of users by combining the large language model and the real-time data capture technology, thereby realizing the instant generation and convenient recommendation of travel suggestions; it can generate effective travel suggestions in real time, make accurate recommendations using real-time data, and meet the customized needs of users through the large language model, and can automatically capture real-time information and generate corresponding travel suggestions according to the personalized needs of users, such as travel mode, location selection and budget restrictions, so that users can quickly obtain travel suggestions and travel plan recommendations anytime and anywhere. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0054] Figure 1 It is a flow chart of the present invention.
[0055] Figure 2 This is a system structure diagram of the present invention. DETAILED DESCRIPTION
[0056] To make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described in detail below. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other implementation methods obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.
[0057] Embodiment 1
[0058] A real-time travel suggestion generation method based on a large language model and real-time data capture, the specific implementation steps are as follows:
[0059] Step 1) Obtain user needs;
[0060] User needs can be obtained directly from the text dialog box, and user needs can be obtained through voice-to-text conversion;
[0061] Convert user requirements into text for easy subsequent processing;
[0062] Step 2) Using the demand extractor, distinguish between subject demand, restriction demand, and real-time demand;
[0063] The demand extractor is a large language model that introduces topic requirements, restriction requirements, and real-time requirements through prompt words, and allows the large language model to extract topic requirements, restriction requirements, and real-time requirements from user requirements;
[0064] The requirement extractor is a sequence labeling model that distinguishes topic requirements, restriction requirements, and real-time requirements by labeling each word of the user's requirements.
[0065] Thematic demand refers to the theme of travel suggestions in user demand;
[0066] Restriction requirements refer to the restrictions on travel suggestions in user needs, including at least time, budget, travel mode, travel rhythm, etc.;
[0067] Real-time demand refers to the real-time requirements contained in travel suggestions in user needs;
[0068] Step 3) Using a real-time data crawler, based on the user's subject needs and real-time needs, relevant real-time data is crawled from external web pages to obtain the subject's initial real-time data;
[0069] Step 31) crawling real-time data from specific external web pages according to subject requirements and real-time requirements;
[0070] Extract specific fields from websites with accurate information;
[0071] Set up a website library, and pay attention to websites that are allowed to crawl data by laws and regulations, such as 12306 website, Air Travel website, Amap API, and China Tourism Network;
[0072] For example, if the user's subject demand is "Qingdao to Chengdu" and the real-time demand is "today", today's train and flight information will be captured from the 12306 website and the Air Travel website;
[0073] Step 32) According to the subject requirements, crawl the knowledge related to the subject requirements from external web pages;
[0074] Extract specific fields from websites with accurate information;
[0075] Set up a website library, and pay attention to websites that are allowed to crawl data by laws and regulations, such as 12306 website, Air Travel website, Amap API, and China Tourism Network;
[0076] Step 4) Retrieving static information related to the subject requirement from an external knowledge base through a retriever based on the subject requirement of the user, thereby obtaining subject-related static information;
[0077] External knowledge base, including static information on possible travel advice topics, such as cities, scenic spots, attractions, travel time, food, transportation methods, characteristics, etc.;
[0078] The retriever can adopt the M3E model;
[0079] The relevant knowledge can score the retrieval model with a threshold exceeding α;
[0080] The value of α is 0.8;
[0081] Step 5) filtering the subject-related static information and the subject-related initial real-time data through a data filter based on the user's restriction requirements to obtain the filtered subject-related static information and the filtered real-time data;
[0082] A data filter is a set of rules used to filter out partial information that does not meet restriction requirements from topic-related static information and topic initial real-time data;
[0083] Step 51) based on the restriction requirement of the user, filter out part of the subject-related static information that does not meet the restriction requirement, and obtain the filtered subject-related static information;
[0084] Step 52) based on the restriction requirements of the user, filter out the part of the initial real-time data of the subject that does not meet the restriction requirements, and obtain the filtered real-time data;
[0085] For example, if the user's subject demand is "Qingdao to Chengdu", the real-time demand is "today", and the restriction demand is "budget 1000", then the travel modes with a fare of more than 1000 yuan will be filtered out from the real-time data;
[0086] Step 6) Using a data organizer, the filtered subject-related static information and the filtered real-time data are organized to obtain the static information and real-time information necessary for generating suggestions;
[0087] Necessary static information and real-time information can be a slot-value set to store key information;
[0088] For example, the following slots and values
[0089] Slot value Departure Qingdao destination Chengdu time Today (replace with a specific date) Flight 1 xxx Flight 1 Time 14:00-16:20 Flight 1 Price 980 Flight 1 Departure Airport Qingdao Jiaodong International Airport Flight 1 arrives at the airport Chengdu Tianfu International Airport …… ……
[0090] The data collator is used to fill the filtered subject-related static information and filtered real-time data into slots and values, and dynamically adjust the number of slots;
[0091] Step 7) The static information and real-time information necessary for generating suggestions are spliced into prompt words of the large language model through a prompt word generator;
[0092] Stitch the information together.
[0093] For example, the prompt words are: "The following subject information is available: {subject information}, and the following real-time information is available: {real-time information}. Please give real-time suggestions for {user needs} based on the above information";
[0094] Step 8) inputting the prompt words into the large language model calling module, generating real-time travel suggestions, and outputting real-time travel suggestion feedback to the user;
[0095] Embodiment 2
[0096] A real-time travel advice generation system based on large language models and real-time data crawling:
[0097] User interaction module: used to interact with users, divided into two parts: obtaining user needs and giving final responses;
[0098] Demand extraction module: used to distinguish user needs;
[0099] Data import module: used to capture relevant real-time data from external web pages and import relevant static information from external knowledge bases;
[0100] Data processing module: used to filter and organize data;
[0101] Large language model calling module: used to call the data in the prompt word generator, generate real-time travel suggestions, and input the data into the user interaction module to complete user interaction.
[0102] In the user interaction module, interact with the user through various methods or media;
[0103] Can interact with users through mobile APP, WeChat applet and other media;
[0104] Convert information interacting with users into text for processing.
[0105] The demand extraction module at least includes:
[0106] The data import module at least includes:
[0107] External knowledge base: includes external static information related to the topic;
[0108] Retriever: used to retrieve and return relevant content in external knowledge bases based on subject requirements;
[0109] External web pages: including real-time data related to the topic;
[0110] Crawlers: used to crawl real-time data from specific external web pages according to subject requirements and real-time needs;
[0111] The external knowledge base is a knowledge graph constructed from data crawled from China Tourism Network;
[0112] External web pages include 12306 website, Air Travel website, Amap API, China Tourism Network, etc.
[0113] The data processing module at least includes:
[0114] Data filter: used to filter topic-related static information and topic initial real-time data according to user restriction requirements;
[0115] Data organizer: used to organize the filtered subject-related static information and filtered real-time data;
[0116] The prompt word generator splices the information processed by the data filter and the data organizer into prompt words of the large language model.
[0117] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0118] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims. It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present invention will not further explain various possible combinations. In addition, the various different embodiments of the present invention can also be combined arbitrarily, as long as they do not violate the concept of the present invention, they should also be regarded as the contents disclosed by the present invention.
Claims
1. A real-time travel suggestion generation system based on large language model and real-time data capture, characterized in that: include: User interaction module: used to interact with users, obtain user needs and give responses in real time; Demand extraction module: used to extract user needs in the user interaction module and distinguish user needs into subject needs, restriction needs, and real-time needs; Data import module: crawl relevant real-time data from external web pages according to user needs, and import relevant static information from external knowledge bases; Data processing module: filter and organize the information obtained by importing data into the module according to user needs; including data filter, data organizer and prompt word generator; The data filter is used to filter the static information related to the topic and the initial real-time data of the topic according to the restriction requirements of the user; The data organizer is used to organize the filtered subject-related static information and the filtered real-time data; The prompt word generator: splices the information processed by the data filter and the data organizer into prompt words of the large language model; Large language model calling module: used to call the data in the prompt word generator, generate real-time travel suggestions, and input the data into the user interaction module to complete user interaction.
2. A real-time travel suggestion generation system based on a large language model and real-time data capture as claimed in claim 1, characterized in that: The user interaction module is used to interact with users; The data import module at least includes: Retriever: used to retrieve and return relevant content in external knowledge bases based on subject requirements; Real-time data crawler: used to crawl real-time data from external web pages according to subject requirements and real-time requirements.
3. A method for generating real-time travel suggestions based on a large language model and real-time data capture, characterized in that: The following steps are involved: Step 1: Obtain user needs; Step 2: Extract user requirements through the requirement extractor, and distinguish user requirements into subject requirements, restriction requirements, and real-time requirements; Step 3: Based on the user's topic needs and real-time needs, relevant real-time data is captured from external web pages through a real-time data crawler to obtain the initial real-time data of the topic; Step 4: Based on the user's subject requirements, the retriever retrieves static information related to the subject requirements from the external knowledge base to obtain subject-related static information; Step 5: Through the data filter, based on the user's restriction requirements, the topic-related static information and the topic's initial real-time data are filtered to obtain the filtered topic-related static information and the filtered real-time data; Step 6: Use a data organizer to organize the filtered topic-related static information and the filtered real-time data to obtain the static information and real-time information necessary for generating suggestions; Step 7: Use the prompt word generator to combine the static information and real-time information necessary for generating suggestions into prompt words for the large language model; Step 8: Input the prompt words into the large language model to generate real-time travel suggestions and output them to the user in real time.
4. A method for generating real-time travel suggestions based on a large language model and real-time data capture as claimed in claim 3, characterized in that: In the step 1, obtaining user needs at least includes: obtaining user needs through user interviews, questionnaires, user observations, competitive product analysis, data analysis, and social media monitoring.
5. A method for generating real-time travel suggestions based on a large language model and real-time data capture as claimed in claim 3, characterized in that: In step 2, the subject requirements, restriction requirements, and real-time requirements are distinguished by the requirements extractor, which at least includes: The requirement extractor is used to extract subject requirements, restriction requirements and real-time requirements from user requirements; The subject demand refers to the subject of travel suggestions in user demand; The restriction requirements refer to the restrictions on travel suggestions in the user's requirements, including at least time, budget, travel mode, travel rhythm, etc.; The real-time demand refers to the real-time requirement included in the travel suggestions in the user's demand.
6. A method for generating real-time travel suggestions based on a large language model and real-time data capture as claimed in claim 3, characterized in that: In step 3, the real-time data crawler is used to crawl relevant real-time data from external web pages based on the user's theme requirements to obtain the theme initial real-time data, which at least includes: Grab real-time data from specific external web pages based on topic requirements and real-time needs; According to the topic requirements, crawl the knowledge related to the topic requirements from external web pages.
7. A method for generating real-time travel suggestions based on a large language model and real-time data capture as claimed in claim 3, characterized in that: In step 4, the retriever retrieves static information related to the subject requirement from an external knowledge base based on the subject requirement of the user, and obtains the subject-related static information, which at least includes: The external knowledge base includes static information on possible travel advice topics; If there is external knowledge, the knowledge related to the subject requirements can be retrieved from the external knowledge through a retriever.
8. A method for generating real-time travel suggestions based on a large language model and real-time data capture as claimed in claim 3, characterized in that: In step 5, the subject-related static information and the subject-related initial real-time data are filtered through a data filter based on the user's restriction requirements to obtain the filtered subject-related static information and the filtered real-time data, which at least include: The data filter is used to filter part of the information that does not meet the restriction requirements from the subject-related static information and the subject initial real-time data; Based on the restriction requirements of the user, part of the subject-related static information that does not meet the restriction requirements is filtered out to obtain the filtered subject-related static information; Based on the restriction requirements of the user, part of the data in the initial real-time data of the subject that does not meet the restriction requirements is filtered out to obtain the filtered real-time data.
9. A method for generating real-time travel suggestions based on a large language model and real-time data capture as claimed in claim 3, characterized in that: In step 6, the filtered subject-related static information and the filtered real-time data are sorted by a data sorter to obtain static information and real-time information necessary for generating suggestions, which at least include: The necessary static information and real-time information are used to store key information; The data organizer is used to fill the filtered subject-related static information and the filtered real-time data into the slots and values, and dynamically adjust the number of slots.
10. A storage medium having a computer program stored thereon, wherein the computer program is used to implement the method according to any one of claims 4 to 10.
Citation Information
Patent Citations
A tourist route recommendation method based on large language model and knowledge graph
CN117407606B
Guide method based on large model
CN118069812A