A large model-based vertical knowledge question answering method and device

By using large-scale model semantic recognition and resource library matching, the problems of unintelligent and inaccurate vertical knowledge question answering have been solved, realizing efficient knowledge processing and question answering services in professional fields and improving scientific research efficiency.

CN119621889BActive Publication Date: 2026-01-20ZHEJIANG LAB
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411667925.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2026-01-20
Estimated Expiration
2044-11-21

AI Technical Summary

Technical Problem

Existing large-scale models suffer from a lack of intelligence and accuracy in vertical knowledge question answering, failing to effectively provide knowledge processing and question answering services for professional fields.

Method used

The vertical knowledge question-answering method based on a large model receives the question text input by the user, performs semantic recognition, judges the question-answering intent, and calls the tool plugin to perform task processing, such as document parsing and data visualization, if the preset keywords are contained. Otherwise, it detects professional question-answering options, selects the corresponding resource library for matching, and outputs the relevant target resources.

Benefits of technology

It improves the accuracy and professionalism of vertical knowledge Q&A, and can provide efficient knowledge processing and Q&A services in professional fields, thereby improving the data processing and analysis efficiency of researchers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621889B_ABST
    Figure CN119621889B_ABST
Patent Text Reader

Abstract

The application relates to a vertical knowledge question answering method and device based on a large model, applied to the field of information technology, and the method comprises the following steps: receiving a user input question text; performing semantic recognition on the question text based on a pre-constructed large model to obtain a recognition result; in the case where the recognition result contains a preset keyword, calling a target plug-in tool matched with the preset keyword to perform task processing on the question text, and outputting a processing result; in the case where the recognition result does not contain the preset keyword, detecting an operation result of a professional question answering option when the user inputs the question text, determining a current question answering type based on the operation result, inputting the recognition result into a target resource library matched with the current question answering type for matching, and outputting a target resource. Through the application, the technical problems of unintelligent and inaccurate vertical knowledge question answering in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of information technology, in particular to a vertical knowledge question answering method and device based on a large model. BACKGROUND

[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 tens of billions or even trillions of parameters. They can learn rich language representations and world knowledge through pre-training on large-scale datasets, and thus exhibit excellent performance on various tasks. Currently, large models have shown broad application prospects in multiple fields, including but not limited to natural language processing (NLP), computer vision (CV), speech recognition (ASR), etc. More and more enterprises and research institutions are beginning to try to integrate large models into their own products and services to improve product intelligence and user experience. The application of mainstream large models mainly focuses on general scenarios and solving general problems, but there are generally problems of unintelligence and inaccuracy in vertical knowledge question answering, so it cannot well provide applications containing massive professional literature, professional knowledge understanding, literature processing, and professional task processing for researchers. SUMMARY

[0003] The embodiments of the present application provide a vertical knowledge question answering method and device based on a large model to solve the technical problems of unintelligence and inaccuracy in vertical knowledge question answering in the prior art.

[0004] To achieve the above-mentioned purpose, the embodiments of the present application adopt the following technical solutions:

[0005] In a first aspect, the embodiments of the present application provide a vertical knowledge question answering method based on a large model, which comprises:

[0006] receiving a user input question text;

[0007] performing semantic recognition on the question text based on a pre-constructed large model to obtain a recognition result, the recognition result representing a user's question and answer intention;

[0008] if the recognition result contains a preset keyword, determining that the question and answer intention is to use a tool plug-in, calling a target plug-in tool matched with the preset keyword to perform task processing on data in the question text, outputting a processing result, the task processing including document parsing, data visualization, and / or table extraction;

[0009] If the preset keyword is not included in the recognition result, it is determined that the question and answer intention is a dialogue question and answer, an operation result of a user inputting the question text on a professional question and answer option is detected, a current question and answer type is determined based on the operation result, the recognition result is input into a target resource library matched with the current question and answer type for matching, and a target resource associated with the recognition result is output.

[0010] With reference to the first aspect, in a possible design, the detecting an operation result of a user inputting the question text on the professional question and answer option, and determining a current question and answer type based on the operation result, and inputting the recognition result into a target resource library matched with the current question and answer type for matching, includes:

[0011] displaying a first interface including a professional question and answer option;

[0012] detecting whether a selection operation on the professional question and answer option is performed when the user inputs the question text,

[0013] if yes, determining that a current question and answer type is a professional question and answer based on the operation result, and inputting the recognition result into a target resource library matched with the professional question and answer option for matching;

[0014] The method further includes:

[0015] if no, determining that a current question and answer type is a common question and answer based on the operation result, and inputting the recognition result into a preset common language large model for conversational answering.

[0016] With reference to the first aspect, in a possible design, the detecting whether a selection operation on the professional question and answer option is performed when the user inputs the question text includes:

[0017] detecting whether a selection operation on the knowledge base question and answer option and / or the network search option is performed when the user inputs the question text.

[0018] With reference to the first aspect, in a possible design, before receiving the question text input by the user, the method further includes:

[0019] obtaining geoscience literature data, extracting knowledge points from the geoscience literature data, and storing the knowledge points in a knowledge base;

[0020] In a case where the professional question and answer option is a knowledge base question and answer option, the inputting the recognition result into a target resource library matched with the professional question and answer option for matching, and outputting a target resource associated with the recognition result includes:

[0021] The identification result is input into the knowledge base to match the knowledge point, geoscience literature data associated with the identification result is filtered based on a matching degree of the identification result and the knowledge point, the geoscience literature data associated with the identification result is taken as a target resource, and the target resource is returned to the user.

[0022] With reference to the first aspect, in a possible design, in a case where the professional question answering option is a network search option, the inputting the identification result into the target resource library matched with the professional question answering option to output the target resource associated with the identification result includes:

[0023] The identification result is input into a search engine, and a search is performed in the search engine.

[0024] According to a relevance of a search result, the reference literature searched is associated in the target resource, and the target resource is returned to the user.

[0025] With reference to the first aspect, in a possible design, before the receiving the question text input by the user, the method further includes:

[0026] The geoscience literature data is acquired, the original large model is enhanced based on the geoscience literature data, and the pre-constructed large model is trained to obtain.

[0027] After the outputting the processing result or the target resource associated with the identification result, the method further includes:

[0028] The session result feedback information is received.

[0029] The pre-constructed large model is incrementally learned based on the session result feedback information.

[0030] With reference to the first aspect, in a possible design, after the receiving the question text input by the user, the method further includes:

[0031] The function authority and the data authority of the user are acquired.

[0032] The plug-in tool matched with the function authority is acquired from a plug-in tool library to obtain the target plug-in tool.

[0033] The resource matched with the data authority is acquired from a resource library, and the target resource library is constructed by using the resource.

[0034] The second aspect, the embodiments of the present application provide a vertical knowledge question answering device based on a large model, comprising:

[0035] The text input module is configured to receive a question text input by a user.

[0036] a semantic recognition module, configured to perform semantic recognition on the question text based on a pre-constructed large model to obtain a recognition result, the recognition result representing a question and answer intention of the user;

[0037] a tool calling module, configured to determine that the question and answer intention is to use a tool plug-in if the recognition result contains a preset keyword, call a target plug-in tool matched with the preset keyword to perform task processing on data in the question text, output a processing result, and the task processing includes document analysis, data visualization, and / or table extraction;

[0038] a professional question and answer module, configured to determine that the question and answer intention is a dialogue question and answer if the recognition result does not contain a preset keyword, detect an operation result of a user on a professional question and answer option when inputting the question text, determine a current question and answer type based on the operation result, input the recognition result into a target resource library matched with the current question and answer type for matching, and output a target resource associated with the recognition result.

[0039] In a third aspect, an embodiment of the present application provides a terminal, including a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to execute the method in the first aspect and possible design manners thereof.

[0040] In a fourth aspect, an embodiment of the present application provides a storage medium, which stores a computer program, and the computer program is configured to execute the method in the first aspect and possible design manners thereof when running.

[0041] Compared with the prior art, the method and device for vertical knowledge question answering based on a large model provided in the embodiments of the present application receive a user input question text; perform semantic recognition on the question text based on a pre-constructed large model to obtain a recognition result, which represents the user's question and answer intention; if the recognition result contains a preset keyword, it is determined that the question and answer intention is to use a tool plug-in, a target plug-in tool matched with the preset keyword is called to perform task processing on the data in the question text, and a processing result is output, the task processing including document analysis, data visualization and / or table extraction; if the recognition result does not contain the preset keyword, it is determined that the question and answer intention is a dialogue question and answer, an operation result of the user on a professional question and answer option when inputting the question text is detected, and the current question and answer type is determined based on the operation result, the recognition result is input into a target resource library matched with the current question and answer type for matching, and a target resource associated with the recognition result is output. The present application performs semantic recognition on the user's question, determines the user's real intention, and then calls a plug-in tool for performing corresponding task processing. Questions that are not matched to the corresponding tool plug-in are classified into a text question and answer task. In the text question and answer task, the question content is analyzed as to whether the question needs to be answered using professional knowledge according to whether the user selects a professional question and answer option. For knowledge that needs to be answered using professional knowledge, a target resource library matched with the reinforcement question and answer function is matched, the target resource library includes professional literature capable of answering vertical knowledge related questions, and therefore can be used to answer the user's question from a professional perspective. In this way, with the aid of big data, professional task processing and professional question and answer of scientific research knowledge can be realized at the same time, and the problem of inaccurate knowledge question and answer for vertical knowledge is solved. In addition, the large model recognizes the user's intention, calls an automatic tool to process the data in the question and answer process, assists the scientific research personnel in processing the literature, and improves the efficiency of data processing and analysis.

[0042] The details of one or more embodiments of the present application are presented in the following drawings and description to make other features, objects and advantages of the present application more apparent. BRIEF DESCRIPTION OF DRAWINGS

[0043] The drawings described herein are intended to provide further understanding of the present application, and form a part of the present application. The illustrative embodiments of the present application and their description serve 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 the embodiments of the present application is shown;

[0045] Figure 2 A flowchart of a method for vertical knowledge question answering based on a large model provided in the embodiments of the present application is shown;

[0046] Figure 3A system architecture diagram of a vertical knowledge question answering method based on a large model is shown.

[0047] Figure 4 A structural block diagram of a scientific research tool system is shown.

[0048] Figure 5 A flowchart of a question answering method is shown.

[0049] Figure 6 A structural block diagram of a vertical knowledge question answering device based on a large model 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 explained below in conjunction with the drawings and embodiments.

[0051] Unless otherwise defined, technical terms or scientific terms used in the present application shall have the general meaning understood by a person with ordinary skill in the art to which the present application belongs. In the present application, "one", "a", "an", "the", "these" and similar words do not represent a quantitative limitation, and they can be singular or plural. In the present application, the terms "include", "contain", "have" and any variants thereof have the purpose of covering non-exclusive inclusion; for example, a process, method and system, product or device containing a series of steps or modules (units) are not limited to the listed steps or modules (units), but can include steps or modules (units) not listed, or can include other steps or modules (units) inherent to the process, method, product or device. In the present application, the terms "connected", "connected", "coupled" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. In the present application, "multiple" means two or more. The association between the associated objects is described as "and / or", which means that there can be three relationships, for example, "A and / or B" can mean that A exists alone, A and B exist together, and B exists alone. In general, the character " / " represents an "or" relationship between the associated objects. In the present application, the terms "first", "second", "third" and the like are only used to distinguish similar objects, and do not represent a specific order for the objects.

[0052] The various technologies described in the embodiments of this application can be used to enhance question answering for vertical knowledge in professional fields. Taking the field of geoscience as an example, a scientific research tool platform is constructed by combining geoscience knowledge and the capabilities of large-scale models. This platform obtains user questions in a dialogue-based question-and-answer manner, analyzes them, and then either calls upon tools or professional knowledge bases to resolve user questions. This platform improves users' scientific research efficiency and supports scientific research work.

[0053] Current large-scale model applications mainly focus on general scenarios and solving general problems, while they generally suffer from unintelligent and inaccurate answers for vertical knowledge questions. For example, when users ask large-scale models questions related to geoscience, the models provide overly general answers that lack sufficient detail and geoscience background knowledge.

[0054] In view of this, the method provided in this application, through text semantic analysis, can automatically determine whether to call a dedicated tool plugin based on the question text and its professional nature. By controlling the question-answering enhancement switch, users can decide whether to enable the question-answering enhancement function. If the user selects the question-answering enhancement function, the answer can be improved by introducing a domain-specific knowledge base on top of the general model. This approach can improve the depth and quality of question-answering, resulting in higher accuracy for questions and answers targeting specific vertical knowledge areas.

[0055] The vertical knowledge question-answering method based on a large model provided in this application can be executed on a terminal, computer device, or cloud server. Taking running on a terminal as an example, Figure 1 A hardware structure block diagram of a terminal provided in an embodiment of this application is shown. Figure 1 As shown, a terminal may include one or more ( Figure 1 Only one processor 102 is shown in the diagram, and a memory 104 for storing data. The processor 102 may be, 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. The input / output device 108 may be a display screen, on which the query text, the output target resource, and the processing result are displayed. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the terminal described above. For example, the terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0056] The memory 104 can be used to store computer programs, such as software programs of application software and modules, and the processor 102 can perform various functional applications and data processing, i.e., implement the above method, by running the computer programs stored in the memory 104. The memory 104 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, which can be connected to the terminal through a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0057] The transmission device 106 is configured to receive or send data via a network. A specific example of the above network can include a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (NIC), which can be connected to other network devices through a base station so as to be able to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is configured to communicate with the Internet in a wireless manner.

[0058] The embodiment of the present application 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 is shown, as shown in the figure, the method comprises steps S201 to S204. Figure 2

[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, a computer device or other terminals, including characters and / or symbols. In some embodiments, the question text can also be a question text converted from a gesture action or a voice instruction of the user, that is, the user can ask the large model by inputting character information; or the user can ask the large model by inputting gestures, voice instructions, etc.

[0061] Step S202, performing semantic recognition on the question text based on a pre-constructed large model to obtain a recognition result, the recognition result representing a question and answer intention of the user.

[0062] ​The pre-constructed large model analyzes the semantics of the question text based on a statistical grammar or a rule grammar structure, and then converts the question text into a recognition result. In this step, the large model identifies whether the user uses the target plug-in tool and which target plug-in tool is used. Specifically, the target plug-in tool includes a table extraction tool, a document parsing tool, a map data visualization tool, etc. The document parsing tool can read and understand the document and extract the content. The map data visualization tool can draw map data according to the data provided by the user. The table extraction tool extracts table content from the picture.

[0063] The names of these tools can be used as preset keywords. The large model identifies whether the question text contains the keywords to obtain a recognition result. 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] For example, when the user inputs “parse the following document”, the large model performs semantic recognition to obtain a recognition result representing “use the document parsing tool”. The document parsing tool is a preset keyword, and the recognition result contains the preset keyword.

[0065] Step S203, if the recognition result contains the preset keyword, it is determined that the question and answer intention is to use the tool plug-in, and the target plug-in tool matched with the preset keyword is called to process the data in the question text, output the processing result, and the task processing includes document parsing, data visualization and / or table extraction.

[0066] For example, the user uploads an article and asks “please display table3 in markdown format from this article”. The large model is called for semantic recognition. The large model identifies the keyword table and determines that the table extraction tool needs to be called according to the overall semantics. Finally, the table extraction tool returns to the user: the markdown (or lightweight markup language) format table extracted from the article.

[0067] In this example, the preset keyword is table, the target plug-in tool is the table extraction tool, the task processing is to extract the markdown format table, and the output processing result is the markdown format table.

[0068] In some embodiments, after receiving the user input question text, the method further comprises: obtaining the function authority and data authority of the user; obtaining the plug-in tool matched with the function authority from the plug-in tool library to obtain the target plug-in tool; and obtaining the resource matched with the data authority from the resource library to obtain the target resource library. The data privacy is protected in the manner of setting the authority to prevent improper use or leakage.

[0069] The data authority includes the use authority of the generated conversation data, the file data generated by the conversation, the personal literature data uploaded by the user of the personal knowledge base, and all or part of the literature data of the public knowledge base. The function authority includes the use authority of the question and answer function of the multi-language large model, the knowledge base enhanced question and answer function, the network search enhanced question and answer function, the document parsing function, the data visualization function, and the table extraction function.

[0070] The user is divided into an ordinary user and an administrator user. The administrator user manages the data authority and the function authority of the ordinary user through a management background. The set data authority includes: user self-owned data query storage operation according to a user-specific ID; user self-owned data only accessible by the user; public data has a corresponding division list according to different divisions, and each item corresponds to a different division data range; each user has a data authority list owned by the user, and the data range of each user can be independently configured. The set function authority includes: setting a complete function authority list, and each item in the list is a minimum function point that can be configured; each user corresponds to a function authority list, and the function of each user can be independently configured; the server provides corresponding services according to whether the function point authority is owned.

[0071] In step S204, if the preset keyword is not included in the recognition result, it is determined that the question and answer intention is a dialogue question and answer. The operation result of the user input question text on the professional question and answer option is detected, and the current question and answer type is determined based on the operation result. The recognition result is input into the target resource library matched with the current question and answer type for matching, and the target resource associated with the recognition result is output.

[0072] In this step, the professional question and answer option is set, and whether the user needs to start the enhanced question and answer function is detected based on the operation result of the professional question and answer option. When the user inputs the question text and selects the professional question and answer option, it is determined that the enhanced question and answer function needs to be provided for the user. When the user inputs the question text and does not select the professional question and answer option, it is determined that the enhanced question and answer function does not need to be provided for the user, which can be understood as the ordinary question and answer with the user.

[0073] The professional question answering (i.e., enhanced question answering) includes: training the original large model with vertical knowledge points to obtain a large model, and the large model has a high accuracy in answering questions about vertical knowledge. Specifically, the large model trained with vertical knowledge points has rich geoscience background knowledge, which can better analyze the context and details of geoscience field problems, avoid conflicts with knowledge in other fields, and ensure that the problem is accurately understood.

[0074] The professional question answering also includes: searching for an answer in a knowledge base (or search engine) containing vertical knowledge and returning the answer to the user. The vertical knowledge includes geoscience background knowledge, such as literature knowledge in the geoscience field. The literature data in the knowledge base comes from expert data, academic articles, practical experience, etc. in the field, so when answering complex problems in the geoscience field, it can draw on and reproduce expert-level judgments and knowledge, and thus the searched answer is more targeted.

[0075] In some embodiments, a professional question answering option can be displayed on the interface for inputting the question text. Specifically, a first interface is displayed, and the first interface includes a professional question answering option. When the user inputs the question text, it is detected whether a selection operation on the professional question answering option is performed. If so, the current question answering type is determined to be professional question answering based on the operation result, and the recognition result is input into a target resource library matched with the professional question answering option for matching.

[0076] In this embodiment, when the large model identifies that the user does not need to use the tool plug-in (i.e., the user needs to start the dialogue question answering), it further detects whether the user needs to start enhanced question answering or ordinary question answering. If the user needs to start enhanced question answering, the user selects the professional question answering option by checking, clicking, or the like. The server determines the current question answering type to be professional question answering based on the user's selection, and then the server starts the enhanced question answering function for the user, i.e., uses a professional knowledge base and a browser, and outputs an answer by or a large model.

[0077] In some embodiments, if the user does not perform the selection operation on the professional question answering option, the current question answering type is determined to be ordinary question answering based on the operation result, and the recognition result is input into a preset ordinary language large model for conversational answering.

[0078] As an example, the professional question answering option can be set to multiple, such as including a search engine option and a knowledge base option. The above detection of whether the user performs the selection operation on the professional question answering option when inputting the question text includes detection of whether the user performs the selection operation on the knowledge base question answering option and / or the network search option when inputting the question text.

[0079] In this embodiment, the professional question answering options include knowledge base question answering options and / or network search options, wherein the knowledge base question answering options correspond to a knowledge base containing vertical knowledge, and the network search options correspond to a search engine.

[0080] The knowledge base can further include a personal knowledge base and a public knowledge base, and the knowledge base can be composed of geoscience literature data. The personal knowledge base stores literature data of a user personally, or knowledge points extracted from the literature data, and the public knowledge base stores literature data of all users, or knowledge points extracted from the literature data. The literature in the public knowledge base can also be partially divided according to sub-disciplines to support users to select in the preferred knowledge range when using.

[0081] The following continues to describe the reinforced question answering by taking the knowledge base as an example. 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 answering options are knowledge base question answering options, the above-mentioned inputting the recognition result into the target resource library matched with the professional question answering options for matching and outputting the target resource includes: inputting the recognition result into the knowledge base for matching with the knowledge points, screening geoscience literature data associated with the recognition result based on the matching degree of the recognition result and the knowledge points, taking the geoscience literature data associated with the recognition result as the target resource, and returning to the user.

[0083] In this embodiment, a set of related documents screened and approved by geoscience professionals is constructed and stored in the server in the form of efficient indexing, and the knowledge of the large model result is enhanced when the question is entered.

[0084] The following continues to describe the reinforced question answering by taking the search engine as an example. In the case where the professional question answering options are network search options, the above-mentioned inputting the recognition result into the target resource library matched with the professional question answering options for matching and outputting the target resource includes: inputting the recognition result into the search engine for searching in the search engine; and associating the searched reference literature in the target resource according to the relevance of the search result, and returning to the user.

[0085] In some embodiments, before receiving the question text input by the user, the method further includes: obtaining geoscience literature data, enhancing the original large model based on the geoscience literature data, and training to obtain a pre-constructed large model; and after outputting the processing result or the target resource, the method further includes: receiving session result feedback information; and based on the session result feedback information, incrementally learning the pre-constructed large model.

[0086] Specifically, the session result feedback information represents the satisfaction of the user to the output result of the large model. If the user is not satisfied with the output result, the large model will perform incremental learning to improve the accuracy of the reply in the answering process.

[0087] In the embodiments described in steps S201 to S204, the questioning text input by the user is received, the questioning text is subjected to semantic recognition based on a pre-constructed large model to obtain a recognition result, the recognition result representing the user's question and answer intention, if the recognition result contains a preset keyword, it is determined that the question and answer intention is to use a tool plug-in, a target plug-in tool matched with the preset keyword is called to process the data in the questioning text, and a processing result is output, the task processing including document analysis, data visualization and / or table extraction, if the recognition result does not contain the preset keyword, it is determined that the question and answer intention is a dialogue question and answer, the operation result of the user when inputting the questioning text to the professional question and answer option is detected, and the current question and answer type is determined based on the operation result, the recognition result is input into a target resource library matched with the current question and answer type for matching, and a target resource associated with the recognition result is output. The present application performs semantic recognition on the user's question, judges the user's real intention, and then calls a plug-in tool for performing a corresponding task to process the task, the questions that are not matched to the corresponding tool plug-in are classified into text question and answer tasks, the question content in the text question and answer task is analyzed as to whether the question needs to be answered using professional knowledge according to whether the user selects a professional question and answer option, and for the knowledge that needs to be answered using professional knowledge, a target resource library matched with the reinforcement question and answer function is matched, the target resource library includes professional literature capable of answering questions related to vertical knowledge, and therefore can be used to answer the user's question from a professional perspective. In this way, with the aid of big data, the professional task processing and professional question and answer of scientific research knowledge can be realized at the same time, and the problem of inaccurate knowledge question and answer for vertical knowledge is solved, in addition, the large model recognizes the user's intention and calls an automated tool to process the data in the question and answer process, assisting the scientific research personnel in processing the literature, and improving the efficiency of data processing and analysis.

[0088] The large model-based vertical knowledge question and answer method provided by the embodiments of the present application will be described and explained below through specific examples.

[0089] The present application enhances the training of the large model through professional knowledge, and further enhances the answer of the large model through the knowledge base.

[0090] The enhancement processing for the large model includes: enhancing the large model through professional knowledge for training, improving the understanding and processing ability of the large enhanced model for professional field (such as earth science) tasks; collecting professional literature such as academic papers and industry reports corresponding to the discipline, and converting them into a data format suitable for large model training through data cleaning, labeling and other processing methods; the trained large model is continuously adjusted and optimized in the training strategy through user feedback on the conversation results during use, in order to optimize the professional relevance and accuracy of the large model answers. For example, even if the large model is pre-trained with professional knowledge, it may still have understanding bias for similar and easily confused knowledge points, resulting in answers that do not meet the expected results. Through user feedback on such incorrect answers, the same errors can be reduced or avoided. The large model uses the Transformer architecture, and can continuously optimize the model's ability through daily data training of the model in the use process through model incremental updating.

[0091] The enhancement processing of introducing a knowledge base to improve the relevance of the large model answers includes: constructing a knowledge base for storing structured and unstructured data. The knowledge base is equipped with an efficient retrieval engine: recording complete version information of the data, quickly locating the information. The combination of public knowledge base in professional field and private knowledge base of individual user provides personalized knowledge optimization for users.

[0092] Specifically, the knowledge base is constructed based on ElasticSearch (ES), and when the literature selected by the expert is written into ES, the literature is parsed into a structured structure that can be quickly analyzed. Specifically, each article recorded in the knowledge base can include multiple knowledge points, and when the user requests to enter the knowledge base, the literature with a certain correlation degree will be selected according to the matching degree of the request keyword and the knowledge points contained in the articles in the knowledge base. For example, the knowledge base contains three articles X contains knowledge points A (twice), B (ten times), C (once), Y contains knowledge points A (eight times), C (ten times), E (four times), Z contains knowledge points B (nine times), C (three times), D (fifty times), E (twelve times). When requesting A, Y and X are returned, when requesting B, X and Z are returned, when requesting C, Y and X are returned, when requesting D, Z is returned, and when requesting E, Z and Y are returned.

[0093] Figure 3 A system architecture diagram of a large model-based vertical knowledge question answering method provided by an embodiment of the application is shown in FIG. 1. Figure 3As shown, the application system portal project, the agent project, and the large model algorithm project of the method are shown. All services are deployed on a cloud service, wherein the portal project and the agent project are deployed in a Kubernetes (a container orchestration platform) provided by the cloud service, and the algorithm project is deployed in a GPU cloud server. The cloud service can be conveniently standardized and quickly scaled, thereby improving the overall stability and availability of the service. For security considerations, only the portal project is exposed to the outside in the overall service, and the other agent project and large model project only expose services in the same cluster.

[0094] The portal project is the only entrance exposed to the outside by the entire system and provides a user interface for users to operate as a business layer. In addition, the portal project is a data storage layer inside the system, which includes logic for direct communication and interaction with middleware. The middleware can access a database management system MySQL, an object storage service (OSS), a log service SLS, an ES, and the like, and thus provides an interface for interaction with the middleware for other projects, and can maintain, manage, and count requests of the entire system.

[0095] The agent project is an extension of the business layer in the entire system, and is a central system for connecting large models, managing tool libraries, and analyzing user tasks. The agent project provides tools and large model services for the portal project, routes tasks of upstream requests to corresponding tools or large model services, or third-party services, and the third-party services provide a mathematical formula recognizer, a search engine, and the like.

[0096] The large model algorithm project is an infrastructure layer project deployed by the system itself, and deploys a model pre-trained with professional knowledge. The large model algorithm project provides a semantic recognition service for pre-processing user tasks, a knowledge question and answer service for answering specific problems, and a knowledge fusion service for combining additional knowledge and model answers.

[0097] Figure 4 A structural block diagram of a scientific research tool system provided by an embodiment of the present application is shown in FIG. 1. Figure 4 As shown, the portal part includes two modules of a user and a session, which together constitute a system front desk provided for 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, and ensures that verified users can access system resources;

[0099] User registration and audit: a registration and audit mechanism is provided to ensure that registered users are trusted scientific researchers.

[0100] The main capabilities of the conversation module include: conversation management: the conversation module records the interaction history of the user with the system, facilitating subsequent queries and references; context awareness: based on user historical input and behavior patterns, providing context-related suggestions and services; multi-round conversation: supporting continuous multi-round dialogue, enabling users to complete complex tasks in one session.

[0101] The agent part includes all background systems, including prompt-model management (or prompt word model management), knowledge base, tool library, search engine (Web search). As the core part of the system, it processes user's actual request and provides the implementation and management of main functions.

[0102] The main capabilities of the prompt-model management module include:

[0103] Model training and updating: support fine-tuning based on pre-trained large models to adapt to the specific needs of the geosciences field.

[0104] Model deployment and management: provide model deployment, monitoring and version control to ensure the stability and maintainability of the service.

[0105] Prompt engineering: design and manage prompt templates to optimize the response quality and efficiency of the model.

[0106] The main capabilities of the knowledge base module include:

[0107] Data storage and indexing: build and maintain a professional knowledge base in the field of geosciences, including terms, 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 search capabilities of the system.

[0111] Result filtering and sorting: filter and sort search results based on relevance, authority and other factors.

[0112] The main capabilities of the tool library module include:

[0113] General third-party tool integration: general and resource-intensive functions such as image recognition and document parsing are implemented through third-party services;

[0114] Integration of professional field tools: professional functions such as map data visualization can be implemented through self-development.

[0115] Figure 5A flow chart of a question and answer method provided by an embodiment of the application is shown in FIG. 1. As shown in FIG. 1, in the method, a user sends a conversation message on a portal, an agent engine receives the user input, and then judges the function authority and data authority possessed by the user, and then performs semantic recognition. Figure 5

[0116] The message sent by the user is divided into two parts for parameter recognition. One is to perform semantic recognition through a first-layer large model, and the other is to judge the check state of a switch when the user sends the message.

[0117] The preset keyword is recognized to determine whether the user needs to perform text question and answer or use a tool plug-in. In the text question and answer, whether the knowledge base switch or the Web search switch is checked when the user sends the question text is determined to determine whether the user needs to enter the normal question and answer, or open the knowledge base, or open the Web search. The knowledge base and the Web search are used to integrate the specified knowledge base content or the Web search content in the large model reply. When the knowledge base switch is opened, the user needs to select the personal or public knowledge base, and can specifically subdivide the part of the secondary discipline knowledge in the knowledge base. The keyword in the user question is used to search in the specified knowledge base, and finally integrated in the answer, and the associated literature information is also attached as reference after the answer. When the WebSearch switch is opened, 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 by the user, and after selecting the specified engine, the answer is also combined with the searched Web content, and the corresponding reference content source is displayed in the reference.

[0118] In the tool plug-in, functions such as document parsing, data visualization, and table extraction are provided. The plug-in tool corresponding to the preset keyword is directly called to perform task processing.

[0119] In the embodiments of the application, a vertical knowledge question and answer device based on a large model is also provided. The device is used to implement the above embodiments and preferred embodiments, and details are not repeated. The terms "module", "unit", "sub-unit" and the like used below can be a combination of software and / or hardware that can implement a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware is also possible and is conceived.

[0120] Figure 6 A structure block diagram of a vertical knowledge question and answer device based on a large model provided by an embodiment of the application is shown in FIG. 2. As shown in FIG. 2, the device includes: Figure 6

[0121] The text input module 61 is used to receive the question text input by the user.

[0122] ​​The semantic recognition module 62 is configured to perform semantic recognition on the question text based on a pre-constructed large model to obtain a recognition result, the recognition result representing the question and answer intention of the user.

[0123] The tool calling module 63 is configured to determine that the question and answer intention is to use a tool plug-in if the recognition result contains a preset keyword, call a target plug-in tool matched with the preset keyword to perform task processing on data in the question text, and output a processing result, the task processing including document analysis, data visualization, and / or table extraction.

[0124] The professional question and answer module 64 is configured to determine that the question and answer intention is a dialogue question and answer if the recognition result does not contain the preset keyword, detect an operation result of the user on a professional question and answer option when inputting the question text, determine a current question and answer type based on the operation result, input the recognition result into a target resource library matched with the current question and answer type for matching, and output a target resource associated with the recognition result.

[0125] It should be noted that each of the above modules can be a functional module or a program module, and can be implemented by software or hardware. For the modules implemented by hardware, each of the above modules can be located in the same processor; or each of the above modules can be located in different processors in any combination.

[0126] In the embodiment, an electronic device is also provided, including a memory and a processor, the memory storing a computer program, and the processor being configured to execute the computer program to perform the steps in any of the above method embodiments.

[0127] Optionally, the electronic device can further include a transmission device and an input and output device, wherein the transmission device is connected with the processor, and the input and output device is connected with the processor.

[0128] Optionally, in the embodiment, the processor can be configured to execute the following steps S1 to S4 through the computer program.

[0129] S1, receiving a question text input by a user.

[0130] S2, performing semantic recognition on the question text based on a pre-constructed large model to obtain a recognition result, the recognition result representing the question and answer intention of the user.

[0131] S3, determining that the question and answer intention is to use a tool plug-in if the recognition result contains a preset keyword, calling a target plug-in tool matched with the preset keyword to perform task processing on data in the question text, and outputting a processing result, the task processing including document analysis, data visualization, and / or table extraction.

[0132] S4, if the preset keyword is not included in the recognition result, it is determined that the question and answer intention is a dialogue question and answer, an operation result of the user input on a professional question and answer option is detected when asking a text, and a current question and answer type is determined based on the operation result, the recognition result is input into a target resource library matched with the current question and answer type for matching, and a target resource associated with the recognition result is output.

[0133] It should be noted that the specific examples in the embodiment can refer to the examples described in the above embodiments and optional implementation manners, and will not be described herein again.

[0134] In addition, in combination with the method provided in the above embodiments, a storage medium can also be provided in the embodiment to implement. The storage medium has a computer program stored thereon. The computer program is executed by a processor to implement any one of the vertical knowledge question and answer methods based on a large model in the above embodiments.

[0135] The embodiment of the application further provides a computer program product, which, when running on a computer, causes the computer to execute 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 this application, but not to limit it. According to the embodiments provided in the application, all other embodiments obtained by those of ordinary skill in the art without creative labor are within the scope of protection of the application.

[0137] Obviously, the drawings are only some examples or embodiments of the application, and can be applied to other similar cases without creative labor for those of ordinary skill in the art. In addition, it can be understood that although the work done in the development process may be complex and long, some design, manufacture or production changes according to the technical content disclosed in the application are only conventional technical means for those of ordinary skill in the art, and should not be regarded as insufficient disclosure of the application.

[0138] The term "embodiment" in the application means that the specific features, structures or characteristics described in combination with the embodiment can be included in at least one embodiment of the application. The appearance of this phrase in various places in the specification does not necessarily mean the same embodiment, nor does it mean independence or alternative to other embodiments. It can be clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in the application can be combined with other embodiments without conflict.

[0139] The above embodiments only express several implementation ways of the present application, and the description is specific and detailed, but it should not be understood as a limitation to the patent protection scope. It should be pointed out that, for ordinary skilled in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A vertical knowledge question-answering method based on a large model, characterized in that, The method includes: Receive user-inputted question text; The question text is semantically recognized based on a pre-built large model to obtain the recognition result, which represents the user's question-and-answer intent. If the recognition result contains a preset keyword, then the question-and-answer intent is determined to be to use a tool plugin, call the target plugin tool that matches the preset keyword to perform task processing on the data in the question text, and output the processing result. The task processing includes document parsing, data visualization and / or table extraction. If the recognition result does not contain a preset keyword, then the question and answer intent is determined to be a dialogue question and answer. The operation result of the user inputting the question text on the professional question and answer option is detected, and the current question and answer type is determined based on the operation result. 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. The process of detecting the user's operation result 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 includes: displaying a first interface, the first interface including professional question-and-answer options; 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 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; if no, determining the current question-and-answer type as ordinary question-and-answer based on the operation result, and inputting the recognition result into a preset ordinary language large model for conversational response.

2. The vertical knowledge question answering method based on a large model according to claim 1, characterized in that, The step of detecting whether to perform a selection operation on the professional question and answer options when the user inputs the question text includes: When a user inputs the question text, the system detects whether to perform a selection operation on knowledge base question-and-answer options and / or web search options.

3. The vertical knowledge question answering method based on a large model according to claim 1, characterized in that, Before receiving the user-inputted question text, the method further includes: Acquire geoscientific literature data, extract knowledge points from the geoscientific literature data, and store the knowledge points in a knowledge base; When the professional question-and-answer option is a knowledge base question-and-answer option, the step of inputting the recognition result into a target resource library that matches the professional question-and-answer option for matching, and outputting the target resource associated with the recognition result, includes: The recognition result is input into the knowledge base and matched with the knowledge point. Based on the matching degree between the recognition result and the knowledge point, the geoscientific literature data associated with the recognition result is filtered out. The geoscientific literature data associated with the recognition result is used as the target resource and returned to the user.

4. The vertical knowledge question answering method based on a large model according to claim 1, characterized in that, When the professional Q&A option is a web search option, the step of inputting the recognition result into a target resource library that matches the professional Q&A option for matching, and outputting the target resource associated with the recognition result, includes: The identification results are input into a search engine for searching. Based on the relevance of the search results, the found references are associated with the target resource and returned to the user.

5. The vertical knowledge question answering method based on a large model according to claim 1, characterized in that, Before receiving the user-inputted question text, the method further includes: Obtain geoscientific literature data, perform enhancement processing on the original large model based on the geoscientific literature data, and train to obtain the pre-constructed large model; After outputting the processing result or the target resource associated with the recognition result, the method further includes: Receive session result feedback information; Incremental learning is performed on the pre-built large model based on the feedback information of the session results.

6. The vertical knowledge question answering method based on a large model according to claim 1, characterized in that, After receiving the user's input query text, the method further includes: Obtain the user's functional permissions and data permissions; Obtain the target plugin tool by retrieving a plugin tool from the plugin tool library that matches the stated functional permissions; The resource library is obtained from the resource library that matches the data permissions, and the target resource library is constructed using the resource library.

7. A vertical knowledge question-answering device based on a large model, characterized in that, include: The text input module is used to receive the user's input of the question text; The semantic recognition module is used to perform semantic recognition on the question text based on a pre-built large model to obtain recognition results, which represent the user's question-and-answer intent. The tool invocation module is used to determine that the question-and-answer intent is to use a tool plugin if the recognition result contains a preset keyword, and to call a target plugin tool that matches the preset keyword to perform task processing on the data in the question text and output the processing result. 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 intent is a conversational question-and-answer session if the recognition result does not contain preset keywords; detect the operation result of the user's input of the question text on the professional question-and-answer options; determine the current question-and-answer type based on the operation result; input the recognition result into a target resource library matching the current question-and-answer type for matching; and output the target resource associated with the recognition result. Specifically, detecting the operation result of the user's input of the question text on the professional question-and-answer options, 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: displaying a first interface, the first interface including professional question-and-answer options; detecting whether the user performs a selection operation on the professional question-and-answer options when inputting the question text; if yes, determining the current question-and-answer type as a professional question-and-answer session based on the operation result, and inputting the recognition result into a preset general language model for conversational response.

8. A terminal, comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the vertical knowledge question-answering method based on a large model as described in any one of claims 1 to 6.

9. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the vertical knowledge question-answering method based on a large model as described in any one of claims 1 to 6 when it runs.

Citation Information

Patent Citations

  • Question and answer method and system

    CN118377880A

  • Task planning method, device and system, electronic equipment and storage medium

    CN118626622A