A method, device, server and storage medium for expanding question and answer database
By clustering and combining the questions in the Q&A library, new Q&A pairs are generated, and target Q&A pairs are filtered according to the credibility and stored in the Q&A library, the problem of high cost and insufficient accuracy of the existing Q&A library expansion method is solved, and the effect of improving the accuracy and diversity of answers in the Q&A system is achieved.
Patent Information
- Application Number
- CN201910675047.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-07-25
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2040-01-07
AI Technical Summary
The existing Q&A library expansion method is costly and fails to improve the accuracy of answers to a single question, resulting in insufficient accuracy of the output answers of the Q&A system.
By clustering questions in the Q&A library, combining similar questions with their corresponding answers, generating new Q&A pairs, and filtering the target Q&A pairs according to their credibility and storing them into the Q&A library.
It improves the accuracy and diversity of the Q&A library for the Q&A system, enhances the Q&A library's ability to answer questions, and reduces the expansion cost.
Smart Images

Figure CN110413755B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, server, and storage medium for expanding a question and answer database. Background Art
[0002] Human-Computer Interaction (HCI) refers to the process of information exchange between people and computers using a certain dialogue language and a certain interactive method. With the development of human-computer interaction technology, more and more intelligent products based on human-computer interaction technology have emerged, such as in-vehicle voice systems, smart speakers, smart customer service, children's companion robots, etc. These intelligent products can chat and communicate with users through question-and-answer systems and generate corresponding answers based on users' questions. Among them, the question-and-answer knowledge base is crucial to the question-and-answer system, and the richness of question-and-answer pairs in the question-and-answer knowledge base directly affects the accuracy of the answers output by the question-and-answer system.
[0003] At present, most Q&A databases are expanded by mining a large amount of external knowledge and introducing new questions and new answers. This method not only has high expansion costs, but also only increases the breadth of the Q&A database without increasing the depth of a single question. For a single question, it is impossible to accurately find the corresponding Q&A pair and output an accurate answer. Therefore, how to expand the Q&A database and improve the accuracy of the answers output by the Q&A system has become an urgent problem to be solved. Summary of the invention
[0004] The embodiments of the present invention provide a method, device, server, and storage medium for expanding a question-and-answer database, which can expand the question-and-answer database and improve the accuracy of the question-and-answer database corresponding to a question-and-answer system.
[0005] On the one hand, an embodiment of the present invention provides a method for expanding a question and answer database, comprising:
[0006] Clustering the questions in the question-answer database, and combining the questions clustered into the same category with the answers corresponding to the questions of the same category to obtain at least one first question-answer pair;
[0007] Obtaining the credibility of each first question-answer pair in the at least one first question-answer pair, and determining a first target question-answer pair from the at least one first question-answer pair according to the credibility of each first question-answer pair;
[0008] The first target question-answer pair is stored in the question-answer library.
[0009] On the other hand, an embodiment of the present invention provides a device for expanding a question-and-answer database, comprising:
[0010] A clustering module, configured to cluster the questions in the question-answer database, and combine the questions clustered into the same category with the answers corresponding to the questions of the same category to obtain at least one first question-answer pair;
[0011] A processing module, configured to obtain the credibility of each first question-answer pair in the at least one first question-answer pair, and determine a first target question-answer pair from the at least one first question-answer pair according to the credibility of each first question-answer pair;
[0012] A storage module is used to store the first target question and answer pair in the question and answer library.
[0013] Correspondingly, an embodiment of the present invention also provides a server, comprising: a processor and a storage device; the storage device is used to store program instructions; the processor calls the program instructions to execute: clustering the questions in the question and answer library, and combining the questions clustered into the same category with the answers corresponding to the questions of the same category to obtain at least one first question and answer pair; obtaining the credibility of each first question and answer pair in the at least one first question and answer pair, and determining a first target question and answer pair from the at least one first question and answer pair based on the credibility of each first question and answer pair; storing the first target question and answer pair in the question and answer library.
[0014] Correspondingly, an embodiment of the present invention further provides a computer storage medium, in which program instructions are stored. When the program instructions are executed, they are used to implement the above methods.
[0015] In an embodiment of the present invention, each question in the question and answer library can be clustered, and the questions clustered into the same category can be combined with the answers corresponding to the questions of the same category to obtain at least one first question and answer pair. Furthermore, the credibility of each first question and answer pair in at least one first question and answer pair can be obtained, and a first target question and answer pair can be determined from at least one first question and answer pair based on the credibility of each first question and answer pair, and then the first target question and answer pair can be stored in the question and answer library. In this way, the question and answer pairs in the question and answer library can be expanded based on the existing data in the question and answer library, thereby improving the accuracy of the question and answer system corresponding to the question and answer library. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1It is a structural schematic diagram of a question-and-answer database expansion system according to an embodiment of the present invention;
[0018] Figure 2 It is a schematic diagram of a process of implementing expansion of a question-answer library by a question-answer module in an embodiment of the present invention;
[0019] Figure 3 It is a schematic diagram of a process of implementing expansion of a question and answer library by an answer-question module in an embodiment of the present invention;
[0020] Figure 4 It is a schematic diagram of a process of expanding a question-and-answer database according to an embodiment of the present invention;
[0021] Figure 5 is a schematic diagram of another process of expanding a question-and-answer database according to an embodiment of the present invention;
[0022] Figure 6 It is a structural schematic diagram of a device for expanding a question-and-answer database according to an embodiment of the present invention;
[0023] Figure 7 It is a structural diagram of a server according to an embodiment of the present invention. DETAILED DESCRIPTION
[0024] With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, drones, robots, smart medical care, smart customer service, etc. I believe that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0025] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0026] Among them, natural language processing (NLP) is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that can achieve effective communication between people and computers using natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field will involve natural language, that is, the language used by people in daily life, so it is closely related to the study of linguistics. Robot question-answering technology is an important technology for the application of natural language processing technology. Robot question-answering technology is mainly used in question-answering systems, so that question-answering systems can automatically output corresponding answers based on questions input by users. Among them, the question-answering knowledge base is crucial to the question-answering system. The richness of question-answer pairs in the question-answering knowledge base directly affects the accuracy and richness of the answers output by the question-answering system.
[0027] The solution provided in the embodiment of the present application involves an artificial intelligence robot question-answering technology, which can, on the one hand, expand the question-answer pairs in the question-answer library through the questions in the question-answer library, and on the other hand, can expand the question-answer pairs in the question-answer library through the answers in the question-answer library. The two aspects of expansion can be combined and iterated with each other. Compared with expanding the question-answer pairs by simply adding question sentences, the embodiment of the present invention can make richer expansions of the question-answer pairs in the question-answer library based on existing data from more dimensions, thereby improving the richness and accuracy of the answers output by the question-answering system. This is specifically illustrated by the following embodiments:
[0028] See also Figure 1 In an embodiment of the present invention, a system for expanding a question-answer database is proposed. The expansion system includes a question-answer module and an answer-question module, wherein the question-answer module is used to expand the question-answer pairs in the question-answer database through the questions in the question-answer database, and the answer-question module is used to expand the question-answer pairs in the question-answer database through the answers in the question-answer database. The expansion system forms a closed loop by combining the question-answer module and the answer-question module. The output results of the two modules complement each other iteratively, greatly enriching the number of question-answer pairs in the question-answer database. In this way, the existing data of the question-answer database can be fully mined without introducing additional data and external knowledge, and the question-answer pairs consisting of answers and questions in the question-answer database can be automatically expanded, the question-answer pairs composed of answers and questions in the question-answer database can be enhanced, and the accuracy and diversity of the question-answer system corresponding to the question-answer database can be improved.
[0029] In one embodiment, the specific process of the question-answer module expanding the question-answer pairs in the question-answer library by using the questions in the question-answer library can be found in Figure 2As shown, the process may include a process corresponding to the combination mode and a process corresponding to the generation mode. In one embodiment, the process corresponding to the combination mode may be: obtaining all questions from the question and answer library, calling the first clustering model to cluster all questions, and combining the questions clustered into the same category with the answers corresponding to the questions of the same category to obtain at least one question and answer pair. Furthermore, the first classification model may be called to determine the credibility of each question and answer pair in the at least one question and answer pair, and the question and answer pairs whose credibility is greater than or equal to the first preset credibility threshold are determined as candidate question and answer pairs from the at least one question and answer pair, and after manual filtering, the first target question and answer pair is screened out from the candidate question and answer pairs, and then the first target question and answer pair is stored in the question and answer library, thereby realizing the expansion of the question and answer pairs in the question and answer library.
[0030] In one embodiment, when the first preset credibility threshold satisfies the preset credibility threshold condition (for example, the first preset credibility threshold is relatively high, greater than or equal to a preset threshold), Figure 2 The manual filtering process can be omitted. The first preset credibility threshold and the certain preset threshold can be preset by developers according to experimental data, and can be adjusted according to actual needs later, which is not specifically limited in the embodiment of the present invention.
[0031] In one embodiment, the process corresponding to the generation mode can be: obtaining a question from a question and answer library, and calling a pre-trained first sequence generation model to determine at least one text sequence corresponding to the question, and the confidence of each text sequence in the at least one text sequence, and determining the text sequence in the at least one text sequence whose confidence is greater than or equal to the first confidence threshold as the new answer corresponding to the question, and then generating a question and answer pair consisting of the question and the new answer, and after manual filtering, screening out a first target question and answer pair from the question and answer pair consisting of the question and the new answer, and then storing the first target question and answer pair in the question and answer library, thereby achieving the expansion of the question and answer pairs in the question and answer library.
[0032] It can be seen that both the combination mode and the generation mode can expand the question-answer pairs in the question-answer library through the questions in the question-answer library, and the corresponding processes of the two modes can be executed independently of each other. In the question-answer module, a large number of new question-answer pairs mined based on the existing question-answer library can be quickly generated and added to the question-answer library through the combination mode and the generation mode. Among them, since the generation mode corresponding to the question-answer module can generate new answers (i.e., the above-mentioned newly added answers), the number of answers in the question-answer library will increase, thereby providing more answers for the answer-question module, and the two iterate each other.
[0033] In one embodiment, the specific process of the answer-question module expanding the question-answer pairs in the question-answer library by the answers in the question-answer library can be found in Figure 3As shown, the process may include a process corresponding to the combination mode and a process corresponding to the generation mode. Figure 3 The process corresponding to the combination mode can be: obtain all answers from the question and answer library, call the second clustering model to cluster all answers, and combine the answers clustered into the same category with the questions corresponding to the answers of the same category to obtain at least one question and answer pair. Furthermore, the second classification model can be called to determine the credibility of each question and answer pair in the above at least one question and answer pair, and determine the question and answer pairs with a credibility greater than or equal to the second preset credibility threshold from the above at least one question and answer pair as candidate question and answer pairs, and after manual filtering, select the second target question and answer pair from the candidate question and answer pairs, and then store the second target question and answer pair in the question and answer library, thereby realizing the expansion of the question and answer pairs in the question and answer library.
[0034] In one embodiment, when the second preset credibility threshold satisfies the preset credibility threshold condition (for example, the second preset credibility threshold is higher, greater than or equal to a preset threshold), Figure 2 The manual filtering process can be omitted. The second preset credibility threshold and the preset threshold can be preset by developers according to experimental data, and can be adjusted according to actual needs later, which is not specifically limited in the embodiment of the present invention.
[0035] In one embodiment, the Figure 3 The process corresponding to the generation mode can be: obtaining the answer from the question and answer library, and calling the pre-trained second sequence generation model to determine at least one text sequence corresponding to the answer, and the confidence of each text sequence in the at least one text sequence corresponding to the answer, and determining the text sequence in the at least one text sequence corresponding to the answer whose confidence is greater than or equal to the second confidence threshold as the new question corresponding to the answer, and then generating a question and answer pair consisting of the answer and the new question, and after manual filtering, screening out a second target question and answer pair from the question and answer pair consisting of the answer and the new question, and then storing the second target question and answer pair in the question and answer library, thereby realizing the expansion of the question and answer pairs in the question and answer library.
[0036] In the answer-question module, the expansion of the question-answer pairs in the question-answer library can be achieved through the combination mode and the generation mode. The corresponding processes of the two modes can be executed independently of each other. In the answer-question module, a large number of new question-answer pairs mined based on the existing question-answer library can be quickly generated and added to the question-answer library through the combination mode and the generation mode. Among them, since the generation mode corresponding to the answer-question module can generate new questions (i.e., the above-mentioned new questions), the number of questions in the question-answer library will increase, so that more questions can be provided for the question-answer module. The two are iterative, greatly enriching the number of question-answer pairs in the question-answer library.
[0037] From the above content, it can be seen that the specific processes corresponding to the question-answer module and the answer-question module to expand the question-answer library can include three types of models: clustering model, classification model and sequence generation model. Among them, the clustering model is unsupervised and does not rely on pre-defined classes or training instances with class labels, that is, no special training is required. The clustering model can be any model that can cluster text, such as the k-means clustering algorithm (K-means) and the Gaussian mixture clustering model (Mixture of Gaussian Models, GMM).
[0038] For the classification model, the input question and answer pair, the output result can be the credibility of the question and answer pair being the correct combination, or it can also be understood as the probability that the question and answer pair is the correct combination. Exemplarily, the classification model can be a simple support vector machine (SVM), logistic regression (LR) and other models, or a complex neural network, especially a neural network model with an attention mechanism. For the training of the classification model, in one embodiment, the answers and questions in the question and answer pair can be spliced together and input into the classification model as training samples, and then the text classification is performed. In another embodiment, the questions and answers in the question and answer pair can be subjected to feature screening respectively, and the feature information corresponding to the questions and answers in the question and answer pair can be extracted, and then the feature information corresponding to the questions and answers in the question and answer pair can be calculated at the final output end, and the similarity can be calculated to become a regression model, and the value of the calculated feature similarity can be discretized to 0-1, which becomes a classification problem. Among them, 0 represents dissimilarity and 1 represents similarity. Exemplarily, assuming that a question-answer pair A is input into the classification model, the calculated value of the feature similarity between the answer and the question in the question-answer pair A is discretized to 1. It can be determined that the answer and the question in the question-answer pair A are similar, and thus the confidence that the question-answer pair is a correct combination can be determined with 100%.
[0039] In one embodiment, the sequence generation model may be a (Sequence to Sequence, Seq2Seq) model, which is an Encoder-Decoder structure network, whose input is a sequence and output is also a sequence, wherein the Encoder converts a variable length signal sequence into a fixed length vector expression, and the Decoder converts the fixed length vector into a variable length target signal sequence. In an embodiment of the present invention, the sequence generation model may generate multiple sequences.
[0040] It is understandable that although both the question-answer module and the answer-question module include the above three categories of models, in the question-answer module and the answer-question module, the first clustering model is different from the second clustering model, the first classification model is different from the second classification model, and the first sequence generation model is also different from the second sequence generation model. The above differences may be different specific parameters in the model or different model structures adopted by the model. For example, both are classification models, the first classification model adopts the SVM model structure, and the second classification model adopts the LR model structure. Among them, the first clustering model clusters the questions to find different answers to a class of questions, and the second clustering model clusters the answers to find different questions to answer a class of answers. The first sequence generation model and the second sequence generation model have different corresponding generation mechanisms. The first sequence generation model generates answers through questions, and the second sequence generation model generates questions through answers. Therefore, the first sequence generation model and the second sequence generation model need to be trained separately.
[0041] See also Figure 4 The figure is a flow chart of expanding a question and answer library according to an embodiment of the present invention. The method according to the embodiment of the present invention can be executed by a server. The method according to the embodiment of the present invention includes the following steps.
[0042] S401: Clustering the questions in the question-answer database, and combining the questions clustered into the same category with the answers corresponding to the questions of the same category to obtain at least one first question-answer pair.
[0043] In one embodiment, a question and answer database stores multiple questions and answers, wherein the correspondence between questions and answers in the question and answer database can be a one-to-one correspondence or a many-to-many correspondence. In the process of automatic question and answer, similar questions can be answered with the same or different types of answers, and similar answers can also be answered with seemingly different questions. For example, when the question is very subjective, or the answer to an objective question is not unique.
[0044] For example, for an objective question such as: What are the habits of giant pandas? The answer to this objective question can be a concise description of the giant panda's living habits, or a humorous ridicule of certain points of the giant panda (such as laziness, cuteness, etc.). For another example, a subjective question is: Why is Shiba Inu so lovable? The answers to this subjective question are more diverse, such as because it smiles cutely or because it looks cute. For another example, for an answer such as: Good-looking and good singing, it can answer both the question "Why is Wang Leehom so popular?" and the question "How did Fish Leong become so popular?"
[0045] It can be seen that the answers to some questions in the question-and-answer database can also be the answers to other questions, forming new question-and-answer pairs. In one embodiment, the server can obtain all questions in the question-and-answer database, call a clustering model to cluster the obtained questions, and combine the answers corresponding to the questions belonging to the same category with the answers corresponding to other questions belonging to the same category, thereby combining to obtain at least one first question-and-answer pair.
[0046] For example, assuming that the correspondence between questions and answers included in the question-answer database is as shown in Table 1, the server can obtain all questions Q1, Q2, and Q3 in the question-answer database, and call the clustering model to cluster the obtained questions. The clustering result is: Q1 and Q3 are questions belonging to the same category, and Q2 is a separate category. In this case, the server can combine Q1 with the answer corresponding to the question Q3 of the same category, and combine Q3 with the answer corresponding to the question Q1 of the same category, and combine to obtain 4 first question-answer pairs, namely (Q1, A5), (Q1, A6), (Q3, A1), and (Q3, A2).
[0047] Table 1
[0048]
[0049] The clustering model may be any model that can cluster texts, such as a k-means clustering algorithm (K-means) and a Gaussian mixture clustering model (GMM).
[0050] S402: Obtain the credibility of each first question-answer pair in at least one first question-answer pair, and determine a first target question-answer pair from the at least one first question-answer pair according to the credibility of each first question-answer pair.
[0051] S403: Storing the first target question-answer pair in the question-answer database.
[0052] In one embodiment, the server can call the first classification model to determine the credibility of each first question and answer pair in at least one first question and answer pair, and determine the first question and answer pair in at least one first question and answer pair whose credibility is greater than or equal to a preset credibility threshold as the first target question and answer pair, and then store the first target question and answer pair in the question and answer library, thereby expanding the question and answer pairs in the question and answer library.
[0053] In one embodiment, the server may call the first classification model to extract the feature information corresponding to the question and the answer in each first question-answer pair, and calculate the feature similarity between the feature information corresponding to the question and the answer in each first question-answer pair, and then determine the credibility of each first question-answer pair based on the feature similarity between the feature information corresponding to the question and the answer in each first question-answer pair. The credibility represents the probability that the question and the answer in the first question-answer pair are a correct combination.
[0054] Among them, the higher the feature similarity between the feature information corresponding to the question and the answer in the first question and answer pair, the higher the credibility of the first question and answer pair. In one embodiment, the feature similarity can be directly equated with credibility. For example, if the feature similarity between the feature information corresponding to the question and the answer in a first question and answer pair QA1 is 90%, then the credibility of the first question and answer pair QA1 can be directly determined to be 90%. In another embodiment, the feature similarity can also be converted into credibility based on a preset conversion rule, and the embodiment of the present invention does not specifically limit this.
[0055] In one embodiment, the server can select a candidate question and answer pair whose credibility is greater than or equal to a preset credibility threshold from at least one first question and answer pair; if the preset credibility threshold satisfies a preset credibility threshold condition, the candidate question and answer pair is determined as a first target question and answer pair; if the preset credibility threshold does not satisfy the preset credibility threshold condition, the candidate question and answer pair is output, and the first target question and answer pair is determined from the candidate question and answer pairs based on the selection operation on the candidate question and answer pair.
[0056] In one embodiment, the preset credibility threshold condition may be that the preset credibility threshold is greater than or equal to the preset credibility upper threshold. The preset credibility threshold and the preset credibility upper threshold may be set by the developer in advance based on experimental measurement data, and may be adjusted later based on actual design requirements.
[0057] In one embodiment, if the server detects that the preset credibility threshold does not meet the preset credibility threshold condition, the candidate question and answer pair can be output through the terminal setting that pre-establishes the communication connection. After the user views the candidate question and answer pair through the terminal device, the candidate question and answer pair can be manually filtered, and a selection operation can be input for the candidate question and answer pair. The server can determine the first target question and answer pair from the candidate question and answer pairs based on the selection operation for the candidate question and answer pair. Among them, the input method of the selection operation can be touch, click, press, voice, etc., and the embodiment of the present invention does not specifically limit this.
[0058] Furthermore, the answer corresponding to a question can be more diverse and not limited to the existing answers in the question and answer library. In one embodiment, the server can obtain the first question from the question and answer library, and call the first sequence generation model to determine at least one text sequence corresponding to the first question, and the confidence of each text sequence in the at least one text sequence, and the first question is any one of the at least one question stored in the question and answer library. Furthermore, the server can determine the text sequence with a confidence greater than or equal to the first confidence threshold in the at least one text sequence corresponding to the first question as the newly added answer corresponding to the first question, generate a new question and answer pair consisting of the first question and the newly added answer, and store the new question and answer pair consisting of the first question and the newly added answer in the question and answer library. Among them, the confidence of each of the above text sequences represents the probability that each text sequence is the answer corresponding to the first question. The higher the confidence of the text sequence, the higher the probability that the text sequence is the answer corresponding to the first question.
[0059] Based on the above similar methods, the server can generate the above new question-answer pairs corresponding to all questions in the question-answer library. In this way, by generating new answers corresponding to each question in the question-answer library through the first sequence generation model, the number of answers in the question-answer library can be increased, making the answer corresponding to a question more diversified and not limited to the existing answers in the question-answer library.
[0060] In one embodiment, the above-mentioned first sequence generation model can be a Seq2Seq model. The server can use the first question as the input of the Seq2Seq model. The Seq2Seq model can automatically output at least one text sequence corresponding to the first question and the confidence of each text sequence in the at least one text sequence.
[0061] In one embodiment, after the server determines a text sequence whose confidence is greater than or equal to a first confidence threshold in at least one text sequence corresponding to the first question as a new answer corresponding to the first question and generates a new question-answer pair consisting of the first question and the new answer, the server can output the new question-answer pair consisting of the first question and the new answer through a terminal device with a communication connection established in advance, manually filter the new question-answer pair by a user, and store the manually filtered new question-answer pair in a question-answer library.
[0062] Alternatively, after generating a new question-answer pair consisting of the first question and the newly added answer, the server can determine whether the first confidence threshold is greater than the first confidence upper threshold. If so, the new question-answer pair consisting of the first question and the newly added answer is directly stored in the question-answer library; if not, the new question-answer pair consisting of the first question and the newly added answer is output through a terminal device with a communication connection established in advance, and the user performs manual filtering, and the new question-answer pair after manual filtering is stored in the question-answer library.
[0063] In one embodiment, after the server expands the question-answer pairs in the question-answer library through the questions in the question-answer library, if any unanswered question input by the user is received, the target answer corresponding to the unanswered question can be queried in the question-answer library. Compared with before the expansion, the number of target answers corresponding to the unanswered question after the expansion increases. In view of this situation, in one embodiment, the server can output all the target answers corresponding to the unanswered question for the user to choose. In this way, since the number of target answers corresponding to the unanswered question increases after the expansion, not only the richness of the output answers can be improved, but also the accuracy of the output answers can be improved.
[0064] Alternatively, in another embodiment, after the server searches the question-and-answer database for the target answer corresponding to the question to be answered, it can randomly select a preset number of answers to be output from all the target answers corresponding to the question to be answered, and output the preset number of answers to be output for the user to select. In this way, since the number of target answers corresponding to the question to be answered increases after the expansion, the duplication of the output answers to be output can be reduced, and the novelty of the output answers to be output can be improved.
[0065] In one embodiment, after the server expands the question-answer pairs in the question-answer library through the questions in the question-answer library, if any question to be answered input by the user is received, the server can compare the similarity between the semantic information of the question to be answered and the semantic information of each question in the question-answer library to obtain the semantic similarity between the question to be answered and each question in the question-answer library. Further, the server can determine the highest semantic similarity from each semantic similarity, and if the highest semantic similarity is greater than or equal to a preset semantic similarity threshold, the question corresponding to the highest semantic similarity is determined as the target question corresponding to the question to be answered, and the answer corresponding to the target question in the question-answer library is determined as the target answer to the question to be answered, and then the target answer is output.
[0066] Alternatively, if the highest semantic similarity is less than a preset semantic similarity threshold, the target answer to the question to be answered cannot be determined, and a prompt message may be output to prompt the user that the target answer to the question to be answered has not been found.
[0067] In another embodiment, if the server receives any question to be answered input by the user, it can compare the similarity between each character in the question to be answered and the characters of each question in the question and answer library, and obtain the character similarity between the question to be answered and each question in the question and answer library. Further, the server can determine the highest character similarity from each character similarity, and if the highest character similarity is greater than or equal to a preset character similarity threshold, the question corresponding to the highest character similarity is determined as the target question corresponding to the question to be answered, and the answer corresponding to the target question in the question and answer library is determined as the target answer to the question to be answered, and then the target answer is output.
[0068] Exemplarily, assume that the question to be answered is "Who is Jay Chou". There is a question A1 "Who is Zhou Jie" stored in the Q&A library. From the semantic level, the question to be answered "Who is Jay Chou" and the question A1 "Who is Zhou Jie" are two completely different questions, and the corresponding answers are completely different. In this case, if the server compares the semantic information of the question to be answered with the semantic information of the question, the semantic similarity between the question to be answered and the question A1 can be obtained.
[0069] From the character level, the characters "Zhou", "Jie", "Shi", and "Shui" in the question to be answered "Who is Jay Chou" and the question A1 "Who is Zhou Jie" are the same, and they can be regarded as two questions with relatively high character similarity. In this case, if the server compares each character in the question to be answered with each character in the question A1, the character similarity between the question to be answered and the question A1 can be obtained. It can be seen that for the question to be answered "Who is Jay Chou" and the question A1 "Who is Zhou Jie", the similarities obtained from the semantic level and the character level are different, and the character similarity between the two is higher than the semantic similarity. In this case, the target answer of the question to be answered determined from the semantic level is more accurate.
[0070] In an embodiment of the present invention, each question in the Q&A library can be clustered, and the questions clustered into the same category and the answers corresponding to the questions in the same category can be combined to obtain at least one first Q&A pair. Further, the credibility of each first Q&A pair in at least one first Q&A pair can be obtained, and a first target Q&A pair can be determined from at least one first Q&A pair according to the credibility of each first Q&A pair, and then the first target Q&A pair can be stored in the Q&A library. By adopting such a method, the Q&A pairs in the Q&A library can be expanded based on the existing questions in the Q&A library, and the accuracy of the Q&A library corresponding to the Q&A system can be improved.
[0071] Please refer to Figure 5 which is a schematic flowchart of another method for expanding the Q&A library according to an embodiment of the present invention. The method according to an embodiment of the present invention can be executed by a server. The method according to an embodiment of the present invention includes the following steps.
[0072] S501: Cluster each question in the Q&A library, and combine the questions clustered into the same category and the answers corresponding to the questions in the same category to obtain at least one first Q&A pair.
[0073] S502: Obtain the credibility of each first question-answer pair in at least one first question-answer pair, and determine a first target question-answer pair from at least one first question-answer pair according to the credibility of each first question-answer pair, and then store the first target question-answer pair in the question-answer library. The specific implementation of steps S501 to S502 can refer to the relevant description of steps S401 to S403 in the above embodiment, which will not be repeated here.
[0074] S503: Clustering the answers in the question-answer database, and combining the answers clustered into the same category with the questions corresponding to the answers of the same category to obtain at least one second question-answer pair.
[0075] S504: Obtain the credibility of each second question and answer pair in at least one second question and answer pair, and determine a second target question and answer pair from the at least one second question and answer pair according to the credibility of each second question and answer pair.
[0076] S505: Store the second target question and answer pair in the question and answer library.
[0077] In automatic question-answering, the same answer can answer multiple different questions. For example, the same answer "good-looking, good singing" can answer both the question "Why is Wang Leehom so popular" and the question "How did Fish Leong become popular?" Therefore, not only can steps S501 to S502 be executed to expand the question-answer pairs in the question-answer library through the questions in the question-answer library, but steps S503 to S505 can also be executed to expand the question-answer pairs in the question-answer library again through the answers in the question-answer library. The two expansion methods are combined and iterated with each other, which can greatly enrich the number of question-answer pairs in the question-answer library. In this way, the existing data of the question-answer library can be fully mined without introducing additional data and external knowledge, and the question-answer pairs composed of answers and questions in the question-answer library can be automatically expanded, the ability of the question-answer library to answer questions can be enhanced, and the accuracy and diversity of the question-answer system corresponding to the question-answer library can be improved.
[0078] In one embodiment, the server can obtain all answers in the question and answer library, and call the clustering model to cluster the obtained answers, and combine the answers belonging to the same category with the corresponding questions of other answers belonging to the same category, thereby combining at least one second question and answer pair.
[0079] For example, assuming that the correspondence between questions and answers included in the question and answer database is as shown in Table 2, the server can obtain all answers A1, A2, and A3 in the question and answer database, and call the clustering model to cluster the obtained answers. The clustering result is: A1 and A3 are answers belonging to the same category, and A2 is a separate category. In this case, the server can combine A1 with the question corresponding to the answer A3 of the same category, and combine A3 with the question corresponding to the answer A1 of the same category, and obtain 4 second question and answer pairs, namely (A1, Q5), (A1, Q6), (A3, Q1), and (A3, Q2).
[0080] Table 2
[0081]
[0082] In one embodiment, the server can call the second classification model to determine the credibility of each second question and answer pair in at least one second question and answer pair, and determine the second question and answer pair in at least one second question and answer pair whose credibility is greater than or equal to a preset credibility threshold as the second target question and answer pair, and then store the second target question and answer pair in the question and answer library, thereby achieving the expansion of the question and answer pairs in the question and answer library through answer pairs.
[0083] In one embodiment, the server may call the second classification model to extract the feature information corresponding to the question and the answer in each second question-answer pair, and calculate the feature similarity between the feature information corresponding to the question and the answer in each second question-answer pair, and then determine the credibility of each second question-answer pair based on the feature similarity between the feature information corresponding to the question and the answer in each second question-answer pair. The credibility represents the probability that the question and the answer in the second question-answer pair are a correct combination.
[0084] Among them, the higher the feature similarity between the feature information corresponding to the question and the answer in the second question and answer pair, the higher the credibility of the second question and answer pair. In one embodiment, the feature similarity can be directly equated with credibility. For example, if the feature similarity between the feature information corresponding to the question and the answer in a second question and answer pair QA1 is 90%, then the credibility of the second question and answer pair QA1 can be directly determined to be 90%. In another embodiment, the feature similarity can also be converted into credibility based on a preset conversion rule, and the embodiment of the present invention does not specifically limit this.
[0085] In one embodiment, the server can select, from at least one second question and answer pair, a candidate question and answer pair corresponding to the second question and answer pair whose credibility is greater than or equal to a preset credibility threshold; if the preset credibility threshold satisfies a preset credibility threshold condition, the candidate question and answer pair corresponding to the second question and answer pair is determined as the second target question and answer pair; if the preset credibility threshold does not satisfy the preset credibility threshold condition, the candidate question and answer pair corresponding to the second question and answer pair is output, and the second target question and answer pair is determined from the candidate question and answer pairs based on the selection operation of the candidate question and answer pair corresponding to the second question and answer pair.
[0086] In one embodiment, the preset credibility threshold condition may be that the preset credibility threshold is greater than or equal to the preset credibility upper threshold. The preset credibility threshold and the preset credibility upper threshold may be set by the developer in advance based on experimental measurement data, and may be adjusted later based on actual design requirements.
[0087] In one embodiment, if the server detects that the preset credibility threshold does not meet the preset credibility threshold condition, the candidate question and answer pair corresponding to the second question and answer pair can be output through the terminal setting that pre-establishes the communication connection. After the user views the candidate question and answer pair corresponding to the second question and answer pair through the terminal device, the candidate question and answer pair corresponding to the second question and answer pair can be manually filtered, and a selection operation can be input for the candidate question and answer pair corresponding to the second question and answer pair. The server can determine the second target question and answer pair from the candidate question and answer pairs based on the selection operation for the candidate question and answer pair corresponding to the second question and answer pair. Among them, the input method of the selection operation can be touch, click, press, voice, etc., and the embodiment of the present invention does not make specific limitations on this.
[0088] Furthermore, the questions corresponding to an answer can be more diverse and not limited to the questions already in the question and answer library. In one embodiment, the server can obtain the first answer from the question and answer library, and call the second sequence generation model to determine at least one text sequence corresponding to the first answer, and the confidence of each text sequence in the at least one text sequence corresponding to the first answer, and the first answer is any one of the at least one answer stored in the question and answer library. Furthermore, the server can determine the text sequence with a confidence greater than or equal to the first confidence threshold in the at least one text sequence corresponding to the first answer as the newly added question corresponding to the first answer, and generate a new question and answer pair consisting of the first answer and the newly added question, and then store the new question and answer pair consisting of the first answer and the newly added question in the question and answer library. Among them, the confidence of each text sequence corresponding to the above-mentioned first answer represents the probability that each text sequence is the question corresponding to the first answer. The higher the confidence of the text sequence, the higher the probability that the text sequence is the question corresponding to the first answer.
[0089] Based on the above similar methods, the server can generate the above new question and answer pairs corresponding to all the answers in the question and answer library. In this way, by generating new questions corresponding to each answer in the question and answer library through the second sequence generation model, the number of questions in the question and answer library can be increased, making the questions corresponding to one answer more diversified and not limited to the existing questions in the question and answer library.
[0090] In one embodiment, the server determines a text sequence whose confidence is greater than or equal to a second confidence threshold in at least one text sequence corresponding to the first answer as a new question corresponding to the first answer, and generates a new question-answer pair consisting of the first answer and the new question. Then, the server can output the new question-answer pair consisting of the first answer and the new question through a terminal device with a communication connection established in advance, and the user can manually filter the new question-answer pair, and store the manually filtered new question-answer pair in the question-answer library.
[0091] Alternatively, after generating a new question-and-answer pair consisting of the first answer and the newly added question, the server can determine whether the second confidence threshold is greater than the second confidence upper threshold. If so, the new question-and-answer pair consisting of the first answer and the newly added question is directly stored in the question-and-answer library; if not, the new question-and-answer pair consisting of the first answer and the newly added question is output through a terminal device with a communication connection established in advance, and the user performs manual filtering, and the new question-and-answer pair after manual filtering is stored in the question-and-answer library.
[0092] In an embodiment of the present invention, each question in the question and answer library can be clustered, and the questions clustered into the same category and the answers corresponding to the questions of the same category can be combined to obtain at least one first question and answer pair. Furthermore, the credibility of each first question and answer pair in at least one first question and answer pair can be obtained, and a first target question and answer pair can be determined from at least one first question and answer pair based on the credibility of each first question and answer pair, and then the first target question and answer pair can be stored in the question and answer library. Furthermore, each answer in the question and answer library can be clustered, and the answers clustered into the same category and the questions corresponding to the answers of the same category can be combined to obtain at least one second question and answer pair, and the credibility of each second question and answer pair in at least one second question and answer pair can be obtained, and a second target question and answer pair can be determined from at least one second question and answer pair based on the credibility of each second question and answer pair, and then the second target question and answer pair can be stored in the above-mentioned question and answer library. The two methods of expanding the question and answer database through questions and expanding the question and answer database through answers can be combined to fully mine the existing data of the question and answer database without introducing additional data and external knowledge, automatically expand the question and answer pairs consisting of answers and questions in the question and answer database, enhance the question and answer database's ability to answer questions, and improve the accuracy and diversity of the question and answer system corresponding to the question and answer database.
[0093] An embodiment of the present invention further provides a computer storage medium, in which program instructions are stored. When the program instructions are executed, they are used to implement the corresponding methods described in the above embodiments.
[0094] See also Figure 6 , is a structural diagram of an expansion device for a question and answer library according to an embodiment of the present invention. The expansion device for the question and answer library according to the embodiment of the present invention can be set in a server, or can also be set in some intelligent terminals with rich software and hardware resources, such as some personal computers.
[0095] In one implementation of the device according to an embodiment of the present invention, the device includes the following structure.
[0096] A clustering module 60, configured to cluster the questions in the question-answer database, and combine the questions clustered into the same category with the answers corresponding to the questions of the same category to obtain at least one first question-answer pair;
[0097] A processing module 61 is used to obtain the credibility of each first question-answer pair in the at least one first question-answer pair, and determine a first target question-answer pair from the at least one first question-answer pair according to the credibility of each first question-answer pair;
[0098] The storage module 62 is used to store the first target question and answer pair in the question and answer library.
[0099] In one embodiment, the processing module 61 is also used to obtain a first question from the question and answer library, and call a first sequence generation model to determine at least one text sequence corresponding to the first question, and the confidence of each text sequence in the at least one text sequence, wherein the first question is any one of the at least one question stored in the question and answer library; determine a text sequence in the at least one text sequence corresponding to the first question whose confidence is greater than or equal to a first confidence threshold as a new answer corresponding to the first question; generate a new question and answer pair consisting of the first question and the new answer, and store the new question and answer pair consisting of the first question and the new answer in the question and answer library.
[0100] In one embodiment, the clustering module 60 is further used to cluster the answers in the question and answer library, and to combine the answers clustered into the same category with the questions corresponding to the answers of the same category to obtain at least one second question and answer pair; the processing module 61 is further used to obtain the credibility of each second question and answer pair in the at least one second question and answer pair, and to determine a second target question and answer pair from the at least one second question and answer pair based on the credibility of each second question and answer pair; the storage module 62 is further used to store the second target question and answer pair in the question and answer library.
[0101] In one embodiment, the processing module 61 is also used to obtain a first answer from the question and answer library, and call a second sequence generation model to determine at least one text sequence corresponding to the first answer, and the confidence of each text sequence in the at least one text sequence corresponding to the first answer, wherein the first answer is any one of the at least one answers stored in the question and answer library; determine a text sequence in the at least one text sequence corresponding to the first answer whose confidence is greater than or equal to a first confidence threshold as a new question corresponding to the first answer; generate a new question and answer pair consisting of the first answer and the new question, and store the new question and answer pair consisting of the first answer and the new question in the question and answer library.
[0102] In one embodiment, the clustering module 60 is specifically used to call the clustering model to calculate the similarity between the questions in the question-answer database; and cluster the questions whose similarity is greater than or equal to a preset similarity threshold into questions of the same category.
[0103] In one embodiment, the processing module 61 is specifically used to select a candidate question and answer pair whose credibility is greater than or equal to a preset credibility threshold from the at least one first question and answer pair; if the preset credibility threshold satisfies the preset credibility threshold condition, the candidate question and answer pair is determined as the first target question and answer pair; if the preset credibility threshold does not satisfy the preset credibility threshold condition, the candidate question and answer pair is output, and the first target question and answer pair is determined from the candidate question and answer pairs based on the selection operation on the candidate question and answer pair.
[0104] In one embodiment, the processing module 61 is further specifically used to call the classification model to extract the feature information corresponding to the question and the answer in each of the first question and answer pairs, and calculate the feature similarity between the feature information corresponding to the question and the answer in each of the first question and answer pairs; based on the feature similarity between the feature information corresponding to the question and the answer in each of the first question and answer pairs, determine the credibility of each of the first question and answer pairs.
[0105] In the embodiment of the present invention, the specific implementation of each of the above modules can refer to the description of the relevant contents in the embodiments corresponding to the above-mentioned figures.
[0106] In an embodiment of the present invention, the clustering module 60 clusters the questions in the question and answer library, and combines the questions clustered into the same category with the answers corresponding to the questions of the same category to obtain at least one first question and answer pair. Furthermore, the processing module 61 can obtain the credibility of each first question and answer pair in at least one first question and answer pair, and determine a first target question and answer pair from at least one first question and answer pair based on the credibility of each first question and answer pair, and then the storage module 62 stores the first target question and answer pair in the question and answer library. In this way, the question and answer pairs in the question and answer library can be expanded based on the existing data in the question and answer library, thereby improving the accuracy of the question and answer system corresponding to the question and answer library.
[0107] See also Figure 7 , is a schematic diagram of the structure of a server according to an embodiment of the present invention, wherein the server according to the embodiment of the present invention includes a power supply module and other structures, and includes a processor 701, a storage device 702, and a network interface 703. The processor 701, the storage device 702, and the network interface 703 can exchange data, and the processor 701 implements the expansion function of the corresponding question and answer library.
[0108] The storage device 702 may include a volatile memory, such as a random-access memory (RAM); the storage device 702 may also include a non-volatile memory, such as a flash memory, a solid-state drive (SSD), etc.; the storage device 702 may also include a combination of the above-mentioned types of memory.
[0109] The processor 701 may be a central processing unit (CPU) 701. In one embodiment, the processor 701 may also be a graphics processing unit (GPU) 701. The processor 701 may also be a combination of a CPU and a GPU. In the server, multiple CPUs and GPUs may be included as needed to expand the corresponding question-and-answer library. In one embodiment, the storage device 702 is used to store program instructions. The processor 701 may call the program instructions to implement the various methods involved in the embodiments of the present invention.
[0110] In a first possible implementation, the processor 701 of the server calls the program instructions stored in the storage device 702 to cluster the questions in the question and answer library, and combine the questions clustered into the same category with the answers corresponding to the questions of the same category to obtain at least one first question and answer pair; obtain the credibility of each first question and answer pair in the at least one first question and answer pair, and determine a first target question and answer pair from the at least one first question and answer pair based on the credibility of each first question and answer pair; and store the first target question and answer pair in the question and answer library.
[0111] In one embodiment, the processor 701 is further used to obtain a first question from the question and answer library, and call a first sequence generation model to determine at least one text sequence corresponding to the first question, and the confidence of each text sequence in the at least one text sequence, wherein the first question is any one of the at least one question stored in the question and answer library; determine a text sequence in the at least one text sequence corresponding to the first question whose confidence is greater than or equal to a first confidence threshold as a new answer corresponding to the first question; generate a new question and answer pair consisting of the first question and the new answer, and store the new question and answer pair consisting of the first question and the new answer in the question and answer library.
[0112] In one embodiment, the processor 701 is further used to cluster the answers in the question and answer library, and combine the answers clustered into the same category with the questions corresponding to the answers of the same category to obtain at least one second question and answer pair; the processor 701 is further used to obtain the credibility of each second question and answer pair in the at least one second question and answer pair, and determine a second target question and answer pair from the at least one second question and answer pair according to the credibility of each second question and answer pair; the processor 701 is further used to store the second target question and answer pair in the question and answer library through the storage device 702.
[0113] In one embodiment, the processor 701 is further used to obtain a first answer from the question and answer library, and call a second sequence generation model to determine at least one text sequence corresponding to the first answer, and the confidence of each text sequence in the at least one text sequence corresponding to the first answer, wherein the first answer is any one of the at least one answers stored in the question and answer library; determine a text sequence in the at least one text sequence corresponding to the first answer whose confidence is greater than or equal to a first confidence threshold as a new question corresponding to the first answer; generate a new question and answer pair consisting of the first answer and the new question, and store the new question and answer pair consisting of the first answer and the new question in the question and answer library.
[0114] In one embodiment, the processor 701 is specifically configured to call a clustering model to calculate the similarity between the questions in the question-answer database; and cluster the questions whose similarity is greater than or equal to a preset similarity threshold into questions of the same category.
[0115] In one embodiment, the processor 701 is specifically used to select a candidate question and answer pair whose credibility is greater than or equal to a preset credibility threshold from the at least one first question and answer pair; if the preset credibility threshold satisfies the preset credibility threshold condition, the candidate question and answer pair is determined as the first target question and answer pair; if the preset credibility threshold does not satisfy the preset credibility threshold condition, the candidate question and answer pair is output, and the first target question and answer pair is determined from the candidate question and answer pairs based on the selection operation on the candidate question and answer pair.
[0116] In one embodiment, the processor 701 is further specifically used to call the classification model to extract the feature information corresponding to the question and the answer in each of the first question and answer pairs, and calculate the feature similarity between the feature information corresponding to the question and the answer in each of the first question and answer pairs; based on the feature similarity between the feature information corresponding to the question and the answer in each of the first question and answer pairs, determine the credibility of each of the first question and answer pairs.
[0117] In the embodiment of the present invention, the specific implementation of the processor 701 may refer to the description of the relevant contents in the embodiments corresponding to the aforementioned figures.
[0118] In an embodiment of the present invention, the processor 701 clusters the questions in the question and answer library, and combines the questions clustered into the same category with the answers corresponding to the questions of the same category to obtain at least one first question and answer pair. Furthermore, the processor 701 obtains the credibility of each first question and answer pair in at least one first question and answer pair, and determines a first target question and answer pair from at least one first question and answer pair based on the credibility of each first question and answer pair, and then stores the first target question and answer pair in the question and answer library through the storage device 702. In this way, the question and answer pairs in the question and answer library can be expanded based on the existing data in the question and answer library, thereby improving the accuracy of the question and answer system corresponding to the question and answer library.
[0119] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0120] The above disclosure is only part of the embodiments of the present invention, which certainly cannot be used to limit the scope of the rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiments and equivalent changes made according to the claims of the present invention are still within the scope of the invention.
Claims
1. A method for expanding a question-answer database, characterized in that: The method comprises: Clustering the questions in the question-answer database, and combining the questions clustered into the same category with the answers corresponding to the questions of the same category to obtain at least one first question-answer pair; Obtaining the credibility of each first question-answer pair in the at least one first question-answer pair, and determining a first target question-answer pair from the at least one first question-answer pair according to the credibility of each first question-answer pair; wherein the credibility of each first question-answer pair is determined based on the feature similarity between the feature information corresponding to the question and the answer in each first question-answer pair; Storing the first target question-answer pair in the question-answer library; Clustering the answers in the question-answer database, and combining the answers clustered into the same category with the questions corresponding to the answers of the same category to obtain at least one second question-answer pair; Obtaining the credibility of each second question-answer pair in the at least one second question-answer pair, and determining a second target question-answer pair from the at least one second question-answer pair according to the credibility of each second question-answer pair; wherein the credibility of each second question-answer pair is determined based on the feature similarity between the feature information corresponding to the question and the answer in each second question-answer pair; Storing the second target question-answer pair in the question-answer library; When receiving a question to be answered, querying the question and answer library for a target answer corresponding to the question to be answered; Output all target answers corresponding to the question to be answered, or output a preset number threshold of target answers among all target answers corresponding to the question to be answered.
2. The method according to claim 1, characterized in that The method further comprises: Obtaining a first question from the question-and-answer library, and calling a first sequence generation model to determine at least one text sequence corresponding to the first question and a confidence level of each text sequence in the at least one text sequence, wherein the first question is any one of the at least one question stored in the question-and-answer library; Determining, in at least one text sequence corresponding to the first question, a text sequence whose confidence is greater than or equal to a first confidence threshold as a new answer corresponding to the first question; Generate a new question-answer pair consisting of the first question and the newly added answer, and store the new question-answer pair consisting of the first question and the newly added answer in the question-answer library.
3. The method according to claim 1, characterized in that The method further comprises: Obtaining a first answer from the question and answer library, and calling a second sequence generation model to determine at least one text sequence corresponding to the first answer and the confidence of each text sequence in the at least one text sequence corresponding to the first answer, wherein the first answer is any one of the at least one answer stored in the question and answer library; Determining a text sequence whose confidence level is greater than or equal to a first confidence threshold in at least one text sequence corresponding to the first answer as a new question corresponding to the first answer; A new question-answer pair consisting of the first answer and the newly added question is generated, and the new question-answer pair consisting of the first answer and the newly added question is stored in the question-answer library.
4. The method according to claim 1, characterized in that: The clustering of the questions in the question-answer database includes: Calling a clustering model to calculate the similarity between each question in the question-answer database; The questions whose similarity is greater than or equal to a preset similarity threshold are clustered into questions of the same category.
5. The method according to claim 1, characterized in that The step of determining a first target question-answer pair from the at least one first question-answer pair according to the credibility of each first question-answer pair includes: Selecting a candidate question-answer pair whose credibility is greater than or equal to a preset credibility threshold from the at least one first question-answer pair; If the preset credibility threshold satisfies the preset credibility threshold condition, determining the candidate question-answer pair as the first target question-answer pair; If the preset credibility threshold does not meet the preset credibility threshold condition, the candidate question and answer pair is output, and a first target question and answer pair is determined from the candidate question and answer pairs based on a selection operation on the candidate question and answer pair.
6. The method according to claim 1, characterized in that The obtaining the credibility of each first question-answer pair in the at least one first question-answer pair includes: Calling the classification model to extract feature information corresponding to the question and the answer in each of the first question-answer pairs, and calculating feature similarity between the feature information corresponding to the question and the answer in each of the first question-answer pairs; The credibility of each of the first question-answer pairs is determined based on the feature similarity between the feature information corresponding to the question and the answer in each of the first question-answer pairs.
7. A device for expanding a question-answer database, characterized in that: The device comprises: A clustering module, configured to cluster the questions in the question-answer database, and combine the questions clustered into the same category with the answers corresponding to the questions of the same category to obtain at least one first question-answer pair; A processing module, used to obtain the credibility of each first question-answer pair in the at least one first question-answer pair, and determine a first target question-answer pair from the at least one first question-answer pair according to the credibility of each first question-answer pair; wherein the credibility of each first question-answer pair is determined based on the feature similarity between the feature information corresponding to the question and the answer in each first question-answer pair; A storage module, configured to store the first target question-answer pair in the question-answer library; The clustering module is further used to cluster the answers in the question-answer library, and combine the answers clustered into the same category with the questions corresponding to the answers of the same category to obtain at least one second question-answer pair; The processing module is further used to obtain the credibility of each second question-answer pair in the at least one second question-answer pair, and determine a second target question-answer pair from the at least one second question-answer pair according to the credibility of each second question-answer pair; wherein the credibility of each second question-answer pair is determined based on the feature similarity between the feature information corresponding to the question and the answer in each second question-answer pair; The storage module is further configured to store the second target question-answer pair in the question-answer library; The processing module is also used to, when receiving a question to be answered, query the target answer corresponding to the question to be answered from the question and answer library; output all the target answers corresponding to the question to be answered, or output a preset number threshold of target answers among all the target answers corresponding to the question to be answered.
8. A server, characterized in that: The method comprises a processor and a storage device, wherein the processor and the storage device are connected to each other, wherein the storage device is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1 to 6.
9. A computer storage medium, characterized in that The computer storage medium stores program instructions, which, when executed, are used to implement the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Data processing method and apparatus based on question-and-answer platform
CN105005564A
Question answering system-based conversation processing method, device and system and mobile equipment
CN108399169A