Intelligent question and answer method and device, electronic equipment and storage medium

Through the collaborative work of multiple question-and-answer models and customized fusion strategies, the existing intelligent question-and-answer system's inaccurate answers and insufficient flexibility are solved, achieving higher answer accuracy and adaptability.

CN119885071APending Publication Date: 2025-04-25周鹏 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411918923.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

Existing intelligent question-and-answer systems usually rely on a single artificial intelligence model and cannot fully cover knowledge in different fields, resulting in inadequate answers or answers, lack of flexibility, and difficult to adapt to complex and changeable user questioning models.

Method used

Multiple question-and-answer models work together, and a customized fusion strategy is selected according to the question type. By pre-processing user questions, entering multiple question-and-answer models for answer prediction, and integrating answers using corresponding fusion strategies to generate the final answer.

Benefits of technology

Improve the accuracy and flexibility of answers, and better understand and analyze complex questions, thereby improving user experience and system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119885071A_ABST
    Figure CN119885071A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an intelligent question answering method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a question input by a user, and carrying out the preprocessing of the question; inputting the pre-processed questions into a plurality of question and answer models for answer prediction; and fusing answers predicted by the plurality of question models by using a fusion strategy corresponding to the question type to generate a final answer of the question. The technical scheme provided by the embodiment of the invention can be suitable for diversified scenes needing to provide rapid and accurate information answering and interaction, and can solve the problem that an intelligent question answering system in the prior art is inaccurate in answering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an intelligent question-answering method, device, electronic device and storage medium. Background Art

[0002] In today's era of information explosion, it is crucial to quickly and accurately obtain the required information. Whether it is internal knowledge management, customer service support, or individual users' needs for professional knowledge, traditional search methods often fail to meet the requirements of efficiency and accuracy. Intelligent question-answering systems have emerged as the times require. They can not only understand the description of questions in natural language, but also extract the most relevant information from massive data through advanced technologies such as deep learning, and provide accurate answers or solutions. This not only improves the user experience, but also significantly improves work efficiency, reduces labor costs, and creates huge value for enterprises and organizations.

[0003] However, under the existing technical framework, intelligent question-answering systems usually rely on only a single artificial intelligence model to handle all types of query requests. Current technical implementations have obvious limitations. On the one hand, a single model may not be able to fully cover knowledge in different fields, resulting in answers to questions in specific fields that are not professional or accurate enough; on the other hand, due to the lack of flexibility, its adaptability and response speed may also be limited when faced with complex and changing user question patterns. In addition, when encountering situations that require the combination of multiple contextual information or involve multiple rounds of dialogue, a single model may expose problems with insufficient understanding and reasoning capabilities. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides an intelligent question-answering method, device, electronic device and storage medium to solve the problem of inaccurate answers given by the intelligent question-answering system in the prior art.

[0005] In a first aspect, an embodiment of the present invention provides an intelligent question-answering method, comprising:

[0006] Obtaining a question input by a user, and preprocessing the question;

[0007] Input the preprocessed questions into multiple question-answering models for answer prediction;

[0008] The answers predicted by the multiple question models are fused using a fusion strategy corresponding to the question type to generate a final answer to the question.

[0009] Furthermore, the preprocessed questions are input into multiple question-answering models for answer prediction, including:

[0010] Selecting at least one model from a plurality of pre-created domain-specific question-answering models, the model having a domain matching degree with the question reaching a set lower threshold;

[0011] The preprocessed questions are input into the pre-created generalized question-answering model and the selected field-specific question-answering model for answer prediction.

[0012] Further, the question types are understanding type and information query type;

[0013] Using a fusion strategy corresponding to the question type, the answers predicted by the multiple question models are fused to generate a final answer to the question, including:

[0014] Determine whether the maximum value of the domain matching degree of the question in the selected field-specific question-answering models reaches a set upper limit threshold;

[0015] If yes, the domain-specific question-answering model corresponding to the maximum domain matching degree is used as the target question-answering model; otherwise, the generalized question-answering model is used as the target question-answering model;

[0016] The target question-answering model is instructed to re-predict the answer to the question as the final answer based on its predicted answer and in combination with the answers predicted by other question-answering models.

[0017] Furthermore, the question type is a logical reasoning type;

[0018] Using a fusion strategy corresponding to the question type, the answers predicted by the multiple question models are fused to generate a final answer to the question, including:

[0019] According to the degree of matching between the question-answering model and the domain of the question, the answers predicted by each question-answering model are assigned corresponding weights;

[0020] The answers predicted by each question-answering model after being assigned weights are used as a new feature set and input into a pre-created meta-model; the answers are integrated using the meta-model to generate the final answer to the question.

[0021] Furthermore, the question type is a fact judgment type;

[0022] Using a fusion strategy corresponding to the question type, the answers predicted by the multiple question models are fused to generate a final answer to the question, including:

[0023] The answers predicted by each question-answering model are counted, and the final answer to the question is determined by majority rule.

[0024] In a second aspect, an embodiment of the present invention provides an intelligent question-answering device, comprising:

[0025] A question acquisition unit, used to acquire a question input by a user and pre-process the question;

[0026] An answer prediction unit, used to input the preprocessed questions into multiple question-answering models for answer prediction;

[0027] An answer fusion unit is used to fuse the answers predicted by the multiple question models using a fusion strategy corresponding to the question type to generate a final answer to the question.

[0028] Furthermore, the answer prediction unit is specifically used for:

[0029] Selecting at least one model from a plurality of pre-created domain-specific question-answering models, the model having a domain matching degree with the question reaching a set lower threshold;

[0030] The preprocessed questions are input into the pre-created generalized question-answering model and the selected field-specific question-answering model for answer prediction.

[0031] Further, the question types are understanding type and information query type;

[0032] The answer fusion unit includes a comprehension question answer fusion subunit, which is used to:

[0033] Determine whether the maximum value of the domain matching degree of the question in the selected field-specific question-answering models reaches a set upper limit threshold;

[0034] If yes, the domain-specific question-answering model corresponding to the maximum domain matching degree is used as the target question-answering model; otherwise, the generalized question-answering model is used as the target question-answering model;

[0035] The target question-answering model is instructed to re-predict the answer to the question as the final answer based on its predicted answer and in combination with the answers predicted by other question-answering models.

[0036] Furthermore, the question type is a logical reasoning type;

[0037] The answer fusion unit includes a logical reasoning question answer fusion subunit, which is used to:

[0038] According to the degree of matching between the question-answering model and the domain of the question, the answers predicted by each question-answering model are assigned corresponding weights;

[0039] The answers predicted by each question-answering model after being assigned weights are used as a new feature set and input into a pre-created meta-model; the answers are integrated using the meta-model to generate the final answer to the question.

[0040] Furthermore, the question type is a fact judgment type;

[0041] The answer fusion unit includes a fact judgment question answer fusion sub-unit, which is used to:

[0042] The answers predicted by each question-answering model are counted, and the final answer to the question is determined by majority rule.

[0043] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a housing, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the housing, and the processor and the memory are arranged on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the intelligent question and answer method described in the first aspect above.

[0044] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more central processing units to implement the intelligent question and answer method described in the first aspect above.

[0045] The technical solution provided by the embodiment of the present invention adopts multiple question-answering models to work together and selects a customized fusion strategy to integrate answer predictions according to the question type. This enables the system to better understand and analyze questions through the complementarity of different question-answering models when facing complex and changeable user question patterns, thereby improving the accuracy of the answers. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0047] Figure 1 A flowchart of an intelligent question-answering method provided in Embodiment 1 of the present invention;

[0048] Figure 2 A flowchart of an intelligent question-answering method provided in Embodiment 2 of the present invention;

[0049] Figure 3 A schematic diagram of an intelligent question-answering example provided in Embodiment 2 of the present invention;

[0050] Figure 4 A schematic diagram of the structure of an intelligent question-answering device provided in Embodiment 3 of the present invention;

[0051] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0052] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0053] It should be clear that the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0054] Since different question-answering models have different strengths and adaptability, it is difficult to fully capture and analyze the nuances, contextual connections, and implicit intentions in the language using only one model, which limits the overall performance and user experience of the question-answering system. To this end, the embodiment of the present invention proposes a multi-model fusion intelligent question-answering system architecture, which comprehensively improves the understanding and response capabilities of the intelligent question-answering system by integrating the advantages of multiple question-answering models, and solves the problem of inaccurate system answers in the prior art.

[0055] The invention is described in detail below through various embodiments.

[0056] Embodiment 1

[0057] This embodiment provides an intelligent question-answering method, which can be executed by a corresponding intelligent question-answering device in an intelligent question-answering system, and is applicable to various scenarios that require fast and accurate information answers and interactions. Figure 1 , the method includes the following steps 101-103.

[0058] Step 101: Obtain a question input by a user and pre-process the question.

[0059] In this step 101, the questions raised by the user can be received through the human-computer interaction interface, and the received user questions can be stored in the memory or database in a set data structure (such as a string, a list, etc.). The specific implementation method can be:

[0060] Text input: The user inputs questions through the keyboard, and the intelligent question-answering device receives text data through form submission or other API interfaces;

[0061] Voice input: The user inputs voice through a microphone, and the intelligent question-answering device uses speech recognition technology (such as automatic speech recognition ASR) to convert the voice into text;

[0062] Other input methods: including but not limited to image recognition (for example, extracting text from images), gesture input, etc.

[0063] For example, the user enters in the text box: "Weather forecast for Beijing tomorrow"; the user says to the mobile phone: "Query the weather forecast for Beijing tomorrow."

[0064] After obtaining the problem input by the user, preprocess the problem, aiming to convert the original user input into a form more suitable for subsequent processing. Among them, the preprocessing process includes but is not limited to the following operations:

[0065] Cleaning and standardization: Using regular expression technology, perform preliminary processing on the original user input, remove unnecessary characters, punctuation marks, spaces, etc., to ensure the consistency and standardization of the input;

[0066] Word segmentation and tokenization: Using natural language processing (NLP) technology, split the sentence into words or phrases (word segmentation), and add grammatical or semantic labels to each word (tokenization) for subsequent analysis;

[0067] Removing stop words: Delete common meaningless words (such as "de", "shi", "zai", etc.) to reduce noise interference;

[0068] Lemmatization: Restore words to their basic forms (e.g., restore both "run" and "ran" to "run") for unified processing;

[0069] Context understanding: According to the user's historical conversations or the current conversation environment, supplement missing information or correct ambiguous expressions;

[0070] Intent recognition: Judge the user's intent and problem type to provide a direction for subsequent processing.

[0071] Example: The original input problem is: "Weather forecast for Beijing tomorrow." After preprocessing:

[0072] Cleaning and standardization: "Weather forecast tomorrow Beijing";

[0073] Word segmentation and tokenization: [("weather", "noun"), ("forecast", "verb"), ("tomorrow", "time"),("Beijing", "location")];

[0074] Removing stop words: "Weather forecast tomorrow Beijing";

[0075] Lemmatization: "Weather forecast tomorrow Beijing" (in this example, no reduction is required);

[0076] Context understanding: Confirm that the user wants to know the weather conditions in Beijing tomorrow;

[0077] Intent recognition: The intent of this problem is to inquire about the weather forecast information for Beijing tomorrow, belonging to the information query type.

[0078] Through step 101, questions input by users can be effectively received and preliminarily processed, ensuring the quality and consistency of input data, and providing a solid foundation for subsequent more complex understanding and responses.

[0079] Step 102: Input the preprocessed questions into multiple question-answering models for answer prediction.

[0080] In this embodiment, multiple question-and-answer models are pre-managed. These models can be locally created and pre-trained, or they can be online question-and-answer models that are publicly provided by different developers and are user-oriented. All of these question-and-answer models belong to the category of large language models, which are designed to understand and answer various questions raised by users. It is worth noting that different question-and-answer models differ in the types of questions they handle and the advantages they show. For example, some models perform well in processing factual queries, while others have excellent performance in logical reasoning or semantic understanding. In addition, these question-and-answer models can be built using a variety of algorithms and technologies, including but not limited to rule-driven models, deep learning models, and knowledge graph-driven models.

[0081] When executing step 102, all or part of the pre-managed multiple question-answering models may be selected to process the same question input by the user. The pre-processed questions will be input into the selected multiple question-answering models at the same time, so that each question-answering model can independently predict the answer. The answer predicted by each question-answering model for the same question may be the same or different, depending on the model's capabilities, training data, and the complexity of the question.

[0082] Step 103: Use a fusion strategy corresponding to the question type to fuse the answers predicted by the multiple question models to generate a final answer to the question.

[0083] Among them, the question type refers to the category to which the question input by the user belongs, such as information query type, fact judgment type, logical reasoning type or understanding type, etc. In specific implementation, the keyword matching technology can be used to preliminarily classify the questions input by the user, and then the pre-trained machine learning model can be used to further verify and optimize the preliminary classification results to obtain the category to which the question input by the user finally belongs. The fusion strategy refers to a method or rule that combines the predicted answers of multiple question-and-answer models to the same question input by the user to generate the final answer. In this step, a variety of fusion strategies are pre-designed, and a correspondence between a variety of question types and these fusion strategies is established. Among them, the multiple fusion strategies include but are not limited to:

[0084] Weighted average fusion strategy: assign different weights to each question-answering model based on its credibility or historical performance, and calculate the weighted average.

[0085] Voting fusion strategy: select the answer with the highest frequency among multiple question-answering models;

[0086] Deep learning fusion strategy: Use deep learning models to combine multiple answers to generate a final answer.

[0087] It should be noted that one question type may correspond to multiple fusion strategies, and multiple question types may correspond to one fusion strategy. If there are multiple fusion strategies corresponding to one question type, one fusion strategy may be selected from the multiple corresponding fusion strategies to fuse the answers predicted by multiple question models for the same question input by the user to generate the final answer to the question.

[0088] The following describes the corresponding fusion strategies for various problems in detail.

[0089] (1) Information query questions

[0090] This type of problem mainly focuses on finding the information that users need quickly and accurately from massive data. This type of problem usually does not require in-depth analysis or reasoning, but focuses on information retrieval and matching. Specifically, it can correspond to the following fusion strategies:

[0091] Weighted average fusion strategy: In information retrieval, the accuracy and comprehensiveness of retrieval results can be improved by weighted averaging information from different sources or with different characteristics; for example, in a search engine, the rankings of multiple related web pages can be weighted averaged to obtain more accurate search results;

[0092] Alternatively, voting fusion strategy: among multiple information sources or query results, the final information can be determined by voting; for example, in a recommendation system, the results of multiple recommendation algorithms can be voted on to obtain the content that the user is most likely to be interested in.

[0093] Although the deep learning fusion strategy is powerful, it is not the best choice in information query problems due to computational complexity and real-time requirements.

[0094] (2) Questions related to fact judgment

[0095] This type of question requires a judgment on a proposition or assertion based on specific facts and evidence. This type of question emphasizes objectivity and accuracy. The following integration strategies can be used:

[0096] Voting fusion strategy: Voting can be used to determine the final factual judgment among multiple pieces of evidence or data sources. For example, in data verification, data from multiple sensors can be voted on to obtain more accurate data values.

[0097] Alternatively, deep learning fusion strategy: deep learning models can be trained to recognize and understand complex data patterns to more accurately judge facts; for example, in image recognition, deep learning models can judge objects or scenes in images by analyzing image features.

[0098] The weighted average fusion strategy is not the best choice for fact judgment problems because fact judgment usually relies on specific evidence and data rather than a simple average of multiple results.

[0099] (3) Logical reasoning type questions

[0100] This type of question requires you to judge a proposition or assertion based on logical rules and reasoning methods. This type of question emphasizes logic and rigor. The specific corresponding integration strategies are as follows:

[0101] Voting fusion strategy: The final judgment can be determined by voting among multiple logical reasoning results; for example, in decision-making, the opinions of multiple experts can be voted to obtain a more comprehensive decision result;

[0102] Alternatively, deep learning fusion strategy: deep learning models can improve logical reasoning ability by learning logical rules and reasoning patterns; for example, in natural language processing, deep learning models can perform logical reasoning by understanding language structure and context.

[0103] The weighted average fusion strategy is not the best choice in logical reasoning problems, because logical reasoning usually relies on strict logical rules and reasoning steps rather than a simple average of multiple results.

[0104] (4) Understanding Type Issues

[0105] This type of question requires a deep understanding and explanation of a concept, principle or phenomenon. This type of question emphasizes depth and comprehensiveness. The following integration strategies can be used:

[0106] Deep learning fusion strategy: Deep learning models have a strong ability to understand and explain complex concepts, principles, or phenomena; for example, in machine translation, deep learning models can accurately translate by understanding the semantic relationship between the source language and the target language;

[0107] Alternatively, the weighted average fusion strategy: a more comprehensive understanding can be obtained by taking a weighted average of different explanations or viewpoints; for example, in a literature review, the views of multiple researchers can be weighted averaged to obtain a more comprehensive research conclusion.

[0108] The voting fusion strategy is not the best choice for understanding problems because understanding usually requires in-depth analysis and synthesis of multiple aspects rather than simply choosing the majority opinion.

[0109] As an optimization implementation strategy, if the question type corresponds to multiple fusion strategies, a main fusion strategy and an auxiliary fusion strategy corresponding to the question type need to be configured. The main fusion strategy plays a dominant role in the fusion process, while the auxiliary fusion strategy plays a secondary or supplementary role, aiming to enhance the effect of the main fusion strategy and ensure the quality and reliability of the final answer by providing additional support and optimization measures.

[0110] When executing step 103, the preconfigured main fusion strategy corresponding to the question type may be used to fuse the answers predicted by the multiple question models to generate an intermediate answer to the question. Then, according to different instructions from the user for the intermediate answer, the answers predicted by the multiple question models are fused, or the answers predicted by the multiple question models and the intermediate answer are fused to obtain the final answer to the question. Specifically, after receiving an incomplete indication from the user for the intermediate answer, the preconfigured auxiliary fusion strategy corresponding to the question type is used to fuse the answers predicted by the multiple question models and the intermediate answer to obtain the final answer to the question. After receiving an incorrect indication from the user for the intermediate answer, the preconfigured auxiliary fusion strategy corresponding to the question type is used to fuse the answers predicted by the multiple question models to obtain the final answer to the question. If no incomplete and incorrect indication from the user for the intermediate answer is received, the intermediate answer is the final answer to the question.

[0111] The above preferred implementation not only considers the predicted answers of multiple question models, but also takes the intermediate answers into consideration, and finally obtains the final answer to the question through more sophisticated fusion processing. This process ensures that even if the user is not satisfied with the initial results, a more accurate and reliable answer can be provided through the auxiliary fusion strategy.

[0112] Exemplarily, the corresponding relationship between various problem types and these fusion strategies is shown in the following table:

[0113] Question Type Fusion Strategy Information Query Type Voting fusion strategy (main) + weighted average fusion strategy (auxiliary) Type of fact judgment Voting fusion strategy (main) + deep learning fusion strategy (auxiliary) Logical reasoning type Deep learning fusion strategy (main) + voting fusion strategy (auxiliary) Understanding Types Deep learning fusion strategy (main) + weighted average fusion strategy (auxiliary)

[0114] Embodiment 2

[0115] Based on the above embodiment 1, this embodiment further optimizes the above answer prediction step 102. Figure 2 , an intelligent question answering method, comprising:

[0116] Step 201: Obtain a question input by a user and pre-process the question.

[0117] This step is the same as step 101 in the above-mentioned embodiment 1 and will not be described again here.

[0118] Step 202: Select at least one model from a plurality of pre-created domain-specific question-answering models, the model having a domain matching degree with the question reaching a set lower limit threshold.

[0119] In this embodiment, multiple question-answering models are pre-created, including: a general generalized question-answering model, and multiple domain-specific question-answering models. Among them, the general generalized question-answering model refers to those models designed to handle question-answering tasks in a wide range of fields. They are usually trained based on large-scale data sets and have certain performance capabilities in multiple different fields. They are characterized by high flexibility and wide application range, and can provide more reasonable answers without being optimized specifically for a specific field. Domain-specific question-answering models are models that have been specially trained or fine-tuned to focus on a specific field. These models utilize the professional knowledge and data in the field, so they can often provide more accurate and professional answers to questions in a specific field. One field corresponds to a dedicated question-answering model, and each domain-specific question-answering model is trained to understand and answer questions entered by users. In addition, each domain-specific question-answering model is labeled with the corresponding domain label when it is created.

[0120] After the user enters a question, it is necessary to determine the domain matching between the question and the pre-created domain-specific question-answering models. In order to determine which model is most suitable for processing the current question, this embodiment calculates the domain matching between each domain-specific question-answering model and the question. Domain matching is an indicator that measures the relevance of a model to the domain of the question. Exemplarily, keyword matching technology can be used to calculate domain matching, and the specific steps of implementing this technology may include:

[0121] First, a vocabulary is pre-built, which contains multiple keywords under the domain labels corresponding to all domain-specific question-answering models; these keywords should be able to accurately reflect the core content and characteristics of their respective fields;

[0122] Then, when the user enters a question, the question is matched with the keywords in the vocabulary one by one;

[0123] Then, for each domain label corresponding to a domain-specific question-answering model: count the target keywords under the domain label that match the question; calculate the domain matching degree between the question and the domain-specific question-answering model corresponding to the domain label based on the counted target keywords, where the more target keywords there are, the higher the domain matching degree. Alternatively, weighted sum the counted target keywords to obtain the domain matching degree of the domain-specific question-answering model corresponding to the question and the domain label, where the larger the sum, the higher the matching degree. This method takes the weight of the target keyword into consideration and can measure the domain matching degree more accurately.

[0124] Of course, the domain matching degree can also be calculated through semantic analysis, which specifically includes: using natural language processing technology to semantically understand the questions input by the user and extract semantic features; inputting the extracted semantic features of the questions into a pre-trained domain classification model, calculating the semantic similarity between the questions input by the user and the labels of each domain based on the model, outputting the confidence score of the questions input by the user in each domain label, and obtaining the domain matching degree of the domain-specific question-answering model corresponding to the question and each domain label based on the output results. Among them, the greater the semantic similarity between the question input by the user and a domain label, the higher the confidence score, and the greater the domain matching degree of the domain-specific question-answering model corresponding to the domain label.

[0125] In this step, a minimum standard (lower threshold) of matching degree is preset to ensure that only domain-specific question-answering models whose matching degree with the question input by the user reaches this standard will be selected to provide answers to the question input by the user.

[0126] Step 203: The preprocessed questions are input into the pre-created generalized question-answering model and the selected field-specific question-answering model for answer prediction.

[0127] Step 204: Use a fusion strategy corresponding to the question type to fuse the answers predicted by the multiple question models to generate a final answer to the question.

[0128] This step is the same as step 103 in the above-mentioned embodiment 1 and will not be described in detail. Figure 3 As a specific example, after the user inputs a question, it is first preprocessed, and then three models (domain-A question-answering model, domain-C question-answering model, and domain-E question-answering model) whose domain matching degree with the question reaches a set lower limit threshold are selected from the five pre-created domain-specific question-answering models (AE domain-specific question-answering model). Then, the preprocessed question is respectively input into the pre-created generalized question-answering model and the selected domain-A question-answering model, domain-C question-answering model, and domain-E question-answering model for answer prediction. Finally, the fusion strategy corresponding to the question type is used to fuse the answers predicted by the multiple question models to generate the final answer to the question.

[0129] A preferred implementation for step 204 is provided below.

[0130] (1) The question type input by the user is a comprehension type and an information query type. Accordingly, step 204 may include:

[0131] Determine whether the maximum value of the domain matching degree of the question in the selected field-specific question-answering models reaches a set upper limit threshold;

[0132] If yes, the domain-specific question-answering model corresponding to the maximum domain matching degree is used as the target question-answering model; otherwise, the generalized question-answering model is used as the target question-answering model;

[0133] The target question-answering model is instructed to re-predict the answer to the question as the final answer based on its predicted answer and in combination with the answers predicted by other question-answering models.

[0134] In the above implementation process, if the domain matching degree of a domain-specific question-answering model is the largest and exceeds the set upper threshold, it means that this model is highly relevant to the domain of the question and is therefore selected as the target question-answering model for re-predicting the answer. If the domain matching degrees of all domain-specific question-answering models do not reach the set upper threshold, it means that the current question may not belong to the scope of professional knowledge in any specific field, or the question involves knowledge in multiple fields. In this case, the generalized question-answering model is selected as the target question-answering model for re-predicting the answer.

[0135] (2) The question type input by the user is a logical reasoning type. Accordingly, step 204 may include:

[0136] According to the matching degree between the question-answering model and the domain of the question, the answers predicted by each question-answering model are assigned corresponding weights;

[0137] The answers predicted by each question-answering model after being assigned weights are used as a new feature set and input into a pre-created meta-model; the answers are integrated using the meta-model to generate the final answer to the question.

[0138] In the above implementation, a weight is assigned to each Q&A model based on its domain match with the question. The greater the domain match, the greater the weight. This means that if a Q&A model performs well in dealing with questions in the same or similar domain as the question, the answer it generates will be given a higher weight. Among them, the weight of the answer predicted by the general generalized Q&A model for the user input question can be set as the arithmetic mean of the answer weights of all domain-specific Q&A models that provide predictions for the question.

[0139] (3) The type of question input by the user is a fact judgment type. Accordingly, step 204 may include: counting the answers predicted by each question-answering model, and using the majority rule to determine the final answer to the question. The majority rule means: based on the frequency of occurrence of the answers predicted by all question-answering models, the answer with the most occurrences is selected as the final answer. Furthermore, if multiple answers appear the same number of times, one answer may be randomly selected from the multiple answers, or the question input by the user may be re-predicted to determine the final answer.

[0140] In this preferred method, understanding type questions require the system to deeply understand the user's intention and give corresponding answers, which usually relies on accurate analysis of the user's questions and accurate application of domain knowledge. Information query type questions focus on quickly finding and extracting the content required by the user from a large amount of information, which requires the system to have efficient information retrieval and extraction capabilities. For these two types of questions, the benefits of using the re-prediction answer strategy are:

[0141] Improve accuracy: By selecting the domain-specific question-answering model that best matches the target question (if the match is high enough) or the generalized question-answering model (if the match is not high enough), and re-predicting the answer based on the predictions of other models, the advantages of multiple models can be combined to improve the accuracy of the answer;

[0142] Enhanced flexibility: This strategy can flexibly respond to questions of different fields and types, and enhances the adaptability of the system by selecting the most appropriate model to generate answers;

[0143] Optimize user experience: Users can get more accurate and expected answers, thus improving user experience.

[0144] Logical reasoning problems require the system to be able to reason and judge based on known facts, draw new conclusions or verify existing assumptions. This type of problem usually involves complex logical relationships and reasoning processes, requiring the system to have strong logical analysis and processing capabilities. The benefits of using a metamodel integration strategy are:

[0145] Improve logic: The meta-model can comprehensively consider the prediction results of multiple question-answering models, and perform logical integration and optimization to generate answers that are more in line with logic and reasoning rules;

[0146] Enhanced comprehensive analysis capabilities: Through the integration of meta-models, the system can demonstrate stronger comprehensive analysis capabilities and handle more complex problems that require logical reasoning;

[0147] Improve answer quality: The answers integrated by the meta-model are usually more comprehensive and accurate than those predicted by a single model, thus improving the quality of the answers.

[0148] Fact judgment problems require the system to accurately determine whether a fact is true or an event has occurred. This type of problem usually relies on a large amount of factual information and data support, and requires the system to have efficient information retrieval and comparison capabilities. The benefits of using the majority rule are:

[0149] Simplify the decision-making process: The majority rule selects the answer with the highest frequency as the final answer by counting the prediction results of each question-answering model, which simplifies the decision-making process and improves efficiency.

[0150] Enhanced reliability: Since the majority decision principle is based on the prediction results of multiple models, even if a model makes an incorrect prediction, it will not have a decisive impact on the final answer, thereby enhancing the reliability of the answer;

[0151] Easy to understand and accept: The results of the majority rule are usually more intuitive and easy to understand, and users are more likely to accept such answers.

[0152] In summary, the technical solution provided in this embodiment can flexibly select multiple question-answering models in different situations, adapt to various types of user questions, and select the most appropriate answer fusion strategy for different question types to ensure the professionalism and accuracy of the answers.

[0153] Embodiment 3

[0154] This embodiment provides an intelligent question-answering device, which is implemented by software and / or hardware and is used to execute the intelligent question-answering method described in the embodiment of the present invention. Figure 4 , the device specifically includes the following units:

[0155] The question acquisition unit 401 is used to acquire the question input by the user and pre-process the question;

[0156] An answer prediction unit 402 is used to input the preprocessed questions into multiple question-answering models for answer prediction;

[0157] The answer fusion unit 403 is used to use a fusion strategy corresponding to the question type to fuse the answers predicted by the multiple question models to generate a final answer to the question.

[0158] Exemplarily, the answer prediction unit 402 is specifically used for:

[0159] Selecting at least one model from a plurality of pre-created domain-specific question-answering models, the model having a domain matching degree with the question reaching a set lower threshold;

[0160] The preprocessed questions are input into the pre-created generalized question-answering model and the selected field-specific question-answering model for answer prediction.

[0161] Furthermore, the question types are understanding type and information query type. Accordingly, the answer fusion unit 403 includes an understanding type question answer fusion subunit, which is used to:

[0162] Determine whether the maximum value of the domain matching degree of the question in the selected field-specific question-answering models reaches a set upper limit threshold;

[0163] If yes, the domain-specific question-answering model corresponding to the maximum domain matching degree is used as the target question-answering model; otherwise, the generalized question-answering model is used as the target question-answering model;

[0164] The target question-answering model is instructed to re-predict the answer to the question as the final answer based on its predicted answer and in combination with the answers predicted by other question-answering models.

[0165] The question type is a logical reasoning type. Accordingly, the answer fusion unit 403 includes a logical reasoning question answer fusion subunit, which is used to:

[0166] According to the degree of matching between the question-answering model and the domain of the question, the answers predicted by each question-answering model are assigned corresponding weights;

[0167] The answers predicted by each question-answering model after being assigned weights are used as a new feature set and input into a pre-created meta-model; the answers are integrated using the meta-model to generate the final answer to the question.

[0168] Furthermore, the question type is a fact judgment type; the answer fusion unit 403 includes a fact judgment question answer fusion subunit, which is used to:

[0169] The answers predicted by each question-answering model are counted, and the final answer to the question is determined by majority rule.

[0170] Figure 5 FIG. 1 is a schematic diagram of the structure of an embodiment of an electronic device of the present invention, which can implement the processes of the first and second embodiments of the present invention. Figure 5 As shown, the above-mentioned electronic device may include: a shell 51, a processor 52, a memory 53, a circuit board 54 and a power supply circuit 55, wherein the circuit board 54 is arranged inside the space enclosed by the shell 51, and the processor 52 and the memory 53 are arranged on the circuit board 54; the power supply circuit 55 is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory 53 is used to store executable program codes; the processor 52 runs the program corresponding to the executable program code by reading the executable program code stored in the memory 53, so as to execute the intelligent question and answer method described in any of the aforementioned embodiments.

[0171] The specific execution process of the above steps by the processor 52 and the steps further executed by the processor 52 by running the executable program code can be found in the description of the method embodiment of the present invention, which will not be repeated here.

[0172] The electronic device can be an electronic device with data processing capabilities that exists in various forms, such as a server that provides computing services. Its structure is similar to a general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, manageability, etc.

[0173] Furthermore, an embodiment of the present invention also provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more central processing units to implement the intelligent question and answer method described in the aforementioned embodiment.

[0174] It should be noted that in this article, relational terms such as first and second are only used to refer to

[0175] One entity or operation is distinguished from another entity or operation without necessarily requiring or implying that these

[0176] There is no such actual relationship or order between entities or operations. Furthermore, the terms "comprises", "includes" and "

[0177] "Including" or any other variation thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article, or apparatus. In the absence of more limitations, an element defined by the phrase "including a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0178] In the embodiments of the present invention, the term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0179] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0180] In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0181] For the convenience of description, the above device is described by dividing the functions into various units / modules. Of course, when implementing the present invention, the functions of each unit / module can be implemented in the same or multiple software and / or hardware.

[0182] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0183] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. An intelligent question-answering method, characterized in that: The method comprises: Obtaining a question input by a user, and preprocessing the question; Input the preprocessed questions into multiple question-answering models for answer prediction; The answers predicted by the multiple question models are fused using a fusion strategy corresponding to the question type to generate a final answer to the question.

2. The method according to claim 1, characterized in that The preprocessed questions are fed into multiple question-answering models for answer prediction, including: Selecting at least one model from a plurality of pre-created domain-specific question-answering models, the model having a domain matching degree with the question reaching a set lower threshold; The preprocessed questions are input into the pre-created generalized question-answering model and the selected field-specific question-answering model for answer prediction.

3. The method according to claim 2, characterized in that The question types are comprehension type and information inquiry type; Using a fusion strategy corresponding to the question type, the answers predicted by the multiple question models are fused to generate a final answer to the question, including: Determine whether the maximum value of the domain matching degree of the question in the selected field-specific question-answering models reaches a set upper limit threshold; If yes, the domain-specific question-answering model corresponding to the maximum domain matching degree is used as the target question-answering model; otherwise, the generalized question-answering model is used as the target question-answering model; The target question-answering model is instructed to re-predict the answer to the question as the final answer based on its predicted answer and in combination with the answers predicted by other question-answering models.

4. The method according to claim 2, characterized in that: The question type is a logical reasoning type; Using a fusion strategy corresponding to the question type, the answers predicted by the multiple question models are fused to generate a final answer to the question, including: According to the degree of matching between the question-answering model and the domain of the question, the answers predicted by each question-answering model are assigned corresponding weights; The answers predicted by each question-answering model after being assigned weights are used as a new feature set and input into a pre-created meta-model; the answers are integrated using the meta-model to generate the final answer to the question.

5. The method according to claim 2, characterized in that: The question type is a fact judgment type; Using a fusion strategy corresponding to the question type, the answers predicted by the multiple question models are fused to generate a final answer to the question, including: The answers predicted by each question-answering model are counted, and the final answer to the question is determined by majority rule.

6. An intelligent question-answering device, characterized in that: The device comprises: A question acquisition unit, used to acquire a question input by a user and pre-process the question; An answer prediction unit, used to input the preprocessed questions into multiple question-answering models for answer prediction; An answer fusion unit is used to fuse the answers predicted by the multiple question models using a fusion strategy corresponding to the question type to generate a final answer to the question.

7. The device according to claim 6, characterized in that The answer prediction unit is specifically used for: Selecting at least one model from a plurality of pre-created domain-specific question-answering models, the model having a domain matching degree with the question reaching a set lower threshold; The preprocessed questions are input into the pre-created generalized question-answering model and the selected field-specific question-answering model for answer prediction.

8. The device according to claim 7, characterized in that The question types are comprehension type and information inquiry type; The answer fusion unit includes a comprehension question answer fusion subunit, which is used to: Determine whether the maximum value of the domain matching degree of the question in the selected field-specific question-answering models reaches a set upper limit threshold; If yes, the domain-specific question-answering model corresponding to the maximum domain matching degree is used as the target question-answering model; otherwise, the generalized question-answering model is used as the target question-answering model; The target question-answering model is instructed to re-predict the answer to the question as the final answer based on its predicted answer and in combination with the answers predicted by other question-answering models.

9. The device according to claim 7, characterized in that The question type is a logical reasoning type; The answer fusion unit includes a logical reasoning question answer fusion subunit, which is used to: According to the degree of matching between the question-answering model and the domain of the question, the answers predicted by each question-answering model are assigned corresponding weights; The answers predicted by each question-answering model after being assigned weights are used as new feature sets and input into the pre-created meta-model; The meta-model is used to integrate the answers and generate the final answer to the question.

10. The device according to claim 7, characterized in that The question type is a fact judgment type; The answer fusion unit includes a fact judgment question answer fusion sub-unit, which is used to: The answers predicted by each question-answering model are counted, and the final answer to the question is determined by majority rule.

11. An electronic device, characterized in that: The electronic device comprises: a housing, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the housing, and the processor and the memory are arranged on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program codes; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the intelligent question-answering method described in any one of claims 1 to 5 above.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more central processing units to implement the intelligent question-answering method described in any of the preceding claims 1-5.