A voice question-answering method and system based on short text matching

Through the method of grammatical error correction and word fusion training, combined with text matching of ESIM model, the problems of proprietary noun recognition and unlogged word processing in automotive voice Q&A are solved, the accuracy and response efficiency are improved, and the efficient voice is achieved Q&A interaction.

CN114328881BActive Publication Date: 2025-01-10CHONGQING CHANGAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210061030.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-19
Publication Date
2025-01-10
Estimated Expiration
2042-01-19

AI Technical Summary

Technical Problem

In car driving scenarios, the recognition accuracy of proprietary car nouns during the speech to text is low, and no logged-in words exist in text semantic understanding, resulting in insufficient accuracy and response time for text answer generation, affecting interaction fluency.

Method used

Correct text errors through the grammatical error correction model, use word fusion training word vector model to process unlogged words, and combine entity word retrieval, semantic similarity and character similarity joint recall method, use ESIM model to match text to achieve knowledge points Efficient sorting and decision-making judgment of candidate sets.

Benefits of technology

It improves the accuracy of auto noun recognition, makes unlogged words recognizable, shortens response time, reduces the risk of false response output, and improves the accuracy and interactive fluency of voice Q&A.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114328881B_ABST
    Figure CN114328881B_ABST
Patent Text Reader

Abstract

The present invention discloses a voice question-answering method and system based on short text matching, the method comprising: converting user voice into input text; obtaining correction text; performing word segmentation and word segmentation vectorization processing on the correction text; obtaining a knowledge point candidate set by adopting entity word retrieval, semantic similarity and character similarity joint recall; the correction text and the knowledge point candidate set form a paired text, adopting an ESIM model to predict whether the paired text is equivalent, and sorting the knowledge point candidate set based on the prediction result; making a decision based on the prediction result, determining the reply form, and outputting the system's answer text; voice broadcasting the answer text; setting a buried point of an interactive interface, supporting users to give helpful and unhelpful evaluation feedback to the answer text returned by the system; and regularly capturing user feedback data and adding it to the ESIM model for incremental training. The method can effectively improve the recognition accuracy of automobile proper nouns, so that unregistered words become recognizable words of word vectors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of natural language processing, and in particular relates to a voice question-answering method and system based on short text matching. Background Art

[0002] In car driving scenarios, voice interaction with the car system avoids the need to transfer hands and eyes from driving to operating the car system, greatly improving driving safety.

[0003] The implementation of the voice interaction system mainly includes four steps: voice-to-text, text semantic understanding, text answer generation, and text voice broadcast. In the application of the automotive vertical field, there are mainly the following problems and challenges: (1) In the voice-to-text process, the main problem is the low recognition accuracy of proprietary automotive nouns; (2) In the text semantic understanding process, the text needs to be vectorized first, but proprietary automotive nouns are easily unregistered words; (3) In the text answer generation, it is necessary to pre-fabricate the question-and-answer knowledge base in the system and retrieve knowledge points from the knowledge base. If simple methods such as ES retrieval, keyword retrieval, character similarity sorting, or cosine similarity sorting are used directly, the accuracy of the output answer is low. If the input text is directly paired with the system's pre-fabricated knowledge base text, and then input into text matching models such as ESIM and BERT for sorting, the response time will be too long, affecting the smoothness of the interaction.

[0004] At present, there have been some studies on improved methods. For example, Chinese patent CN202111081901.4 discloses a vector retrieval dialogue method for a popular legal question-answering system. This method converts speech into text, generates sentence vectors through the BERT model, and screens candidate answers through vector similarity calculation, and uses the results of cosine similarity retrieval > 0.9 as the answer. This method still has many shortcomings: (1) It does not consider the possible errors in the speech conversion process; (2) Cosine similarity is used as the final calculation indicator of similarity, and its accuracy is limited. Summary of the invention

[0005] In view of the above-mentioned deficiencies in the prior art, the purpose of the present invention is to provide a voice question answering method and system based on short text matching, which can effectively improve the recognition accuracy of automobile proper nouns, make unregistered words become recognizable words in word vectors, and improve efficiency while ensuring the accuracy level.

[0006] The technical solution of the present invention is achieved in this way:

[0007] A voice question answering method based on short text matching comprises the following steps:

[0008] S1: Detect user voice and convert it into input text;

[0009] S2: Perform error site detection and error correction on the input text obtained in S1 to obtain a corrected text;

[0010] S3: Perform word segmentation and word vectorization processing on the corrected text obtained in S2 to obtain word segmentation and sentence vectors;

[0011] S4: Based on the obtained word segmentation and sentence vectors, entity word retrieval, semantic similarity and character similarity joint recall are used to obtain the knowledge point candidate set;

[0012] S5: Based on the corrected text in S2 and the knowledge point candidate set, a paired text is formed, the ESIM model is used to predict whether the paired text is equivalent, and the knowledge point candidate set is ranked based on the prediction results;

[0013] S6: Make a decision based on the prediction results, determine the response format, and output the system's response text;

[0014] S7: Voice broadcasting of the response text;

[0015] S8: Set tracking points on the interactive interface to support users to provide helpful or unhelpful feedback on the response text returned by the system.

[0016] S9: Regularly capture S8 user feedback data and add it to the ESIM model, and start incremental training of the ESIM model. The ESIM model that passes the evaluation is used as the latest ESIM model.

[0017] Furthermore, step S2 specifically includes the following steps:

[0018] S2.1: Collect historical conversation data and open data from automobile forums and automobile encyclopedias to form an automobile corpus. Collect automobile-related proper entity nouns as a dictionary of automobile proper entity nouns. Use the Jieba word segmentation tool to load the dictionary of automobile proper entity nouns as a custom dictionary. Then segment the automobile corpus and train the Kenlm language model below 3-gram.

[0019] S2.2: Collect open-source dictionaries of similar-sounding characters and characters with similar shapes, as well as error correction dictionaries for incorrect proper entity nouns annotated in historical conversation data;

[0020] S2.3: Segment the input text obtained in S1, and then obtain 3-gram phrases by shifting the window of 3 words. If the number of segmented words in the text is less than 3, use 2-gram. If there is only 1 word, skip error correction.

[0021] S2.4: Use the kenlm language model to perform perplexity scoring on the phrases obtained in S2.3, and obtain a perplexity scoring result list;

[0022] S2.5: Based on the perplexity score result list in S2.4, calculate the mean deviation of each phrase and determine the site with the largest mean deviation as the potential error site;

[0023] S2.6: Match the segmentation of the error site in S2.5 with the error correction dictionary, and propose the correct word in the hit error correction record as one of the candidate words, and match the dictionary of similar pronunciation and similar appearance for each word in the segmentation to generate a new segmentation and add it to the candidate word set;

[0024] S2.7: For the candidate word set obtained in S2.6, replace the text at the error site one by one, and re-score the perplexity according to the steps of S2.3 and S2.4. Finally, select the candidate word set with the best score for replacement, so as to generate the corrected text after error correction.

[0025] Furthermore, step S3 specifically includes the following steps:

[0026] S3.1: Collect historical conversation data and open data from automobile forums and automobile encyclopedias to form an automobile corpus, and perform two types of processing: Processing 1: Use the Jieba word segmentation tool to load a custom dictionary containing automobile-specific entity nouns, segment the automobile corpus, and obtain the list data after segmentation; Processing 2: Directly split the automobile corpus word by word, retain single English words as characters, and obtain word-granular list data; Aggregate the two parts of the list data to form a list data set, and generate a bag-of-words dictionary containing characters and words, retaining records with a word frequency greater than 2;

[0027] S3.2: Input the list data set of S3.1 into the gensim model as training samples for the word2vec word vector model. The minimum word frequency is set to 3. If it is a newly added corpus, load the historical word2vec word vector model for incremental training.

[0028] S3.3: Segment the corrected text obtained in S2, and search the corresponding code in the bag-of-words dictionary of S3.1. If a hit is found, it is replaced with the code, and the found code is replaced with the first-level list in the list where the segmented word is located; if there is no hit, the segmented word is included in the unregistered word dictionary and the word frequency is accumulated, and the corresponding text is added to the dictionary with the unregistered word as the key and the text as the value, and then the segmented word is split word by word, and the corresponding code is searched in the bag-of-words dictionary of S3.1, and the found code is replaced with the second-level list in the list where the segmented word is located;

[0029] S3.4: Based on the first-level list and the second-level list encoded in S3.3, search the word2vec word vector model in S3.2 to obtain the vector value, average the vector values ​​of the second-level list, and then average the first-level list as the sentence vector.

[0030] Furthermore, step S3 also includes S3.5: regularly taking the corpus corresponding to the segmented words with a frequency greater than 2 in the unregistered word dictionary in S3.3 as new corpus, and performing incremental training of the gensim model in S3.2.

[0031] Furthermore, step S4 specifically includes the following steps:

[0032] S4.1: Segment the knowledge point questions pre-made by the system, extract the automobile specific entity nouns based on the automobile specific entity noun dictionary collected in S2.1, and form an inverted index table;

[0033] S4.2: Based on the automobile-specific entity nouns contained in S3, search the inverted index table to obtain a list of knowledge points;

[0034] S4.3: Use the method of S3 to form sentence vectors for the system's pre-made knowledge point questions, and store them in faiss as the vector library; then for the sentence vectors obtained in S3, use the Euclidean distance to search the vector library and select knowledge points with a distance less than 0.2;

[0035] S4.4: For the problem of S3 text and knowledge points in the system's prefabricated knowledge base, the difflib module is used to quickly calculate character similarity and select knowledge points with character similarity greater than 0.8;

[0036] S4.5: Summarize the knowledge point list of S4.2 and the results of the knowledge points of S4.3 and S4.4 to form a candidate set of knowledge points;

[0037] 6. The voice question-answering method based on short text matching according to claim 5, characterized in that S5 specifically comprises the following steps:

[0038] S5.1: Based on the historical conversation data, the S4 method is used to form a paired dataset, and the semantic equivalence of the paired dataset is manually annotated to form a dataset containing positive and negative labels;

[0039] S5.2: Input the dataset containing positive and negative labels into the ESIM model for model training;

[0040] S5.3: Pair the knowledge point candidate set of S4 with the correction text, and after S3 sentence vectorization, use the ESIM model for prediction, and perform inverse sorting on the knowledge point candidate set based on the prediction results.

[0041] Furthermore, in S6, there are three types of responses: precise response, recommended response, and unavailable response. Each response type corresponds to a different threshold. The prediction result is then compared with the threshold to determine the response type.

[0042] Furthermore, the threshold for accurate replies is greater than or equal to 0.95, the threshold for recommended replies is greater than or equal to 0.6, and the threshold for unreply is less than 0.6. When the prediction result is ≥0.95, an accurate reply is given; when 0.6≤prediction result<0.95, a recommended reply is given; when the prediction result is<0.6, a direct reply is given that it is unreplyable, and when replying, the greeting and the reply content corresponding to the specific reply form are concatenated as the system's response text.

[0043] Furthermore, the response text is voice broadcasted through a TTS tool.

[0044] The present invention also discloses a voice question-answering system based on short text matching, the voice question-answering system comprising:

[0045] The speech recognition module is used to detect user speech and convert the user speech into input text.

[0046] The grammar error correction module is used to detect error sites and correct errors in the input text to obtain a corrected text.

[0047] The vectorization module is used to perform word segmentation and word vectorization processing on the corrected text to obtain word segmentation and sentence vectors.

[0048] The recall module obtains the candidate set of knowledge points based on word segmentation and sentence vectors by using entity word retrieval, semantic similarity and character similarity joint recall.

[0049] The sorting module is used to use the ESIM model to predict whether the paired texts formed by the corrected text and the knowledge point candidate set are equivalent, and to sort the knowledge point candidate set based on the prediction results.

[0050] The decision module is used to make decisions based on the prediction results, determine the response form, and output the system's response text.

[0051] The voice broadcast module is used to voice broadcast the response text.

[0052] The feedback module is used for users to provide feedback on whether the response text returned by the system is helpful or not.

[0053] The iteration module is used to periodically capture user feedback data and add it to the ESIM model, and start incremental training of the ESIM model. The ESIM model that passes the evaluation is used as the latest ESIM model.

[0054] Compared with the prior art, the present invention has the following beneficial effects:

[0055] (1) The present invention aims to solve the problem of low accuracy of ASR recognition of automobile proper nouns, which has the greatest impact on voice question and answer in the automobile field. By calling a grammatical error correction model, the grammatical errors in the text are corrected, thereby effectively improving the accuracy of automobile proper noun recognition.

[0056] (2) The present invention aims to correct the situation in which unregistered words appear in the text vectorization process, and proposes a method of training a word vector model by word fusion. The method supports generating word vectors for unregistered words by decomposing them into characters and performing weighted summation, so that the unregistered words are distinguishable from each other. The gensim model that supports incremental training is used to add the accumulated high-frequency unregistered word materials into the training, so that the unregistered words can finally become recognizable words in the word vector.

[0057] (3) The present invention improves the knowledge base retrieval question-answering method by adopting a three-way joint recall method of entity recall, semantic similarity recall and character similarity recall combined with an ESIM text matching model to achieve a response time of 100 milliseconds.

[0058] (4) The present invention adopts a combination of precise replies, recommended replies and unavailable replies, which can effectively reduce the risk of erroneous response output and improve the accuracy of voice question and answer.

[0059] (5) Data collection in the interactive interface to collect user feedback on question-and-answer results can reduce the need for additional data annotation samples during model training and enable regular online updates and iterations. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 -Schematic diagram of the structure of the system of the present invention. DETAILED DESCRIPTION

[0061] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0062] A voice question answering method based on short text matching comprises the following steps:

[0063] S1: Detect user voice and convert it into input text;

[0064] S2: Perform error site detection and error correction on the input text obtained in S1 to obtain a corrected text;

[0065] S3: Perform word segmentation and word vectorization processing on the corrected text obtained in S2 to obtain word segmentation and sentence vectors;

[0066] S4: Based on the obtained word segmentation and sentence vectors, entity word retrieval, semantic similarity and character similarity joint recall are used to obtain the knowledge point candidate set;

[0067] S5: Based on the corrected text in S2 and the knowledge point candidate set, a paired text is formed, the ESIM model is used to predict whether the paired text is equivalent, and the knowledge point candidate set is ranked based on the prediction results;

[0068] S6: Make a decision based on the prediction results, determine the response format, and output the system's response text;

[0069] S7: Voice broadcasting of the response text;

[0070] S8: Set tracking points on the interactive interface to support users to provide helpful or unhelpful feedback on the response text returned by the system.

[0071] S9: Regularly capture S8 user feedback data and add it to the ESIM model, and start incremental training of the ESIM model. The ESIM model that passes the evaluation is used as the latest ESIM model.

[0072] In specific implementation, step S1 specifically includes the following steps:

[0073] S1.1: Select a speech-to-text interface service provider and clarify the standards and formats of input and output parameters according to the interface documentation;

[0074] S1.2: After receiving the voice input, initiate a voice-to-text interface request;

[0075] S1.3: Parse the interface output content and extract the converted input text.

[0076] In specific implementation, step S2 specifically includes the following steps:

[0077] S2.1: Collect historical conversation data and open data from automobile forums and automobile encyclopedias to form an automobile corpus. Collect automobile-related proper entity nouns as a dictionary of automobile proper entity nouns. Use the Jieba word segmentation tool to load the dictionary of automobile proper entity nouns as a custom dictionary. Then segment the automobile corpus and train the Kenlm language model below 3-gram.

[0078] S2.2: Collect open-source dictionaries of similar-sounding characters and characters with similar shapes, as well as error correction dictionaries for incorrect proper entity nouns annotated in historical conversation data;

[0079] S2.3: Segment the input text obtained in S1, and then obtain 3-gram phrases by shifting the window of 3 words. If the number of segmented words in the text is less than 3, use 2-gram. If there is only 1 word, skip error correction.

[0080] S2.4: Use the kenlm language model to perform perplexity scoring on the phrases obtained in S2.3, and obtain a perplexity scoring result list;

[0081] S2.5: Based on the perplexity score result list in S2.4, calculate the mean deviation of each phrase and determine the site with the largest mean deviation as the potential error site;

[0082] S2.6: Match the segmentation of the error site in S2.5 with the error correction dictionary, and propose the correct word in the hit error correction record as one of the candidate words, and match the dictionary of similar pronunciation and similar appearance for each word in the segmentation to generate a new segmentation and add it to the candidate word set;

[0083] S2.7: For the candidate word set obtained in S2.6, replace the text at the error site one by one, and re-score the perplexity according to the steps of S2.3 and S2.4. Finally, select the candidate word set with the best score for replacement, so as to generate the corrected text after error correction.

[0084] In specific implementation, step S3 specifically includes the following steps:

[0085] S3.1: Collect historical conversation data and open data from automobile forums and automobile encyclopedias to form an automobile corpus, and perform two types of processing: Processing 1: Use the Jieba word segmentation tool to load a custom dictionary containing automobile-specific entity nouns, segment the automobile corpus, and obtain the list data after segmentation; Processing 2: Directly split the automobile corpus word by word, retain single English words as characters, and obtain word-granular list data; Aggregate the two parts of the list data to form a list data set, and generate a bag-of-words dictionary containing characters and words, retaining records with a word frequency greater than 2;

[0086] S3.2: Input the list data set of S3.1 into the gensim model as training samples for the word2vec word vector model. The minimum word frequency is set to 3. If it is a newly added corpus, load the historical word2vec word vector model for incremental training.

[0087] S3.3: Segment the corrected text obtained in S2, and search the corresponding code in the bag-of-words dictionary of S3.1. If a hit is found, it is replaced with the code, and the found code is replaced with the first-level list in the list where the segmented word is located; if there is no hit, the segmented word is included in the unregistered word dictionary and the word frequency is accumulated, and the corresponding text is added to the dictionary with the unregistered word as the key and the text as the value, and then the segmented word is split word by word, and the corresponding code is searched in the bag-of-words dictionary of S3.1, and the found code is replaced with the second-level list in the list where the segmented word is located;

[0088] S3.4: Based on the first-level list and the second-level list encoded in S3.3, search the word2vec word vector model in S3.2 to obtain the vector value, average the vector values ​​of the second-level list, and then average the first-level list as the sentence vector.

[0089] In specific implementation, step S3 also includes S3.5: regularly taking the corpus corresponding to the segmented words with a frequency greater than 2 in the unregistered word dictionary in S3.3 as new corpus, and performing incremental training of the gensim model in S3.2.

[0090] In specific implementation, step S4 specifically includes the following steps:

[0091] S4.1: Segment the knowledge point questions pre-made by the system, extract the automobile specific entity nouns based on the automobile specific entity noun dictionary collected in S2.1, and form an inverted index table;

[0092] S4.2: Based on the automobile-specific entity nouns contained in the S3 segmentation, search the inverted index table of S4.1 to obtain a list of knowledge points;

[0093] S4.3: Use the method of S3 to form sentence vectors for the system's pre-made knowledge point questions, and store them in faiss as the vector library; then for the sentence vectors obtained in S3, use the Euclidean distance to search the vector library and select knowledge points with a distance less than 0.2;

[0094] S4.4: For the problem of S3 text and knowledge points in the system's prefabricated knowledge base, the difflib module is used to quickly calculate character similarity and select knowledge points with character similarity greater than 0.8;

[0095] S4.5: Summarize the knowledge point list of S4.2 and the results of the knowledge points of S4.3 and S4.4 to form a candidate set of knowledge points;

[0096] In specific implementation, S5 specifically includes the following steps:

[0097] S5.1: Based on the historical conversation data, the S4 method is used to form a paired dataset, and the semantic equivalence of the paired dataset is manually annotated to form a dataset containing positive and negative labels;

[0098] S5.2: Input the dataset containing positive and negative labels into the ESIM model for model training;

[0099] S5.3: Pair the knowledge point candidate set of S4 with the correction text, and after S3 sentence vectorization, use the ESIM model for prediction, and perform inverse sorting on the knowledge point candidate set based on the prediction results.

[0100] Here, the ESIM model structure is as follows: the input information is first connected to the embedding layer, then to the bidirectional LSTM layer, and then in the local inference layer, the similarity of each position of the two sentences is calculated by point multiplication, and the positions are weighted. Then, in the inference layer, feature extraction is performed again through the bidirectional LSTM, and average pooling and maximum pooling are performed respectively. The pooled results are feature spliced, and finally connected to the fully connected layer and softmax normalization.

[0101] In specific implementation, there are three types of responses in S6: precise response, recommended response, and unable to respond. Each response type corresponds to a different threshold. The prediction result is then compared with the threshold to determine the response type.

[0102] In specific implementation, the threshold for accurate replies is greater than or equal to 0.95, the threshold for recommended replies is greater than or equal to 0.6, and the threshold for unreply is less than 0.6. When the prediction result is ≥0.95, an accurate reply is given; when 0.6≤prediction result<0.95, a recommended reply is given; when the prediction result is<0.6, a direct reply is given that it is unreplyable, and when replying, the greeting and the reply content corresponding to the specific reply form are concatenated as the system's response text.

[0103] Here, for example, when the prediction result is 0.98, a precise reply is used; when the prediction result is 0.8, a recommended reply is used; and when the prediction result is 0.5, a direct reply cannot be used.

[0104] In specific implementation, the response text is voice broadcasted through the TTS tool. Specifically, the response text can be directly displayed in the dialogue interaction section, and the response text is inserted into the TTS tool for voice broadcasting.

[0105] In specific implementation, step S8 specifically includes the following steps:

[0106] S8.1: In the answer box of the accurate reply displayed on the front end, there are click buttons for helpful and unhelpful. After the user clicks, the feedback of the conversation is recorded;

[0107] S8.2: The question record in the recommended question box displayed on the front end supports clicks. After the user clicks, the system directly returns the answer to the knowledge point corresponding to the question;

[0108] S8.3: In the unanswered answer box displayed on the front end, an option for manual customer service is provided, and contact information is obtained after clicking it.

[0109] In specific implementation, step S9 specifically includes the following steps:

[0110] S9.1: Set up a scheduled task to update the questions and knowledge point questions recorded in S8.1 to the data table storing the data set;

[0111] S9.2: Set up a scheduled task, start the ESIM model training task, read the data table of S9.1, perform incremental training, and generate a new ESIM model version;

[0112] S9.3: Set up scheduled tasks, start the model evaluation task, read the ESIM models of various versions in S9.2, and push the version with the highest accuracy to replace the ESIM model in S5.2.

[0113] See also Figure 1 , a voice question answering system based on short text matching, comprising:

[0114] The speech recognition module is used to detect user speech and convert the user speech into input text.

[0115] The grammar error correction module is used to detect error sites and correct errors in the input text to obtain a corrected text.

[0116] The vectorization module is used to perform word segmentation and word vectorization processing on the corrected text to obtain word segmentation and sentence vectors.

[0117] The recall module obtains the candidate set of knowledge points based on word segmentation and sentence vectors by using entity word retrieval, semantic similarity and character similarity joint recall.

[0118] The sorting module is used to use the ESIM model to predict whether the paired texts formed by the corrected text and the knowledge point candidate set are equivalent, and to sort the knowledge point candidate set based on the prediction results.

[0119] The decision module is used to make decisions based on the prediction results, determine the response form, and output the system's response text.

[0120] The voice broadcast module is used to voice broadcast the response text.

[0121] The feedback module is used for users to provide feedback on whether the response text returned by the system is helpful or not.

[0122] The iteration module is used to periodically capture user feedback data and add it to the ESIM model, and start incremental training of the ESIM model. The ESIM model that passes the evaluation is used as the latest ESIM model.

[0123] Finally, it should be noted that the above embodiments of the present invention are only examples for illustrating the present invention, and are not intended to limit the implementation methods of the present invention. For those skilled in the art, other different forms of changes and modifications can be made based on the above description. It is impossible to list all implementation methods here. Any obvious changes or modifications derived from the technical solution of the present invention are still within the scope of protection of the present invention.

Claims

1. A voice question-answering method based on short text matching, characterized in that: The following steps are involved: S1: Detect user voice and convert it into input text; S2: Perform error site detection and error correction on the input text obtained in S1 to obtain a corrected text; S3: Perform word segmentation and word vectorization processing on the corrected text obtained in S2 to obtain word segmentation and sentence vectors; S4: Based on the word segmentation and sentence vectors obtained in S3, entity word retrieval, semantic similarity and character similarity are used to jointly recall and obtain the candidate set of knowledge points; S5: Based on the corrected text in S2 and the knowledge point candidate set obtained in S4, a paired text is formed, the ESIM model is used to predict whether the paired texts are equivalent, and the knowledge point candidate set is sorted based on the prediction results; S6: Make a decision based on the prediction results, determine the response format, and output the system's response text; S7: Voice broadcasting of the response text; S8: Set tracking points on the interactive interface to support users to provide helpful or unhelpful feedback on the response text returned by the system. S9: Regularly capture S8 user feedback data and add it to the ESIM model, and start the incremental training of the ESIM model. The ESIM model that passes the evaluation is used as the latest ESIM model; Wherein, step S2 specifically includes the following steps: S2.1: Collect historical conversation data and open data from automobile forums and automobile encyclopedias to form an automobile corpus. Collect automobile-related proper entity nouns as a dictionary of automobile proper entity nouns. Use the Jieba word segmentation tool to load the dictionary of automobile proper entity nouns as a custom dictionary. Then segment the automobile corpus and train the Kenlm language model below 3-gram. S2.2: Collect open-source dictionaries of similar-sounding characters and characters with similar shapes, as well as error correction dictionaries for incorrect proper entity nouns annotated in historical conversation data; S2.3: Segment the input text obtained in S1, and then obtain 3-gram phrases by shifting the window of 3 words. If the number of segmented words in the text is less than 3, use 2-gram. If there is only 1 word, skip error correction. S2.4: Use the kenlm language model to perform perplexity scoring on the phrases obtained in S2.3, and obtain a perplexity scoring result list; S2.5: Based on the perplexity score result list in S2.4, calculate the mean deviation of each phrase and determine the site with the largest mean deviation as the potential error site; S2.6: Match the segmentation of the error site in S2.5 with the error correction dictionary, and propose the correct word in the hit error correction record as one of the candidate words, and match the dictionary of similar pronunciation and similar appearance for each word in the segmentation to generate a new segmentation and add it to the candidate word set; S2.7: For the candidate word set obtained in S2.6, replace the text at the error site one by one, and re-score the perplexity according to the steps of S2.3 and S2.4, and finally select the candidate set with the best score to replace, so as to generate the corrected text after error correction; Wherein, step S3 specifically includes the following steps: S3.1: Collect historical conversation data and open data from automobile forums and automobile encyclopedias to form an automobile corpus, and perform two types of processing: Processing 1: Use the Jieba word segmentation tool to load a custom dictionary containing automobile-specific entity nouns, segment the automobile corpus, and obtain the list data after segmentation; Processing 2: Directly split the automobile corpus word by word, retain single English words as characters, and obtain word-granular list data; Aggregate the two parts of the list data to form a list data set, and generate a bag-of-words dictionary containing characters and words, retaining records with a word frequency greater than 2; S3.2: Input the list data set of S3.1 into the gensim model as training samples for the word2vec word vector model. The minimum word frequency is set to 3. If it is a newly added corpus, load the historical word2vec word vector model for incremental training. S3.3: Segment the corrected text obtained in S2, and search the corresponding code in the bag-of-words dictionary of S3.

1. If a hit is found, it is replaced with the code, and the found code is replaced with the first-level list in the list where the segmented word is located; if there is no hit, the segmented word is included in the unregistered word dictionary and the word frequency is accumulated, and the corresponding text is added to the dictionary with the unregistered word as the key and the text as the value, and then the segmented word is split word by word, and the corresponding code is searched in the bag-of-words dictionary of S3.1, and the found code is replaced with the second-level list in the list where the segmented word is located; S3.4: Based on the first-level list and the second-level list encoded in S3.3, search the word2vec word vector model in S3.2 to obtain the vector value, average the vector values ​​of the second-level list, and then average the vector values ​​of the first-level list as the sentence vector; Wherein, step S3 also includes S3.5: regularly taking the corpus corresponding to the word segmentation with a word frequency greater than 2 in the unregistered word dictionary in S3.3 as the new corpus, and performing incremental training of the gensim model in S3.

2.

2. A voice question-answering method based on short text matching according to claim 1, characterized in that: Step S4 specifically includes the following steps: S4.1: Segment the knowledge point questions pre-made by the system, extract the automobile specific entity nouns based on the automobile specific entity noun dictionary collected in S2.1, and form an inverted index table; S4.2: Based on the automobile-specific entity nouns contained in the S3 segmentation, search the inverted index table of S4.1 to obtain a list of knowledge points; S4.3: Use the method of S3 to form sentence vectors for the system's pre-made knowledge point questions, and store them in faiss as the vector library; then for the sentence vectors obtained in S3, use the Euclidean distance to search the vector library and select knowledge points with a distance less than 0.2; S4.4: For the problem of knowledge points in S3 text and system prefabricated knowledge base, the SequenceMatcher function of the difflib module is used to quickly calculate the character similarity between sentences and select knowledge points with character similarity greater than 0.8; S4.5: Summarize the knowledge point list of S4.2 and the results of the knowledge points of S4.3 and S4.4 to form a knowledge point candidate set.

3. A voice question-answering method based on short text matching according to claim 2, characterized in that: S5 specifically includes the following steps: S5.1: Based on the historical conversation data, the S4 method is used to form a paired dataset, and the semantic equivalence of the paired dataset is manually annotated to form a dataset containing positive and negative labels; S5.2: Input the dataset containing positive and negative labels into the ESIM model for model training; S5.3: Pair the knowledge point candidate set of S4 with the corrected text of S2, and after sentence vectorization by S3, use the ESIM model for prediction, and perform inverse sorting on the knowledge point candidate set based on the prediction results.

4. A voice question-answering method based on short text matching according to claim 1, characterized in that: There are three types of responses in S6: precise response, recommended response, and unavailable response. Each response type corresponds to a different threshold. The prediction result is then compared with the threshold to determine the response type.

5. A voice question-answering method based on short text matching according to claim 4, characterized in that: The threshold for accurate replies is greater than or equal to 0.95, the threshold for recommended replies is greater than or equal to 0.6, and the threshold for unreply is less than 0.

6. When the predicted result is ≥0.95, an accurate reply is given; when 0.6≤prediction result<0.95, a recommended reply is given; when the predicted result is<0.6, a direct reply is made that it is unreplyable, and when replying, the greeting and the reply content corresponding to the specific reply form are concatenated as the system's response text.

6. A voice question-answering method based on short text matching according to claim 1, characterized in that: The response text is voiced through the TTS tool.

7. A voice question-answering system based on short text matching, characterized in that: include: A speech recognition module, used to detect user speech and convert the user speech into input text; A grammar error correction module is used to detect error sites and correct errors in the input text to obtain a corrected text; The specific steps include: (1) Collect historical conversation data and open data from automobile forums and automobile encyclopedias to form an automobile corpus. Collect automobile-related proper entity nouns as an automobile proper entity noun dictionary. Use the Jieba word segmentation tool to load the automobile proper entity noun dictionary as a custom dictionary. Then segment the automobile corpus and train the Kenlm language model below 3-gram. (2) Collect open-source dictionaries of similar-sounding and similar-looking characters, as well as error-correction dictionaries for proper entity nouns that were incorrectly annotated in historical conversation data; (3) Segment the input text, and then obtain 3-gram phrases by shifting the window of 3 words. If the number of segmented words in the text is less than 3, use 2-gram. If there is only 1 word, skip error correction. (4) Use the Kenlm language model to perform perplexity scoring on the phrases obtained in (3) and obtain a perplexity score result list; (5) Based on the perplexity score result list in (4), calculate the mean deviation of each phrase and determine the site with the largest mean deviation as the potential error site; (6) Match the segmentation of the error site in (5) with the error correction dictionary, and propose the correct word in the hit correction record as one of the candidate words, and match the dictionary of similar pronunciation and similar appearance for each word in the segmentation to generate a new segmentation and add it to the candidate word set; (7) For the candidate word set obtained in (6), replace the text at the error site one by one, and re-score the perplexity according to steps (3) and (4). Finally, select the candidate set with the best score to replace it, thereby generating the corrected text after error correction; The vectorization module is used to perform word segmentation and word vectorization processing on the corrected text to obtain word segmentation and sentence vectors; specifically, it includes the following steps: a: Collect historical conversation data and open data from automobile forums and automobile encyclopedias to form an automobile corpus, and perform two types of processing: Processing 1: Use the Jieba word segmentation tool to load a custom dictionary containing automobile-specific entity nouns, segment the automobile corpus, and obtain the list data after segmentation; Processing 2: Directly split the automobile corpus word by word, retain single English words as characters, and obtain word-granular list data; Aggregate the two parts of the list data to form a list data set, and generate a bag-of-words dictionary containing characters and words, retaining records with a word frequency greater than 2; b: Input the list data set of a into the gensim model as training samples for the word2vec word vector model. The minimum word frequency is set to 3. If it is a newly added corpus, load the historical word2vec word vector model for incremental training. c: Segment the corrected text, and search for the corresponding code in the bag-of-words dictionary of a after segmentation. If a hit is found, it is replaced with the code, and the found code is replaced with the first-level list in the list where the segmentation is located; if there is no hit, the segmentation is included in the unregistered word dictionary and the word frequency is accumulated. The corresponding text is added to the dictionary with the unregistered word as the key and the text as the value, and then the segmentation is split word by word, and the corresponding code is searched in the bag-of-words dictionary of a. The found code is replaced with the second-level list in the list where the segmentation is located; d: Based on the first-level list and second-level list encoded in c, search the word2vec word vector model in b to obtain the vector value, average the vector values ​​of the second-level list, and then average the vector values ​​of the first-level list as the sentence vector; e: Regularly add the corpus corresponding to the word frequency greater than 2 in the unregistered word dictionary of c as the new corpus, and perform incremental training of the gensim model in b; The recall module obtains the candidate set of knowledge points based on word segmentation and sentence vectors by using entity word retrieval, semantic similarity, and character similarity for joint recall; A sorting module is used to use the ESIM model to predict whether the paired texts formed by the corrected text and the knowledge point candidate set are equivalent, and sort the knowledge point candidate set based on the prediction results; The decision module is used to make decisions based on the prediction results, determine the response form, and output the system's response text; Voice broadcast module, used to voice broadcast the response text; Feedback module, used for users to provide feedback on whether the response text returned by the system is helpful or not; The iteration module is used to periodically capture user feedback data and add it to the ESIM model, and start incremental training of the ESIM model. The ESIM model that passes the evaluation is used as the latest ESIM model.

Citation Information

Patent Citations

  • Vector retrieval type dialogue method of common method question-answering system

    CN113742471A

  • Input prompting method and device for question-answering robot

    CN110765247A