File travel data service method and system based on large model RAG architecture
Through the cultural and tourism data service method based on the large-model RAG architecture, the problems of inaccurate passenger flow statistics and incomplete data dimension coverage in the tourism industry are solved, efficient knowledge retrieval services are achieved, and decision-making management quality and customer service capabilities are improved.
Patent Information
- Application Number
- CN202411689022.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-18
AI Technical Summary
The passenger flow statistics of the existing technology in the tourism industry are not accurate enough, the data dimensions are not covered incompletely, and it is difficult to provide efficient knowledge retrieval services to support decision-making management.
The cultural and tourism data service method based on the large-modal RAG architecture is adopted, and through steps such as multi-modal data processing, Q/A data generation, data cleaning, data segmentation, data encoding embedding, index cascade, query conversion, intelligent routing, content retrieval, query sorting, fine-tuning model management, hybrid model access, multi-modal data processing services, model fine-tuning services and search services, we realize the understanding and analysis of user's natural language input, and provide intelligent analysis and knowledge retrieval of structured business data.
It significantly improves the service efficiency of data, provides users with more accurate and efficient knowledge retrieval services, supports decision-making management, and improves customer service capabilities and knowledge sharing efficiency.
Smart Images

Figure CN119646146A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and more specifically, to a cultural and tourism data service method and system based on a large model RAG architecture. Background Art
[0002] The current inaccurate passenger flow statistics in the tourism industry and the incomplete coverage of data dimensions have always been the key and difficult data problems that the cultural and tourism departments have been committed to solving. Combined with the powerful data analysis capabilities of the big model, the integration and cognition of existing business data and spatiotemporal data are completed, providing strong support for the decision-making quality and efficiency of tourism acquisition, scenic spot traffic diversion, and tourism planning. With the development of big model technology, many systems rely on its data capabilities to carry out relevant data analysis.
[0003] For example, the Chinese patent application "Method, system, device and medium for real-time analysis of traffic data based on large models" with publication number CN 117951348 A improves traffic operation efficiency through a system that collects multimodal large model traffic data and generates traffic reports. The Chinese patent application "An intelligent catering data analysis system and method based on AI large model" with publication number CN 118428599A analyzes user demand information and locates the user's calorie intake; constructs a user nutrition demand model based on the user's calorie intake location, and recommends user catering based on the user's nutrition demand model.
[0004] However, people in this field still urgently need to solve the following technical problems: how to further improve the service efficiency of data and provide users with more accurate and efficient knowledge retrieval services to support decision-making management. Summary of the invention
[0005] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a cultural and tourism data service method and system based on the large model RAG architecture, which improves the service efficiency of the data and can provide users with more accurate and efficient knowledge retrieval services.
[0006] The object of the present invention is achieved through the following solutions:
[0007] A cultural and tourism data service method based on a large model RAG architecture includes the following steps:
[0008] Cultural and tourism data analysis is implemented based on the large-scale RAG architecture orchestration. According to user questions, user intentions are understood, complex tasks are decomposed into multiple subtasks, and query and analyze data through query analysis tools combined with knowledge, and the results are returned to users.
[0009] Furthermore, the large-model RAG architecture-based orchestration realizes cultural and tourism data analysis, understands user intentions according to user questions, decomposes complex tasks into multiple subtasks, uses query analysis tools combined with knowledge to query and analyze data, and returns results to users, specifically including the following sub-steps:
[0010] S1, data preparation: construct a knowledge base based on the access structured data through the multimodal data processing module, and support manual editing of knowledge;
[0011] S2, Q / A data generation: When processing documents in the single-document dialogue phase, by retrieving documents, Q / A data is used to generate question-and-answer patterns or summarize documents in a Q / A manner to directly find answers to user questions. In the process of building the Q / A query paradigm, Q / A data is used in advance to generate questions corresponding to the documents for relevance matching of subsequent questions.
[0012] S3, data cleaning: use data cleaning tools or rules to perform preliminary screening and noise removal before data is stored in the database; remove redundant data content during the data splitting stage; eliminate ambiguity, correct data and annotations during the data annotation stage;
[0013] S4, data segmentation service: set data segmentation strategy, segment text data by paragraph, core content, word count, and segmentation, use video recognition corresponding models to split video data according to the set method, and use audio and natural language processing related models to split audio data;
[0014] S5, data encoding and embedding: use the large model to extract vector representations of the data to be input into the knowledge base or the user's query questions, and use the pre-trained model to convert sparse knowledge into dense knowledge through similarity retrieval, relevance sorting or matrix operations;
[0015] S6, index cascade: data and information needs are divided into categories and organized at different levels. First, the text summary and core content are extracted through the reading comprehension ability of the large language model to build the first-level vector index; then the core content is split into text blocks or multi-level knowledge is created again according to different data themes, scenarios, and businesses; finally, the multi-level index is organized into a retrieval process according to rules;
[0016] S7, query transformation: Using the contextual search enhancement method in the RAG model, the large language model is used to understand the questions input by the user, grasp the intent and focus of the question; then the initial question is split according to the intent and focus, so as to add more relevant questions; finally, more search knowledge is extended through one question;
[0017] S8, intelligent routing: using the understanding ability of rules or large language models at the task processing front end to route according to rules based on different tasks;
[0018] S9, content retrieval; content retrieval is done by inputting the questions or key topics to be retrieved and searching for knowledge from the knowledge base through algorithms;
[0019] S10, query ranking: using the similarity measurement algorithm of the cross-coding model to calculate the relevance of all results and inputs;
[0020] S11, fine-tuning model management: Fine-tuning model management is used to provide add, delete, query and modify functions for fine-tuning models, data and parameters, and also performs version mapping;
[0021] S12, hybrid model access: accessing the hybrid model when processing input data, to enable data recognition to be completed with the assistance of an external model;
[0022] S13, multi-mode data processing service: including text processing service and image processing service. The text processing service content completes the text-related processing mechanism of the upper-layer business, supports file styles in multiple formats, and sets corresponding processing methods for text styles; the image processing service is used to process images as retrieval content in the RAG scenario, and at the same time align the image information with the input of the large language model for encoding;
[0023] S14, model fine-tuning service: using encoding model fine-tuning, it supports supervised training fine-tuning of text encoding models for electronic text data, and provides corresponding functional support for fine-tuning;
[0024] S15, retrieval service: The retrieval service includes service functions for single document retrieval, massive document retrieval, user manual retrieval, and customized retrieval arrangement application scenarios.
[0025] Furthermore, in step S1, the multimodal data processing module includes text processing services and image processing services, which support Word documents, TXT files, CSV data tables, Excel tables, PDF files, and image file styles in various formats, and extract relevant data from them to build a knowledge base.
[0026] Furthermore, in step S5, the data encoding includes text data encoding, video data encoding, audio data encoding and image data encoding.
[0027] Furthermore, in step S9, the algorithm includes high-dimensional space proximity, graph calculation, and semantic similarity retrieval algorithms, and the content retrieval includes a single retrieval or a combination of multiple retrieval methods.
[0028] Furthermore, in step S10, while calculating the correlation between all results and inputs, it also includes the step of fine-tuning the model in terms of domain knowledge.
[0029] Furthermore, in step S11, after fine-tuning the model management, it can be quickly applied to the RAG process as a specification parameter of the service.
[0030] Further, in step S14, the coding model includes M3E, BGE, and BCE coding models.
[0031] Furthermore, in step S15, single document retrieval is used to provide users with the ability to ask questions about electronic documents in a specific format, where the document format includes but is not limited to PDF / WORD / TXT / HTML; it also includes document summary extraction, document structure and document core content extraction functions;
[0032] Massive document retrieval uses the RAG model to retrieve large quantities of document content, including text, video, image and audio document styles. First, data preprocessing is done using big data related methods and means, and documents of various styles are split, organized and cognitively aligned.
[0033] The content of user manual content retrieval is centered around entities, concepts, or events, and the RAG model is used to process such documents;
[0034] In the document retrieval scenario, we first use question-answer pairs to solve legacy problems, and then use the text knowledge base and large language model question-answering capabilities to form a cascade model to answer deeper questions.
[0035] Customized search arrangement is based on the customer's application scenario and needs, using the system's existing tool set.
[0036] A cultural tourism data service system based on a large model RAG architecture, including:
[0037] The data preparation module is used to build a knowledge base based on the access structured data through the multimodal data processing module, and supports manual editing of knowledge;
[0038] The Q / A data generation module is used to generate a question-and-answer model using Q / A data or summarize the document in a Q / A way when processing documents in a single-document dialogue session, so as to directly find answers to user questions. In the process of building the Q / A query paradigm, the Q / A data is used in advance to generate questions corresponding to the document for relevance matching of subsequent questions.
[0039] The data cleaning module is used to perform preliminary screening and noise elimination of data through data cleaning tools or rules before data is stored in the database; remove redundant data content during the data splitting stage; eliminate ambiguity, correct data and annotations during the data annotation stage;
[0040] The data segmentation service module is used to set data segmentation strategies, segment text data by paragraph, core content, word count, and segmentation, split video data by using the corresponding video recognition model according to the set method, and split audio data by using audio and natural language processing related models;
[0041] The data encoding and embedding module is used to use the large model to extract vector representations of the data to be input into the knowledge base or the questions queried by the user, and to convert sparse knowledge into dense knowledge through similarity retrieval, relevance sorting or matrix operations using the pre-trained model;
[0042] The index cascade module is used to classify data and information needs and organize them at different levels. First, the text summary and core content are extracted through the reading comprehension ability of the large language model to build the first-level vector index; then the core content is split into text blocks or multi-level knowledge is created again according to different data themes, scenarios, and businesses; finally, the multi-level index is organized into a retrieval process according to rules;
[0043] The query conversion module is used to use the contextual search enhancement method in the RAG model to use the understanding ability of the large language model to grasp the intention and focus of the question input by the user; then split the initial question according to the intention and focus, so as to add more related questions; finally, more search knowledge is extended through one question;
[0044] Intelligent routing module, which is used to use the understanding ability of rules or large language models in the task processing front end to route according to different tasks;
[0045] Content retrieval module, which is used for content retrieval. By inputting the questions or key topics to be retrieved, the algorithm is used to search for knowledge from the knowledge base;
[0046] The query ranking module is used to calculate the relevance of all results and inputs using a similarity measurement algorithm based on a cross-coding model;
[0047] The fine-tuning model management module is used to manage the fine-tuning model, data and parameters, provide the functions of adding, deleting, checking and modifying, and also do version mapping;
[0048] A hybrid model access module is used to access the hybrid model when processing input data, so as to be able to complete data recognition with the assistance of an external model;
[0049] The multi-mode data processing service module is used to include text processing services and image processing services. The text processing service content completes the text-related processing mechanism of the upper-level business, supports file styles in multiple formats, and sets corresponding processing methods for text styles. The image processing service is used to process images as retrieval content in the RAG scenario, and at the same time, encode and align the image information with the input of the large language model.
[0050] Model fine-tuning service module, which is used to fine-tune the encoding model, supports supervised training fine-tuning of text encoding models for electronic text data, and provides corresponding functional support for fine-tuning;
[0051] The retrieval service module is used for retrieval services including service functions for single document retrieval, massive document retrieval, user manual retrieval, and customized retrieval arrangement application scenarios.
[0052] The beneficial effects of the present invention include:
[0053] The present invention implements a cultural and tourism data analysis method and system based on the RAG architecture of a large model. It can perform intelligent analysis of structured business data according to the user's natural language input (synchronously supporting uploads of multiple document formats, such as Word, Excel, PDF, etc.), provide unified management of business data sources, data tables, dictionaries and domain knowledge, and significantly improve knowledge sharing and data utilization efficiency. The integration and cognition of existing business data and spatiotemporal data form key capabilities such as real-time data statistics, reasoning analysis, ranking analysis, and association analysis, and combine large models and front-end visualization capabilities to achieve visual display of analysis results. Through the intelligent classification, labeling, search and recommendation of knowledge and the formation of a standardized knowledge base, the knowledge sharing and utilization efficiency within the enterprise is improved, and customer service capabilities are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, 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 labor.
[0055] Figure 1 This is a flow chart of an intelligent data analysis scenario according to an embodiment of the present invention. DETAILED DESCRIPTION
[0056] All features disclosed in all embodiments in this specification, or steps in all methods or processes implicitly disclosed, except for mutually exclusive features and / or steps, can be combined and / or expanded or replaced in any manner.
[0057] The specific implementation process of the present invention is as follows:
[0058] In order to solve the deficiencies of the prior art, the embodiments of the present application provide a cultural and tourism data service method and system based on the large model RAG (Retrieval-Augmented Generation) architecture. In the preferred implementation, the present application solves the technical problems of continuous updating of real-time data and continuous iteration of model training data content, constructs visualization and analysis of multiple data types, proposes new solutions, greatly improves the service efficiency of data, and provides users with more accurate and efficient knowledge retrieval services to support decision management.
[0059] Specifically, in a preferred embodiment, a cultural and tourism data service method based on a large model RAG architecture is provided, which draws on the RAG architecture to realize the understanding and analysis of user data, complete the integration and cognition of existing business data and spatiotemporal data, and form key capabilities such as real-time data statistics, reasoning analysis, ranking analysis, and correlation analysis to enhance customer service capabilities, and provide basic support for the decision-making quality and efficiency of tourism acquisition, scenic spot traffic diversion, and tourism planning.
[0060] The present invention proposes a cultural tourism data service method based on a large model RAG architecture, which is aimed at the problems of inaccurate passenger flow statistics and incomplete data dimension coverage in the current tourism industry. The large model technology is used to integrate and recognize existing business data and spatiotemporal data, forming key capabilities of real-time data statistics, reasoning analysis, ranking analysis, and association analysis, improving customer service capabilities, and providing basic support for the decision-making quality and efficiency of tourism acquisition, scenic spot traffic diversion, and tourism planning. The specific steps of this method are as follows:
[0061] Step 1: Data preparation stage, the system of the present invention automatically builds a knowledge base based on access structured data (business data or analysis data) through a multimodal data processing module, and supports manual editing of knowledge. The multimodal data processing module includes text processing services and image processing services, which support Word documents, TXT files, CSV data tables, Excel tables, PDF files, and image file styles in various formats to extract relevant data and build a knowledge base.
[0062] Step 2: Q / A data generation. There are many scenarios in which Q / A data is used in actual application scenarios. In the conception of the present invention, when processing documents in a single-document dialogue session, the answers to user questions can be directly found by retrieving documents and using Q / A data to generate some commonly used question-and-answer patterns or summarizing the document in a Q / A manner. In the process of constructing the Q / A question-and-answer query paradigm, Q / A data can be used in advance to generate questions corresponding to the document to facilitate the relevance matching of subsequent questions. Q / A data generation can also be applied to the pre-task of model fine-tuning to generate fine-tuning data.
[0063] Step 3: Data cleaning. RAG-based data cleaning is an indispensable and important function. Only by ensuring the accuracy of the data entering the knowledge base can the accuracy of query and generation be guaranteed. In the conception of the present invention, data cleaning can also be processed in several stages. Before the data is entered into the database, data cleaning tools or rules can be used to perform preliminary screening of the data and perform initial data noise removal; in the data splitting stage, redundant data content can be further removed; and finally, the data labeling stage requires ambiguity elimination, data correction, and data labeling.
[0064] Step 4: Data segmentation service. In order to improve the accuracy of data query, in the present invention, the system supports various data segmentation strategies. Text data can be segmented by paragraph, core content, word count, intelligent segmentation, etc.; video data requires a corresponding video recognition model to automatically split in a certain way; audio data requires audio and natural language processing related models to split. The advantages of block cutting are: first, it can improve the efficiency of model processing, and smaller text paragraphs are easier to embed and retrieve; second, the segmented text can more accurately match user queries and provide more relevant search results, which is particularly important for high-precision information retrieval and content generation applications.
[0065] Step 5: Data encoding and embedding. Data encoding and embedding refers to the use of intelligent large models to extract vector representations of data to be input into the knowledge base or user query questions. In the present invention, a pre-trained model is used to convert sparse knowledge into dense knowledge through similarity retrieval, relevance sorting or matrix operations to facilitate the execution of downstream tasks. The data encoding and embedding here not only refers to the common text data encoding, but also refers to the encoding of video, audio, image and other style data.
[0066] Step six: index cascade. The core idea of index cascade technology is to classify huge data and information needs and organize them at different levels to achieve more effective management and retrieval. It is mainly used in massive knowledge base retrieval and precise knowledge retrieval scenarios. In the conception of the present invention, the implementation process is: the first step is to extract the text summary and core content through the reading comprehension ability of the large language model to build the first-level vector index; then the core content is split into text blocks according to a reasonable structure; in the process, multi-level knowledge can be created again according to different data themes, scenarios, and businesses; finally, the multi-level index is arranged in a rule-based retrieval process to achieve the precise retrieval needs of massive data.
[0067] Step 7: Query conversion. In common knowledge retrieval scenarios, questions input by users often contain only a small amount of initial information. In the present invention, the commonly used contextual search enhancement method in RAG is used. Therefore, the understanding ability of the large language model can be used to grasp the intention and focus of the questions input by users. Then the initial questions are split according to the intention and focus, and more related questions are added. Finally, more search knowledge is extended through a question, the richness of search knowledge is improved, and the context of the question is enhanced.
[0068] Step 8: Intelligent routing. Intelligent routing is used in the system to divert and schedule tasks. It can use rules or the understanding ability of large language models at the front end of task processing to route tasks according to rules, which plays an important role in proxy calls.
[0069] Step 9: Content retrieval. Content retrieval is the process of searching for knowledge from the knowledge base under specific conditions by inputting the questions or key topics to be retrieved through some algorithms. In the conception of the present invention, high-dimensional space proximity, graph calculation, and semantic similarity retrieval algorithms are usually used. The retrieval here does not only refer to a single retrieval, but may also be the use of multiple retrieval methods together.
[0070] Step 10: Query sorting. Retrieval methods are often arranged in a variety of ways to increase the richness of search results, but a problem also arises: experiments show that when searching a large amount of knowledge at a time, the first few top-k items may be more relevant, but the latter may not be very relevant. When multiple search results are combined, it is not known which search algorithm is more effective. Therefore, in the present invention, an input relevance sorting algorithm is used to calculate the relevance ranking in the results. Common result sorting generally uses a similarity measurement algorithm of a cross-coding model to calculate the relevance of all results and inputs. At the same time, in order to make the model more accurate, the model can also be fine-tuned in terms of domain knowledge.
[0071] Step 11: Fine-tune model management. Fine-tune model management mainly provides the functions of adding, deleting, checking and modifying the fine-tuned model, data and parameters, and also requires version mapping. The model can be quickly applied to the RAG process as a specification parameter of the service.
[0072] Step 12: Hybrid model access. Hybrid model access refers to the ability to use external models to assist in data recognition when processing input data. For example, in image input, the image recognition algorithm can be used to add image metadata, the video intelligent cutting algorithm can be used to assist in video intelligent segmentation and summary extraction, and the audio algorithm can convert complex speech and text.
[0073] Step 13: Multi-mode data processing services. As application support services, multi-mode data processing services include text processing services and image processing services. The content of text processing services is to complete the text-related processing mechanism of the upper-level business. First of all, it supports file styles in multiple formats, and can also have corresponding processing methods for text styles, such as multiple text segmentation methods, flexible text encoding technology, rich index compilation, query result evaluation, etc. At the same time, corresponding means are provided for model fine-tuning in text processing services, such as the generation, combing, screening and evaluation of training data. Image processing service refers to the scenario that can process images as retrieval content in RAG scenarios, including grouping, labeling, annotation, recognition, etc. of images. At the same time, the image information needs to be encoded and aligned with the input of the large language model.
[0074] Step 14: Model fine-tuning service. Coding model fine-tuning is the main function of the model fine-tuning service. For electronic text data, it can support supervised training fine-tuning of text coding models and provide corresponding functional support for fine-tuning. Through the fine-tuning of M3E, BGE, and BCE coding models, the accuracy of extracting domain knowledge representation features can be improved to a certain extent.
[0075] Step 15: Retrieval service. Retrieval service is the main function in application business application service, including service functions for single document retrieval, mass document retrieval, user manual retrieval, question and answer retrieval, and custom retrieval arrangement application scenarios. The main application scenario of single document retrieval is the user's question and answer ability for electronic documents in a specific format, where the document format includes but is not limited to PDF / WORD / TXT / HTML, etc. It also includes document summary extraction, document structure and document core content extraction functions. Massive document retrieval uses RAG technology to retrieve large quantities of document content, and the document content includes document styles such as text, video, picture, and audio. The processing process will face greater challenges than single document content. First of all, the present invention uses big data related methods and means for data preprocessing. At the same time, in order to adapt to the input of the large language model, documents of various styles will also be split, organized and cognitively aligned; on the other hand, in order to maximize the accuracy of retrieval, it is also necessary to use arrangement technology and search result optimization technology to ensure the matching of retrieval and results, and input more relevant contextual content into the large language model. The main feature of user manual content retrieval is that the retrieval content mainly revolves around entities, concepts or events as clues. Under extreme conditions, the content retrieved by users must ensure the absolute accuracy of the text, and even the order of operations must be completely consistent. Therefore, the present invention conceives the use of RAG technology to process such documents to adapt to the special circumstances of this scenario. The document retrieval scenario refers to when users use the system, there are generally a large number of Q / A question and answer pairs for specific businesses. First, question and answer pairs are used to solve legacy problems, and at the same time, the text knowledge base and large language model question and answer capabilities are used to form a cascade model to answer deeper problem needs in order to achieve business capabilities. Custom retrieval arrangement is based on the customer's application scenarios and needs, using the system's existing tool set for arrangement.
[0076] Based on the above steps, the system can understand the user's intention according to the user's questions, decompose complex tasks into multiple subtasks, query and analyze the data through query analysis tools combined with knowledge, and return the results to the user.
[0077] It should be noted that within the scope of protection defined in the claims of the present invention, the following embodiments can be combined and / or expanded or replaced in any logical way from the above specific implementation methods, such as disclosed technical principles, disclosed technical features or implicitly disclosed technical features.
[0078] Example 1
[0079] A cultural and tourism data service method based on a large model RAG architecture includes the following steps:
[0080] Cultural and tourism data analysis is implemented based on the large-scale RAG architecture orchestration. According to user questions, user intentions are understood, complex tasks are decomposed into multiple subtasks, and query and analyze data through query analysis tools combined with knowledge, and the results are returned to users.
[0081] Example 2
[0082] Based on Example 1, the large model RAG architecture orchestration is used to implement cultural and tourism data analysis. According to user questions, the user intention is understood, and complex tasks are decomposed into multiple subtasks. The query and analysis tools are used to query and analyze the data in combination with knowledge, and the results are returned to the user. Specifically, the sub-steps are as follows:
[0083] S1, data preparation: construct a knowledge base based on the access structured data through the multimodal data processing module, and support manual editing of knowledge;
[0084] S2, Q / A data generation: When processing documents in the single-document dialogue phase, by retrieving documents, Q / A data is used to generate question-and-answer patterns or summarize documents in a Q / A manner to directly find answers to user questions. In the process of building the Q / A query paradigm, Q / A data is used in advance to generate questions corresponding to the documents for relevance matching of subsequent questions.
[0085] S3, data cleaning: use data cleaning tools or rules to perform preliminary screening and noise removal before data is stored in the database; remove redundant data content during the data splitting stage; eliminate ambiguity, correct data and annotations during the data annotation stage;
[0086] S4, data segmentation service: set data segmentation strategy, segment text data by paragraph, core content, word count, and segmentation, use video recognition corresponding models to split video data according to the set method, and use audio and natural language processing related models to split audio data;
[0087] S5, data encoding and embedding: use the large model to extract vector representations of the data to be input into the knowledge base or the user's query questions, and use the pre-trained model to convert sparse knowledge into dense knowledge through similarity retrieval, relevance sorting or matrix operations;
[0088] S6, index cascade: data and information needs are divided into categories and organized at different levels. First, the text summary and core content are extracted through the reading comprehension ability of the large language model to build the first-level vector index; then the core content is split into text blocks or multi-level knowledge is created again according to different data themes, scenarios, and businesses; finally, the multi-level index is organized into a retrieval process according to rules;
[0089] S7, query transformation: Using the contextual search enhancement method in the RAG model, the large language model is used to understand the questions input by the user, grasp the intent and focus of the question; then the initial question is split according to the intent and focus, so as to add more relevant questions; finally, more search knowledge is extended through one question;
[0090] S8, intelligent routing: using the understanding ability of rules or large language models at the task processing front end to route according to rules based on different tasks;
[0091] S9, content retrieval; content retrieval is done by inputting the questions or key topics to be retrieved and searching for knowledge from the knowledge base through algorithms;
[0092] S10, query ranking: using the similarity measurement algorithm of the cross-coding model to calculate the relevance of all results and inputs;
[0093] S11, fine-tuning model management: Fine-tuning model management is used to provide add, delete, query and modify functions for fine-tuning models, data and parameters, and also performs version mapping;
[0094] S12, hybrid model access: accessing the hybrid model when processing input data, to enable data recognition to be completed with the assistance of an external model;
[0095] S13, multi-mode data processing service: including text processing service and image processing service. The text processing service content completes the text-related processing mechanism of the upper-layer business, supports file styles in multiple formats, and sets corresponding processing methods for text styles; the image processing service is used to process images as retrieval content in the RAG scenario, and at the same time align the image information with the input of the large language model for encoding;
[0096] S14, model fine-tuning service: using encoding model fine-tuning, it supports supervised training fine-tuning of text encoding models for electronic text data, and provides corresponding functional support for fine-tuning;
[0097] S15, retrieval service: The retrieval service includes service functions for single document retrieval, massive document retrieval, user manual retrieval, and customized retrieval arrangement application scenarios.
[0098] Example 3
[0099] On the basis of Example 2, in step S1, the multimodal data processing module includes text processing services and image processing services, which support Word documents, TXT files, CSV data tables, Excel tables, PDF files, and image file styles in various formats, and extract relevant data to build a knowledge base.
[0100] Example 4
[0101] Based on Example 2, in step S5, the data encoding includes text data encoding, video data encoding, audio data encoding and image data encoding.
[0102] Example 5
[0103] On the basis of Example 2, in step S9, the algorithm includes high-dimensional space proximity, graph calculation, and semantic similarity retrieval algorithms, and the content retrieval includes a single retrieval or a combination of multiple retrieval methods.
[0104] Example 6
[0105] Based on Example 2, in step S10, while calculating the correlation between all results and inputs, it also includes the step of fine-tuning the model in terms of domain knowledge.
[0106] Example 7
[0107] On the basis of Example 2, in step S11, after fine-tuning the model management, it can be quickly applied to the RAG process as a specification parameter of the service.
[0108] Example 8
[0109] Based on Example 2, in step S14, the coding model includes M3E, BGE, and BCE coding models.
[0110] Example 9
[0111] Based on Example 2, in step S15, single document retrieval is used to provide users with the ability to ask questions about electronic documents in a specific format, where the document format includes but is not limited to PDF / WORD / TXT / HTML; it also includes document summary extraction, document structure and document core content extraction functions;
[0112] Massive document retrieval uses the RAG model to retrieve large quantities of document content, including text, video, image and audio document styles. First, data preprocessing is done using big data related methods and means, and documents of various styles are split, organized and cognitively aligned.
[0113] The content of user manual content retrieval is centered around entities, concepts, or events, and the RAG model is used to process such documents;
[0114] In the document retrieval scenario, we first use question-answer pairs to solve legacy problems, and then use the text knowledge base and large language model question-answering capabilities to form a cascade model to answer deeper questions.
[0115] Customized search arrangement is based on the customer's application scenario and needs, using the system's existing tool set.
[0116] Example 10
[0117] A cultural tourism data service system based on a large model RAG architecture, including:
[0118] The data preparation module is used to build a knowledge base based on the access structured data through the multimodal data processing module, and supports manual editing of knowledge;
[0119] The Q / A data generation module is used to generate a question-and-answer model using Q / A data or summarize the document in a Q / A way when processing documents in a single-document dialogue session, so as to directly find answers to user questions. In the process of building the Q / A query paradigm, the Q / A data is used in advance to generate questions corresponding to the document for relevance matching of subsequent questions.
[0120] The data cleaning module is used to perform preliminary screening and noise elimination of data through data cleaning tools or rules before data is stored in the database; remove redundant data content during the data splitting stage; eliminate ambiguity, correct data and annotations during the data annotation stage;
[0121] The data segmentation service module is used to set data segmentation strategies, segment text data by paragraph, core content, word count, and segmentation, split video data by using the corresponding video recognition model according to the set method, and split audio data by using audio and natural language processing related models;
[0122] The data encoding and embedding module is used to use the large model to extract vector representations of the data to be input into the knowledge base or the questions queried by the user, and to convert sparse knowledge into dense knowledge through similarity retrieval, relevance sorting or matrix operations using the pre-trained model;
[0123] The index cascade module is used to classify data and information needs and organize them at different levels. First, the text summary and core content are extracted through the reading comprehension ability of the large language model to build the first-level vector index; then the core content is split into text blocks or multi-level knowledge is created again according to different data themes, scenarios, and businesses; finally, the multi-level index is organized into a retrieval process according to rules;
[0124] The query conversion module is used to use the contextual search enhancement method in the RAG model to use the understanding ability of the large language model to grasp the intention and focus of the question input by the user; then split the initial question according to the intention and focus, so as to add more related questions; finally, more search knowledge is extended through one question;
[0125] Intelligent routing module, which is used to use the understanding ability of rules or large language models in the task processing front end to route according to different tasks;
[0126] Content retrieval module, which is used for content retrieval. By inputting the questions or key topics to be retrieved, the algorithm is used to search for knowledge from the knowledge base;
[0127] The query ranking module is used to calculate the relevance of all results and inputs using a similarity measurement algorithm based on a cross-coding model;
[0128] The fine-tuning model management module is used to manage the fine-tuning model, data and parameters, provide the functions of adding, deleting, checking and modifying, and also do version mapping;
[0129] A hybrid model access module is used to access the hybrid model when processing input data, so as to be able to complete data recognition with the assistance of an external model;
[0130] The multi-mode data processing service module is used to include text processing services and image processing services. The text processing service content completes the text-related processing mechanism of the upper-level business, supports file styles in multiple formats, and sets corresponding processing methods for text styles. The image processing service is used to process images as retrieval content in the RAG scenario, and at the same time, encode and align the image information with the input of the large language model.
[0131] Model fine-tuning service module, which is used to fine-tune the encoding model, supports supervised training fine-tuning of text encoding models for electronic text data, and provides corresponding functional support for fine-tuning;
[0132] The retrieval service module is used for retrieval services including service functions for single document retrieval, massive document retrieval, user manual retrieval, and customized retrieval arrangement application scenarios.
[0133] The units involved in the embodiments of the present invention may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, limit the units themselves.
[0134] According to one aspect of an embodiment of the present invention, a computer program product or a computer program is provided, the computer program product or the computer program includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in the above various optional implementations.
[0135] As another aspect, an embodiment of the present invention further provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.
Claims
1. A cultural and tourism data service method based on a large model RAG architecture, characterized in that: The following steps are involved: Cultural and tourism data analysis is implemented based on the large-scale RAG architecture orchestration. According to user questions, user intentions are understood, complex tasks are decomposed into multiple subtasks, and query and analyze data through query analysis tools combined with knowledge, and the results are returned to users.
2. The cultural and tourism data service method based on the large model RAG architecture according to claim 1 is characterized in that: The large-model RAG architecture-based orchestration realizes cultural and tourism data analysis. According to user questions, the user's intention is understood, and complex tasks are decomposed into multiple subtasks. The query analysis tool is used to query and analyze the data in combination with knowledge, and the results are returned to the user. The specific sub-steps include: S1, data preparation: construct a knowledge base based on the access structured data through the multimodal data processing module, and support manual editing of knowledge; S2, Q / A data generation: When processing documents in the single-document dialogue phase, by retrieving documents, Q / A data is used to generate question-and-answer patterns or summarize documents in a Q / A manner to directly find answers to user questions. In the process of building the Q / A query paradigm, Q / A data is used in advance to generate questions corresponding to the documents for relevance matching of subsequent questions. S3, data cleaning: use data cleaning tools or rules to perform preliminary screening and noise removal before data is stored in the database; remove redundant data content during the data splitting stage; eliminate ambiguity, correct data and annotations during the data annotation stage; S4, data segmentation service: set data segmentation strategy, segment text data by paragraph, core content, word count, and segmentation, use video recognition corresponding models to split video data according to the set method, and use audio and natural language processing related models to split audio data; S5, data encoding and embedding: use the large model to extract vector representations of the data to be input into the knowledge base or the user's query questions, and use the pre-trained model to convert sparse knowledge into dense knowledge through similarity retrieval, relevance sorting or matrix operations; S6, index cascade: data and information needs are divided into categories and organized at different levels. First, the text summary and core content are extracted through the reading comprehension ability of the large language model to build the first-level vector index; then the core content is split into text blocks or multi-level knowledge is created again according to different data themes, scenarios, and businesses; finally, the multi-level index is organized into a retrieval process according to rules; S7, query transformation: Using the contextual search enhancement method in the RAG model, the understanding ability of the large language model is used to grasp the intent and focus of the question input by the user; then the initial question is split according to the intent and focus, thereby adding more relevant questions; Finally, more search knowledge is extended through a question; S8, intelligent routing: using the understanding ability of rules or large language models at the task processing front end to route according to rules based on different tasks; S9, content retrieval; content retrieval is done by inputting the questions or key topics to be retrieved and searching for knowledge from the knowledge base through algorithms; S10, query ranking: using the similarity measurement algorithm of the cross-coding model to calculate the relevance of all results and inputs; S11, fine-tuning model management: Fine-tuning model management is used to provide add, delete, query and modify functions for fine-tuning models, data and parameters, and also performs version mapping; S12, hybrid model access: accessing the hybrid model when processing input data, to enable data recognition to be completed with the assistance of an external model; S13, multi-mode data processing service: including text processing service and image processing service. The text processing service content completes the text-related processing mechanism of the upper-layer business, supports file styles in multiple formats, and sets corresponding processing methods for text styles; the image processing service is used to process images as retrieval content in the RAG scenario, and at the same time align the image information with the input of the large language model for encoding; S14, model fine-tuning service: using encoding model fine-tuning, it supports supervised training fine-tuning of text encoding models for electronic text data, and provides corresponding functional support for fine-tuning; S15, retrieval service: The retrieval service includes service functions for single document retrieval, massive document retrieval, user manual retrieval, and customized retrieval arrangement application scenarios.
3. The cultural and tourism data service method based on the large model RAG architecture according to claim 2 is characterized in that: In step S1, the multimodal data processing module includes text processing services and image processing services, which support Word documents, TXT files, CSV data tables, Excel tables, PDF files, and image file styles in various formats, and extract relevant data to build a knowledge base.
4. The cultural and tourism data service method based on the large model RAG architecture according to claim 2 is characterized in that: In step S5, the data encoding includes text data encoding, video data encoding, audio data encoding and image data encoding.
5. The cultural and tourism data service method based on the large model RAG architecture according to claim 2 is characterized in that: In step S9, the algorithm includes high-dimensional space proximity, graph calculation, and semantic similarity retrieval algorithms, and the content retrieval includes a single retrieval or a combination of multiple retrieval methods.
6. The cultural and tourism data service method based on the large model RAG architecture according to claim 2 is characterized in that: In step S10, while calculating the correlation between all results and inputs, it also includes the step of fine-tuning the model in terms of domain knowledge.
7. The cultural and tourism data service method based on the large model RAG architecture according to claim 2 is characterized in that: In step S11, after fine-tuning the model management, it can be quickly applied to the RAG process as a specification parameter of the service.
8. The cultural and tourism data service method based on the large model RAG architecture according to claim 2 is characterized in that: In step S14, the coding model includes M3E, BGE, and BCE coding models.
9. The cultural and tourism data service method based on the large model RAG architecture according to claim 2 is characterized in that: In step S15, single document retrieval is used to provide users with the ability to ask questions about electronic documents in a specific format, where the document format includes but is not limited to PDF / WORD / TXT / HTML; it also includes document summary extraction, document structure and document core content extraction functions; Massive document retrieval uses the RAG model to retrieve large quantities of document content, including text, video, image and audio document styles. First, data preprocessing is done using big data related methods and means, and documents of various styles are split, organized and cognitively aligned. The content of user manual content retrieval is centered around entities, concepts, or events, and the RAG model is used to process such documents; In the document retrieval scenario, we first use question-answer pairs to solve legacy problems, and then use the text knowledge base and large language model question-answering capabilities to form a cascade model to answer deeper questions. Customized search arrangement is based on the customer's application scenario and needs, using the system's existing tool set.
10. A cultural and tourism data service system based on a large model RAG architecture, characterized in that: include: The data preparation module is used to build a knowledge base based on the access structured data through the multimodal data processing module, and supports manual editing of knowledge; The Q / A data generation module is used to generate a question-and-answer model using Q / A data or summarize the document in a Q / A way when processing documents in a single-document dialogue session, so as to directly find answers to user questions. In the process of building the Q / A query paradigm, the Q / A data is used in advance to generate questions corresponding to the document for relevance matching of subsequent questions. The data cleaning module is used to perform preliminary screening and noise elimination of data through data cleaning tools or rules before data is stored in the database; remove redundant data content during the data splitting stage; eliminate ambiguity, correct data and annotations during the data annotation stage; The data segmentation service module is used to set data segmentation strategies, segment text data by paragraph, core content, word count, and segmentation, split video data by using the corresponding video recognition model according to the set method, and split audio data by using audio and natural language processing related models; The data encoding and embedding module is used to use the large model to extract vector representations of the data to be input into the knowledge base or the questions queried by the user, and to convert sparse knowledge into dense knowledge through similarity retrieval, relevance sorting or matrix operations using the pre-trained model; The index cascade module is used to classify data and information needs and organize them at different levels. First, the text summary and core content are extracted through the reading comprehension ability of the large language model to build the first-level vector index; then the core content is split into text blocks or multi-level knowledge is created again according to different data themes, scenarios, and businesses; finally, the multi-level index is organized into a retrieval process according to rules; The query conversion module is used to use the contextual search enhancement method in the RAG model to use the understanding ability of the large language model to grasp the intent and focus of the questions input by the user; then the initial question is split according to the intent and focus, thereby adding more relevant questions; Finally, more search knowledge is extended through a question; Intelligent routing module, which is used to use the understanding ability of rules or large language models in the task processing front end to route according to different tasks; Content retrieval module, which is used for content retrieval. By inputting the questions or key topics to be retrieved, the algorithm is used to search for knowledge from the knowledge base; The query ranking module is used to calculate the relevance of all results and inputs using a similarity measurement algorithm based on a cross-coding model; The fine-tuning model management module is used to manage the fine-tuning model, data and parameters, provide the functions of adding, deleting, checking and modifying, and also do version mapping; A hybrid model access module is used to access the hybrid model when processing input data, so as to be able to complete data recognition with the assistance of an external model; The multi-mode data processing service module is used to include text processing services and image processing services. The text processing service content completes the text-related processing mechanism of the upper-level business, supports file styles in multiple formats, and sets corresponding processing methods for text styles. The image processing service is used to process images as retrieval content in the RAG scenario, and at the same time, encode and align the image information with the input of the large language model. Model fine-tuning service module, which is used to fine-tune the encoding model, supports supervised training fine-tuning of text encoding models for electronic text data, and provides corresponding functional support for fine-tuning; The retrieval service module is used for retrieval services including service functions for single document retrieval, massive document retrieval, user manual retrieval, and customized retrieval arrangement application scenarios.
Citation Information
Patent Citations
Method, system and equipment for analyzing traffic data in real time based on large model and medium
CN117951348A
Intelligent catering data analysis system and method based on AI large model
CN118428599A
Cited By
Book data processing and intelligent service system based on artificial intelligence
CN120653760A