Intelligent question and answer matching method and device, terminal and storage medium

By combining a fine-ranking model and a key mutual information-assisted model, the problem of inaccurate semantic key information acquisition by the attention layer of the BERT deep model is solved, achieving efficient matching between texts and accuracy of response data, thus improving the convenience and real-time performance of intelligent question answering.

CN117093686BActive Publication Date: 2026-04-28CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD
Filing Date
2023-08-01
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

In existing intelligent question answering matching methods, the last attention layer of the BERT deep model cannot accurately obtain key information after semantic processing, resulting in inaccurate similarity calculation between texts and affecting the matching effect.

Method used

By employing a fine-ranking model and a key mutual information-assisted model, and by concatenating and fusing the full difference vector and keyword difference vector, combined with semantic and literal recall strategies, key mutual information text features are extracted from candidate data and user request data. A deep recurrent neural network model is then used for encoding and normalization to achieve accurate matching between texts.

Benefits of technology

It improves the accuracy of text similarity calculation, realizes the convenience and real-time nature of intelligent question answering in different complex scenarios, and ensures that the response data meets user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117093686B_ABST
    Figure CN117093686B_ABST
Patent Text Reader

Abstract

The application provides a kind of intelligent question and answer matching method, device, terminal and storage medium, it is related to artificial intelligence technical field, by according to user request data to the preset question and answer knowledge base is recalled, obtains candidate data;User request data and candidate data are input into precision sorting model and obtain full quantity difference vector;Key mutual information text feature is input into key mutual information auxiliary model and obtains key word difference vector;According to full quantity difference vector and key word difference vector, obtain the response data corresponding to user request data, solve the problem that the similarity between the text calculated by the traditional intelligent question and answer matching method is low in accuracy, affect the intelligent question and answer matching effect, by key mutual information auxiliary model, the key mutual information of request text and candidate text is fused, can make the response data obtained more in line with user's expectation and demand, realizes the convenience and real-time of intelligent question and answer in different complex scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to an intelligent question-and-answer matching method, device, terminal, and storage medium. Background Technology

[0002] Existing knowledge-based retrieval-based intelligent question answering (QA) matching methods are complex systems for calculating text similarity, including data preprocessing, multi-layer coarse-grained candidate text recall, text feature extraction, and fine-grained ranking. Among related technologies, intelligent QA matching is achieved based on similarity calculations using fully deep learning models. For example, deep learning-based methods directly encode the semantic similarity of the request text and user text using the model, then perform coarse-grained recall using an Elasticsearch database. The recalled data undergoes feature processing and is then input into a BERT deep model for similarity calculation. The model ultimately ranks the candidate recalls based on similarity scores and returns the corresponding response to the user. In this model, the final layer of the BERT deep model adds a keyword-based attention layer, using text dependency analysis to fuse vectors and calculate text similarity. However, because the input of the final layer of the BERT deep model is also the input of the additional attention layer, the keyword-based attention layer may not accurately capture the key information after semantic processing, leading to inaccurate text similarity calculations and affecting the intelligent QA matching effect. Summary of the Invention

[0003] This invention provides an intelligent question-answering matching method, device, terminal, and storage medium to address the shortcomings of traditional intelligent question-answering matching methods, which result in low accuracy of the similarity between texts and affect the effectiveness of intelligent question-answering matching.

[0004] This invention provides an intelligent question-answering matching method, comprising:

[0005] Based on user request data, the system retrieves candidate data from a pre-defined question-and-answer knowledge base.

[0006] The user request data and the candidate data are input into the fine ranking model to obtain the full difference vector. The fine ranking model is used to perform full data matching between the user request data and the candidate data.

[0007] Extract key mutual information text features from the candidate data and the user request data, input the key mutual information text features into the key mutual information auxiliary model to obtain the keyword difference vector, and the key mutual information auxiliary model is used to perform key data matching between the user request data and the candidate data.

[0008] The response data corresponding to the user request data is obtained based on the full difference vector and the keyword difference vector.

[0009] According to the intelligent question-answering matching method provided by the present invention, the step of inputting the keywords into a key mutual information auxiliary model to obtain a keyword difference vector includes:

[0010] Encode the keywords corresponding to the user request data and the keywords corresponding to the candidate data to obtain user request encoded data and candidate encoded data;

[0011] The user request encoded data is input into the first deep recurrent neural network module to obtain the first semantic difference vector;

[0012] The candidate encoded data is input into the second deep recurrent neural network module to obtain the second semantic difference vector;

[0013] The first semantic difference vector and the second semantic difference vector are concatenated;

[0014] The concatenated semantic difference vectors are fused to obtain the keyword difference vector corresponding to the dimension of the full difference vector.

[0015] According to an intelligent question-answering matching method provided by the present invention, the step of obtaining response data corresponding to the user request data based on the full difference vector and the keyword difference vector includes:

[0016] The full difference vector is concatenated with the keyword difference vector;

[0017] The normalized value of the concatenated vector is calculated as the similarity between the candidate data and the user request data;

[0018] The response data corresponding to the user request data is matched based on the similarity.

[0019] According to the present invention, an intelligent question-answering matching method is provided, wherein the step of recalling a preset question-answering knowledge base based on the user request data to obtain candidate data includes:

[0020] Based on the user request data and semantic recall strategy, semantic similarity is obtained by recalling the preset question-and-answer knowledge base.

[0021] Sort the semantic similarity from high to low and select the top n knowledge data;

[0022] Based on the user request data and the literal recall strategy, the preset question-and-answer knowledge base is used to retrieve the m knowledge data with the highest literal similarity ranking.

[0023] The candidate data are obtained based on the n knowledge data and the m knowledge data.

[0024] According to the intelligent question-answering matching method provided by the present invention, the step of retrieving semantic similarity from the preset question-answering knowledge base based on the user request data and a semantic recall strategy includes:

[0025] Entity recognition is performed on the user request data and the knowledge data in the preset question-and-answer knowledge base;

[0026] The identified entities are categorized to obtain their corresponding types;

[0027] Replace the entities in the user request data and the knowledge data in the preset question-and-answer knowledge base with the entities of the corresponding type;

[0028] Calculate the semantic similarity between the replaced user request data and the knowledge data in the preset question-and-answer knowledge base.

[0029] According to an intelligent question-answering matching method provided by the present invention, the step of extracting key mutual information text features from the candidate data and the user request data includes:

[0030] Entity identification is performed on the candidate data and the user request data;

[0031] The identified entities are subjected to part-of-speech analysis, and the information of nouns and verbs is saved as keywords.

[0032] The individual information of the keywords is input into a knowledge graph constructed from historical keywords to obtain keyword association information;

[0033] Key mutual information text features are obtained based on the individual information of the keywords and the association information of the keywords. The key mutual information text features include request text features and candidate text features.

[0034] According to the intelligent question-answering matching method provided by the present invention, the calculation of the normalized value of the concatenated vector includes:

[0035] Merge the concatenated vectors into a one-dimensional vector;

[0036] The normalized value of the one-dimensional vector is calculated using the softmax function.

[0037] The present invention also provides an intelligent question-and-answer matching device, comprising:

[0038] The recall module is used to recall candidate data from a preset question-and-answer knowledge base based on user request data.

[0039] The first input module is used to input the user request data and the candidate data into the fine ranking model to obtain the full difference vector. The fine ranking model is used to perform full data matching between the user request data and the candidate data.

[0040] The second input module is used to extract key mutual information text features from the candidate data and the user request data, input the key mutual information text features into the key mutual information auxiliary model to obtain the keyword difference vector, and the key mutual information auxiliary model is used to perform key data matching between the user request data and the candidate data.

[0041] The acquisition module is used to acquire response data corresponding to the user request data based on the full difference vector and the keyword difference vector.

[0042] The present invention also provides a terminal, including a memory, a transceiver, and a processor;

[0043] A memory for storing computer programs; a transceiver for sending and receiving data under the control of the processor; and a processor for reading the computer programs from the memory and performing the following operations:

[0044] Based on user request data, the system retrieves candidate data from a pre-defined question-and-answer knowledge base.

[0045] The user request data and the candidate data are input into the fine ranking model to obtain the full difference vector. The fine ranking model is used to perform full data matching between the user request data and the candidate data.

[0046] Extract key mutual information text features from the candidate data and the user request data, input the key mutual information text features into the key mutual information auxiliary model to obtain the keyword difference vector, and the key mutual information auxiliary model is used to perform key data matching between the user request data and the candidate data.

[0047] The response data corresponding to the user request data is obtained based on the full difference vector and the keyword difference vector.

[0048] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the intelligent question-answering matching method described in any of the preceding claims.

[0049] The intelligent question-answering matching method, device, terminal, and storage medium provided by this invention retrieve candidate data from a preset question-answering knowledge base based on user request data; input the user request data and the candidate data into a fine-sorting model to obtain a full-scale difference vector; extract key mutual information text features from the candidate data and the user request data, and input the key mutual information text features into a key mutual information auxiliary model to obtain a keyword difference vector; obtain response data corresponding to the user request data based on the full-scale difference vector and the keyword difference vector. By using the key mutual information auxiliary model to better integrate the key mutual information between the request text and the candidate text in the same dimension, the obtained response data can better meet the user's expectations and needs, realizing the convenience and real-time performance of intelligent question answering in different complex scenarios. Attached Figure Description

[0050] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0051] Figure 1 This is one of the flowcharts of the intelligent question-answering matching method provided by the present invention;

[0052] Figure 2 This is the second flowchart of the intelligent question-answering matching method provided by the present invention;

[0053] Figure 3 This is a schematic diagram of the candidate data fine sorting model provided by the present invention;

[0054] Figure 4 This is the third flowchart of the intelligent question-answering matching method provided by the present invention;

[0055] Figure 5 This is a schematic diagram of the semantic similarity-based recall process provided by the present invention;

[0056] Figure 6 This is the fourth flowchart of the intelligent question-answering matching method provided by the present invention;

[0057] Figure 7 This is an overall flowchart of the intelligent question-answering solution provided by the present invention;

[0058] Figure 8 This is a schematic diagram of the intelligent question-and-answer matching device provided by the present invention;

[0059] Figure 9 This is a schematic diagram of the terminal provided by the present invention. Detailed Implementation

[0060] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0061] Figure 1 A flowchart of the intelligent question-answering matching method provided in the embodiments of the present invention is shown below. Figure 1 As shown, the intelligent question-answering matching method provided in this embodiment of the invention includes:

[0062] Step 101: Retrieve candidate data from the preset question-and-answer knowledge base based on the user request data;

[0063] Step 102: Input the user request data and candidate data into the fine ranking model to obtain the full difference vector. The fine ranking model is used to perform full data matching between the user request data and the candidate data.

[0064] In this embodiment of the invention, the fine-sorting model is the BERT fine-sorting model.

[0065] Step 103: Extract key mutual information text features from candidate data and user request data, and input the key mutual information text features into the key mutual information auxiliary model to obtain keyword difference vectors. The key mutual information auxiliary model is used to perform key data matching between user request data and candidate data.

[0066] Step 104: Obtain the response data corresponding to the user's request data based on the full difference vector and the keyword difference vector.

[0067] Traditional intelligent question-answering matching relies on similarity metrics based on fully deep learning models. For example, deep learning-based methods directly encode the semantic similarity of the request and user texts, then perform coarse data retrieval using an Elasticsearch database. The retrieved data undergoes feature processing and is then fed into a BERT deep learning model for similarity calculation. The model ultimately ranks the candidate responses based on similarity scores and returns the corresponding responses to the user. The BERT deep learning model adds a keyword-based attention layer at its final layer, using text dependency analysis to fuse vectors and calculate text similarity. However, because the input to the final layer of the BERT deep learning model is also the input to the additional attention layer, the keyword-based attention layer may not accurately capture the key information after semantic processing, leading to inaccurate text similarity calculations and affecting the intelligent question-answering matching performance.

[0068] The intelligent question-answering matching method provided in this invention recalls candidate data from a preset question-answering knowledge base based on user request data; inputs the user request data and the candidate data into a fine-ranking model to obtain a full-scale difference vector; extracts key mutual information text features from the candidate data and the user request data, inputs these key mutual information text features into a key mutual information auxiliary model to obtain a keyword difference vector; and obtains response data corresponding to the user request data based on the full-scale difference vector and the keyword difference vector. By using the key mutual information auxiliary model to better integrate the key mutual information between the request text and the candidate text in the same dimension, the obtained response data can better meet the user's expectations and needs, achieving convenience and real-time performance of intelligent question answering in different complex scenarios.

[0069] Based on any of the above embodiments, such as Figure 2 As shown, the keywords are input into the key mutual information-assisted model to obtain the keyword difference vector, including:

[0070] Step 201: Encode the keywords corresponding to the user request data and the keywords corresponding to the candidate data to obtain the user request encoded data and the candidate encoded data;

[0071] Step 202: Input the user request encoded data into the first deep recurrent neural network module to obtain the first semantic difference vector;

[0072] Step 203: Input the candidate encoded data into the second deep recurrent neural network module to obtain the second semantic difference vector;

[0073] Step 204: Concatenate the first semantic difference vector and the second semantic difference vector;

[0074] Step 205: Fuse the concatenated semantic difference vectors to obtain the keyword difference vectors corresponding to the dimensions of the full difference vectors.

[0075] Based on the full difference vector and the keyword difference vector, the response data corresponding to the user request data is obtained, including:

[0076] The normalized value of the concatenated vector is calculated as the similarity between the candidate data and the user request data; the response data corresponding to the user request data is matched based on the similarity.

[0077] In this embodiment of the invention, calculating the normalized value of the concatenated vector includes:

[0078] Merge the concatenated vectors into a one-dimensional vector;

[0079] The softmax function is used to calculate the normalized value of a one-dimensional vector.

[0080] As above Figure 3 As shown, the input information of the key mutual information-assisted model consists of the output information feature text of the keyword extraction module; the BERT fine ranking model is a normal model fine-tuned based on the BERT pre-trained model. Based on the current BERT semantic model, it is an intelligent question-answering assistance scheme based on key mutual information. It separately encodes the key mutual information feature text of the extracted short text and uses an N-layer RNN unit to achieve vectorized representation of key information within the text. Next, the vectorized output of the request text's key information feature and the output of the candidate text's key information feature are concatenated and fused through an FFN fully connected layer. Finally, the outputs of the BERT fine ranking model and the key mutual information-assisted model are concatenated and connected to a fully connected layer for similarity calculation.

[0081] In this embodiment of the invention, the key mutual information auxiliary model is a deep recurrent neural network model based on RNN, whose main purpose is to accurately mine the semantic differences between key information features in different texts. This model, while preserving the original text information, can better highlight the key information between the request text and candidate texts by processing the key mutual information features separately. Since the output of the BERT semantic model CLS-token represents the semantic differences between different texts, it is theoretically feasible to concatenate the outputs of the mutual information auxiliary model and the BERT model on the same text difference dimension. This scheme, through encoding and semantic calculation of key information features using this auxiliary model, can better determine the text similarity between the request text and candidate texts. By fusing the output of this auxiliary model and the output vector of the original semantic model on the same data dimension, the similarity accuracy of the two short texts is further improved while preserving the features of the original BERT semantic model, making the selection of candidate results more accurate and effective.

[0082] Based on any of the above embodiments, such as Figure 4 As shown, based on user request data, a preset question-and-answer knowledge base is retrieved to obtain candidate data, including:

[0083] Step 401: Based on user request data and semantic recall strategy, retrieve semantic similarity from the preset question-and-answer knowledge base;

[0084] In this embodiment of the invention, semantic similarity is obtained by recalling the preset question-and-answer knowledge base based on user request data and a semantic recall strategy, including:

[0085] Step 4011: Perform entity recognition on the user request data and the knowledge data in the preset question-and-answer knowledge base;

[0086] Step 4012: Classify the identified entities to obtain their corresponding types;

[0087] Step 4013: Replace the entities in the user request data and the knowledge data in the preset question-and-answer knowledge base with the corresponding entity type;

[0088] Step 4014: Calculate the semantic similarity between the replaced user request data and the knowledge data in the preset question-and-answer knowledge base.

[0089] Step 402: Sort the semantic similarity from high to low and select the top n knowledge data.

[0090] In this embodiment of the invention, the recall process based on semantic similarity is as follows: Figure 5 As shown, this semantic recall module rewrites and semantically encodes candidate data (offline). Simultaneously, it rewrites and semantically encodes the user request text and then performs similarity measurement with the candidate data. For example, if the user request text is "Introduce China Mobile," we first identify the key information "China Mobile," rewrite the text as "Introduce <Company>," and then semantically encode this rewritten text and perform similarity matching calculations with the rewritten semantic vectors saved in the knowledge base. Finally, together with literal recall schemes such as ES, we jointly recall the top K (K = m + n) knowledge data with the best similarity.

[0091] Step 403: Based on user request data and literal recall strategy, retrieve the m knowledge data with the highest literal similarity ranking from the preset question-and-answer knowledge base;

[0092] Literal recall strategies include, but are not limited to, the BM25 algorithm, the TF-IDF algorithm, etc., or the use of third-party open-source databases (ES). In this embodiment of the invention, candidate data recall is implemented based on databases such as ES.

[0093] Step 404: Obtain candidate data based on n knowledge data and m knowledge data.

[0094] Traditional recall methods may suffer from incomplete recall, potentially missing correct information during the recall phase and leading to incorrect matching later. For example, the texts "<network speed>" and "<network speed>" have different literal meanings, and relying solely on literal meaning during the recall phase may result in omissions. Semantic recall based on text rewriting, however, will uniformly categorize both as "network speed," thus eliminating biases in the semantic encoding process.

[0095] This invention integrates a literal text-based data retrieval scheme (e.g., data retrieval via ES database and inverted index) and a text-rewritten semantic similarity-based retrieval scheme. Since the underlying implementation principles of text-rewritten semantic vector retrieval and inverted index relevance retrieval (ES-based) differ significantly, text rewriting technology can significantly reduce errors in the semantic encoding process of similar texts. Therefore, text information can be considered from multiple directions in the retrieval results, avoiding the incompleteness of retrieval results caused by a single method. The multi-channel retrieval mode ensures high coverage of the retrieval results.

[0096] Because the size of knowledge bases is uncontrollable across different business scenarios, the number of knowledge bases can be enormous. Matching the entire knowledge base can be time-consuming and lack real-time performance. Therefore, it is necessary to perform coarse recall on the entire knowledge base and return only the top K most similar knowledge points for fine sorting. This invention, based on existing literal recall schemes, adds a semantic recall module based on text rewriting. When the knowledge base is large, it can automatically achieve complete recall of the knowledge base and calculate the text similarity of candidate data, achieving high matching accuracy.

[0097] Based on any of the above embodiments, such as Figure 6 As shown, key mutual information text features are extracted from the candidate data and the user request data, including:

[0098] Step 601: Perform entity recognition on candidate data and user request data;

[0099] In this embodiment of the invention, entity recognition can be performed on candidate data and user request data using methods such as Bi-LSTM+CRF. Bi-LSTM+CRF can improve the recognition accuracy of short texts.

[0100] Step 602: Perform part-of-speech analysis on the identified entities and save the parts of speech as nouns and verbs as individual keywords;

[0101] Step 603: Input the individual keyword information into the knowledge graph constructed from historical keywords to obtain keyword association information;

[0102] Step 604: Obtain key mutual information text features based on individual keyword information and keyword association information. Key mutual information text features include request text features and candidate text features.

[0103] In the prior art, the keyword library information is pre-constructed and the relevant weights of keywords are determined manually or by related technical methods. In this solution, the keyword library information may be incompletely constructed, and the weights of keywords may be set unreasonably manually. Manually constructing the keyword library information has a low degree of automation. According to the analysis of the knowledge base data in the embodiments of the present invention, keywords with noun and verb词性 are usually the main information in the current short text. For the information after entity recognition, the词性 information of the entity is analyzed, and the keyword information with noun and verb词性 is saved, thereby discarding the keyword information of other词性. For the saved keyword information, if the corresponding associated information can be found in the knowledge graph, the associated information is also saved as an information feature for use as the feature input information of the subsequent fine-ranking model. For example: The key information retained after entity recognition and词性 analysis is "魔百和". Assuming that the information associated with "魔百和" in the knowledge graph is the company "中国移动", then both "魔百和" and "中国移动" are used as key information for the input of the subsequent fine-ranking model. Compared with manually constructing keyword library data, the key information in the text can be automatically recognized and information extended.

[0104] In the embodiments of the present invention, the additional features introduced by the knowledge graph can挖掘 deeper information in the text, which is more conducive to the improvement of the subsequent matching accuracy. Compared with the existing solution of constructing a keyword set, the intelligent question-and-answer matching accuracy can be improved. By performing entity recognition and词性 analysis on the candidate text to obtain the keyword information of the text, and performing key information retrieval and extension through the knowledge graph, it has a higher degree of automation compared with the method of manually constructing a keyword library, can obtain引申 information that is associated with the text but does not exist, and is not prone to the problem of OOV words, and has better scalability. And it provides the keyword information after accurate recognition and verification for the subsequent key mutual information-assisted question-and-answer model.

[0105] As follows Figure 7 It should be noted that there are some unclear parts in the original text such as "词性", "魔百和", "中国移动", "引申信息", etc. which may need further clarification in the actual context for more accurate translation. Here, they are translated according to the literal meaning as much as possible.As shown, the overall process of the intelligent question answering solution follows the framework of existing technologies, and adds or modifies the modules marked with dashed boxes in the flowchart. The knowledge base-based retrieval-based intelligent question answering (QA) framework is a complex system for calculating text similarity, including data preprocessing, multi-layer candidate text coarse recall, text feature extraction, and fine ranking modules. However, the multi-layer candidate text coarse recall scheme suffers from weak model interpretability; the recall scheme based solely on Elasticsearch suffers from incomplete recall data coverage and an inability to uncover deeper semantic information. Regarding the fine ranking of candidate data based on deep models, the semantic input method using full short texts suffers from low correlation between key information in the request text and candidate texts; the keyword-based text similarity QA solution suffers from shortcomings such as missing key information due to manual keyword database construction, incomplete keyword database information, difficulty in determining keyword weights, low correlation of the fine ranking model with key information, and the edit distance being easily affected by invalid data.

[0106] The intelligent question-answering matching method provided in this invention can adapt to different knowledge base data and different scenarios. Combined with existing intelligent question-answering services, and considering that knowledge base operators may add, delete, or modify existing knowledge base data in real time, it achieves automatic data updates, avoiding excessive human intervention and truly realizing real-time updates of knowledge base data for more timely responses. Addressing existing methods for candidate data retrieval using methods such as Elasticsearch (ES), this invention adds a semantic similarity-based retrieval method based on text rewriting. The rewriting scheme reduces bias in the semantic encoding process by classifying entities of the same type. Combining literal retrieval based on ES and semantic retrieval ensures more complete retrieval results. Addressing existing methods that pre-construct keyword databases, this invention automatically extracts key information and its derived associations through entity recognition, part-of-speech analysis, and knowledge graphs. Furthermore, it proposes an auxiliary question-answering method based on key mutual information at the input layer and implements vector fusion of the BERT semantic interaction model and the auxiliary question-answering model at the output layer, ultimately calculating the similarity between the request text and candidate texts. It achieves convenience and real-time performance in intelligent question answering under different complex scenarios, making the question answering results more in line with users' expectations and needs.

[0107] The intelligent question-and-answer matching device provided by the present invention is described below. The intelligent question-and-answer matching device described below can be referred to in correspondence with the intelligent question-and-answer matching method described above.

[0108] Figure 8 This is a schematic diagram of the intelligent question-answering matching device provided in an embodiment of the present invention, as shown below. Figure 8 As shown, the intelligent question-answering matching device provided in this embodiment of the invention includes:

[0109] The recall module 801 is used to recall candidate data from a preset question-and-answer knowledge base based on user request data.

[0110] The first input module 802 is used to input the user request data and the candidate data into the fine ranking model to obtain the full difference vector. The fine ranking model is used to perform full data matching between the user request data and the candidate data.

[0111] The second input module 803 is used to extract key mutual information text features from the candidate data and the user request data, input the key mutual information text features into the key mutual information auxiliary model to obtain the keyword difference vector, and the key mutual information auxiliary model is used to perform key data matching between the user request data and the candidate data.

[0112] The acquisition module 804 is used to acquire response data corresponding to the user request data based on the full difference vector and the keyword difference vector.

[0113] The intelligent question-answering matching device provided in this embodiment of the invention retrieves candidate data from a preset question-answering knowledge base based on user request data; inputs the user request data and the candidate data into a fine-sorting model to obtain a full-scale difference vector; extracts key mutual information text features from the candidate data and the user request data, inputs the key mutual information text features into a key mutual information auxiliary model to obtain a keyword difference vector; and obtains response data corresponding to the user request data based on the full-scale difference vector and the keyword difference vector. By using the key mutual information auxiliary model to better integrate the key mutual information between the request text and the candidate text in the same dimension, the obtained response data can better meet the user's expectations and needs, realizing the convenience and real-time performance of intelligent question answering in different complex scenarios.

[0114] In this embodiment of the invention, the second input module 803 is configured as follows:

[0115] Encode the keywords corresponding to the user request data and the keywords corresponding to the candidate data to obtain user request encoded data and candidate encoded data;

[0116] The user request encoded data is input into the first deep recurrent neural network module to obtain the first semantic difference vector;

[0117] The candidate encoded data is input into the second deep recurrent neural network module to obtain the second semantic difference vector;

[0118] The first semantic difference vector and the second semantic difference vector are concatenated;

[0119] The concatenated semantic difference vectors are fused to obtain the keyword difference vector corresponding to the dimension of the full difference vector.

[0120] In this embodiment of the invention, the acquisition module 804 is configured as follows:

[0121] The full difference vector is concatenated with the keyword difference vector;

[0122] Calculate the normalized value of the concatenated vector as the similarity between the candidate data and the user request data;

[0123] The response data corresponding to the user's request data is matched based on similarity.

[0124] In this embodiment of the invention, the recall module 801 is configured as follows:

[0125] Based on user request data and semantic recall strategy, the preset question-and-answer knowledge base is recalled to obtain the n knowledge data with the highest semantic similarity ranking.

[0126] Based on user request data and a literal recall strategy, the preset question-and-answer knowledge base is used to retrieve the m knowledge data items with the highest literal similarity ranking.

[0127] The candidate data are obtained based on n knowledge data and the m knowledge data.

[0128] Traditional solutions for full datasets primarily rely on inverted indexing techniques like Elasticsearch (ES) to retrieve text based on its literal meaning. However, this approach fails to capture and retrieve deeper layers of meaning. Traditional solutions also suffer from low candidate data coverage, leading to missed candidate data and hindering the acquisition of optimal candidate text during the fine-grained ranking stage. This invention, building upon literal data retrieval based on inverted indexes (ES database retrieval), achieves semantic-level data retrieval through text rewriting. This retrieval design complements literal-based retrieval, reducing semantic bias during the semantic encoding of similar texts, resulting in higher data coverage and improved facilitating the ranking of retrieved text in subsequent tasks.

[0129] Traditional solutions primarily rely on pre-constructing a keyword database for subsequent keyword identification within the text. This approach requires continuous updates to the keyword database when encountering new words to avoid missing crucial information. For OOV (Out-of-Voice) issues caused by new words, this invention utilizes entity recognition technology to automatically identify key information within the text. Furthermore, part-of-speech tagging of key entities further filters the key information obtained from entity recognition, improving its quality. Finally, for the aforementioned keyword information, potential extended feature information is obtained through a knowledge graph. This solution ensures timely extraction of key information when encountering OOV issues without frequent updates to the offline keyword database, offering a higher degree of automation and contributing to improved subsequent matching accuracy.

[0130] The most similar existing technology, in its implementation of fine-grained ranking of candidate texts, adds a keyword-based attention layer to the last layer of the BERT semantic model to capture keyword information in the text. It processes key information through text dependency analysis and fuses the vectors from the BERT model to determine the semantic similarity between the question text and candidate texts. This fusion scheme can, to some extent, obtain keyword information from the text to improve ranking accuracy. This invention, however, directly encodes the key mutual information of the text and inputs it into a multi-layer RNN neural network model, considering the key mutual information between texts in the initial layer. It is feasible to fuse the original BERT semantic model and the mutual information-based auxiliary model on the same text differentiation dimension. Utilizing the semantically encoded information from this fusion, it is possible to better determine whether and to what extent there is a correlation between the request text and candidate texts, which is more conducive to the final ranking of candidate texts and returning the most relevant knowledge base question-and-answer response to the user.

[0131] Figure 9 An example is a schematic diagram of the physical structure of a terminal, such as... Figure 9 As shown, the terminal may include a processor 910, a transceiver 920, a memory 930, and a communication bus 940, wherein the processor 910, transceiver 920, and memory 930 communicate with each other via the communication bus 940. The processor 910 can call logical instructions in the memory 930 to execute an intelligent question-and-answer matching method. This method includes: recalling a preset question-and-answer knowledge base based on user request data to obtain candidate data; inputting the user request data and the candidate data into a fine-sorting model to obtain a full-scale difference vector; extracting key mutual information text features from the candidate data and the user request data, inputting the key mutual information text features into a key mutual information auxiliary model to obtain a keyword difference vector; and obtaining response data corresponding to the user request data based on the full-scale difference vector and the keyword difference vector.

[0132] On the other hand, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the intelligent question-answering matching method provided by the above methods. The method includes: recalling a preset question-answering knowledge base based on user request data to obtain candidate data; inputting the user request data and the candidate data into a fine-ranking model to obtain a full-scale difference vector; extracting key mutual information text features from the candidate data and the user request data, and inputting the key mutual information text features into a key mutual information auxiliary model to obtain a keyword difference vector; and obtaining response data corresponding to the user request data based on the full-scale difference vector and the keyword difference vector.

[0133] The device embodiments described above are merely illustrative. 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 modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0134] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An intelligent question-answering matching method, characterized in that, include: Based on user request data, the system retrieves candidate data from a pre-defined question-and-answer knowledge base. The user request data and the candidate data are input into the fine-ranking model to obtain the full difference vector. The fine-ranking model is used to perform full data matching between the user request data and the candidate data. The fine-ranking model is a model finely tuned based on the BERT pre-trained model. Key mutual information text features are extracted from the candidate data and the user request data. The key mutual information text features are input into a key mutual information auxiliary model to obtain a keyword difference vector. The key mutual information auxiliary model is used to perform key data matching between the user request data and the candidate data. Key mutual information is obtained by inputting keyword information into a knowledge graph constructed from historical keywords to obtain keyword association information. Keyword information is information obtained by performing entity recognition and part-of-speech analysis on the data. Based on the full difference vector and the keyword difference vector, obtain the response data corresponding to the user request data; The step of inputting the key mutual information text features into the key mutual information auxiliary model to obtain the keyword difference vector includes: The key mutual information text features corresponding to the user request data and the key mutual information text features corresponding to the candidate data are encoded to obtain user request encoded data and candidate encoded data. The user request encoded data is input into the first deep recurrent neural network module to obtain the first semantic difference vector; The candidate encoded data is input into the second deep recurrent neural network module to obtain the second semantic difference vector; The first semantic difference vector and the second semantic difference vector are concatenated; The concatenated semantic difference vectors are fused to obtain the keyword difference vector corresponding to the dimension of the full difference vector. The step of obtaining the response data corresponding to the user request data based on the full difference vector and the keyword difference vector includes: The full difference vector is concatenated with the keyword difference vector; The normalized value of the concatenated vector is calculated based on the fully connected layer and used as the similarity between the candidate data and the user request data. The response data corresponding to the user request data is matched based on the similarity.

2. The intelligent question-answering matching method according to claim 1, characterized in that, The step of recalling candidate data from a preset question-and-answer knowledge base based on the user request data includes: Based on the user request data and semantic recall strategy, semantic similarity is obtained by recalling the preset question-and-answer knowledge base. Sort the semantic similarity from high to low and select the top n knowledge data; Based on the user request data and the literal recall strategy, the preset question-and-answer knowledge base is used to retrieve the m knowledge data with the highest literal similarity ranking. The candidate data are obtained based on the n knowledge data and the m knowledge data.

3. The intelligent question-answering matching method according to claim 2, characterized in that, The step of retrieving semantic similarity from the preset question-and-answer knowledge base based on the user request data and semantic recall strategy includes: Entity recognition is performed on the user request data and the knowledge data in the preset question-and-answer knowledge base; The identified entities are categorized to obtain their corresponding types; Replace the entities in the user request data and the knowledge data in the preset question-and-answer knowledge base with the entities of the corresponding type; Calculate the semantic similarity between the replaced user request data and the knowledge data in the preset question-and-answer knowledge base.

4. The intelligent question-answering matching method according to claim 1, characterized in that, The extraction of key mutual information text features from the candidate data and the user request data includes: Entity identification is performed on the candidate data and the user request data; The identified entities are subjected to part-of-speech analysis, and the information of nouns and verbs is saved as keywords. The individual information of the keywords is input into a knowledge graph constructed from historical keywords to obtain keyword association information; Key mutual information text features are obtained based on the individual information of the keywords and the association information of the keywords. The key mutual information text features include request text features and candidate text features.

5. The intelligent question-answering matching method according to claim 1, characterized in that, The calculation of the normalized value of the concatenated vector includes: Merge the concatenated vectors into a one-dimensional vector; The normalized value of the one-dimensional vector is calculated using the softmax function.

6. An intelligent question-and-answer matching device, characterized in that, include: The recall module is used to recall candidate data from a preset question-and-answer knowledge base based on user request data. The first input module is used to input the user request data and the candidate data into the fine ranking model to obtain the full difference vector. The fine ranking model is used to perform full data matching between the user request data and the candidate data. The fine ranking model is a model finely tuned based on the BERT pre-trained model. The second input module is used to extract key mutual information text features from the candidate data and the user request data, and input the key mutual information text features into a key mutual information auxiliary model to obtain a keyword difference vector. The key mutual information auxiliary model is used to perform key data matching between the user request data and the candidate data. Key mutual information is obtained by inputting keyword information into a knowledge graph constructed from historical keywords to obtain keyword association information. Keyword information is information obtained by performing entity recognition and part-of-speech analysis on the data. The acquisition module is used to acquire response data corresponding to the user request data based on the full difference vector and the keyword difference vector; The step of inputting the key mutual information text features into the key mutual information auxiliary model to obtain the keyword difference vector includes: The key mutual information text features corresponding to the user request data and the key mutual information text features corresponding to the candidate data are encoded to obtain user request encoded data and candidate encoded data. The user request encoded data is input into the first deep recurrent neural network module to obtain the first semantic difference vector; The candidate encoded data is input into the second deep recurrent neural network module to obtain the second semantic difference vector; The first semantic difference vector and the second semantic difference vector are concatenated; The concatenated semantic difference vectors are fused to obtain the keyword difference vector corresponding to the dimension of the full difference vector. The step of obtaining the response data corresponding to the user request data based on the full difference vector and the keyword difference vector includes: The full difference vector is concatenated with the keyword difference vector; The normalized value of the concatenated vector is calculated based on the fully connected layer and used as the similarity between the candidate data and the user request data. The response data corresponding to the user request data is matched based on the similarity.

7. A terminal, characterized in that, Includes memory, transceiver, and processor; The memory is used to store computer programs; the transceiver is used to send and receive data under the control of the processor. Processor, configured to read the computer program in the memory and perform the following operations: Based on user request data, the system retrieves candidate data from a pre-defined question-and-answer knowledge base. The user request data and the candidate data are input into the fine-ranking model to obtain the full difference vector. The fine-ranking model is used to perform full data matching between the user request data and the candidate data. The fine-ranking model is a model finely tuned based on the BERT pre-trained model. Key mutual information text features are extracted from the candidate data and the user request data. The key mutual information text features are input into a key mutual information auxiliary model to obtain a keyword difference vector. The key mutual information auxiliary model is used to perform key data matching between the user request data and the candidate data. Key mutual information is obtained by inputting keyword information into a knowledge graph constructed from historical keywords to obtain keyword association information. Keyword information is information obtained by performing entity recognition and part-of-speech analysis on the data. Based on the full difference vector and the keyword difference vector, obtain the response data corresponding to the user request data; The step of inputting the key mutual information text features into the key mutual information auxiliary model to obtain the keyword difference vector includes: The key mutual information text features corresponding to the user request data and the key mutual information text features corresponding to the candidate data are encoded to obtain user request encoded data and candidate encoded data. The user request encoded data is input into the first deep recurrent neural network module to obtain the first semantic difference vector; The candidate encoded data is input into the second deep recurrent neural network module to obtain the second semantic difference vector; The first semantic difference vector and the second semantic difference vector are concatenated; The concatenated semantic difference vectors are fused to obtain the keyword difference vector corresponding to the dimension of the full difference vector. The step of obtaining the response data corresponding to the user request data based on the full difference vector and the keyword difference vector includes: The full difference vector is concatenated with the keyword difference vector; The normalized value of the concatenated vector is calculated based on the fully connected layer and used as the similarity between the candidate data and the user request data. The response data corresponding to the user request data is matched based on the similarity.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the intelligent question-answering matching method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Intelligent question and answer matching method and system based on twin network BERT model

    CN112667794A

  • Text matching method, device and system and storage medium

    CN115712713A