Data question answering method and device based on large model, electronic equipment and storage medium

By constructing input prompt words and using the Q&A big model to identify similar question sets, the problem of insufficient answers to the intelligent Q&A model is solved, achieving a more accurate response effect and improving user experience.

CN120578738APending Publication Date: 2025-09-02JIANGSU JIANGNAN RURAL COMMERCIAL BANK CO LTD

Patent Information

Application Number
CN202510682225.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-09-02

AI Technical Summary

Technical Problem

The existing intelligent question-and-answer model has poor answer accuracy when responding to user questions, resulting in poor user experience.

Method used

By obtaining user input questions and question answering knowledge bases, building input prompt words and inputting them into question answering models for processing to identify preset questions that match the similarity of user input questions, and thus responding based on the answers corresponding to similar preset questions.

Benefits of technology

It improves the accuracy of question response, makes the answer closer to user's questions, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120578738A_ABST
    Figure CN120578738A_ABST
Patent Text Reader

Abstract

The invention discloses a data question and answer method and device based on a large model, electronic equipment and a storage medium. The method comprises the following steps: acquiring a question input by a user and a question and answer knowledge base; wherein the question and answer knowledge base comprises a plurality of question and answer data pairs, and each question and answer data pair comprises a preset question and a corresponding answer; constructing an input prompt word according to the user input question; inputting the input prompt word and the question and answer knowledge base into a question and answer large model for processing, so that the question and answer large model recognizes at least one preset question matched with the similarity of the question input by the user from a preset question set of the question and answer knowledge base, and the at least one preset question serves as a target question set; and responding to the question input by the user according to an answer set corresponding to the target question set identified by the question and answer large model. Based on the technical scheme of the invention, the responded answer can be closer to the question, and the accuracy of question response is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer application technology, and in particular to a data question-answering method, device, electronic device and storage medium based on a large model. Background Art

[0002] As society develops, banking services continue to evolve and improve. Consequently, users often have various questions about the new services. It's common knowledge that having staff answer each question individually is too cumbersome.

[0003] In related technologies, a natural language processing (NLP) model is usually trained based on a large number of business-related documents of the bank to obtain an intelligent model capable of answering user questions. In actual scenarios, this intelligent model is used to respond to various business questions raised by users. However, the answers often do not match the questions asked. Summary of the Invention

[0004] The present invention provides a data question-answering method, device, electronic device and storage medium based on a large model to solve the technical problem that the current intelligent question-answering model has poor accuracy in answering questions.

[0005] According to one aspect of the present invention, a data question-answering method based on a large model is provided, the method comprising:

[0006] Obtaining a user input question and a question-answer knowledge base; wherein the question-answer knowledge base includes a plurality of question-answer data pairs, each question-answer data pair including a preset question and a corresponding answer;

[0007] Constructing an input prompt word according to the user input question;

[0008] Inputting the input prompt word and the question-answer knowledge base into a question-answering macromodel for processing, so that the question-answering macromodel identifies at least one preset question that matches the user input question in a preset question set in the question-answering knowledge base as a target question set;

[0009] The user input question is responded to according to the answer set corresponding to the target question set identified by the question-answering model.

[0010] According to another aspect of the present invention, a data question-answering device based on a large model is provided, the device comprising:

[0011] A question acquisition module is used to obtain a question input by a user and a question-answer knowledge base; wherein the question-answer knowledge base includes a plurality of question-answer data pairs, each question-answer data pair including a preset question and a corresponding answer;

[0012] A prompt word construction module, configured to construct an input prompt word according to the user input question;

[0013] a model processing module, configured to input the input prompt word and the question-answering knowledge base into a question-answering macromodel for processing, so that the question-answering macromodel identifies at least one preset question from a preset question set in the question-answering knowledge base that has a similarity to the user input question, as a target question set;

[0014] The question response module is used to respond to the user input question based on the answer set corresponding to the target question set identified by the question-answering model.

[0015] According to another aspect of the present invention, an electronic device is provided, comprising:

[0016] at least one processor; and

[0017] a memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data question answering method based on a large model described in any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the large model-based data question-answering method described in any embodiment of the present invention when executed.

[0020] The technical solution of the embodiment of the present invention is to obtain a user input question and a question-answer knowledge base; wherein the question-answer knowledge base includes a plurality of question-answer data pairs, each question-answer data pair includes a preset question and a corresponding answer; construct an input prompt word according to the user input question; input the input prompt word and the question-answer knowledge base into a question-answering big model for processing, so that the question-answering big model identifies at least one preset question that matches the similarity of the user input question from the preset question set of the question-answering knowledge base as a target question set; respond to the user input question based on the answer set corresponding to the target question set identified by the question-answering big model. The present invention uses a big model to identify the similarity between the user input question and the preset question, and responds to the user input question based on the answers corresponding to similar preset questions, so that the responded answer can be closer to the question, thereby improving the accuracy of the question response.

[0021] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 This is a flowchart of a data question-answering method based on a large model provided according to the first embodiment of the present invention;

[0024] Figure 2 This is a flow chart of a data question-answering method based on a large model provided according to the second embodiment of the present invention;

[0025] Figure 3 This is a flow chart of a data question-answering method based on a large model provided according to the third embodiment of the present invention;

[0026] Figure 4 An architectural diagram of a data question-answering system based on a large model provided by an embodiment of the present invention;

[0027] Figure 5 An overall flow chart of a data question-answering method based on a large model provided by an embodiment of the present invention;

[0028] Figure 6 A flowchart of constructing a question-answer knowledge base provided by an embodiment of the present invention;

[0029] Figure 7 A flowchart of problem similarity identification using a large model provided by an embodiment of the present invention;

[0030] Figure 8 2 is a schematic diagram of the structure of a data question-answering device based on a large model provided according to a fourth embodiment of the present invention;

[0031] Figure 9 2 is a schematic diagram of the structure of an electronic device for implementing the large model-based data question-answering method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0032] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0033] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0034] Example 1

[0035] Figure 1 A flowchart of a data question-answering method based on a large model is provided for the first embodiment of the present invention. This embodiment is applicable to the case where answers to questions are given based on a model. The method can be executed by a data question-answering device based on a large model. The data question-answering device based on a large model can be implemented in the form of hardware and / or software. The data question-answering device based on a large model can be configured in a computer. Figure 1 As shown, the method includes:

[0036] S110: Obtain the user input question and the question-answer knowledge base.

[0037] Among them, the user input question can be a question input by the user in the question-and-answer system. The question-and-answer system has the function of returning a target answer based on the user input question. In an embodiment of the present invention, the question-and-answer system can be preset according to the scenario requirements and is not specifically limited here. Exemplarily, the question-and-answer system can be a bank's question-and-answer system, which is used to respond to personal business questions such as deposits, financial management, and foreign exchange input by users. In other words, the user input question can be a question related to the user's personal business. The user's personal business may include deposits, financial management, and foreign exchange business, etc. In an embodiment of the present invention, the user input question can be related to the actual application scenario and is not specifically limited here. Exemplarily, the user input question can be a text input or voice input of "Why can't I check the deposit and payment records", "How to buy financial products" or "How do I conduct foreign exchange", etc.

[0038] The question-and-answer knowledge base can be understood as a pre-constructed knowledge base for answering the questions input by the user. In the scenario where the question-and-answer system can be a question-and-answer system of a bank, the question-and-answer knowledge base can be constructed by extracting knowledge from relevant documents input by bank staff based on the question-and-answer big model. In an embodiment of the present invention, the question-and-answer knowledge base includes a plurality of question-and-answer data pairs, each question-and-answer data pair includes a preset question and a corresponding answer. Among them, the question-and-answer data pair can be understood as a data pair of a question and a corresponding answer. The preset question can be understood as a question pre-stored in the question-and-answer knowledge base. In an embodiment of the present invention, the specific content of the preset question and the corresponding answer is related to the file actually input by the user into the question-and-answer big model, and is not specifically limited here.

[0039] S120: Construct an input prompt word according to the user input question.

[0040] Among them, the input prompt word can be understood as the prompt word to be input into the question-answering big model. Optionally, the input prompt word can be constructed based on the user input question and at least one preset question in the question-answering knowledge base that has the same intention as the user input question. In an embodiment of the present invention, the input prompt word can be a prompt word related to question similarity identification. That is to say, in an embodiment of the present invention, the input prompt word can be used to guide the question-answering big model to identify the similarity between questions. Exemplarily, the input prompt word can be "identify whether the core content, intention and inquiry information of each preset question in the question-answering knowledge base are consistent with the user input question. If they are consistent, the questions are considered similar; otherwise, the questions are considered dissimilar."

[0041] S130. Input the input prompt word and the question-answer knowledge base into the question-answer big model for processing, so that the question-answer big model identifies at least one preset question that matches the similarity of the user input question from the preset question set of the question-answer knowledge base as the target question set.

[0042] The preset question set may be understood as a collection of preset questions pre-stored in the question-and-answer knowledge base.

[0043] The target question set can be understood as a set of questions similar to the user input question identified by the question-answering macromodel from the preset question set in the question-answering knowledge base. Accordingly, the target question set can be understood as a set of target questions. The target questions can be understood as questions similar to the user input question.

[0044] Based on the above example of inputting prompt words, the question-answering model can have the function of identifying the similarity between questions.

[0045] S140. Respond to the user input question according to the answer set corresponding to the target question set identified by the question-answering model.

[0046] Specifically, the answer corresponding to each target question is identified from the question-answer data pairs stored in the question-answer knowledge base as an answer set. The answer set includes the answer corresponding to each target question.

[0047] Based on the above embodiment, the user input question can be responded to by integrating the answer set. Optionally, the response to the user input question includes:

[0048] The answers corresponding to each of the target questions are integrated to obtain a target answer, and the user input question is responded to based on the target answer.

[0049] In the implementation of the present invention, the specific method for integrating the answers corresponding to each target question is not limited. Optionally, the method for integrating at least one answer may include formatting, answer content integration, and content desensitization.

[0050] The target answer may be understood as an answer that responds to the user input question.

[0051] Based on the above embodiment scheme, the answers corresponding to each of the target questions are integrated to respond to the user input questions based on the integrated target answers, avoiding the technical problem of directly returning the answer set to the user, resulting in unintuitive response results, difficult for users to understand, and poor user experience. The target answers responded by the present invention are more intuitive and easier for users to understand, which helps to improve user experience.

[0052] The technical solution of the embodiment of the present invention is to obtain a user input question and a question-answer knowledge base; wherein the question-answer knowledge base includes a plurality of question-answer data pairs, each question-answer data pair includes a preset question and a corresponding answer; construct an input prompt word according to the user input question; input the input prompt word and the question-answer knowledge base into a question-answering big model for processing, so that the question-answering big model identifies at least one preset question that matches the similarity of the user input question from the preset question set of the question-answering knowledge base as a target question set; respond to the user input question based on the answer set corresponding to the target question set identified by the question-answering big model. The present invention uses a big model to identify the similarity between the user input question and the preset question, and responds to the user input question based on the answers corresponding to similar preset questions, so that the responded answer can be closer to the question, thereby improving the accuracy of the question response.

[0053] Example 2

[0054] Figure 2 This is a flowchart of a data question-answering method based on a large model provided in the second embodiment of the present invention. This embodiment is a refinement of the above embodiment in constructing input prompt words based on the user input question. Figure 2 As shown, the method includes:

[0055] S210: Obtain the user input question and the question-answer knowledge base.

[0056] S220: Perform intent recognition on the question input by the user to obtain the question intent.

[0057] The question intention can be understood as the intention of the user input question. In the implementation of the present invention, the question intention can be obtained by performing intent recognition on the user input question through a pre-built intent recognition model. Specifically, the question intention is obtained by performing intent recognition on the input user input question through a pre-built intent recognition model. The intent recognition model can be obtained by training a deep learning model based on training samples. The training samples can be historical user input questions. The training samples can be marked with sample identifiers. The sample identifiers can represent the true intentions of the training samples. In the implementation of the present invention, the question intention is related to the actual user input question and is not specifically limited here. For example, taking the user input question as "Why can't I query the deposit and payment records", "How to buy financial products" or "How do I conduct foreign exchange" as an example, the corresponding question intentions can be deposit and payment inquiries, financial purchases and foreign exchange operations.

[0058] It should be noted that after obtaining the question intent, the user input question can be vectorized through the Embedding model, so that a series of similarity comparisons can be performed between the vector corresponding to the user input question and the question and answer data in the question and answer knowledge base.

[0059] Based on the above embodiment, the question intent of the input question data can be determined by natural language processing. Optionally, the step of identifying the question intent of the user input question includes:

[0060] Natural language processing is performed on the user input question to obtain at least one target keyword, and vectorization processing is performed on the at least one target keyword to obtain the question intent.

[0061] The target keyword may be a term that can represent the semantic meaning of the input question data. In an embodiment of the present invention, the target keyword may be obtained by processing the user-input question using a pre-built natural language processing model. Exemplarily, the natural language processing model may be an NLP model. Specifically, the user-input question is processed using the pre-built natural language processing model to obtain at least one target keyword that can represent the semantic meaning of the user-input question. Furthermore, the user-input question is pre-processed to obtain the pre-processed user-input question, which is then input into the natural language processing model to obtain at least one target keyword. In an embodiment of the present invention, the specific method for pre-processing the user-input question can be preset based on scenario requirements and is not limited here. Optionally, the specific pre-processing method may include data cleaning, data denoising, and data desensitization. For example, taking the user-input question "Why can't I query my deposit and payment records?" as an example, the corresponding target keywords may be "deposit and payment" and "query," or "deposit and payment records" and "query," etc.

[0062] In an embodiment of the present invention, after identifying the target keywords of the user input question, the target keywords can be vectorized to obtain keyword vectors, and the keyword vectors can be used as question intent. This is to facilitate further intent matching and similarity matching based on the vectors, so as to effectively reduce the amount of computation in the data processing process. Optionally, the target keywords can be vectorized by an Embedding model to obtain question intent. Among them, the Embedding model can be understood as a model that converts discrete data into continuous vector representation. Discrete data can be text, images, categories, etc. Commonly, Embedding models can include Word to Vector (Word2Vec) models, Global Vectors for Word Representation (GloVe), and Transformer-based bidirectional encoder representations (Bidirectional Encoder Representations from Transformers, BERT) models, etc.

[0063] Based on the above embodiment scheme, the accuracy of intent recognition can be improved by identifying the intent of the question through natural language processing.

[0064] S230. Identify at least one preset question that matches the question intention input by the user from the preset question set of the question-answering knowledge base according to the question intention as a first question set.

[0065] Among them, the preset questions included in the first question set may be questions with the same intention as the question input by the user. In an embodiment of the present invention, the question-answer knowledge base may include multiple question-answer pair sets, each question-answer pair set may include at least one data question-answer pair, and each question-answer pair set may correspond to an intention. Exemplarily, the question-answer knowledge base includes three question-answer pair sets A, B and C, and the corresponding intentions may be deposit and payment inquiries, financial purchases and foreign exchange operations, respectively. Specifically, in the case where the question input by the user is "Why can't I query the deposit and payment records", the question intention is identified as a deposit and payment query, and the first question set obtained by matching may be the question-answer pair set A in the question-answer knowledge base.

[0066] In the implementation of the present invention, a preset question in the first question set is used as the first question. The first question may be a question with the same intention as the question input by the user.

[0067] S240: Determine at least one first question in the first question set that matches the user input question in similarity, as a second question set.

[0068] The first questions included in the second question set may be questions that match the user-input question by similarity. Specifically, for each first question, a target similarity is determined between the user-input question and the first question, and first questions whose target similarity exceeds a preset similarity threshold are selected as second questions that match the user-input question by similarity. Alternatively, the first questions are sorted in descending order based on the target similarity, and the first preset number of first questions are selected as second questions that match the user-input question by similarity. The target similarity may represent the degree of similarity between the user-input question and the first question. The specific value of the target similarity depends on the problems in the actual application scenario and is not limited here. For example, the target similarity may be 70%, 80%, or 90%. The similarity threshold may be understood as a threshold value related to the target similarity. In embodiments of the present invention, the similarity threshold may be preset based on scenario requirements and is not specifically limited here. For example, the similarity threshold may be 80%, 85%, or 90%. The preset number may represent the number of second questions extracted. In embodiments of the present invention, the preset number may be preset based on scenario requirements and is not specifically limited here. Exemplarily, the preset number may be 5, 8, or 10, etc. Furthermore, the target similarity may be determined by performing similarity recognition on the user input question and the first question based on a pre-built similarity recognition model. Specifically, the target similarity is obtained by performing similarity recognition on the input user input question and the first question using a pre-built similarity recognition model. The similarity recognition model may be obtained by training a deep learning model based on training samples. The training samples may include historical user input questions, historical preset questions, and the actual similarity between the two questions.

[0069] In the implementation of the present invention, the first question in the second question set is used as the second question. The second question can be a question similar to the user input question. In an embodiment of the present invention, the specific second questions included in the second question set are related to the actual application scenario and are not limited here. Exemplarily, the first question set includes four first questions A, B, C and D, and the target similarity between each first question and the user input question is calculated to be 80%, 90%, 85% and 95% respectively, and the descending order is D, B, C and A. The first three first questions D, B and C are taken as the second questions to obtain the second question set.

[0070] S250: Construct input prompt words according to the user input question and the second question set.

[0071] In an embodiment of the present invention, the input prompt word can be used to guide the question-answering model to identify the similarity between the second question and the user input question. The input prompt word can be preset according to the scenario requirements and is not specifically limited here. For example, the input prompt word can be "identify whether the core content, intent, and query information of each second question in the second question set are consistent with the user input question. If they are consistent, the questions are considered similar; otherwise, the questions are considered dissimilar."

[0072] S260. Input the input prompt word and the question-answer knowledge base into the question-answer big model for processing, so that the question-answer big model identifies at least one preset question that matches the similarity of the user input question from the preset question set of the question-answer knowledge base as the target question set.

[0073] Optionally, the step of inputting the input prompt word and the question-answer knowledge base into a question-answering macromodel for processing, so that the question-answering macromodel identifies at least one preset question from a preset question set in the question-answering knowledge base that matches the user input question in similarity, as a target question set, includes:

[0074] The input prompt word and the question-answer knowledge base are input into the question-answering big model for processing, so that the question-answering big model identifies at least one second question in the second question set that matches the similarity of the user input question as the target question set.

[0075] Based on the above example of inputting prompt words, the question-answering model may have the function of identifying the similarity between the question input by the user and the second question.

[0076] Based on the above embodiment, the effect of identifying the similarities between questions is achieved, thereby improving the reliability and accuracy of the similarity identification between the determined questions.

[0077] Optionally, as an optional embodiment of the above embodiment, specifically, a user input question and a question and answer knowledge base are obtained; intent recognition is performed on the user input question to obtain the question intent; at least one preset question that matches the user input question intent is identified from the preset question set of the question and answer knowledge base according to the question intent, as a first question set; at least one first question in the first question set that matches the user input question in similarity is determined as a second question set; the input prompt word and the question and answer knowledge base are input into a question and answer big model for processing, so that the question and answer big model identifies at least one second question in the second question set that matches the user input question in similarity, as a target question set.

[0078] Based on the above optional implementation scheme, three identification and screening of similar questions to user input questions are implemented, that is, the first intention identification and screening, the second local similarity identification and screening, and the third similarity identification and screening based on the large model. This ensures that the questions in the second question set identified are highly similar and highly streamlined to the user input questions, so as to improve the accuracy of subsequent answer responses.

[0079] S270. Respond to the user input question according to the answer set corresponding to the target question set identified by the question-answering model.

[0080] The technical solution of an embodiment of the present invention obtains the question intent by performing intent recognition on the user input question; based on the question intent, at least one preset question matching the user input question intent is identified from a preset question set in the question-answering knowledge base as a first question set; at least one first question in the first question set that matches the user input question in similarity is determined as a second question set; and input prompt words are constructed based on the user input question and the second question set. The present invention constructs input prompt words based on the secondary screened question set, so that the input prompt words can guide the large model to perform a tertiary screening of questions, ensuring that the target question obtained from the final screening is highly similar to the user input question.

[0081] Example 3

[0082] Figure 3 This is a flowchart of a data question-answering method based on a large model provided in the third embodiment of the present invention. This embodiment is an addition to the above embodiment in which the input prompt word and the question-answering knowledge base are input into the question-answering large model for processing. Figure 3 As shown, the method includes:

[0083] S310: Obtain a user input file, and identify the text content of the file in the user input file.

[0084] The user input file can be understood as a file entered by the user into the question-and-answer system. In embodiments of the present invention, the question-and-answer system can be preset based on scenario requirements and is not specifically limited here. For example, if the question-and-answer system is a bank's question-and-answer system, the user input file can include the bank's policy documents, product documents, business chat logs, and service logs.

[0085] The file text content can be understood as the specific text content in the user input file. In layman's terms, the file text content is the text in the user input file. In the embodiment of the present invention, the file text content is related to the actual file input by the user and is not specifically limited here.

[0086] S320: Perform text understanding on the text content of the file to obtain a question set, and construct question and answer prompt words based on the question set.

[0087] The question set may be a collection of questions extracted from the text content of the document. These questions can be understood as questions related to the topic. Optionally, the question set may be obtained by processing the text content of the document based on a pre-built natural language processing model. Specifically, the question set is obtained by processing the text content of the document based on a pre-built natural language processing model. In an embodiment of the present invention, the natural language processing model used to determine the question set is different from the natural language processing model used to identify target keywords. That is, the two may be obtained based on different training samples. Typically, the identified questions are related to the topic in the text content of the document. In an embodiment of the present invention, the specific questions are related to the actual text content of the document, and this is not specifically limited here. For example, taking a foreign exchange product document as an example, the product document includes multiple topics, such as "Forex Introduction", "Forex Operation Guide", and "Forex Maintenance Guide". The question set may include "Forex Introduction", "Forex Operation Guide", and "Forex Maintenance Guide".

[0088] The Q&A prompts can be used to guide the Q&A model to generate Q&A data pairs based on the text content of the document. The input prompts can be preset based on scenario requirements and are not specifically limited here. For example, the Q&A prompts can be "Identify the answer corresponding to each question from the text content of the document" or "Please understand the text content and find the answer to each question from the text content of the document." etc.

[0089] S330. Input the question and answer prompt words and the document text content into the question and answer big model for processing, so that the question and answer big model can identify the text content corresponding to each question in the question set from the document text content as the answer to the question.

[0090] Based on the above example of inputting prompt words, the question-answering model can have the function of identifying answers to questions from text.

[0091] The answer to the question can be understood as the answer to the question. In the embodiment of the present invention, the specific content of the answer to the question is related to the specific text content of the input file, which is not specifically limited here.

[0092] S340: Construct the question-answer data pair according to the question set and the question-answer set.

[0093] The question answer set may be understood as a collection of question answers.

[0094] Based on the above embodiment, the present invention can construct question-answer data pairs based on vectorized questions and answers. Optionally, constructing the question-answer data pairs based on the question set and the question answer set includes:

[0095] Vectorization is performed on the question set and the question answer set respectively, and the question-answer data pair is constructed based on the vectorized question set and the vectorized question answer set.

[0096] Specifically, each question and the corresponding answer are vectorized through the Embedding model to obtain vector pairs, which are used as question-answering data to build a question-answering knowledge base.

[0097] Furthermore, the question-answer data pairs can be divided into intents to obtain multiple question-answer pair sets with different intents, so as to construct the question-answer knowledge base based on the question-answer pair sets. In an embodiment of the present invention, the intent corresponding to each question-answer pair set can be represented based on a vector.

[0098] Based on the above embodiment scheme, a question-and-answer knowledge base is constructed based on vectorized questions and answers, which can reduce the memory occupied by the question-and-answer knowledge base. In the later stage, intention matching and similarity matching between questions can be achieved based on vector-to-vector calculations, which can effectively reduce the amount of calculation, reduce the question-and-answer response time, increase the question-and-answer response rate, and enhance the user experience.

[0099] S350: Obtain the user input question and the question-answer knowledge base.

[0100] S360: Construct an input prompt word according to the user input question.

[0101] S370. Input the input prompt word and the question-answer knowledge base into the question-answer big model for processing, so that the question-answer big model identifies at least one preset question that matches the similarity of the user input question from the preset question set of the question-answer knowledge base as the target question set.

[0102] S380. Respond to the user input question according to the answer set corresponding to the target question set identified by the question-answering model.

[0103] The technical solution of the embodiment of the present invention obtains a user input file and identifies the text content of the file in the user input file; performs text understanding on the file text content to obtain a question set, and constructs question and answer prompts based on the question set; inputs the question and answer prompts and the file text content into the question and answer macro model for processing, so that the question and answer macro model identifies the text content corresponding to each question in the question set from the file text content as the answer to the question; and constructs the question and answer data pair based on the question set and the question answer set. The present invention realizes the construction of a question and answer knowledge base based on the macro model, effectively improving the efficiency of constructing the question and answer knowledge base.

[0104] Based on the above embodiments, the following Figure 4 and Figure 5 The data question-answering method based on the large model of the present invention is further elaborated. Figure 4 This is an architectural diagram of a large-model-based data question-answering system provided in an embodiment of the present invention. Figure 5 The overall flow chart of a large-model-based data question-and-answer method provided in an embodiment of the present invention. Specifically, the question-and-answer system may include: a question-and-answer pair construction module, specifically used to construct a question-and-answer knowledge base; a preprocessing model, specifically used to understand the intent of the user's input question; a question retrieval module, specifically used to extract the top N questions with the highest similarity to the user's input question from the knowledge base; a question judgment module, specifically used to perform secondary similarity recognition using the large model; and a post-processing module, specifically used to integrate answers and respond to the user's input question. Based on this, the corresponding specific steps are as follows.

[0105] 1. Question-answer pair building module. Combined as follows Figure 6 Explain the process of building question and answer pairs. Figure 6A flowchart for constructing a question-and-answer knowledge base is provided in an embodiment of the present invention. Specifically, the content of obtained files, such as policy documents, product documents, historical chat records, and customer service logs, is preprocessed. The preprocessing may include spam filtering, deduplication, and information screening. Spam filtering may include filtering irrelevant or malicious text content in chat records to avoid bias in large model learning. Deduplication may include eliminating duplicate data between files. Information screening may include cleaning private data in customer chat records. Data desensitization may include removing sensitive data from files. Furthermore, the large model performs deep semantic understanding of the content in the files, automatically extracting knowledge from the preprocessed text content, and quickly generating Frequently Asked Questions (FAQ) entries, also known as question-and-answer pairs. The FAQ entries quickly generated by the large model are manually reviewed and adjusted to obtain the final question-and-answer pairs. The generated FAQ entries may be reviewed and screened by staff based on business needs and regulations. Manual review can prevent misunderstandings or omissions that may occur when large models generate large numbers of answers. It can also prevent biased answers generated in question-and-answer pairs due to irregular input data. Manual review can promptly correct errors or biases in answers, ensuring the accuracy of the information in the question-and-answer pairs. Furthermore, input files may contain complex and difficult-to-understand content, which may cause large models to generate unsatisfactory answers. Manual review can target these answers to ensure they are more standardized. The Embedding model converts FAQ items into vector representations and stores them in the knowledge base, resulting in a question-and-answer knowledge base.

[0106] 2. Preprocessing module. Specifically, it receives questions input by users; cleans and tokenizes the text to remove noise, such as extra spaces, tabs, line breaks, and invisible special characters; tokenizes and parses the questions to extract keywords and infer the intent of the questions; and uses the Embedding model to convert the intent into a vector.

[0107] 3. Question retrieval module. Specifically, the intent vector is compared with the intent vectors in the knowledge base to obtain a set of question-answer pairs with the same intent. The similarity between the vector of the user-entered question and the question vectors stored in the knowledge base is calculated, and the top_N similar questions are filtered out based on the similarity and returned. The filtered top_N questions and the user-entered question are input into the prompt to construct the complete prompt content, that is, the input prompt word.

[0108] 4. Question retrieval module. Combined as follows Figure 7 Explain the process of identifying similar problems through large models. Figure 7 A flowchart for identifying similar questions through a large model is provided for an embodiment of the present invention. Specifically, the written prompt words are used to guide the large model to make similarity judgments on the top_N questions and the user-input questions one by one. The prompt words can be "You are a semantic analysis expert, focusing on comparing and evaluating the similarity of two questions. Please read Question 1 and Question 2 carefully to understand their semantics and context. Your task is to judge whether the two questions express the same meaning or focus. If the core content, intention or information asked about the two questions are basically the same, please consider Question 1 and Question 2 to have the same meaning. If there are significant differences in the core content, intention or information asked about the two questions, please consider Question 1 and Question 2 to have different meanings. When making a judgment, please pay attention to the keywords, context and nuances of the questions. Now, please start analyzing and comparing Question 1 and Question 2" to obtain questions output by the model that are similar to the user-input questions. The above-mentioned Question 1 and Question 2 can refer to the user-input question and the second question, respectively.

[0109] 5. Post-processing module. Specifically, this module determines the output of the large model, i.e., the target question, extracts the corresponding answer based on the output, formats the extracted answer, integrates information, removes sensitive information, and generates the target answer, which is then returned to the user. Furthermore, continuous optimization and adjustment based on user feedback can be performed to improve the overall performance of the question-answering system and user satisfaction.

[0110] Based on the above embodiment scheme, knowledge is automatically extracted from a large amount of documents, historical chat records, customer service logs and other data through a large model to quickly generate FAQ entries, reducing the need for manual writing and classification, and improving the efficiency of knowledge base construction. The present invention can capture the intention of the user to input questions to provide appropriate answers. The present invention adds intent recognition, that is, through intent recognition and two similarity recognitions to screen questions, it can be determined that the target question obtained by screening is highly similar to the user input question, so as to further provide a high-precision answer response to the user input question based on the target question.

[0111] Example 4

[0112] Figure 8 This is a structural diagram of a data question-answering device based on a large model provided by the fourth embodiment of the present invention. Figure 8 As shown, the device includes: a question acquisition module 310, a prompt word construction module 320, a model processing module 330 and a question response module 340.

[0113] Among them, the question acquisition module 310 is used to obtain the user input question and the question and answer knowledge base; wherein the question and answer knowledge base includes multiple question and answer data pairs, each question and answer data pair includes a preset question and a corresponding answer; the prompt word construction module 320 is used to construct an input prompt word according to the user input question; the model processing module 330 is used to input the input prompt word and the question and answer knowledge base into the question and answer big model for processing, so that the question and answer big model identifies at least one preset question that matches the similarity of the user input question from the preset question set of the question and answer knowledge base as the target question set; the question response module 340 is used to respond to the user input question according to the answer set corresponding to the target question set identified by the question and answer big model.

[0114] The technical solution of the embodiment of the present invention is to obtain a user input question and a question-answer knowledge base; wherein the question-answer knowledge base includes a plurality of question-answer data pairs, each question-answer data pair includes a preset question and a corresponding answer; construct an input prompt word according to the user input question; input the input prompt word and the question-answer knowledge base into a question-answering big model for processing, so that the question-answering big model identifies at least one preset question that matches the similarity of the user input question from the preset question set of the question-answering knowledge base as a target question set; respond to the user input question based on the answer set corresponding to the target question set identified by the question-answering big model. The present invention uses a big model to identify the similarity between the user input question and the preset question, and responds to the user input question based on the answers corresponding to similar preset questions, so that the responded answer can be closer to the question, thereby improving the accuracy of the question response.

[0115] Optionally, the prompt word construction module 320 includes: an intention recognition unit, an intention matching unit, a similarity matching unit, and a prompt word construction unit;

[0116] The intention recognition unit is used to recognize the intention of the question input by the user to obtain the question intention;

[0117] The intention matching unit is configured to identify, from a set of preset questions in the question-answering knowledge base according to the question intention, at least one preset question that matches the question input by the user as a first question set;

[0118] The similarity matching unit is configured to determine at least one first question in the first question set that has a similarity match with the question input by the user as a second question set;

[0119] The prompt word construction unit is used to construct input prompt words according to the user input question and the second question set.

[0120] Optionally, the model processing module 330 is specifically configured to:

[0121] The input prompt word and the question-answer knowledge base are input into the question-answering big model for processing, so that the question-answering big model identifies at least one second question in the second question set that matches the similarity of the user input question as the target question set.

[0122] Optionally, the intention recognition unit is specifically configured to:

[0123] Natural language processing is performed on the user input question to obtain at least one target keyword, and vectorization processing is performed on the at least one target keyword to obtain the question intent.

[0124] Optionally, the data question-answering device based on a large model further includes: a file acquisition module, a file parsing module, a model recognition module, and a data pair construction module;

[0125] The file acquisition module is used to acquire the user input file and identify the text content of the file in the user input file before inputting the input prompt word and the question-answer knowledge base into the question-answer big model for processing;

[0126] The file parsing module is used to understand the text content of the file, obtain a question set, and construct question-answering prompt words based on the question set;

[0127] The model recognition module is used to input the question and answer prompt words and the document text content into the question and answer large model for processing, so that the question and answer large model recognizes the text content corresponding to each question in the question set from the document text content as the answer to the question;

[0128] The data pair construction module is used to construct the question-answer data pair according to the question set and the question answer set.

[0129] Optionally, the data pair construction module is specifically used to:

[0130] Vectorization is performed on the question set and the question answer set respectively, and the question-answer data pair is constructed based on the vectorized question set and the vectorized question answer set.

[0131] Optionally, the question response module 340 includes: an integration response unit, configured to integrate the answers corresponding to each target question to obtain a target answer, and respond to the user input question based on the target answer.

[0132] Optionally, the user input questions include questions related to the user's personal business; the user's personal business includes deposit and payment business, financial management business and foreign exchange business.

[0133] The data question and answer device based on a big model provided in an embodiment of the present invention can execute the data question and answer method based on a big model provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0134] Example 5

[0135] Figure 9 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0136] like Figure 9 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0137] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0138] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the large model-based data question-answering method.

[0139] In some embodiments, the big model-based data question and answer method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the big model-based data question and answer method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the big model-based data question and answer method in any other appropriate manner (for example, by means of firmware).

[0140] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0141] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0142] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0143] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0144] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0145] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0146] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0147] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A data question-answering method based on a large model, characterized in that: include: Obtaining a user input question and a question-answer knowledge base; wherein the question-answer knowledge base includes a plurality of question-answer data pairs, each question-answer data pair including a preset question and a corresponding answer; Constructing an input prompt word according to the user input question; Inputting the input prompt word and the question-answer knowledge base into a question-answering macromodel for processing, so that the question-answering macromodel identifies at least one preset question that matches the user input question in a preset question set in the question-answering knowledge base as a target question set; The user input question is responded to according to the answer set corresponding to the target question set identified by the question-answering model.

2. The method according to claim 1, characterized in that The step of constructing an input prompt word according to the user input question includes: Performing intent recognition on the user input question to obtain the question intent; Identifying at least one preset question that matches the question intention input by the user from a preset question set in the question-answering knowledge base according to the question intention as a first question set; determining at least one first question in the first question set that matches the user input question in similarity as a second question set; An input prompt word is constructed according to the user input question and the second question set.

3. The method according to claim 2, characterized in that The step of inputting the input prompt word and the question-answer knowledge base into a question-answering macromodel for processing, so that the question-answering macromodel identifies at least one preset question from a preset question set in the question-answering knowledge base that matches the user input question in similarity, as a target question set, includes: The input prompt word and the question-answer knowledge base are input into the question-answering big model for processing, so that the question-answering big model identifies at least one second question in the second question set that matches the similarity of the user input question as the target question set.

4. The method according to claim 2, characterized in that The identifying the question intention of the user input question includes: Natural language processing is performed on the user input question to obtain at least one target keyword, and vectorization processing is performed on the at least one target keyword to obtain the question intent.

5. The method according to claim 1, wherein Before inputting the input prompt word and the question-answer knowledge base into the question-answer big model for processing, the method further includes: Obtaining a user input file, and identifying the text content of the file in the user input file; Performing text understanding on the text content of the document to obtain a question set, and constructing question-answer prompt words based on the question set; Inputting the question and answer prompt words and the document text content into the question and answer macromodel for processing, so that the question and answer macromodel identifies text content corresponding to each question in the question set from the document text content as the answer to the question; The question-answer data pair is constructed according to the question set and the question answer set.

6. The method according to claim 5, characterized in that The step of constructing the question-answer data pair according to the question set and the question answer set includes: Vectorization is performed on the question set and the question answer set respectively, and the question-answer data pair is constructed based on the vectorized question set and the vectorized question answer set.

7. The method according to claim 1, characterized in that The responding to the user input question includes: The answers corresponding to each of the target questions are integrated to obtain a target answer, and the user input question is responded to based on the target answer.

8. The method according to claim 1, characterized in that The user input questions include questions related to the user's personal business; the user's personal business includes deposit and payment business, financial management business and foreign exchange business.

9. A data question-answering device based on a large model, characterized in that: include: A question acquisition module is used to obtain a question input by a user and a question-answer knowledge base; wherein the question-answer knowledge base includes a plurality of question-answer data pairs, each question-answer data pair including a preset question and a corresponding answer; A prompt word construction module, configured to construct an input prompt word according to the user input question; a model processing module, configured to input the input prompt word and the question-answering knowledge base into a question-answering macromodel for processing, so that the question-answering macromodel identifies at least one preset question from a preset question set in the question-answering knowledge base that has a similarity to the user input question, as a target question set; The question response module is used to respond to the user input question based on the answer set corresponding to the target question set identified by the question-answering model.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the large model-based data question-answering method according to any one of claims 1 to 8 when executed.

Citation Information

Patent Citations

  • Question extraction and answer generation method and device, medium and equipment

    CN117056490A

  • Method, device and system for constructing question and answer library by using large language model and medium

    CN117216205A

  • Question and answer pair extraction method and device, electronic equipment and storage medium

    CN117407502A

  • Intelligent question and answer method, system and device, computer equipment and readable storage medium

    CN118377881A

  • Intelligent question answering method and system based on traditional model and domain knowledge base enhancement

    CN118657217A

Cited By

  • Question and answer method and system based on large-model intelligent reasoning and caching mechanism

    CN121722892A