Drop knowledge question-answering method and device based on large model
Through the vertical knowledge question-and-answer method based on the big model, combined with semantic recognition and tool plug-in call, the problem of vertical knowledge question-and-answer in the existing technology is solved, and more efficient and accurate professional knowledge processing and question-and-answer services are achieved.
Patent Information
- Application Number
- CN202411667925.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-21
AI Technical Summary
In the prior art, vertical knowledge questions and answers are not intelligent and inaccurate, and it is difficult to effectively provide scientific researchers with professional literature processing and task processing support.
The vertical knowledge question and answer method based on the big model is used to receive the question text input by the user, and semantic recognition is performed based on the pre-constructed big model to judge the user's question and answer intention. If the recognition result contains preset keywords, call the corresponding tool plug-in for task processing; if not, detect the user's operation results on the professional question and answer options, and enter the recognition result to match the target resource library.
Through semantic recognition and intent judgment, accurately calling tool plug-ins or resource libraries has been improved, and the accuracy and intelligence of vertical knowledge questions and answers have been assisted to help scientific researchers process literature and complete professional tasks more efficiently.
Smart Images

Figure CN119621889A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information technology, and in particular to a vertical knowledge question-answering method and device based on a large model. Background Art
[0002] In recent years, with the rapid progress of computing hardware performance, the accumulation of massive data, and the continuous innovation of algorithm theory, artificial intelligence technology, especially large models (LLMs) in the field of deep learning, has developed rapidly. Large models refer to neural network models with billions or even trillions of parameters. They can learn rich language representations and world knowledge by pre-training on large-scale data sets, thereby showing excellent performance in a variety of tasks. At present, large models have shown broad application prospects in many fields, including but not limited to natural language processing (NLP), computer vision (CV), speech recognition (ASR) and other fields. More and more companies and research institutions are beginning to try to integrate large models into their own products and services to improve the level of product intelligence and improve user experience. The application of mainstream large models mainly focuses on general scenarios and solving general problems, while there are generally unintelligent and inaccurate problems in vertical knowledge questions and answers, so they cannot provide scientific researchers with applications that include massive professional literature, professional knowledge understanding, literature processing, and professional task processing. Summary of the invention
[0003] The embodiments of the present application provide a method and device for answering vertical knowledge based on a large model to solve the technical problems of unintelligent and inaccurate vertical knowledge questions in the prior art.
[0004] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0005] In a first aspect, an embodiment of the present application provides a vertical knowledge question answering method based on a large model, the method comprising:
[0006] Receive the question text entered by the user;
[0007] Performing semantic recognition on the question text based on a pre-built large model to obtain a recognition result, wherein the recognition result represents the user's question-answering intention;
[0008] If the recognition result contains preset keywords, determining that the question-answering intention is to use a tool plug-in, calling a target plug-in tool that matches the preset keywords to perform task processing on the data in the question text, and outputting a processing result, wherein the task processing includes document parsing, data visualization and / or table extraction;
[0009] If the recognition result does not contain preset keywords, it is determined that the question and answer intention is a dialogue question and answer, and the operation results of the user on the professional question and answer options when entering the question text are detected, and the current question and answer type is determined based on the operation results. The recognition result is input into the target resource library matching the current question and answer type for matching, and the target resource associated with the recognition result is output.
[0010] In combination with the first aspect, in a possible design, detecting the operation result of the user on the professional question and answer option when inputting the question text, determining the current question and answer type based on the operation result, and inputting the recognition result into a target resource library matching the current question and answer type for matching, includes:
[0011] Displaying a first interface, wherein the first interface includes a professional question and answer option;
[0012] Detecting whether the user performs a selection operation on the professional question and answer option when inputting the question text,
[0013] If yes, determining the current question and answer type as a professional question and answer based on the operation result, and inputting the recognition result into a target resource library matching the professional question and answer option for matching;
[0014] The method further comprises:
[0015] If not, the current question and answer type is determined to be a common question and answer based on the operation result, and the recognition result is input into a preset common language large model for conversation answering.
[0016] In combination with the first aspect, in a possible design, the detecting whether the user performs a selection operation on the professional question and answer option when inputting the question text includes:
[0017] It is detected whether a selection operation of the knowledge base question and answer option and / or the network search option is performed when the user inputs the question text.
[0018] In combination with the first aspect, in a possible design manner, before receiving the question text input by the user, the method further includes:
[0019] Acquiring geoscience literature data, extracting knowledge points from the geoscience literature data, and storing the knowledge points in a knowledge base;
[0020] In the case where the professional question and answer option is a knowledge base question and answer option, inputting the recognition result into a target resource library matching the professional question and answer option for matching, and outputting a target resource associated with the recognition result, comprises:
[0021] The recognition result is input into the knowledge base for matching with the knowledge point, and the geological literature data associated with the recognition result is screened out based on the matching degree between the recognition result and the knowledge point, and the geological literature data associated with the recognition result is returned to the user as the target resource.
[0022] In combination with the first aspect, in a possible design, when the professional question and answer option is a network search option, inputting the recognition result into a target resource library matching the professional question and answer option for matching, and outputting a target resource associated with the recognition result includes:
[0023] Inputting the recognition result into a search engine and performing a search in the search engine;
[0024] According to the relevance of the search results, the searched references are associated with the target resource and returned to the user.
[0025] In combination with the first aspect, in a possible design manner, before receiving the question text input by the user, the method further includes:
[0026] Acquire geoscience literature data, perform enhancement processing on the original large model based on the geoscience literature data, and train to obtain the pre-built large model;
[0027] After outputting the processing result or outputting the target resource associated with the recognition result, the method further includes:
[0028] Receive session result feedback information;
[0029] The pre-built large model is incrementally learned based on the session result feedback information.
[0030] In combination with the first aspect, in a possible design manner, after receiving the question text input by the user, the method further includes:
[0031] Obtaining the functional permissions and data permissions of the user;
[0032] Acquire a plug-in tool that matches the functional permission from a plug-in tool library to obtain the target plug-in tool;
[0033] Resources matching the data authority are acquired from the resource library, and the target resource library is constructed with the resources.
[0034] In a second aspect, an embodiment of the present application provides a vertical knowledge question-answering device based on a large model, including:
[0035] A text input module, used to receive question text input by the user;
[0036] A semantic recognition module, used to perform semantic recognition on the question text based on a pre-built large model to obtain a recognition result, wherein the recognition result represents the user's question-answering intention;
[0037] A tool calling module, for determining that the question-answering intention is to use a tool plug-in if the recognition result contains a preset keyword, calling a target plug-in tool that matches the preset keyword to perform task processing on the data in the question text, and outputting a processing result, wherein the task processing includes document parsing, data visualization and / or table extraction;
[0038] A professional question and answer module is used to determine that the question and answer intention is a dialogue question and answer if the recognition result does not contain preset keywords, detect the operation results of the professional question and answer options when the user enters the question text, and determine the current question and answer type based on the operation results, input the recognition result into the target resource library matching the current question and answer type for matching, and output the target resource associated with the recognition result.
[0039] In a third aspect, an embodiment of the present application provides a terminal, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the method of the first aspect and possible design methods thereof.
[0040] In a fourth aspect, an embodiment of the present application provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the method of the first aspect and its possible design manner when running.
[0041] Compared with the prior art, a vertical knowledge question and answer method and device based on a big model is provided in an embodiment of the present application. The method and device receive a question text input by a user; semantic recognition is performed on the question text based on a pre-built big model to obtain a recognition result, and the recognition result represents the user's question and answer intention; if the recognition result contains preset keywords, the question and answer intention is determined to be to use a tool plug-in, and a target plug-in tool matching the preset keywords is called to perform task processing on the data in the question text, and the processing result is output, and the task processing includes document parsing, data visualization and / or table extraction; if the recognition result does not contain preset keywords, the question and answer intention is determined to be a dialogue question and answer, and the operation results of the professional question and answer options when the user inputs the question text are detected, and the current question and answer type is determined based on the operation results, and the recognition result is input into the target resource library matching the current question and answer type for matching, and the target resource associated with the recognition result is output. This application performs semantic recognition on user questions, determines the user's true intention, and then calls the plug-in tool that executes the corresponding task to process the task. Questions that are not matched to the corresponding tool plug-in will be classified into text question-and-answer tasks; in text question-and-answer tasks, the question content will be parsed to see whether the question requires professional knowledge to answer based on whether the user selects the professional question-and-answer option; for knowledge that requires professional knowledge to answer, it will be matched through a preset target resource library that matches the enhanced question-and-answer function. The target resource library includes professional literature that can answer questions related to vertical knowledge, so it can be used to answer users' questions from a professional perspective. In this way, with the help of big data, professional task processing and professional question-and-answer for scientific research knowledge can be realized at the same time, solving the current problem of inaccurate knowledge question-and-answer for vertical knowledge. In addition, the big model assists scientific researchers in processing literature by identifying user intentions and calling automated tools to process data in the question-and-answer process, thereby improving the efficiency of data processing and analysis.
[0042] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0044] Figure 1 A hardware structure block diagram of a terminal provided in an embodiment of the present application is shown;
[0045] Figure 2 A flowchart of a vertical knowledge question-answering method based on a large model provided in an embodiment of the present application is shown;
[0046] Figure 3A system architecture diagram of a vertical knowledge question-answering method based on a large model provided in an embodiment of the present application is shown;
[0047] Figure 4 A structural block diagram of a scientific research tool system provided by an embodiment of the present application is shown;
[0048] Figure 5 A flowchart of a question-and-answer method provided in an embodiment of the present application is shown;
[0049] Figure 6 A structural block diagram of a vertical knowledge question-and-answer device based on a large model provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0050] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0051] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the", "these" and the like in this application do not represent quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether directly or indirectly. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. Usually, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0052] The various technologies described in the embodiments of this application can be used to strengthen question-answering for vertical knowledge in professional fields. Taking the field of geology as an example, a scientific research tool platform is constructed by combining geological knowledge and the capabilities of large models. The platform obtains user questions in the form of dialogue and question-answering. After analysis, it either calls tools or professional knowledge bases to solve user questions. Through this platform, the user's scientific research efficiency is improved and scientific research work is supported.
[0053] The existing applications of big models mainly focus on general scenarios and solving general problems, but there are generally problems of unintelligence and inaccuracy in vertical knowledge question and answer. For example, when users ask geoscience-related questions to the big model, the big model provides overly general answers that lack sufficient details and geoscience background knowledge.
[0054] In view of this, the method provided in the embodiment of the present application can automatically determine whether it is necessary to call a special tool plug-in based on the question text and professionalism through text semantic analysis. By controlling the question and answer enhancement switch, the user can decide whether to enable the question and answer enhancement function. If the user checks the question and answer enhancement function, the answer can be improved by introducing a domain-specific knowledge base based on the general large model. In this way, the depth and quality of questions and answers can be improved, making the accuracy of questions and answers for vertical knowledge higher.
[0055] The vertical knowledge question-answering method based on a large model provided in the embodiment of the present application can be executed in a terminal, a computer device or a cloud server. Taking running on a terminal as an example, Figure 1 FIG. 1 shows a hardware structure block diagram of a terminal provided in an embodiment of the present application. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102, and memory 104 for storing data. Processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. Optionally, the terminal may also include a transmission device 106 for communication functions and an input / output device 108, and the input / output device 108 may be a display screen, and the question text, output target resources, and processing results are displayed on the display screen. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0056] The memory 104 can be used to store computer programs, for example, software programs and modules of application software. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0057] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0058] The present application embodiment provides a vertical knowledge question answering method based on a large model. Figure 2 A flowchart of a vertical knowledge question answering method based on a large model provided in an embodiment of the present application is shown. Figure 2 As shown, the method includes steps S201 to S204.
[0059] Step S201: receiving a question text input by a user.
[0060] The question text is text information input by the user through a mobile phone, computer device or other terminal, including text and / or symbols. In some embodiments, the question text can also be a question text converted from the user's gestures or voice commands, that is, the user can ask questions to the big model by inputting text information; or by inputting gestures, voice and other commands.
[0061] Step S202: semantically recognize the question text based on the pre-built large model to obtain a recognition result, which represents the user's question-answering intention.
[0062] The pre-built large model analyzes the semantics of the question text based on statistical grammar or regular grammar structure, and then converts the question text into recognition results. In this step, the large model identifies whether the user uses the target plug-in tool and which target plug-in tool to use. Specifically, the target plug-in tools include: table extraction tools, document parsing tools, map data visualization tools, etc. The document parsing tool can read and understand the document and extract the content. The map data visualization tool can draw map data based on the data provided by the user, and the table extraction tool extracts the table content from the image.
[0063] The names of these tools can be used as preset keywords, and the large model identifies whether the question text contains the keywords, and obtains the recognition result, and the recognition result contains the preset keywords, or the recognition result does not contain the preset keywords. The preset keywords can be Chinese characters, words, symbols, etc.
[0064] Exemplarily, when the user inputs "parse the following document", the large model performs semantic recognition and obtains a recognition result characterized as "use a document parsing tool", where the document parsing tool is a preset keyword and the recognition result includes the preset keyword.
[0065] Step S203: If the recognition result contains preset keywords, the question-answering intention is determined to be to use a tool plug-in, call a target plug-in tool that matches the preset keywords to perform task processing on the data in the question text, and output the processing results. The task processing includes document parsing, data visualization and / or table extraction.
[0066] For example, a user uploads an article and asks: "please display table 3 in markdown format from this article". The big model is called for semantic recognition. The big model recognizes the keyword "table" and determines the need to call the table extraction tool based on the overall semantics. Finally, the table extraction tool returns to the user: a table in markdown (or lightweight markup language) format extracted from this article.
[0067] In this example, the preset keyword is table, the target plug-in tool is a table extraction tool, the task processing is to extract a table in markdown format, and the output processing result is a table in markdown format.
[0068] In some embodiments, after receiving the question text input by the user, the method further includes: obtaining the user's functional permissions and data permissions; obtaining a plug-in tool that matches the functional permissions from the plug-in tool library to obtain a target plug-in tool; obtaining resources that match the data permissions from the resource library, and constructing a target resource library with the resources. Protect data privacy by setting permissions to prevent improper use or leakage.
[0069] Data permissions include the use of session data, file data generated by sessions, personal document data uploaded by users of personal knowledge bases, and all or part of the document data of public knowledge bases. Functional permissions include the use of multi-language large model Q&A functions, knowledge base enhanced Q&A functions, web search enhanced Q&A functions, document parsing functions, data visualization functions, and table extraction functions.
[0070] Among them, users are divided into ordinary users and administrator users; administrator users manage data permissions and functional permissions for ordinary users through the management background. The set data permissions include: user-owned data query storage is operated according to the user's unique ID; the user's own data can only be accessed by the user; public data has corresponding division lists according to different divisions, and each item corresponds to a different data range; each user has a data permission list, and an independent data range can be configured for each user. The set functional permissions include: setting a complete functional permission list, each item in the list is the minimum function point that can be configured; each user corresponds to a functional permission list, and independent function configuration can be performed for each user; the server provides corresponding services based on whether it has function point permissions.
[0071] Step S204: If the recognition result does not contain preset keywords, it is determined that the question and answer intention is a dialogue question and answer, and the operation results of the professional question and answer options when the user enters the question text are detected, and the current question and answer type is determined based on the operation results. The recognition result is input into the target resource library that matches the current question and answer type for matching, and the target resource associated with the recognition result is output.
[0072] In this step, a professional Q&A option is set, and based on the operation results of the professional Q&A option, it is detected whether the user needs to turn on the enhanced Q&A function. When the user enters the question text and the professional Q&A option is selected, it is determined that the enhanced Q&A function needs to be provided to the user. When the professional Q&A option is not selected when the user enters the question text, it is determined that the enhanced Q&A function does not need to be provided to the user, which can be understood as conducting ordinary Q&A with the user.
[0073] Among them, professional Q&A (i.e. enhanced Q&A) includes: training and optimizing the original large model with vertical knowledge points to obtain a large model with high accuracy in answering questions about vertical knowledge. Specifically, the large model trained with vertical knowledge points is endowed with rich geoscience background knowledge, which can better analyze the context and details of geoscience problems, avoid conflicts with knowledge in other fields, and ensure that the problems are accurately understood.
[0074] Professional Q&A also includes: searching for answers in a knowledge base (or search engine) containing vertical knowledge, and returning the answers to the user. Vertical knowledge includes geoscience background knowledge, such as literature knowledge in the geoscience field. The literature data in the knowledge base comes from expert information, academic articles, practical experience, etc. in the field. Therefore, when answering complex questions in the geoscience field, it is possible to refer to and reproduce expert-level judgments and knowledge, so the answers searched are more targeted.
[0075] In some embodiments, professional question and answer options can be displayed on the interface for inputting question text. Specifically, a first interface is displayed, and the first interface includes professional question and answer options. It is detected whether a selection operation for professional question and answer options is performed when the user inputs the question text. If so, it is determined based on the operation result that the current question and answer type is a professional question and answer, and the recognition result is input into the target resource library that matches the professional question and answer options for matching.
[0076] In this embodiment, when the big model recognizes that the user does not need to use the tool plug-in (i.e., the user needs to open the dialogue Q&A), it will further detect whether the user needs to open the enhanced Q&A or the ordinary Q&A. If the user needs to open the enhanced Q&A, the user selects the professional Q&A option by checking, clicking, etc., and the server determines that the current Q&A type is professional Q&A based on the user's selection, then the server will open the enhanced Q&A function for the user, that is, use the professional knowledge base, browser, or the big model to output the answer.
[0077] In some of the embodiments, if the user does not perform a selection operation on the professional question and answer option, the current question and answer type is determined to be a general question and answer based on the operation result, and the recognition result is input into a preset general language large model for conversational answering.
[0078] As an example, multiple professional Q&A options may be set, such as search engine options and knowledge base options. The above-mentioned detection of whether to perform a selection operation on the professional Q&A option when the user enters a question text includes detecting whether to perform a selection operation on the knowledge base Q&A option and / or the network search option when the user enters a question text.
[0079] In this embodiment, the professional question and answer options include a knowledge base question and answer option and / or a network search option, wherein the knowledge base question and answer option corresponds to a knowledge base containing vertical knowledge, and the network search option corresponds to a search engine.
[0080] The knowledge base may further include a personal knowledge base and a public knowledge base, and the knowledge base may be composed of geoscience literature data. The personal knowledge base stores the user's personal literature data, or the knowledge points extracted from the literature data, and the public knowledge base stores the literature data of all users, or the knowledge points extracted from the literature data. The literature in the public knowledge base may also be partially divided according to secondary disciplines, supporting users to select within the preferred knowledge range when using.
[0081] The following takes the knowledge base as an example to further explain the enhanced question answering. Before receiving the question text input by the user, the method further includes: obtaining geoscience literature data, extracting knowledge points from the geoscience literature data, and storing the knowledge points in the knowledge base.
[0082] In the case where the professional question and answer option is a knowledge base question and answer option, the above-mentioned inputting the recognition result into the target resource library matching the professional question and answer option for matching, and outputting the target resource, includes: inputting the recognition result into the knowledge base for matching with the knowledge point, screening out the geological literature data associated with the recognition result based on the matching degree between the recognition result and the knowledge point, and returning the geological literature data associated with the recognition result as the target resource to the user.
[0083] In this embodiment, a set of relevant documents provided by professionals in the field of geosciences that have been screened and approved is constructed and stored in the server in an efficient indexed storage format, and knowledge enhancement is performed on the large model results when questions are entered.
[0084] The following uses a search engine as an example to further explain enhanced question and answer. When the professional question and answer option is a network search option, the above-mentioned inputting the recognition result into the target resource library matching the professional question and answer option for matching and outputting the target resource includes: inputting the recognition result into the search engine and searching in the search engine; according to the relevance of the search results, associating the searched references in the target resource and returning them to the user.
[0085] In some of the embodiments, before receiving the question text input by the user, the method also includes: acquiring geological literature data, performing enhancement processing on the original big model based on the geological literature data, and training to obtain a pre-built big model; after outputting the processing results or outputting the target resources, the method also includes: receiving session result feedback information; and performing incremental learning on the pre-built big model based on the session result feedback information.
[0086] Specifically, the conversation result feedback information represents the user's satisfaction with the output results of the large model. If the user is not satisfied with the output results, the large model will perform incremental learning to improve the accuracy of the response during the answering process.
[0087] In the embodiment recorded in the above steps S201 to S204, a question text input by a user is received; semantic recognition is performed on the question text based on a pre-built large model to obtain a recognition result, and the recognition result represents the user's question and answer intention; if the recognition result contains preset keywords, the question and answer intention is determined to be to use a tool plug-in, and a target plug-in tool matching the preset keywords is called to perform task processing on the data in the question text, and the processing result is output, and the task processing includes document parsing, data visualization and / or table extraction; if the recognition result does not contain preset keywords, the question and answer intention is determined to be a dialogue question and answer, and the operation results of the professional question and answer options when the user inputs the question text are detected, and the current question and answer type is determined based on the operation results, and the recognition result is input into a target resource library matching the current question and answer type for matching, and the target resource associated with the recognition result is output. This application performs semantic recognition on user questions, determines the user's true intention, and then calls the plug-in tool that executes the corresponding task to process the task. Questions that are not matched to the corresponding tool plug-in will be classified into text question-and-answer tasks; in text question-and-answer tasks, the question content will be parsed to see whether the question requires professional knowledge to answer based on whether the user selects the professional question-and-answer option; for knowledge that requires professional knowledge to answer, it will be matched through a preset target resource library that matches the enhanced question-and-answer function. The target resource library includes professional literature that can answer questions related to vertical knowledge, so it can be used to answer users' questions from a professional perspective. In this way, with the help of big data, professional task processing and professional question-and-answer for scientific research knowledge can be realized at the same time, solving the current problem of inaccurate knowledge question-and-answer for vertical knowledge. In addition, the big model assists scientific researchers in processing literature by identifying user intentions and calling automated tools to process data in the question-and-answer process, thereby improving the efficiency of data processing and analysis.
[0088] The vertical knowledge question-answering method based on a large model provided in the embodiment of the present application is described and illustrated through specific examples below.
[0089] This application uses professional knowledge to enhance the training of the large model, and further enhances the answers of the large model through the knowledge base.
[0090] Enhanced processing for large models includes: enhancing training of large models through professional knowledge to improve the understanding and processing capabilities of large enhanced models for tasks in professional fields (such as earth science); collecting academic papers, industry reports and other professional literature of corresponding disciplines, and converting them into data formats suitable for large model training through data cleaning, labeling and other processing methods; the trained large model continuously adjusts and optimizes the training strategy through user feedback on session results during use, so as to optimize the professional relevance and accuracy of the large model's answers. For example, even if the large model is pre-trained with professional knowledge, it may have a deviation in understanding similar and easily confused knowledge points, resulting in the answer not achieving the expected effect. Through user feedback on such incorrect questions and answers, the same errors can be reduced or avoided. The large model adopts the Transformer architecture, which can continuously optimize the model capabilities through continuous training of the model with user daily data through incremental model updates during use.
[0091] Introducing knowledge base to improve the relevance of large model answers. The enhanced processing of professionalism includes: building a knowledge base to store structured and unstructured data. The knowledge base is equipped with an efficient search engine: recording complete version information of data and quickly locating information. The public knowledge base in professional fields is combined with the private knowledge base of individual users to provide users with personalized knowledge optimization.
[0092] Specifically, the knowledge base is built based on ElasticSearch (ES for short). When writing documents selected by experts into ES, document parsing will be performed to parse the documents into a structured structure that can be quickly analyzed. Specifically, each article recorded in the knowledge base can include multiple knowledge points. When a user requests to enter the knowledge base, documents with a certain degree of relevance will be screened out based on the matching degree between the request keyword and the knowledge points contained in the articles in the knowledge base. For example, the knowledge base contains three articles X containing knowledge points A (twice), B (ten times), C (once), Y containing knowledge points A (eight times), C (ten times), E (four times), and Z containing knowledge points B (nine times), C (three times), D (fifty times), and E (twelve times). When the request contains A, Y and X will be returned; when the request contains B, X and Z will be returned; when the request contains C, Y and X will be returned; when the request contains D, Z will be returned; when the request contains E, Z and Y will be returned.
[0093] Figure 3 A system architecture diagram of a vertical knowledge question-answering method based on a large model provided in an embodiment of the present application is shown. Figure 3As shown in the figure, the application system portal project, proxy project, and large model algorithm project of the method. All services are deployed on the cloud service, among which the portal project and proxy project are deployed in Kubernetes (a container orchestration platform) provided by the cloud service, and the algorithm project is deployed in the GPU cloud server. Cloud services can be conveniently managed in a standardized manner and quickly scaled up and down, improving the overall stability and availability of the service. For security reasons, in the overall service, only the portal project will be exposed to the outside, and other proxy projects and large model projects will only expose services in the same cluster.
[0094] Among them, the portal project is the only entrance for the entire system to be exposed to the outside world, and as a business layer, it provides users with a user interface for operation. In addition, the portal project is a data storage layer within the system, which includes the logic of direct communication and interaction with the middleware. It can access the database management system MySQL, object storage service (Object Storage Service, OSS), log service SLS, ES, etc. through the middleware, thus providing other projects with an interface to interact with the middleware, and can maintain, manage and count the requests of the entire system.
[0095] The proxy project is an extension of the business layer in the entire system. It uses independent projects as the central system for connecting large models, managing tool libraries, parsing user tasks and other business logic. It provides tools and large model services for portal projects, and routes the task judgments of upstream requests to the corresponding tools or large model services, or to third-party services. Third-party services provide mathematical formula identifiers, search engines, etc.
[0096] As an infrastructure layer project deployed by the system itself, the large model algorithm project deploys models that have been pre-trained with professional knowledge. It provides semantic recognition services for pre-processing user tasks, knowledge question-and-answer services for answering specific questions, and knowledge fusion services that combine additional knowledge with the model's own answers.
[0097] Figure 4 A structural block diagram of a scientific research tool system provided in an embodiment of the present application is shown. Figure 4 As shown in the figure, the portal part includes two modules: user and session, which together constitute the system front end provided to users. The main capabilities of the user module include:
[0098] User authentication and management: The user module supports functions such as user registration, login, and permission management to ensure that authenticated users can access system resources;
[0099] User registration and review: Provide a registration and review mechanism to ensure that all registered users are credible researchers.
[0100] The main capabilities of the conversation module include: conversation management: the conversation module records the interaction history between the user and the system for subsequent query and reference; context awareness: provides context-related suggestions and services based on user historical input and behavior patterns; multi-round conversation: supports continuous multi-round conversations, allowing users to complete complex tasks in one conversation.
[0101] The proxy part includes all the backend systems, including prompt-model management (or prompt word model management), knowledge base, tool library, and search engine (WebSearch). As the core part of this system, it processes actual user requests and provides the implementation and management of the main functions.
[0102] Prompt-Model management module capabilities mainly include:
[0103] Model training and updating: Supports fine-tuning based on pre-trained large models to adapt to the specific needs of the geoscience field.
[0104] Model deployment and management: Provides model deployment, monitoring, and version control to ensure service stability and maintainability.
[0105] Prompt Engineering: Design and manage prompt templates to optimize the response quality and efficiency of the model.
[0106] The knowledge base module capabilities mainly include:
[0107] Data storage and indexing: Build and maintain a professional knowledge base in the field of geoscience, including terminology, concepts, research results, etc.
[0108] Data cleaning and integration: Clean and standardize data from various sources to ensure data quality.
[0109] The main functions of the search engine module include:
[0110] Search engine integration: Integrate third-party search engine APIs to enhance the system's search capabilities.
[0111] Result filtering and sorting: Filter and sort search results based on relevance, authority, and other factors.
[0112] The capabilities of the tool library module mainly include:
[0113] Integration of general third-party tools: general and high-consumption functions such as image recognition and document parsing are implemented through third-party services;
[0114] Integration of professional tools: Highly professional functions such as map data visualization can be achieved through independent development.
[0115] Figure 5A flowchart of a question-answering method provided in an embodiment of the present application is shown. Figure 5 As shown, in this method: the user sends a session message on the portal, the agent project receives the user input, first determines the functional permissions and data permissions that the user has, and then performs semantic recognition.
[0116] The message sent by the user is divided into two parts of parameter recognition. The first part is semantic recognition through the first layer large model; the second part is to judge the check status of the switch when the user sends the message.
[0117] By identifying preset keywords, it is determined whether the user needs to conduct text Q&A or use tool plug-ins. In text Q&A, whether the user checks the knowledge base switch and the web search switch when sending the question text can determine whether to enter the general Q&A, open the knowledge base, or open the web search. Among them, opening the knowledge base and opening the web search are used to integrate the specified knowledge base content or web search content in the large model reply. When turning on the knowledge base switch, the user needs to select a personal or public knowledge base, and can specifically subdivide some secondary subject knowledge in the knowledge base; the keywords in the user's question will be used to search in the specified knowledge base, and finally integrated into the answer, and the related literature information will also be attached to the answer as a reference. When the WebSearch switch is turned on, the user can use the third-party search engine API key pre-configured by the system to ask questions, or directly configure the API key applied for by himself. After selecting the specified engine, the answer will also be combined with the searched web content, and the corresponding reference content source will be displayed in the reference.
[0118] The tool plug-in provides functions such as document parsing, data visualization, and table extraction. Directly call the plug-in tool corresponding to the preset keyword to perform task processing.
[0119] A vertical knowledge question-and-answer device based on a large model is also provided in the embodiments of the present application. The device is used to implement the above embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. The terms "module", "unit", "sub-unit", etc. used below can implement a combination of software and / or hardware for predetermined functions. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0120] Figure 6 A structural block diagram of a vertical knowledge question-answering device based on a large model provided in an embodiment of the present application is shown. Figure 6 As shown, the device comprises:
[0121] The text input module 61 is used to receive the question text input by the user.
[0122] The semantic recognition module 62 is used to perform semantic recognition on the question text based on a pre-built large model to obtain a recognition result, which represents the user's question and answer intention.
[0123] The tool calling module 63 is used to determine the question-answering intention by using a tool plug-in if the recognition result contains preset keywords, call the target plug-in tool that matches the preset keywords to perform task processing on the data in the question text, and output the processing results. The task processing includes document parsing, data visualization and / or table extraction.
[0124] The professional question and answer module 64 is used to determine that the question and answer intention is a dialogue question and answer if the recognition result does not contain preset keywords, detect the operation results of the professional question and answer options when the user enters the question text, and determine the current question and answer type based on the operation results, input the recognition result into the target resource library matching the current question and answer type for matching, and output the target resource associated with the recognition result.
[0125] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0126] In this embodiment, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0127] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0128] Optionally, in this embodiment, the processor may be configured to execute the following steps S1 to S4 through a computer program.
[0129] S1. Receive a question text input by a user.
[0130] S2. Perform semantic recognition on the question text based on the pre-built large model to obtain a recognition result, which represents the user's question and answer intention.
[0131] S3. If the recognition result contains preset keywords, the question-answering intention is determined by using a tool plug-in, calling a target plug-in tool that matches the preset keywords to perform task processing on the data in the question text, and outputting the processing results. The task processing includes document parsing, data visualization and / or table extraction.
[0132] S4. If the recognition result does not contain preset keywords, it is determined that the question and answer intention is a dialogue question and answer. The operation results of the professional question and answer options when the user enters the question text are detected, and the current question and answer type is determined based on the operation results. The recognition result is input into the target resource library that matches the current question and answer type for matching, and the target resource associated with the recognition result is output.
[0133] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.
[0134] In addition, in combination with the method provided in the above embodiment, a storage medium may be provided in this embodiment to implement the method. The storage medium stores a computer program; when the computer program is executed by a processor, any one of the vertical knowledge question-answering methods based on a large model in the above embodiment is implemented.
[0135] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer executes each function or step executed by the processor in the above method embodiment.
[0136] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.
[0137] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.
[0138] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.
[0139] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.
Claims
1. A vertical knowledge question answering method based on a large model, characterized in that: The method comprises: Receive the question text entered by the user; Performing semantic recognition on the question text based on a pre-built large model to obtain a recognition result, wherein the recognition result represents the user's question-answering intention; If the recognition result contains preset keywords, determining that the question-answering intention is to use a tool plug-in, calling a target plug-in tool that matches the preset keywords to perform task processing on the data in the question text, and outputting a processing result, wherein the task processing includes document parsing, data visualization and / or table extraction; If the recognition result does not contain preset keywords, it is determined that the question and answer intention is a dialogue question and answer, and the operation results of the user on the professional question and answer options when entering the question text are detected, and the current question and answer type is determined based on the operation results. The recognition result is input into the target resource library matching the current question and answer type for matching, and the target resource associated with the recognition result is output.
2. The large model-based vertical knowledge question answering method according to claim 1 is characterized in that: The detecting the operation result of the user on the professional question and answer option when inputting the question text, determining the current question and answer type based on the operation result, and inputting the recognition result into a target resource library matching the current question and answer type for matching, comprises: Displaying a first interface, wherein the first interface includes a professional question and answer option; Detecting whether the user performs a selection operation on the professional question and answer option when inputting the question text, If yes, determining the current question and answer type as a professional question and answer based on the operation result, and inputting the recognition result into a target resource library matching the professional question and answer option for matching; The method further comprises: If not, the current question and answer type is determined to be a common question and answer based on the operation result, and the recognition result is input into a preset common language large model for conversation answering.
3. The vertical knowledge question answering method based on a large model according to claim 2 is characterized in that: The detecting whether to perform a selection operation on the professional question and answer option when the user inputs the question text includes: It is detected whether a selection operation of a knowledge base question and answer option and / or a network search option is performed when the user inputs the question text.
4. The vertical knowledge question answering method based on a large model according to claim 2 is characterized in that: Before receiving the question text input by the user, the method further includes: Acquiring geoscience literature data, extracting knowledge points from the geoscience literature data, and storing the knowledge points in a knowledge base; In the case where the professional question and answer option is a knowledge base question and answer option, inputting the recognition result into a target resource library matching the professional question and answer option for matching, and outputting a target resource associated with the recognition result, comprises: The recognition result is input into the knowledge base to be matched with the knowledge point, and the geological literature data associated with the recognition result is screened out based on the matching degree between the recognition result and the knowledge point, and the geological literature data associated with the recognition result is returned to the user as the target resource.
5. The vertical knowledge question answering method based on a large model according to claim 2 is characterized in that: In the case where the professional question and answer option is a network search option, inputting the recognition result into a target resource library matching the professional question and answer option for matching, and outputting a target resource associated with the recognition result, comprises: Inputting the recognition result into a search engine and performing a search in the search engine; According to the relevance of the search results, the searched references are associated with the target resource and returned to the user.
6. The large model-based vertical knowledge question answering method according to claim 1 is characterized in that: Before receiving the question text input by the user, the method further includes: Acquire geoscience literature data, perform enhancement processing on the original large model based on the geoscience literature data, and train to obtain the pre-built large model; After outputting the processing result or outputting the target resource associated with the recognition result, the method further includes: Receive session result feedback information; The pre-built large model is incrementally learned based on the session result feedback information.
7. The large model-based vertical knowledge question answering method according to claim 1 is characterized in that: After receiving the question text input by the user, the method further includes: Obtaining the functional permissions and data permissions of the user; Acquire a plug-in tool that matches the functional permission from a plug-in tool library to obtain the target plug-in tool; Resources matching the data authority are acquired from the resource library, and the target resource library is constructed with the resources.
8. A vertical knowledge question-answering device based on a large model, characterized in that: include: A text input module, used to receive question text input by the user; A semantic recognition module, used to perform semantic recognition on the question text based on a pre-built large model to obtain a recognition result, wherein the recognition result represents the user's question-answering intention; A tool calling module, for determining that the question-answering intention is to use a tool plug-in if the recognition result contains a preset keyword, calling a target plug-in tool that matches the preset keyword to perform task processing on the data in the question text, and outputting a processing result, wherein the task processing includes document parsing, data visualization and / or table extraction; A professional question and answer module is used to determine that the question and answer intention is a dialogue question and answer if the recognition result does not contain preset keywords, detect the operation results of the professional question and answer options when the user enters the question text, and determine the current question and answer type based on the operation results, input the recognition result into the target resource library matching the current question and answer type for matching, and output the target resource associated with the recognition result.
9. A terminal comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the large model-based vertical knowledge question-answering method described in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the large model-based vertical knowledge question-answering method according to any one of claims 1 to 7 when running.
Citation Information
Patent Citations
Interface calling method and device, electronic equipment and computer readable storage medium
CN115658186A
Natural language query method and device
CN118312604A
Knowledge question-answering method and system for wading laws and regulations
CN118349660A
Question and answer method and system
CN118377880A
Water conservancy knowledge intelligent question and answer method and device based on large model and medium
CN118535703A