An intelligent question-answering method based on deep learning
Through the intelligent question-and-answer method combining BM25 algorithm screening, emotion recognition and graph attention network, the problems of low answer retrieval efficiency and insufficient accuracy in large-scale knowledge bases are solved, and an efficient and accurate intelligent question-and-answer system is realized.
Patent Information
- Application Number
- CN202310787157.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-29
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2043-06-29
AI Technical Summary
When existing intelligent question-and-answer systems deal with complex problems, there are problems that they cannot accurately understand user semantic information and cannot retrieve the optimal answers. In addition, deep learning-based methods are computationally costly in large-scale knowledge bases, which affects the user experience.
The BM25 algorithm is used to initially screen the knowledge base, combine the emotion recognition model, pre-trained language model and graph attention network, and extract the semantic features and attention tendency characteristics of the problem, and calculate the optimal answer through the Jaccard coefficient.
It reduces the time spent on answer retrieval, improves the practicality and accuracy of the method, retains multi-faceted feature information of the question text, and improves the user experience.
Smart Images

Figure CN116756289B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of deep learning and natural language processing, and in particular to an intelligent question-answering method based on deep learning. Background Art
[0002] With the rapid development of the information society and the advent of the big data era, the amount of information people are exposed to is increasing, and the demand for intelligent question-answering systems has also increased significantly. Intelligent question-answering systems can help users obtain the information they need through natural language, greatly improving the efficiency of information retrieval.
[0003] Currently, knowledge bases for intelligent question-answering (Q&A) via computer programs primarily consist of question-answer pairs. The intelligent Q&A process can be summarized as follows: a user poses a question, and the computer searches the knowledge base for the corresponding answer and provides feedback to the user. Based on the differences in answer retrieval methods, intelligent Q&A methods can be divided into three categories: template matching-based methods, statistical learning-based methods, and deep learning-based methods.
[0004] Template matching methods search for answers by matching user-entered questions with manually defined templates. This method is highly scalable and offers fast search speeds, but requires manual definition of templates for each type of question, which can be very labor-intensive when the question types are complex.
[0005] Statistical learning-based methods count the frequency of individual words in each segmented text in the knowledge base. These words are then matched against the user's question in descending order of frequency, and the answer is returned if a match is found. This method is relatively simple to implement, but it lacks accuracy and is highly dependent on a specific knowledge base.
[0006] Deep learning-based approaches use deep learning models to represent user questions and each question in the knowledge base as vectors, then compare the similarities between these vectors to select the optimal answer. This approach is independent of a specific knowledge base and does not suffer performance degradation when the knowledge base scales. It is also low-cost and highly practical.
[0007] In addition, given that natural language may be highly complex in structure and semantics, intelligent question-answering methods may encounter some problems in practical applications, such as the inability to accurately understand the semantic information of questions raised by users and the inability to retrieve the optimal answer from the knowledge base. Summary of the Invention
[0008] In order to solve the above problems, the present invention proposes an intelligent question-answering method based on deep learning. After the user inputs the question, the question is first segmented, and the BM25 algorithm is used to preliminarily screen the relevant "question-answer" pairs in the knowledge base based on the segmentation results. Next, an emotion recognition model is used to identify the emotional tendencies at the lexical level in the question and the emotional tendencies of the entire sentence, and then the recognition results are summarized into an emotion recognition matrix. At the same time, the semantic feature vector of the question is extracted by a pre-trained language model. After obtaining the emotion recognition matrix and the semantic feature vector, the two are multiplied to obtain semantic features containing emotional tendencies. Next, the question is converted into a graph structure using a graph attention network, and the attention weight of each node in the graph is calculated and saved as a vector. The vector is multiplied with the semantic feature containing emotional tendencies to obtain the feature vector of the question. Finally, by calculating the Jaccard coefficient between different vectors, the highest result is found as the optimal answer.
[0009] In order to achieve the above object, the present invention adopts the following technical solutions:
[0010] An intelligent question-answering method based on deep learning, comprising the following steps:
[0011] Step 1): Collect the user's question and the "question" portion of each "question-answer" pair in the knowledge base. Then, use a word segmentation tool to segment all questions in the "question" portion. Next, use the BM25 algorithm to preliminarily filter out questions in the knowledge base related to the user's question to obtain preliminary screening results. Finally, save the user's question and preliminary screening results to the question list.
[0012] Step 2): Use the emotion recognition network to analyze the questions in the question list and obtain the emotional tendency characteristics of the questions;
[0013] Step 3): Use the pre-trained language model to extract the semantic feature information of the questions in the question list to obtain the content semantic features of the questions;
[0014] Step 4): Use the graph attention network to transform the question into a graph structure, calculate the attention weights of the nodes in the graph, and obtain the attention tendency features of the questions in the question list;
[0015] Step 5): For each question in the question list, the sentiment tendency features, content semantic features, and attention tendency features calculated in Step 2), Step 3), and Step 4) are integrated to obtain the text features of the question;
[0016] Step 6); Calculate the Jaccard coefficient between the text features corresponding to the user's question and the text features of each question in the preliminary screening results of Step 1), and then sort the results. The "answer" part of the "question-answer" pair corresponding to the result with the highest value is the optimal answer.
[0017] Furthermore, the Step 1) includes:
[0018] Assume that the user's question is q, and the question part of any "question-answer" pair in the knowledge base is p. First, preprocess the two, including word segmentation and stop word removal, to obtain q1 and p1. Then, calculate the inverted document score (IDF(t,p1)) for each word t and p1 in q1:
[0019]
[0020] Among them, KB amount Represents the total number of "question-answer" pairs in the knowledge base, FREQUENCY(t,p1) represents the frequency of word t in p1; then calculate the relevance score RELAVANCE(t,p1) between each word t and p1 in q1:
[0021]
[0022] Among them, LEN(p1) represents the length of p1, AVG_LEN(KB) represents the average length of all questions in the knowledge base, and m and n are manually set parameters;
[0023] Calculate the BM25 score BM25(q1,p1) of q1 and any p1 in the knowledge base, and set a threshold. The scores greater than the threshold are included in the candidate knowledge base, and the scores less than the threshold are discarded:
[0024]
[0025] In the above formula, the user question q1 consists of N words, k represents the label of a word, t k represents the kth word;
[0026] Through the above steps, a candidate knowledge base is finally obtained, and the user questions and the questions in the candidate knowledge base are combined into a candidate question list.
[0027] Furthermore, the Step 2) includes:
[0028] After obtaining a list of candidate questions, the emotional tendency feature information of each question is extracted and used as part of the overall feature set. The deep learning network consists of an embedding layer, a convolutional layer, a pooling layer, a connection layer, and an LSTM layer. In the convolutional layer, multiple convolution kernels of different sizes are used to convolve the input of the embedding layer. In the LSTM layer, a bidirectional LSTM network is used to ensure that the emotional context information is better understood.
[0029] The network SENTI takes the Chinese question as input and the hidden state of the last moment of the LSTM layer as output. The output content is represented as feature sentiment :
[0030] feature sentiment =SENTI(question)
[0031] The output content is the emotional tendency characteristics of the Chinese question, including positive, negative, and neutral. The public dataset is used for training, and a total of 30 rounds of training are performed to obtain an emotion recognition model with a loss of 0.03.
[0032] Furthermore, the step 3) includes: extracting the content semantic features of the question text through the deep learning network using the pre-trained language model all-MiniLM-L6-v2 based on the sentence transformer. content .
[0033] Furthermore, the Step 4) includes:
[0034] The deep learning network used to extract attention tendency features consists of a graph representation layer and an attention coefficient calculation layer;
[0035] In the graph representation layer, we first use a word segmentation tool to segment the input question into a set of multiple words. Then, we treat each word as a node in the graph, and connect the nodes with undirected edges. Finally, we aggregate the nodes and undirected edges to obtain an undirected graph corresponding to the input question.
[0036] The attention weight between node i and its neighbor node j is calculated based on the similarity coefficient between the two, as shown in the following formula, where feature i Represents the feature vector corresponding to the i node, feature j Represents the feature vector corresponding to node j, exp represents the exponential function, ReLU represents a nonlinear activation function, N represents the total number of nodes composed of different words, attentionWeight(i,j) represents the attention weight between node i and node j; wordi and word j Represents the original vocabulary of nodes i and j, Word2Vec() represents the input vocabulary word i and word j Conversion into a corresponding vector of machine learning network; concat() represents the feature vector feature i and feature j Splicing, conv() represents the convolution of the spliced result with a convolution kernel size of 2x2, similarity(i,j) represents the similarity between node i and node j;
[0037] feature i =Word2Vec(word i )
[0038] feature j =Word2Vec(word j )
[0039] similarity(i,j)=conv(concat(feature i ,feature j ))
[0040]
[0041] The feature information of the node is updated based on the attention weight between node i and its neighboring nodes, as shown in the following formula, where there are K nodes adjacent to node i, k represents the kth adjacent node, feature k Represents the feature vector of the kth node adjacent to it, LeaklyRELU() represents an activation function in the neural network, feature' i Represents the feature vector corresponding to the updated i node;
[0042]
[0043] As shown in the following formula, feature attention Represents the attention feature vector corresponding to a question text; the features of all nodes are spliced according to their corresponding positions in the original text to obtain the attention tendency features of the question text:
[0044] feature attention ={feature′ i |i∈N}.
[0045] Furthermore, the Step 5) includes:
[0046] Obtain the sentiment tendency features, content semantic features, and attention tendency features of the question text through Step 2), Step 3), and Step 4;
[0047] The three are concatenated and mapped to a 4096*4096 matrix using a convolutional neural network. This matrix is the final feature corresponding to the question text. total :
[0048] feature total =conv(concat(feature sentiment ,feature content ,feature attention ).
[0049] Furthermore, the Step 6) includes:
[0050] After obtaining the features corresponding to all questions including user questions and candidate knowledge bases, the similarity between the features corresponding to user questions and candidate questions other than user questions is calculated, as shown in the following formula:
[0051]
[0052] The Jaccard coefficient is used to measure the similarity, where set user Features for users to ask questions user The corresponding set, set query is the set corresponding to the features of the candidate question, intersection represents the union, and union represents the intersection; finally, all the calculation results are sorted, and the candidate answer corresponding to the result with the highest value is the one being sought.
[0053] Beneficial effects:
[0054] 1) This invention uses preliminary screening to reduce the time overhead during answer retrieval. Due to the large scale of the knowledge base of intelligent question-answering methods, existing methods require comparing the similarity between the user's question and each set of data in the knowledge base to determine the optimal answer, which is time-consuming and results in a poor user experience in actual use. This invention uses the BM25 algorithm for preliminary screening, narrowing the search scope early in the system's operation. This reduces search time while ensuring accuracy, improving the method's practicality and user experience.
[0055] 2) The present invention enriches the feature information of the question text by integrating emotional features, semantic features, and attention features. A question text contains information such as the questioner's emotional tendency, content semantics, and attention tendency. The process of mapping the text into a feature matrix may result in the loss of this information. The existing intelligent question-answering method based on single feature matching only extracts the content semantic information in the question text, ignoring the emotional tendency and attention tendency information, resulting in a large loss when the feature is proposed, which in turn affects the accuracy of the entire method. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 This is a flow chart of an intelligent question-answering method based on deep learning of the present invention;
[0057] Figure 2 This is an overall structural diagram of an intelligent question-answering method based on deep learning of the present invention;
[0058] Figure 3 This is the structure diagram of the emotion recognition network;
[0059] Figure 4 Extract network structure graph for content semantic features;
[0060] Figure 5 Extracting network structure diagram for attention tendency feature. DETAILED DESCRIPTION
[0061] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
[0062] The present invention extracts and fuses multiple features for each question. First, the present invention uses an emotion recognition network to extract the emotional feature information of the question. Then, the present invention uses a pre-trained language model to extract the semantic feature matrix of the question, ensuring the accurate extraction of content semantic information. Next, the present invention uses a graph attention network to extract the attention tendency information of the question, allowing the model to understand the focus of the questioner. Finally, the present invention fuses the three to obtain the final feature matrix, which retains the feature information of the original text to the greatest extent and improves the accuracy of the subsequent similarity calculation steps.
[0063] like Figure 1 As shown, an intelligent question-answering method based on deep learning of the present invention includes the following steps:
[0064] Step 1): Collect the user's questions and the "question" portion of each "question-answer" pair in the knowledge base. Then, use a word segmentation tool to segment all questions. Next, use the BM25 algorithm to preliminarily filter out questions in the knowledge base that are relevant to the user's question. Finally, save the user's question and the preliminary screening results into a question list.
[0065] Step 2): Use the emotion recognition network to analyze the question and obtain the emotional tendency characteristics of the question.
[0066] Step 3): Use the pre-trained language model to extract the semantic feature information of the question and obtain the content semantic features of the question.
[0067] Step 4): Use the graph attention network to transform the question into a graph structure, calculate the attention weights of the nodes in the graph, and obtain the attention tendency characteristics of the question.
[0068] Step 5): For each question, the sentiment tendency features, content semantic features, and attention tendency features calculated in Step 2), Step 3), and Step 4) are integrated to obtain the text features of the question.
[0069] Step 6); Calculate the Jaccard coefficient between the text features corresponding to the user's question and the text features of each question in the preliminary screening results of Step 1), and then sort the results. The "answer" part of the "question-answer" pair corresponding to the result with the highest value is the optimal answer.
[0070] like Figure 2 As shown, the knowledge in the knowledge base exists in the form of "question-answer" pairs. The goal of the present invention is to find the "question-answer" pair that is most similar to the question raised by the user and return the answer therein.
[0071] In Step 1), a preliminary screening is performed on the knowledge base, and the BM25 algorithm is used to screen and obtain the candidate knowledge base. The specific implementation process is as follows.
[0072] Assume the user's question is q, and the question part of any question-answer pair in the knowledge base is p. First, preprocess both, including word segmentation and stop word removal, to obtain q1 and p1. The word segmentation can be performed using the Jieba library for Chinese word segmentation, and the stop word removal can be performed using the open-source stop word library from Harbin Institute of Technology. Then, the inverted document score (IDF(t,p1)) is calculated for each word t in q1 and p1:
[0073]
[0074] Among them, KB amountRepresents the total number of "question-answer" pairs in the knowledge base, and FREQUENCY(t,p1) represents the frequency of word t appearing in p1. Then calculate the relevance score RELAVANCE(t,p1) between each word t and p1 in q1:
[0075]
[0076] Among them, LEN(p1) represents the length of p1, AVG_LEN(KB) represents the average length of all questions in the knowledge base, and m and n are manually set parameters.
[0077] Calculate the BM25 score of q1 and any question p1 in the knowledge base, and set a threshold. Questions with scores greater than the threshold are included in the candidate knowledge base, and questions with scores less than the threshold are discarded.
[0078]
[0079] In the above formula, the user question q1 consists of N words, k represents the label of a word, t k represents the kth word.
[0080] Through the above steps, a candidate knowledge base is finally obtained, and the user questions and the questions in the candidate knowledge base are combined into a candidate question list.
[0081] The extraction of sentiment tendency features in Step 2) includes:
[0082] After obtaining the candidate question list, the sentiment feature information of each question is extracted and used as part of the entire feature. The deep learning network structure used to extract the sentiment feature of the question text is as follows: Figure 3 shown.
[0083] The entire network consists of an embedding layer, a convolutional layer, a pooling layer, a concatenation layer, and an LSTM layer. In the convolutional layer, the network uses multiple convolution kernels of different sizes, such as 1x1, 2x2, and 4x4, to convolve the embedding layer input, ensuring that coarse, medium, and fine scales of sentiment information are fully extracted. In the LSTM layer, the network uses a bidirectional LSTM network to better understand the emotional context.
[0084] feature sentiment =SENTI(question)
[0085] In practical applications, the network SENTI takes the Chinese question as input and the hidden state of the last moment of the LSTM layer as output. The output content is feature sentimentThe output is the sentiment characteristic of the Chinese question, including positive, negative, and neutral. To ensure the effectiveness of subsequent feature fusion, the network can be trained using open-source datasets such as the THUCNews dataset and the weibo_senti_100k dataset. A total of 30 rounds of training were performed, resulting in an emotion recognition model with a loss of 0.03.
[0086] In Step 3), the extraction of content semantic features includes:
[0087] Extract the content semantic features containing the question text content information. The deep learning network structure used to extract content semantic features is as follows Figure 4 shown.
[0088] The entire network uses the all-MiniLM-L6-v2 pre-trained language model based on the sentence transformer to extract the semantic features of the question text. It maps the input question into a 384-dimensional dense vector matrix, fully extracting the lexical, grammatical, and semantic information contained in the text, providing sufficient preparation for subsequent similarity calculations.
[0089] In Step 4), the extraction of attention tendency features includes:
[0090] Extract feature information containing the questioner's attention tendency. The deep learning network structure used to extract attention tendency features is as follows: Figure 5 shown.
[0091] The entire network structure consists of a graph representation layer and an attention coefficient calculation layer.
[0092] In the graph representation layer, we first use a word segmentation tool to segment the input question into a set of words. Each word is then treated as a node in the graph, and nodes are connected by undirected edges. Finally, we aggregate the nodes and undirected edges to form an undirected graph corresponding to the input question.
[0093] feature i =Word2Vec(word i )
[0094] feature j =Word2Vec(word j )
[0095] similarity(i,j)=conv(concat(feature i ,feature j ))
[0096] In the attention coefficient calculation layer, as shown in the above formula, i and j represent the nodes and word i and word j Represents the original vocabulary of nodes i and j, Word2Vec() represents the input vocabulary word i and word j Convert it into a corresponding vector machine learning network, and use the Word2Vec module of the gensim library to implement it. i and feature j Represents the feature vector of node i and node j, concat() represents the feature vector feature i and feature j Concatenate, conv() represents convolution of the concatenated result with a kernel size of 2x2, and similarity(i,j) represents the similarity between nodes i and j. First, a convolutional neural network is used to calculate the features of each node. Then, any node i and its neighbor node j are traversed and concatenated. After concatenation, the convolutional neural network is used to map them to a real value, which is the similarity coefficient between node i and its neighbor node j.
[0097]
[0098] Based on the similarity coefficient between node i and its neighbor node j, the attention weight between the two is calculated as shown in the above formula, where exp represents the exponential function, ReLU represents a nonlinear activation function, N represents the total number of nodes composed of different words, and attentionWeight(i,j) represents the attention weight between node i and node j.
[0099]
[0100] Based on the attention weight between node i and its neighboring nodes, as shown in the above formula, the feature information of the node is updated, where there are K nodes adjacent to node i, k represents the kth adjacent node, feature k Represents the feature vector of the kth node adjacent to it, LeaklyRELU() represents an activation function in the neural network, feature' i Represents the feature vector corresponding to the updated i-node.
[0101] feature attention ={feature′ i |i∈N}
[0102] As shown in the above formula, feature attentionRepresents the attention feature vector corresponding to a question text. By concatenating the features of all nodes according to their corresponding positions in the original text, we can obtain the attention tendency feature of the question text.
[0103] In Step 5), feature fusion includes:
[0104] Through the previous steps, we can obtain the sentiment tendency features, content semantic features, and attention tendency features of the question text.
[0105] feature total =conv(concat(feature sentiment ,feature content ,feature attention )
[0106] As shown in the above formula, the three are concatenated and mapped to a 4096*4096 matrix using a convolutional neural network. This matrix is the final feature corresponding to the question text. total .
[0107] In Step 6), similarity calculation and sorting include:
[0108] After obtaining the features corresponding to all questions including user questions and candidate knowledge bases, the similarity between the features corresponding to user questions and other candidate questions is calculated.
[0109]
[0110] As shown in the above formula, the Jaccard coefficient is used to measure the similarity, where set user Features for users to ask questions user The corresponding set, set query is the set of features corresponding to the candidate question, where intersection represents the union and union represents the intersection. Finally, all the calculation results are sorted, and the candidate answer corresponding to the result with the highest value is the one being sought.
[0111] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. An intelligent question-answering method based on deep learning, characterized in that: The steps include: Step 1): Collect the user's questions and the "question" part of each "question-answer" pair in the knowledge base; then use the word segmentation tool to segment all the questions in the "question" part; then, with the help of The algorithm preliminarily screens questions related to the user's question in the knowledge base to obtain preliminary screening results; finally, the user's question and preliminary screening results are saved in the question list; Step 2): Use the emotion recognition network to analyze the questions in the question list and obtain the emotional tendency characteristics of the questions; Step 3): Use the pre-trained language model to extract the semantic feature information of the questions in the question list to obtain the content semantic features of the questions; Step 4): Use the graph attention network to transform the question into a graph structure, calculate the attention weights of the nodes in the graph, and obtain the attention tendency features of the questions in the question list, including: The deep learning network used to extract attention tendency features consists of a graph representation layer and an attention coefficient calculation layer; In the graph representation layer, we first use a word segmentation tool to segment the input question into a set of multiple words. Then, we treat each word as a node in the graph, and connect the nodes with undirected edges. Finally, we aggregate the nodes and undirected edges to obtain an undirected graph corresponding to the input question. Node-based and its neighboring nodes The similarity coefficient between them is used to calculate the attention weight between them, as shown in the following formula, where Represents the feature vector corresponding to node i, , represents the exponential function, represents a nonlinear activation function, represents the total number of nodes consisting of different words, Representative Node and nodes The attention weight between and represent and The original vocabulary of the node, Represents the input word and Converted into a machine learning network of corresponding vectors; Represents the feature vector and Splicing, It means that the concatenated result will be convolved with a kernel size of 2x2. Represents the similarity between node i and node j; ; ; In the attention coefficient calculation layer, as shown in the above formula, and Represents the nodes composed of two words respectively, and represent and The original vocabulary of the node, Represents the input word and Converted into a corresponding vector machine learning network, used in specific implementation Library Module implementation, and represent Node and The node's feature vector, Represents the feature vector and Splicing, It means that the concatenated result will be convolved with a kernel size of 2x2. Represents the similarity between node i and node j; first use the convolutional neural network to calculate the features of each node, and then traverse any node Its neighboring nodes , after concatenation, a convolutional neural network is used to map it to a real value, which is a node Its adjacent nodes Similarity coefficient between them; ; Node-based The attention weight between node i and its neighboring nodes updates the feature information of the node, as shown in the following formula, where there are K nodes adjacent to node i, and k represents the kth adjacent node. represents the feature vector of the kth adjacent node, Represents an activation function in a neural network. Represents the feature vector corresponding to the updated i node; ; As shown in the following formula, Represents the attention feature vector corresponding to a question text; the features of all nodes are spliced according to their corresponding positions in the original text to obtain the attention tendency features of the question text: ; Step 5): For each question in the question list, the sentiment features, content semantic features, and attention features calculated in Steps 2), 3), and 4) are integrated to obtain the text features of the question; Step 6); Calculate the text features corresponding to the user's question and the text features of each question in the preliminary screening results of Step 1) The coefficient is then sorted, and the "answer" part of the "question-answer" pair corresponding to the result with the highest value is the optimal answer.
2. The intelligent question-answering method based on deep learning according to claim 1, characterized in that: The Step 1) includes: Suppose the user asks , the question part of any "question-answer" pair in the knowledge base is ; First, preprocess the two, including word segmentation and removal of stop words, to obtain and , then calculate Each word in and Inverted document score : ; in, Represents the total number of "question-answer" pairs in the knowledge base, Representative words exist The frequency of occurrence in ; then calculate Each word in and Relevance score : ; in, represent length, represents the average length of all questions in the knowledge base, and Parameters set manually; calculate and any one in the knowledge base of Fraction , and set a threshold at the same time. The scores greater than the threshold are summarized into the candidate knowledge base, and the scores less than the threshold are discarded: ; In the above formula, the user asks Depend on The vocabulary is composed of A label representing a word. Representative vocabulary; Through the above steps, a candidate knowledge base is finally obtained, and the user questions and the questions in the candidate knowledge base are combined into a candidate question list.
3. The intelligent question-answering method based on deep learning according to claim 2, characterized in that: The Step 2) includes: After obtaining the candidate question list, the emotional tendency feature information of each question is extracted and used as part of the entire feature; the deep learning network consists of an embedding layer, a convolutional layer, a pooling layer, a connection layer, Layer composition; in the convolution layer, multiple convolution kernels of different sizes are used to convolve the input of the embedding layer; In the layer, bidirectional network, ensuring that emotional contextual information is better understood; network The Chinese question As input, The hidden state of the last moment of the layer is used as the output, and the output content is expressed as : ; The output content is Chinese question The emotional tendency features, including positive, negative, and neutral, were obtained by using a public dataset for training for 30 rounds, and an emotion recognition model with a loss of 0.03 was obtained.
4. The intelligent question-answering method based on deep learning according to claim 3, characterized in that: The step 3) includes: a deep learning network for extracting content semantic features based on The pre-trained language model all-MiniLM-L6-v2 is used to extract the content semantic features of the question text .
5. The intelligent question-answering method based on deep learning according to claim 4, characterized in that: The Step 5) includes: Obtain the sentiment tendency features, content semantic features, and attention tendency features of the question text through Step 2), Step 3), and Step 4; The three are concatenated and mapped to a 4096×4096 matrix using a convolutional neural network. This matrix is the final feature corresponding to the question text. : 。 6. The deep learning-based intelligent question answering method according to claim 5, characterized in that: The Step 6) includes: After obtaining the features corresponding to all questions including user questions and candidate knowledge bases, the similarity between the features corresponding to user questions and candidate questions other than user questions is calculated, as shown in the following formula: ; use The coefficient measures the similarity, where Features for asking questions to users The corresponding set, is the set of features corresponding to the candidate problem, represents the union, Represents the intersection; finally, all the calculation results are sorted, and the candidate answer corresponding to the result with the highest value is the one being sought.
Citation Information
Patent Citations
A construction method of a knowledge map question answering system in the field of electric power communication based on deep learning
CN109271506A
Conversation reply generation method and device, electronic equipment and storage medium
CN115145980A