Intelligent question and answer method and device based on multiple models, equipment and storage medium
By employing a multi-model intelligent question-answering method, the first model is used to classify the question information and the corresponding second model is retrieved for processing. This solves the problem of low accuracy in AI assistant answers and enables precise answers to questions about system module functions and business knowledge.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- RICHFIT INFORMATION TECH
- Filing Date
- 2024-12-11
- Publication Date
- 2026-06-12
AI Technical Summary
In existing technologies, AI assistants have low accuracy in answering different types of questions.
A multi-model-based intelligent question answering method is adopted. The first model is invoked to classify the question information, and the classification result is determined. Then, the corresponding second model is invoked to process the information based on the classification result, so as to obtain a targeted answer.
It improves the accuracy of answers to different types of questions, and can provide precise answers to questions related to system module functions or business knowledge.
Smart Images

Figure CN122196099A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence, and in particular to a multi-model-based intelligent question answering method, apparatus, device, and storage medium. Background Technology
[0002] With social and economic development and technological progress, business systems are becoming increasingly feature-rich, and business knowledge is becoming increasingly profound and complex. Users may encounter various types of problems while using these systems.
[0003] In some technologies, AI assistants directly answer different types of questions from users and provide solutions and other information.
[0004] Among the aforementioned technologies, the accuracy of AI assistants in answering different types of questions is low. Summary of the Invention
[0005] The multi-model-based intelligent question-answering method, apparatus, device, and storage medium provided in this application are intended to improve the accuracy of answers to different types of questions.
[0006] In a first aspect, embodiments of this application provide a multi-model-based intelligent question-answering method, including:
[0007] In response to the received question information, the first model is invoked, and the question information is processed based on the invoked first model to obtain the classification result corresponding to the question information;
[0008] The second model corresponding to the classification result is retrieved, and the question information is processed based on the retrieved second model to obtain the answer information of the question information under the classification result;
[0009] The answer information will be fed back to the user.
[0010] In one possible implementation, the classification result represents the question information as a question related to the function of the system module, or the classification result represents the question information as a question related to business knowledge.
[0011] In one possible implementation, when the classification result characterizes the question information as a problem related to the function of a system module, the question information is processed based on the invoked second model to obtain the answer information of the question information under the classification result, including:
[0012] The question information is processed based on the second model that is invoked, and the system module corresponding to the question information and the initial answer information of the question information under the classification results are obtained.
[0013] The links to the obtained system modules are added to the initial answer information to obtain the answer information for the question under the category results.
[0014] In one possible implementation, the query information is processed based on the invoked first model to obtain a classification result corresponding to the query information, including:
[0015] Based on the retrieved first model, the query information is split into multiple word units, and these word units are converted into multiple word vectors; each word vector has a corresponding weight.
[0016] Based on the first model that is invoked, the search is performed in the preset category keyword document set according to each word vector to obtain the search results for each word vector;
[0017] Based on the first model that is invoked, the classification result corresponding to the question information is determined according to the search results of each word vector and the weight corresponding to each word vector.
[0018] In one possible implementation, the classification result represents the question information as a question related to the function of the system module, or the classification result represents the question information as a question related to business knowledge; the search result for each word vector includes: a first score and a second score;
[0019] Based on the invoked first model, the classification result corresponding to the question information is determined according to the search results for each word vector and the weight corresponding to each word vector, including:
[0020] The first similarity is determined based on the first score of each word vector and the weight corresponding to each word vector;
[0021] The second similarity is determined based on the second score of each word vector and the weight corresponding to each word vector;
[0022] If the first similarity is determined to be greater than or equal to the second similarity, the classification result indicates that the question information is related to the function of the system module.
[0023] If the first similarity is determined to be less than the second similarity, then the classification result indicates that the question information is related to business knowledge.
[0024] In one possible implementation, the question information is voice information; before retrieving the first model, the method further includes:
[0025] The speech information is subjected to speech recognition and text conversion to obtain the converted question information.
[0026] In one possible implementation, the method further includes:
[0027] Obtain training data, wherein the training data includes a first training set and at least one second training set, the first training set includes question information and classification results, and the second training set includes answer information under the classification results;
[0028] The first training set is input into the first initial model for processing; and the answer information in the second training set under the classification result is input into the second initial model corresponding to the classification result for processing to obtain the predicted answer information under the classification result.
[0029] Based on the answer information under the classification result in the second training set, and the predicted answer information under the classification result, the parameters of the first initial model and the second initial model corresponding to the classification result are adjusted to obtain the first model and the second model corresponding to the classification result.
[0030] Secondly, embodiments of this application provide a multi-model-based intelligent question-answering device, comprising:
[0031] The processing module is used to respond to the received question information, retrieve the first model, process the question information based on the retrieved first model, and obtain the classification result corresponding to the question information.
[0032] The processing module is also used to retrieve the second model corresponding to the classification result, and process the question information based on the retrieved second model to obtain the answer information of the question information under the classification result;
[0033] The feedback module is used to provide the user with the answer information.
[0034] In one possible implementation, the classification result represents the question information as a question related to the function of the system module, or the classification result represents the question information as a question related to business knowledge.
[0035] In one possible implementation, when the classification result indicates that the question information is related to the function of the system module, the question information is processed based on the invoked second model to obtain the answer information of the question information under the classification result. The processing module is used for:
[0036] The question information is processed based on the second model that is invoked, and the system module corresponding to the question information and the initial answer information of the question information under the classification results are obtained.
[0037] The links to the obtained system modules are added to the initial answer information to obtain the answer information for the question under the category results.
[0038] In one possible implementation, the query information is processed based on the invoked first model to obtain a classification result corresponding to the query information. The processing module is used for:
[0039] Based on the retrieved first model, the query information is split into multiple word units, and these word units are converted into multiple word vectors; each word vector has a corresponding weight.
[0040] Based on the first model that is invoked, the search is performed in the preset category keyword document set according to each word vector to obtain the search results for each word vector;
[0041] Based on the first model that is invoked, the classification result corresponding to the question information is determined according to the search results of each word vector and the weight corresponding to each word vector.
[0042] In one possible implementation, the classification result represents the question information as a question related to the function of the system module, or the classification result represents the question information as a question related to business knowledge; the search result for each word vector includes: a first score and a second score;
[0043] Based on the invoked first model, the classification result corresponding to the question information is determined according to the search results of each word vector and the weight corresponding to each word vector. The processing module is used for:
[0044] The first similarity is determined based on the first score of each word vector and the weight corresponding to each word vector;
[0045] The second similarity is determined based on the second score of each word vector and the weight corresponding to each word vector;
[0046] If the first similarity is determined to be greater than or equal to the second similarity, the classification result indicates that the question information is related to the function of the system module.
[0047] If the first similarity is determined to be less than the second similarity, then the classification result indicates that the question information is related to business knowledge.
[0048] In one possible implementation, the question information is voice information; before retrieving the first model, the processing module is also used for:
[0049] The speech information is subjected to speech recognition and text conversion to obtain the converted question information.
[0050] In one possible implementation, the processing module is further configured to:
[0051] Obtain training data, wherein the training data includes a first training set and at least one second training set, the first training set includes question information and classification results, and the second training set includes answer information under the classification results;
[0052] The first training set is input into the first initial model for processing; and the answer information in the second training set under the classification result is input into the second initial model corresponding to the classification result for processing to obtain the predicted answer information under the classification result.
[0053] Based on the answer information under the classification result in the second training set, and the predicted answer information under the classification result, the parameters of the first initial model and the second initial model corresponding to the classification result are adjusted to obtain the first model and the second model corresponding to the classification result.
[0054] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0055] The memory stores the instructions that the computer executes;
[0056] The processor executes computer execution instructions stored in memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0057] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0058] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0059] The multi-model-based intelligent question-answering method, apparatus, device, and storage medium provided in this application embodiment receive a user's question, retrieve a first model; the first model processes the user's question to obtain a classification result corresponding to the user's question; based on the classification result, a second model corresponding to the classification result is retrieved; the second model processes the user's question under the classification result to obtain an answer to the user's question under the classification result; finally, the answer is fed back to the user, thereby improving the accuracy of answers to different types of questions. Attached Figure Description
[0060] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0061] Figure 1 A flowchart illustrating the multi-model-based intelligent question answering method provided in this application. Figure 1 ;
[0062] Figure 2 A flowchart illustrating the multi-model-based intelligent question answering method provided in this application. Figure 2 ;
[0063] Figure 3 A flowchart illustrating the multi-model-based intelligent question answering method provided in this application. Figure 3 ;
[0064] Figure 4 A flowchart illustrating the multi-model-based intelligent question answering method provided in this application. Figure 4 ;
[0065] Figure 5 A schematic diagram of the structure of the multi-model-based intelligent question-answering device provided in this application;
[0066] Figure 6 A schematic diagram of the structure of the electronic device provided in this application.
[0067] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0068] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0069] First, let me explain the terms used in this application:
[0070] A business system is a system developed for an enterprise that has multiple modules. Each module in a business system can handle one or more types of business transactions.
[0071] With social and economic development and technological advancements, businesses are increasingly diversifying their operations. Enterprises typically develop business systems based on their specific business needs. As the variety of business operations grows, the business knowledge becomes more complex and in-depth. Simultaneously, the number of system modules required within these business systems also increases. Each system module may be responsible for handling one or more types of business transactions. Furthermore, the business processes may differ depending on the specific system module handling its assigned business type.
[0072] In one possible application scenario, a user logs into a business system to conduct business. However, the user may not be familiar with the specific system module where the type of business they wish to conduct is processed during the system's development.
[0073] In one possible application scenario, users log into the business system to learn about various business-related knowledge and general information.
[0074] Based on any of the above possible scenarios, in some embodiments, the business system is equipped with an artificial intelligence assistant to answer different types of questions raised by users and provide solutions and other information.
[0075] However, considering any of the possible scenarios described above, it is clear that in the aforementioned embodiments, the AI assistant answers user questions based on a pre-trained model. Using an AI assistant equipped with a single model to answer different types of user questions presents a technical problem: low accuracy in answering different types of questions.
[0076] The multi-model-based intelligent question-answering method provided in this application embodiment receives a user's question, invokes a first model, processes the user's question to obtain a classification result corresponding to the user's question, invokes a second model corresponding to the classification result, processes the user's question under the classification result to obtain an answer to the user's question under the classification result, and finally feeds the answer back to the user. This technical means improves the accuracy of answers to different types of questions.
[0077] The technical solution of this application and how it solves the above-mentioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0078] Figure 1 A flowchart illustrating the multi-model-based intelligent question answering method provided in this application. Figure 1 ,like Figure 1 As shown, the method includes:
[0079] Step 101. In response to the received question information, the first model is invoked, and the question information is processed based on the invoked first model to obtain the classification result corresponding to the question information.
[0080] For example, an AI assistant module can be configured on a business system. An entry point for the AI assistant can be set on the business system's interface. In response to a user clicking the entry point for the AI assistant module, the module will be displayed on the business system.
[0081] The AI assistant module includes an input field for receiving user questions. It is equipped with a first model and at least one second model. Upon receiving a question, the AI assistant module invokes the first model. The invoked first model then categorizes the received question to obtain the corresponding classification result.
[0082] For example, after classifying the question information, the first model may obtain a classification result of type A, type B, or type C.
[0083] Step 102. Retrieve the second model corresponding to the classification result, and process the question information based on the retrieved second model to obtain the answer information of the question information under the classification result.
[0084] For example, the AI assistant module is equipped with at least one second model, each second model being used to answer a question corresponding to a classification result. Based on the classification result corresponding to the question information obtained by processing the question information using the first model, the second model corresponding to that classification result is retrieved.
[0085] By calling the second model, the question information under the classification result is processed to obtain the corresponding answer information.
[0086] For example, the second model includes model A, model B, and model C. After the first model classifies the question information, if it determines that the classification result of the question information is type A, then model A is invoked to process the question information to obtain the answer information; if it determines that the classification result of the question information is type B, then model B is invoked to process the question information to obtain the answer information; if it determines that the classification result of the question information is type C, then model C is invoked to process the question information to obtain the answer information.
[0087] Step 103. Provide the answer information to the user.
[0088] For example, in addition to an information input box, the AI assistant module also has an answer information interface. Based on the retrieved second model, after obtaining the answer information corresponding to the question under the classification result, the answer information is displayed on the answer information interface, thereby providing feedback to the user.
[0089] The multi-model-based intelligent question-answering method provided in this application receives a user's question and invokes a first model. The first model processes the user's question to obtain a classification result, which preliminarily determines the specific type of question, allowing for targeted answers. Based on the classification result, a second model corresponding to that classification is invoked. This second model processes the user's question under that classification result, obtaining an answer for that specific category. For questions of the identified type, the corresponding second model is invoked to provide a targeted answer. Finally, the answer is returned to the user. This improves the accuracy of answers for different types of questions.
[0090] As can be seen from the foregoing embodiments, the first model can categorize user queries. In practical applications of business systems, user queries may include questions about system usage, as well as questions about business knowledge. This embodiment explains how to answer user queries under different categories.
[0091] In one possible implementation, the classification result represents the question information as a question related to the function of the system module, or the classification result represents the question information as a question related to business knowledge.
[0092] For example, based on the retrieved first model, the received user questions are classified to obtain classification results. This determines which category the received user questions belong to.
[0093] In one example, the first model determines that the classification result represents the question information as a question related to the function of a system module.
[0094] Based on practical application examples, the system modules configured in the business system include, but are not limited to: corporate governance module, system management module, internal control risk module, legal compliance module, audit management module, financial data module, financial research module, and system management module.
[0095] It should be noted that the above system modules are merely names and do not imply any limitation on their functionality. For example, the corporate governance module can be used for information dissemination, integration, and modification within an enterprise; the policy management module can be used to process enterprise policy information or employee data; the internal control risk module can be used to analyze and process internal data to determine if any anomalies exist; the legal compliance module can be used to process enterprise compliance information; the audit management module can be used to process enterprise audit information; the financial data module can be used to process enterprise financial data; the financial research module can be used to analyze enterprise financial data and determine its characteristics; and the system management module can be used to configure the various modules within the business system.
[0096] Figure 2 A flowchart illustrating the multi-model-based intelligent question answering method provided in this application. Figure 2 ,like Figure 2 As shown, when the classification result indicates that the question information is related to the function of a system module, the second model processes the question information and obtains the answer information through the following steps:
[0097] Step 201. Process the question information based on the retrieved second model to obtain the system module corresponding to the question information and the initial answer information of the question information under the classification results.
[0098] For example, when the classification result indicates that the current user's question is related to the function of the system module, the second model corresponding to the question related to the function of the system module is retrieved and the question information is processed.
[0099] Based on the processing of the question information using the second model, the second model can obtain the initial answer information corresponding to the current question information; and based on the processing of the question information using the second model, the second model can obtain the system module that the user is asking about in the current question information.
[0100] For example, a user enters the question "I want to fill in compliance information" in the information input box of the AI assistant module. The first model is invoked to classify the question, and the classification result is that the current question is related to the function of the system module. The model used to answer questions related to the function of the system module is then invoked to process the question.
[0101] Based on the model retrieved to answer questions related to the functions of the system module, after processing the question information, it can be determined that the system module corresponding to the question information is the legal compliance module; and after processing the question information, the initial answer information can be obtained as "You can fill in the compliance information through the following link".
[0102] Step 202. Add the obtained system module links to the initial answer information to obtain the answer information of the question under the classification results.
[0103] For example, each system module configured in the business system has a corresponding link to the system module.
[0104] Based on the previous example, after obtaining the initial answer information and the corresponding system module for the question, the link to the system module is added to the initial answer information, thus obtaining the answer information for the question related to the function of the system module. For example, if the link corresponding to the legal compliance module is 'a', then the answer information for the question would be: "You can fill in compliance information through the following link: a".
[0105] In another example, the first model determines that the classification result represents the question information as a question related to business knowledge.
[0106] For example, when the classification result indicates that the current user's question is related to business knowledge, the second model corresponding to the question related to business knowledge is retrieved, the question information is processed, and thus the answer information corresponding to the question information related to business knowledge is obtained.
[0107] For example, a user enters the question "What are the licenses and permits in the compliance information?" into the information input box of the AI assistant module. The first model is invoked to classify the question, and the result is that the question is related to business knowledge. The model used to answer business knowledge-related questions is then invoked to process the question.
[0108] Based on the retrieved model used to answer business knowledge-related questions, the processed query information yields the following answer: "Licenses and licenses can refer to your industry-specific licenses or qualifications. When filling in license and license information, please enter the code of your industry-specific license or qualification in this information field. Note that if the code involves letters, please enter them in uppercase in this information field."
[0109] It should be noted that the two examples above can be implemented individually or in combination.
[0110] In one possible implementation, the user enters the question "I want to fill in compliance information" in the information input box of the AI assistant module. The first model is invoked for processing, and the classification result indicates that the current question is related to the function of the system module. The model used to answer questions related to the function of the system module is invoked, and the answer information corresponding to the current question is: "You can fill in compliance information through the following link: a".
[0111] Based on the answered information, the user accesses the legal compliance module via link 'a' to fill in compliance information. During the process, the user is unsure how to fill in the information fields for licenses and permits. The user then enters a second question in the AI assistant module's input box: "What are licenses and permits in the compliance information?" The first model is invoked for processing, and the classification result indicates that the second question is related to business knowledge. The model used to answer business knowledge-related questions is invoked, and the corresponding answer to the second question is: "Licenses and permits can refer to your industry-specific licenses or qualification certificates. When filling in license and permit information, please enter the code of your industry-specific license or qualification certificate in this information field. Note that if the code involves letters, please enter them in uppercase letters in this information field."
[0112] In the above embodiments, the first model determines the classification result of the question information. If the classification result indicates that the question information is related to the function of a system module, the model used to answer questions related to the function of a system module is invoked, and the question information is processed to obtain the answer information. If the classification result indicates that the question information is related to business knowledge, the model used to answer questions related to business knowledge is invoked, and the question information is processed to obtain the answer information. Furthermore, when invoking the model used to answer questions related to the function of a system module, it is possible to determine which specific system module the question information refers to, and the link corresponding to that system module is attached to the answer information, which can improve the efficiency of users performing business processing on the business system. Moreover, by invoking different models to answer according to different classification results, user questions can be answered in a targeted manner, improving the accuracy of question answers.
[0113] As can be seen from the foregoing embodiments, the first model classifies the received user query information to obtain a classification result for the query information. This embodiment further explains the process by which the first model obtains the classification result for the query information.
[0114] Figure 3 A flowchart illustrating the multi-model-based intelligent question answering method provided in this application. Figure 3 ,like Figure 3As shown, based on the retrieved first model, the question information is processed, and the classification result corresponding to the question information can be obtained through the following steps:
[0115] Step 301. Based on the first model that is invoked, the question information is split into multiple word units, and the multiple word units are converted into multiple word vectors.
[0116] Each word vector has a corresponding weight.
[0117] For example, upon receiving a user's input query, the first model is invoked to process the query. Optionally, the first model includes a natural language processing module. This module uses token embeddings to break down the query into multiple tokens and converts these tokens into word vectors. Each token has its corresponding word vector, and the vector dimensions of these word vectors are preset values.
[0118] Each word vector has a corresponding weight, which can be preset. This embodiment does not limit the preset weight value for each word vector. The weight value of each word vector can also be set according to the popularity of the corresponding word element.
[0119] Step 302. Based on the retrieved first model, search the preset category keyword document set according to each word vector to obtain the search results for each word vector.
[0120] For example, the first model converts the word vectors obtained from the split word units and searches within a predefined set of category keyword documents. For instance, the first model can search within the predefined set of category keyword documents using an information retrieval matching algorithm, which includes, but is not limited to, the Best Matching 25 (BM25) algorithm.
[0121] When searching using the BM25 algorithm, the search results for each word vector in the predefined category keyword document set are determined by the Term Frequency-Inverse Document Frequency (TF-IDF) technique.
[0122] For example, term frequency can be calculated as the proportion of the number of times the word vector corresponding to a word appears in a document relative to the total number of words in the document. Inverse document frequency can be calculated by dividing the number of documents in which the word vector corresponds to a word in a document by the total number of documents. Multiplying the calculated term frequency and inverse document frequency yields the search result for the word vector corresponding to that word.
[0123] In one example, the search results for each word vector include: a first score and a second score.
[0124] For example, the preset set of categorized keyword documents may include: a set of categorized keywords used by the system and a set of categorized keywords for business issues. The word vector is searched in the set of categorized keywords used by the system to obtain a first score, and then searched in the set of categorized keywords for business issues to obtain a second score.
[0125] It is understandable that a word vector, after being searched, can yield a first score and a second score. The first score indicates the probability that the current word vector belongs to the system's set of category keywords, while the second score indicates the probability that the current word vector belongs to the set of category keywords for business issues.
[0126] Step 303. Based on the first model that has been invoked, determine the classification result corresponding to the question information according to the search results of each word vector and the weight corresponding to each word vector.
[0127] For example, the classification result corresponding to the question information can be determined based on the search results for each word vector and the weight corresponding to each word vector.
[0128] Based on the examples above, the classification results indicate that the question information is related to the function of the system module, or the classification results indicate that the question information is related to business knowledge.
[0129] After step 302, each word vector obtains its corresponding first score and second score.
[0130] In one example, the first similarity is determined based on the first score of each word vector and the weight corresponding to each word vector. The second similarity is determined based on the second score of each word vector and the weight corresponding to each word vector.
[0131] For example, a first similarity is calculated based on the first score of each word vector and the weight value corresponding to each word vector. The first similarity indicates the probability that the question information corresponding to multiple word vectors is classified as a question related to the function of a system module.
[0132] The second similarity is calculated based on the second score and weight value of each word vector. This second similarity indicates the probability that the question information corresponding to multiple word vectors is classified as a question related to business knowledge.
[0133] Optionally, the first similarity can be calculated by multiplying the first score of a word vector by its corresponding weight value to obtain the first weight score of that word vector, and then summing the first weight scores of each word vector to obtain the first similarity. Similarly, the second similarity can be calculated by multiplying the second score of a word vector by its corresponding weight value to obtain the second weight score of that word vector, and then summing the second weight scores of each word vector to obtain the second similarity.
[0134] In one example, if the first similarity is determined to be greater than or equal to the second similarity, the classification result indicates that the question is related to the system module's functionality. If the first similarity is determined to be less than the second similarity, the classification result indicates that the question is related to business knowledge.
[0135] For example, the classification result is determined based on the relationship between the calculated first similarity and the second similarity.
[0136] If the first similarity is greater than or equal to the second similarity, it means that the probability of the question information corresponding to the multiple word vectors being classified as questions related to system module functions is higher than the probability of being classified as questions related to business knowledge. Therefore, the classification result is determined to represent questions related to system module functions.
[0137] If the first similarity is determined to be less than the second similarity, it means that the probability of the question information corresponding to multiple word vectors being classified as questions representing questions related to system module functions is less than the probability of them being classified as questions representing questions related to business knowledge. Therefore, the classification result is determined to represent questions related to business knowledge.
[0138] In the above embodiments, by classifying the question information using the first model, it is possible to determine the type of question represented by the question information. After determining the question type, the corresponding second model is invoked, and the second model is used to answer that type of question in a targeted manner. This improves the accuracy of answering different types of user question information.
[0139] Based on any of the foregoing embodiments, after receiving the user's question information, the question information is categorized and processed using a first model. However, in some cases, the AI assistant module may also allow voice input.
[0140] In one example, the question information is spoken information. For cases where the question information is spoken information, before calling the first model, the process includes: performing speech recognition and text conversion on the spoken information to obtain the converted question information.
[0141] For example, in addition to the information input box, the AI assistant module also has a voice input button. It receives the user's voice information in response to the user's action on the voice input button.
[0142] After receiving the user's voice information, speech recognition is performed on the voice information. Based on the speech recognition result, the voice information is converted into text to obtain the converted question information.
[0143] Based on the transformed question information, the first model is invoked to classify the question information to obtain the classification result, and the second model corresponding to the classification result is invoked to obtain the answer information.
[0144] Optionally, the first model includes a speech recognition module that can receive the user's voice information and directly convert the speech into text to obtain the question information.
[0145] In the above example, voice information can also be used as question information, allowing users to ask questions directly through voice. This enables users to ask questions in different ways, improving the intelligence of the AI assistant module and indirectly improving the efficiency of users using the business system.
[0146] Based on any of the foregoing embodiments, both the first model and at least one second model are pre-trained.
[0147] In one possible implementation, each model is trained separately. Each model includes a knowledge base module, a model question-answering optimization module, a question testing module, and an interface generation and debugging module.
[0148] The knowledge base module is used to fine-tune the model by training it based on the input data. For example, the input data in the knowledge base module of the first model can be a set of system-use classification keywords and a set of business question classification keywords.
[0149] For example, the input materials in the knowledge base module of the model used to answer questions related to the function of system modules can be a set of questions and answers on system usage and system manuals, etc.; the input materials in the knowledge base module of the model used to answer questions related to business knowledge can be general knowledge in the financial field, professional knowledge of risk management, explanations of risk indicator terms, etc.
[0150] The model question-answering optimization module is used to optimize the model's output answer information by adjusting the parameters in the model to improve the response speed and accuracy of the output answer information. These parameters may include, but are not limited to, matching accuracy, answer temperature, answer capacity, search capacity, and contextual reference range.
[0151] The question testing module is used to test whether the accuracy of the model's answer information meets a preset accuracy threshold.
[0152] The interface generation and debugging module is used to configure the interface of each model so that the AI assistant module can call the interface according to the different models.
[0153] In one possible implementation, the first model and the second model are jointly trained. Each joint training session involves training the first model and one of the second models together. For example, the first joint training session might involve training the first model and a second model used to answer questions related to system module functionality, while the second joint training session might involve training the first model and a second model used to answer questions related to business knowledge.
[0154] Figure 4 A flowchart illustrating the multi-model-based intelligent question answering method provided in this application. Figure 4 ,like Figure 4 As shown, joint training of the models can be achieved through the following steps:
[0155] Step 401. Obtain the training data.
[0156] The training data includes a first training set and at least one second training set. The first training set includes question information and classification results, and the second training set includes answer information based on the classification results.
[0157] For example, training data is obtained, which is used to train a first initial model and a second initial model. The training data includes a first training set and at least one second training set. The first training set is used to train the first initial model, and the second training set is used to train the second initial model.
[0158] It is understandable that since there are multiple second models, there are also multiple second initial models, and therefore multiple second training sets are used to train these multiple second initial models.
[0159] The first training set includes question information and the corresponding classification results. The second training set includes the corresponding answer information for each classification result; that is, the second training set includes answer information for questions related to system module functions or questions related to business knowledge.
[0160] Step 402. Input the first training set into the first initial model for processing; and input the answer information of the second training set under the classification result into the second initial model corresponding to the classification result for processing to obtain the predicted answer information under the classification result.
[0161] For example, the question information and the corresponding classification result from the first training set are input into the first initial model for processing. The answer information from the second training set under the classification result is input into the second initial model corresponding to the classification result for processing.
[0162] Based on the above example, the predicted answer information of the second initial model corresponding to the classification result is obtained.
[0163] For example, consider training a first model and a model used to answer questions related to the functionality of system modules. The first training set includes various question information and the corresponding classification results. The second training set includes the answer information corresponding to each question, including the initial answer information and the system module pointed to by the question information.
[0164] The first training set is input into the first initial model for processing, and the second training set is input into the initial model used to answer questions related to the functions of system modules for processing, thereby obtaining the predicted answer information for questions related to the functions of system modules.
[0165] Step 403. Based on the answer information under the classification result in the second training set, and the predicted answer information under the classification result, adjust the parameters of the first initial model and the second initial model corresponding to the classification result to obtain the first model and the second model corresponding to the classification result.
[0166] For example, based on the answer information in the second training set under the classification result and the predicted answer information obtained by the second initial model, the first initial model and the second initial model corresponding to the classification result can be trained.
[0167] The training process involves adjusting the parameters of a first initial model and a second initial model corresponding to the classification result, thereby obtaining a trained first model and a second model corresponding to the classification result. The adjusted parameters may include, but are not limited to: learning rate, accuracy, word segmentation dimension, matching accuracy, response temperature, response capacity, search capacity, and contextual reference range.
[0168] For example, consider training a first model and a model for answering questions related to the functions of system modules. Based on the answers to system module function-related questions in the second training set and the predicted answers to system module function-related questions output by the second initial model, the parameters of the first initial model and the initial model for answering system module function-related questions are adjusted to obtain the trained first model and the model for answering system module function-related questions.
[0169] Based on the trained first model and the second model used to answer questions related to the function of system modules, when the classification result of the question information is a question related to the function of system modules, the corresponding second model can output the answer information corresponding to the question information. The answer information includes the initial answer information and the link to the system module pointed to by the question information.
[0170] It should be noted that the training process for the first model and the second model used to answer business knowledge-related questions is similar, and will not be elaborated here.
[0171] In the example above, by training each model separately, or by jointly training the first and second models, well-trained first and second models can be obtained. Based on the trained first and second models, it is possible to classify the question information, and based on the classification results, the second model corresponding to the classification results can be invoked to provide targeted question answers. This can improve the accuracy of answering different types of questions.
[0172] The multi-model-based intelligent question-answering method provided in this application involves: firstly, determining the classification result of received question information based on a pre-trained first model; secondly, retrieving a pre-trained second model corresponding to the classification result; thirdly, providing a targeted answer to the question information using the second model; and finally, feeding back the answer information output by the second model to the user. This method can determine the question type represented by the question information and retrieve different models to answer the question information according to different question types, thereby improving the accuracy of answering different types of questions.
[0173] Figure 5 The schematic diagram of the multi-model-based intelligent question-answering device provided in this application is as follows: Figure 5 As shown, the multi-model-based intelligent question-answering device 50 provided in this embodiment includes:
[0174] The processing module 501 is used to respond to the received question information, retrieve the first model, and process the question information based on the retrieved first model to obtain the classification result corresponding to the question information.
[0175] The processing module 501 is also used to retrieve the second model corresponding to the classification result, and process the question information based on the retrieved second model to obtain the answer information of the question information under the classification result;
[0176] Feedback module 502 is used to provide the answer information to the user.
[0177] In one possible implementation, the classification result represents the question information as a question related to the function of the system module, or the classification result represents the question information as a question related to business knowledge.
[0178] In one possible implementation, when the classification result indicates that the question information is related to the function of the system module, the question information is processed based on the invoked second model to obtain the answer information of the question information under the classification result. The processing module 501 is used for:
[0179] The question information is processed based on the second model that is invoked, and the system module corresponding to the question information and the initial answer information of the question information under the classification results are obtained.
[0180] The links to the obtained system modules are added to the initial answer information to obtain the answer information for the question under the category results.
[0181] In one possible implementation, the query information is processed based on the invoked first model to obtain the classification result corresponding to the query information. The processing module 501 is used for:
[0182] Based on the retrieved first model, the query information is split into multiple word units, and these word units are converted into multiple word vectors; each word vector has a corresponding weight.
[0183] Based on the first model that is invoked, the search is performed in the preset category keyword document set according to each word vector to obtain the search results for each word vector;
[0184] Based on the first model that is invoked, the classification result corresponding to the question information is determined according to the search results of each word vector and the weight corresponding to each word vector.
[0185] In one possible implementation, the classification result represents the question information as a question related to the function of the system module, or the classification result represents the question information as a question related to business knowledge; the search result for each word vector includes: a first score and a second score;
[0186] Based on the invoked first model, the classification result corresponding to the question information is determined according to the search results of each word vector and the weight corresponding to each word vector. The processing module 501 is used for:
[0187] The first similarity is determined based on the first score of each word vector and the weight corresponding to each word vector;
[0188] The second similarity is determined based on the second score of each word vector and the weight corresponding to each word vector;
[0189] If the first similarity is determined to be greater than or equal to the second similarity, the classification result indicates that the question information is related to the function of the system module.
[0190] If the first similarity is determined to be less than the second similarity, then the classification result indicates that the question information is related to business knowledge.
[0191] In one possible implementation, the question information is voice information; before retrieving the first model, the processing module 501 is also used for:
[0192] The speech information is subjected to speech recognition and text conversion to obtain the converted question information.
[0193] In one possible implementation, the processing module 501 is further configured to:
[0194] Obtain training data, wherein the training data includes a first training set and at least one second training set, the first training set includes question information and classification results, and the second training set includes answer information under the classification results;
[0195] The first training set is input into the first initial model for processing; and the answer information in the second training set under the classification result is input into the second initial model corresponding to the classification result for processing to obtain the predicted answer information under the classification result.
[0196] Based on the answer information under the classification result in the second training set, and the predicted answer information under the classification result, the parameters of the first initial model and the second initial model corresponding to the classification result are adjusted to obtain the first model and the second model corresponding to the classification result.
[0197] The multi-model-based intelligent question-answering device provided in this embodiment can execute the methods provided in the above-described method embodiments. Its implementation principle and technical effects are similar, and will not be described in detail here.
[0198] Figure 6 A schematic diagram of the structure of the electronic device provided in this application. Figure 6 As shown, the electronic device 60 provided in this embodiment includes at least one processor 601 and a memory 602. Optionally, the device 60 further includes a communication component 603. The processor 601, memory 602, and communication component 603 are connected via a bus 604.
[0199] In a specific implementation, at least one processor 601 executes computer execution instructions stored in memory 602, causing at least one processor 601 to perform the above-described method.
[0200] The specific implementation process of processor 601 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0201] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0202] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0203] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0204] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0205] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0206] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0207] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0208] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0209] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0210] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0211] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0212] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0213] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A multi-model-based intelligent question answering method, characterized in that, include: In response to the received question information, the first model is invoked, and the question information is processed based on the invoked first model to obtain the classification result corresponding to the question information; The second model corresponding to the classification result is retrieved, and the question information is processed based on the retrieved second model to obtain the answer information of the question information under the classification result; The answer information will be fed back to the user.
2. The method according to claim 1, characterized in that, The classification result indicates that the question information is related to the function of the system module, or the classification result indicates that the question information is related to business knowledge.
3. The method according to claim 2, characterized in that, When the classification result indicates that the question information is related to the function of the system module, the question information is processed based on the invoked second model to obtain the answer information of the question information under the classification result, including: The question information is processed based on the second model that is invoked to obtain the system module corresponding to the question information and the initial answer information of the question information under the classification result; The obtained system module links are added to the initial answer information to obtain the answer information for the question under the classification results.
4. The method according to claim 1, characterized in that, The process of processing the question information based on the invoked first model to obtain the classification result corresponding to the question information includes: Based on the retrieved first model, the question information is split into multiple word units, and the multiple word units are converted into multiple word vectors; wherein, each word vector has a corresponding weight; Based on the first model that is invoked, a search is performed on each word vector in a preset set of classified keyword documents to obtain the search results for each word vector; Based on the first model invoked, the classification result corresponding to the question information is determined according to the search results of each word vector and the weight corresponding to each word vector.
5. The method according to claim 4, characterized in that, The classification result indicates that the question information is related to the function of the system module, or the classification result indicates that the question information is related to business knowledge; The search results for each word vector include: a first score and a second score; The step of determining the classification result corresponding to the question information based on the invoked first model, according to the search results of each word vector and the weight corresponding to each word vector, includes: The first similarity is determined based on the first score of each word vector and the weight corresponding to each word vector; The second similarity is determined based on the second score of each word vector and the weight corresponding to each word vector; If the first similarity is determined to be greater than or equal to the second similarity, then the classification result indicates that the question information is a question related to the function of the system module; If the first similarity is determined to be less than the second similarity, then the classification result indicates that the question information is a question related to business knowledge.
6. The method according to any one of claims 1-5, characterized in that, The question information is voice information; before retrieving the first model, the method further includes: The voice information is subjected to speech recognition and text conversion to obtain the converted question information.
7. The method according to any one of claims 1-5, characterized in that, The method further includes: Acquire training data, wherein the training data includes a first training set and at least one second training set, the first training set includes question information and classification results, and the second training set includes answer information under the classification results; The first training set is input into the first initial model for processing; and the answer information in the second training set under the classification result is input into the second initial model corresponding to the classification result for processing to obtain the predicted answer information under the classification result. Based on the answer information under the classification result in the second training set, and the predicted answer information under the classification result, the parameters of the first initial model and the second initial model corresponding to the classification result are adjusted to obtain the first model and the second model corresponding to the classification result.
8. A multi-model-based intelligent question-answering device, characterized in that, include: The processing module is used to respond to the received question information, retrieve the first model, and process the question information based on the retrieved first model to obtain the classification result corresponding to the question information; The processing module is also used to retrieve the second model corresponding to the classification result, and process the question information based on the retrieved second model to obtain the answer information of the question information under the classification result; The feedback module is used to provide the answer information back to the user.
9. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 7.
11. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 7.