Text processing method, device, storage medium and equipment

By building an intelligent question-answering model based on unsupervised documents and corpus, automatically mining question-answer pairs and expanding questions, the problem of inefficiency in manually combing question-answer pairs is solved, and efficient text processing and intelligent question-answering are achieved.

CN114676239BActive Publication Date: 2025-10-03IFLYTEK CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210300744.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-25
Publication Date
2025-10-03
Estimated Expiration
2042-03-25

AI Technical Summary

Technical Problem

Existing intelligent question-answering systems require manual sorting of question-answer pairs before implementing text processing and question-answering, which results in low efficiency and consumes a lot of human resources. It is also highly subjective and difficult to quantify, affecting text processing effects and question-answering efficiency.

Method used

By building an intelligent question-answering model, using unsupervised documents to automatically mine question-answer pairs and expand questions, generating questions in question-answer pairs, and using a machine reading comprehension model to automatically mine answers, combined with an unsupervised corpus training model, automated question-answering is achieved.

Benefits of technology

It improves text processing effects and intelligent question-answering efficiency, reduces manual intervention, eliminates subjective influences, and improves the accuracy and efficiency of question-answering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114676239B_ABST
    Figure CN114676239B_ABST
Patent Text Reader

Abstract

The present application discloses a text processing method, apparatus, storage medium and equipment, the method comprising: first obtaining a target question text to be answered; then inputting the target question text into a pre-constructed intelligent question-answering model to predict the answer text corresponding to the target question text; wherein the intelligent question-answering model is obtained based on question-answer pairs automatically mined out using unsupervised documents, and training of extended questions; and the extended questions are obtained based on questions mined from unsupervised corpus and question-answer pairs. It can be seen that since the present application uses a pre-constructed intelligent question-answering model to intelligently answer the target question text, the efficiency of intelligent question-answering is effectively improved, and the intelligent question-answering model is obtained based on question-answer pairs automatically mined out using unsupervised documents, and training of extended questions, there is no need for manual sorting of question-answer pairs, eliminating the influence of the subjectivity of manual sorting, thereby improving the text processing effect and the efficiency of intelligent question-answering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of natural language processing technology, and in particular to a text processing method, apparatus, storage medium, and device. Background Art

[0002] With the explosive growth of computer computing power, the application of deep learning in artificial intelligence is also increasing. More and more engineering projects, such as text processing, are being replaced by deep learning models instead of traditional manual features.

[0003] Intelligent question-answering is an important application in the field of artificial intelligence. Compared with traditional manual customer service systems, intelligent question-answering systems have many advantages, such as high efficiency and low cost. Currently, more and more companies are using intelligent question-answering systems to provide conversational services to users, such as Baidu Brain UNIT3.0's interpretation of conversational document question-answering, which can achieve the purpose of automatic document question-answering based on reading comprehension question-answering technology. However, before implementing intelligent question-answering, it is still necessary to manually sort out the question-answer pairs of documents in related fields in advance before intelligent question-answering can be performed based on the results of manually sorted question-answer pairs. The process of manually sorting out question-answer pairs is highly subjective and difficult to quantify. Not only is the sorting efficiency low, but it also requires a large amount of human resources, resulting in poor text processing results and low efficiency of intelligent question-answering. Summary of the Invention

[0004] The main purpose of the embodiments of the present application is to provide a text processing method, device, storage medium and equipment that can improve the text processing effect and achieve the efficiency of intelligent question answering.

[0005] The present invention provides a method for processing text, including:

[0006] Get the target question text to be answered;

[0007] Input the target question text into a pre-built intelligent question-answering model to predict the answer text corresponding to the target question text;

[0008] Among them, the intelligent question-answering model is trained based on question-answer pairs automatically mined using unsupervised documents and extended questions; the extended questions are mined based on unsupervised corpus and questions in the question-answer pairs.

[0009] In one possible implementation, the question-answer pair mining process is as follows:

[0010] Obtain unsupervised documents;

[0011] Inputting the title text in the unsupervised document into a pre-trained language model to obtain a preset question label classification to which the title text belongs and a classification result of each word in the title text being selected as a question;

[0012] Using a preset question template, generating questions in a question-answer pair according to the preset question label classification to which the title text belongs and the classification result of each word in the title text being selected as a question;

[0013] The answer corresponding to the question in the question-answer pair is automatically mined by utilizing a machine reading comprehension (MRC) model and the paragraph content of the question in the question-answer pair in the unsupervised document.

[0014] In one possible implementation, the method of utilizing a machine reading comprehension (MRC) model and the paragraph content of the question in the question-answer pair in the unsupervised document to automatically mine the answer corresponding to the question in the question-answer pair includes:

[0015] By using the machine reading comprehension (MRC) model, all answers corresponding to the question in the question-answer pair are automatically mined from the paragraph content in the unsupervised document, and the answer with the highest confidence is selected from all the answers as the final answer corresponding to the question.

[0016] In one possible implementation, the mining process of the extension problem is as follows:

[0017] Obtain unsupervised corpus;

[0018] Calculate the similarity between the question in the question-answer pair and each candidate question in the unsupervised corpus;

[0019] The candidate question corresponding to the similarity that meets the preset conditions is selected as the extended question answer corresponding to the question in the question-answer pair.

[0020] In a possible implementation, the preset condition includes a similarity greater than a preset threshold.

[0021] In one possible implementation, the intelligent question-answering model is constructed as follows:

[0022] Obtaining sample question text; the sample question text includes questions in sample question-answer pairs automatically mined through unsupervised documents, and sample extended questions automatically mined based on the questions in the sample question-answer pairs;

[0023] The sample question text and its corresponding answer text are used to train a pre-built initial intelligent question-answering model to obtain the intelligent question-answering model.

[0024] In a possible implementation, the method further includes:

[0025] Get the verification question text;

[0026] Input the verification question text into the intelligent question-answering model to obtain an answer result corresponding to the verification question text;

[0027] When the answer result corresponding to the verification question text is inconsistent with the answer marking result corresponding to the verification question text, the verification question text is used again as the sample question text and the intelligent question-answering model is updated.

[0028] The present application also provides a text processing device, including:

[0029] A first acquisition unit is used to acquire the target question text to be answered;

[0030] A prediction unit, configured to input the target question text into a pre-built intelligent question-answering model and predict an answer text corresponding to the target question text;

[0031] Among them, the intelligent question-answering model is trained based on question-answer pairs automatically mined using unsupervised documents and extended questions; the extended questions are mined based on unsupervised corpus and questions in the question-answer pairs.

[0032] In a possible implementation, the apparatus further includes:

[0033] A second acquisition unit is used to acquire unsupervised documents;

[0034] An input unit, configured to input the title text in the unsupervised document into a pre-trained language model to obtain a preset question label classification to which the title text belongs and a classification result of each word in the title text being selected as a question;

[0035] a generating unit, configured to generate questions in a question-answer pair using a preset question template according to the preset question label classification to which the title text belongs and the classification result of each word in the title text being selected as a question;

[0036] The mining unit is used to automatically mine the answer corresponding to the question in the question-answer pair by using a machine reading comprehension MRC model and the paragraph content of the question in the question-answer pair in the unsupervised document.

[0037] In a possible implementation, the mining unit is specifically configured to:

[0038] By using the machine reading comprehension (MRC) model, all answers corresponding to the question in the question-answer pair are automatically mined from the paragraph content in the unsupervised document, and the answer with the highest confidence is selected from all the answers as the final answer corresponding to the question.

[0039] In a possible implementation, the apparatus further includes:

[0040] The third acquisition unit is used to acquire unsupervised corpus;

[0041] A calculation unit, configured to calculate the similarity between the question in the question-answer pair and each candidate question in the unsupervised corpus;

[0042] A selection unit is used to select a candidate question corresponding to a similarity that meets a preset condition as an answer to the extended question corresponding to the question in the question-answer pair.

[0043] In a possible implementation, the preset condition includes a similarity greater than a preset threshold.

[0044] In a possible implementation, the apparatus further includes:

[0045] A fourth acquisition unit is configured to acquire sample question texts; the sample question texts include questions in sample question-answer pairs automatically mined through unsupervised documents, and sample extended questions automatically mined based on the questions in the sample question-answer pairs;

[0046] The training unit is used to train the pre-built initial intelligent question-answering model using the sample question text and its corresponding answer text to obtain the intelligent question-answering model.

[0047] In a possible implementation, the apparatus further includes:

[0048] A fifth obtaining unit, configured to obtain a verification question text;

[0049] An obtaining unit, configured to input the verification question text into the intelligent question-answering model and obtain an answer result corresponding to the verification question text;

[0050] An updating unit is used to update the intelligent question-answering model by reusing the verification question text as the sample question text when the answer result corresponding to the verification question text is inconsistent with the answer marking result corresponding to the verification question text.

[0051] The embodiment of the present application further provides a text processing device, comprising: a processor, a memory, and a system bus;

[0052] The processor and the memory are connected via the system bus;

[0053] The memory is used to store one or more programs, and the one or more programs include instructions. When the instructions are executed by the processor, the processor executes any one of the implementations of the above text processing method.

[0054] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions. When the instructions are executed on a terminal device, the terminal device executes any one of the implementations of the above-mentioned text processing method.

[0055] An embodiment of the present application further provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute any one of the implementations of the above-mentioned text processing method.

[0056] The embodiment of the present application provides a text processing method, apparatus, storage medium and device, which first obtains the target question text to be answered; then inputs the target question text into a pre-built intelligent question-answering model to predict the answer text corresponding to the target question text; wherein the intelligent question-answering model is obtained based on question-answer pairs automatically mined out using unsupervised documents, and training of extended questions; and the extended questions are obtained based on questions mined from unsupervised corpus and question-answer pairs. It can be seen that since the embodiment of the present application uses a pre-built intelligent question-answering model to intelligently answer the target question text, the efficiency of intelligent question-answering is effectively improved, and the intelligent question-answering model is obtained based on question-answer pairs automatically mined out using unsupervised documents, and training of extended questions, it is no longer necessary to manually sort out the question-answer pairs, eliminating the influence of the subjectivity of manual sorting, thereby improving the text processing effect and the efficiency of intelligent question-answering. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0058] Figure 1 A flowchart of a text processing method provided in an embodiment of the present application;

[0059] Figure 2 A schematic diagram of the question-answer pair mining process provided in an embodiment of the present application;

[0060] Figure 3 A schematic diagram of the overall text processing process provided in an embodiment of the present application;

[0061] Figure 4 A schematic diagram of the composition of a text processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0062] Currently, users often encounter numerous complex regulations and rules. For example: What are the specific implementation criteria for the latest real estate lottery policy? What are the application guidelines and pricing for a bank's latest wealth management product? What documents are required for commercial insurance claims, and how many years of service are required to qualify? In these cases, customer service representatives must conduct numerous inquiries or search through regulatory documents or instructions before they can respond to and resolve user questions, resulting in low efficiency.

[0063] To improve answering efficiency, an increasing number of companies are using intelligent question-answering systems to provide conversational services to users. For example, Baidu Brain UNIT 3.0's Conversational Document Q&A system automatically answers document questions based on reading comprehension Q&A technology. However, currently, intelligent Q&A still requires manual review of Q&A pairs in relevant documents before intelligent Q&A can be performed based on these pairs. This manual review process is highly subjective and difficult to quantify, resulting in low review efficiency and significant human resource requirements. This leads to poor text processing and inefficient intelligent Q&A.

[0064] Therefore, how to improve the text processing effect and achieve the efficiency of intelligent question answering is a technical problem that needs to be solved urgently.

[0065] In order to solve the above-mentioned defects, the present application provides a text processing method, which first obtains the target question text to be answered; then the target question text is input into a pre-built intelligent question-answering model to predict the answer text corresponding to the target question text; wherein, the intelligent question-answering model is obtained based on the question-answering pairs automatically mined out by unsupervised documents, and the extended questions are trained; the extended questions are obtained based on the questions mined from the unsupervised corpus and the question-answering pairs. It can be seen that since the embodiment of the present application uses a pre-built intelligent question-answering model to intelligently answer the target question text, the efficiency of intelligent question-answering is effectively improved, and the intelligent question-answering model is obtained based on the question-answering pairs automatically mined out by unsupervised documents, and the extended questions are trained, there is no need for manual sorting of question-answering pairs, eliminating the influence of the subjectivity of manual sorting, thereby improving the text processing effect and the efficiency of intelligent question-answering.

[0066] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0067] First embodiment

[0068] See also Figure 1 , is a flowchart of a text processing method provided in this embodiment, the method comprising the following steps:

[0069] S101: Obtain the target question text to be answered.

[0070] In this embodiment, any question text for which text processing is implemented using this embodiment is defined as a target question text. Furthermore, this embodiment does not limit the language type of the target question text; for example, the target question text can be in Chinese or English. This embodiment also does not limit the source of the target question text; for example, the target question text can be the result of speech recognition or text input data obtained from a question-and-answer platform. This embodiment also does not limit the type of the target question text; for example, the target question text can be questions from daily conversations or questions raised in scenarios such as banks and insurance companies.

[0071] It is understandable that the target question text may be a sentence text, which is a collection of words. After obtaining the sentence text as the target question text to be answered, it may be processed and answered according to subsequent steps.

[0072] S102: Input the target question text into a pre-built intelligent question-answering model to predict the answer text corresponding to the target question text; wherein, the intelligent question-answering model is trained based on question-answer pairs automatically mined from unsupervised documents and extended questions; the extended questions are mined from questions in unsupervised corpus and question-answer pairs.

[0073] In this embodiment, after obtaining the target question text to be answered through step S101, in order to quickly and accurately predict the answer result of the target question text, the target question text can be further input into a pre-built intelligent question-answering model to predict the answer text corresponding to the target question text and feed it back to the proposer of the target question text.

[0074] It should be noted that in order to improve the processing effect of question text and the efficiency of intelligent question and answer, this embodiment will first use the question and answer pairs automatically mined from unsupervised documents and obtain extended questions based on the questions in the unsupervised corpus and question and answer pairs, and then use the automatically mined question and answer pairs and extended questions to build an intelligent question and answer model, so as to overcome the subjective influence brought about by manual sorting of question and answer pairs, and thus improve the processing effect of the text and the efficiency of intelligent question and answer.

[0075] In one optional implementation, the automatic mining process of question-answer pairs may specifically include the following steps A1-A4:

[0076] Step A1: Obtain unsupervised documents.

[0077] In this implementation, in order to build an intelligent question-answering model, it is first necessary to obtain question-answer pairs in the corresponding field as training corpus. In order to automatically mine question-answer pairs in the corresponding field, it is first necessary to obtain unsupervised documents in the corresponding field, and then mine structured knowledge question-answer pairs from them by executing subsequent steps A2-A4.

[0078] Among them, unsupervised documents include but are not limited to headlines, subheadings, and main text. In addition, this embodiment does not limit the language type of unsupervised documents. For example, unsupervised documents can be Chinese text or English text. This embodiment also does not limit the length of unsupervised documents. For example, the target text can be a sentence text or a chapter text. This embodiment also does not limit the source of unsupervised documents. For example, unsupervised documents can be the results of speech recognition or log data collected from various business systems of the platform. This embodiment also does not limit the type of unsupervised documents. For example, the target text can be a sentence in people's daily conversations or a part of the text in a notice, magazine article, literary work, etc.

[0079] Step A2: Input the title text in the unsupervised document into the pre-trained language model to obtain the preset question label classification to which the title text belongs and the classification result of each word in the title text being selected as a question.

[0080] After obtaining the unsupervised document through step A1, the text contents of the headlines and subheadings in the unsupervised document can be further combined, sorted, and rewritten and then input into the pre-trained language model, such as Figure 2 As shown, the text content of the main title (such as w1 w2…wn corresponding to Title 1) and the subtitle (such as w1 w2…wn corresponding to Title 1.1) can be input into the pre-trained language model to obtain the preset question label classification to which the title text belongs (such as Figure 2 Cls1, Cls2, Cls3, Cls4, etc. are represented by sentence vectors) and each word in the title text is selected as the classification result of the question (such as Figure 2 0 / 1 is used to represent the classification results of the corresponding word vector).

[0081] Among them, the pre-trained language model can be a BERT (Bidirectional Encoder Representations from Transformer) model, etc.; the preset question label classification can be set according to the actual situation, and the embodiment of the present application is not limited to this. For example, the preset question label classification can be used as follows Figure 2 In the question, the preset question labels are represented by Cls1, Cls2, Cls3, Cls4... Usually, the preset question labels can be classified into the 5w1h system, namely why, what, where, who, when, and how.

[0082] Step A3: Using the preset question template, generate the question in the question-answer pair according to the preset question label classification to which the title text belongs and the classification result of each word in the title text being selected as the question.

[0083] After obtaining the preset question label classification to which the title text belongs and the classification result of each word in the title text being selected as a question through step A2, the preset question template can be further used to generate questions in the question-answer pair based on the preset question label classification to which the title text belongs and the classification result of each word in the title text being selected as a question, such as Figure 2 The q1, q2...qn, etc. shown are used to execute the subsequent step A4.

[0084] The specific content of the preset question template can be set according to the actual situation. The embodiment of this application does not limit this. It usually needs to be sorted out in advance. Its main purpose is to standardize the questions in the final question-answer pair, that is, to assist the model in training to improve the smoothness of the questions generated in the question-answer pair, making it more like a question described by a normal person. An example of a preset question template is shown in Table 1 below:

[0085]

[0086] Table 1

[0087] It should be noted that there can be multiple question templates for each question type in Table 1 to improve the robustness and diversity of the generated question results.

[0088] Step A4: Utilize the machine reading comprehension (MRC) model and the paragraph content of the question in the question-answer pair in the unsupervised document to automatically mine the answer corresponding to the question in the question-answer pair.

[0089] Generate the question in the question-answer pair through step A3 (such as Figure 2After the q1, q2...qn, etc. shown in the figure, we can further use the Machine Reading Comprehension (MRC) model to analyze the paragraph content of the question in the unsupervised document (such as Figure 2 The p1, p2...pm, etc. shown in the figure are processed, and the answers corresponding to the questions in the question-answer pair are automatically mined according to the processing results, and then the question and its corresponding answer can be used to form a question-answer pair.

[0090] Specifically, one optional implementation method is to use a pre-trained MRC model to automatically mine all answers corresponding to the question in the unsupervised document after obtaining the question in the question-answer pair. The specific implementation process of using the MRC model for answer mining is consistent with existing methods and will not be repeated here. Then, the answer corresponding to the highest confidence level can be selected from all answers as the final answer to the question. In other words, the confidence level of each character in the paragraph content being predicted as the beginning or end position of the answer is maximized, so that the confidence level of the mined answer is the highest.

[0091] In another optional implementation of the embodiment of the present application, in order to improve the prediction accuracy of the intelligent question-answering model, after automatically mining the question-answer pairs using unsupervised documents, the questions in the question-answer pairs can also be processed using unsupervised corpus, and extended questions can be automatically mined based on the processing results to enrich the training corpus for training the intelligent question-answering model. The mining process of the extended questions can specifically include the following steps B1-B3:

[0092] Step B1: Obtain unsupervised corpus.

[0093] In this implementation, in order to build an intelligent question-answering model and enrich the training corpus, it is necessary not only to use the question-answer pairs automatically mined from unsupervised documents, but also to expand the questions in the question-answer pairs. During the expansion process, it is first necessary to obtain unsupervised corpus in the corresponding field, that is, it is necessary to obtain natural text data in the corresponding field, in order to mine the extended questions corresponding to the questions in the question-answer pairs by executing subsequent steps B2-B3.

[0094] Step B2: Calculate the similarity between the question in the question-answer pair and each candidate question in the unsupervised corpus.

[0095] After obtaining the unsupervised corpus through step B1, the similarity between the question in the question-answer pair and each candidate question in the unsupervised corpus can be calculated using existing or future similarity calculation methods to execute the subsequent step B3.

[0096] Step B3: Select candidate questions corresponding to similarities that meet preset conditions as the extended question answers corresponding to the questions in the question-answer pair.

[0097] After calculating the similarity between the question in the question-answer pair and each candidate question in the unsupervised corpus through step B2, the candidate question corresponding to the similarity that meets the preset conditions can be further selected as the extended question answer corresponding to the question in the question-answer pair.

[0098] The specific content of the preset condition can be set according to actual circumstances and is not limited in the present embodiment. For example, the specific content of the preset condition can be set to a similarity greater than a preset threshold. That is, the candidate question corresponding to the similarity greater than the preset threshold can be selected as the extended question answer corresponding to the question in the question-answer pair. The specific value of the preset threshold can also be set according to actual circumstances, for example, it can be set to 0.8.

[0099] Specifically, the implementation code of the mining process of the expansion problem can be as follows:

[0100] For Candidate in unsupervised natural text data in the corresponding field:

[0101] if Compute_Similarity(Question,Candidate)>limit_score:

[0102] Candidate_list.append(Candidate)

[0103] The compute_similarity function represents the algorithm used to calculate similarity, and various existing or future similarity calculation methods can be used. limit_score represents the threshold score, ranging from 0 to 1. A higher score indicates a greater similarity between the question and the candidate, and thus a higher likelihood that the candidate is an extension of the question in the pair. Ultimately, the corresponding extension question can be mined for each question in the pair. If there are many extension questions, they can be organized into a candidate list.

[0104] On this basis, after the question-answer pairs (Question-Answer) automatically mined out through the above steps A1-A4 and the extended questions (or extended question lists (Candidate_list)) corresponding to each Question automatically mined out through the above steps B1-B3, these data can be used as training data to automatically train the initial intelligent question-answering model (such as iFlytek's self-developed question-answering robot, etc.) to generate an intelligent question-answering model with good answering effect and realize automatic real-time question-answering.

[0105] Next, this embodiment will introduce the construction process of the intelligent question and answer model, wherein, an optional implementation method is that the construction process of the intelligent question and answer model can specifically include: first obtaining sample question text; wherein, the sample question text includes questions in sample question and answer pairs automatically mined out through unsupervised documents, and sample extended questions automatically mined out based on the questions in the sample question and answer pairs, and then using the sample question text and its corresponding answer text to train the pre-constructed initial intelligent question and answer model to obtain the intelligent question and answer model.

[0106] Specifically, in this implementation, in order to build an intelligent question-answering model, a lot of preparatory work needs to be done in advance. First, a large number of unsupervised documents need to be collected, and a large amount of question text data needs to be mined from them by executing the above steps A1-A4 as sample question texts. Then, by executing the above steps B1-B3, the extended questions corresponding to the questions in the sample question texts are automatically mined as sample extended questions to form model training data together with the sample question texts. For example, unsupervised document data such as news notification texts and textbook texts can be collected in advance through online channels, and sample question texts and corresponding sample extended questions can be determined from them to form model training data, and the answer text results corresponding to these sample question texts can be recorded. Then, the initial intelligent question-answering model can be trained based on these sample question texts, sample extended questions, and answer text results to generate an intelligent question-answering model.

[0107] It should be noted that the initial intelligent question answering model can be selected as the Sentence-BERT network structure, etc.

[0108] During model training, a sample question text can be extracted from the training data as model input. The predicted answer output by the model is compared with the answer text corresponding to the recorded sample question text, and the model parameters are updated based on the difference between the two. In this way, multiple rounds of model training are performed until the preset conditions are met (such as the number of training times reaches the preset number or the value of the optimization function remains basically unchanged). At this time, the model parameter update is stopped, and the training of the intelligent question-answering model is completed, generating a trained intelligent question-answering model.

[0109] On this basis, after the intelligent question-answering model is generated based on the training of the sample question text, the generated intelligent question-answering model can be further verified using the verification question text. The specific verification process can include the following steps (1)-(3):

[0110] Step (1): Get the verification question text.

[0111] In this embodiment, in order to verify the intelligent question-answering model, it is first necessary to obtain verification question texts. For example, 100 news texts can be collected through online channels, and a large amount of question text data can be mined from them by executing the above steps A1-A4 as verification question texts. The verification question texts refer to question text information that can be used to verify the intelligent question-answering model. After obtaining these verification question texts and the answer marking results corresponding to each verification question text, the subsequent step (2) can be continued.

[0112] Step (2): Input the verification question text into the intelligent question-answering model to obtain the answer result corresponding to the verification question text.

[0113] After obtaining the verification question text through step (1), the verification question text can be further input into the intelligent question-answering model to predict the answer result corresponding to the verification question text for executing the subsequent step (3).

[0114] Step (3): When the answer result corresponding to the verification question text is inconsistent with the answer marking result corresponding to the verification question text, the verification question text is used as the sample question text again to update the intelligent question answering model.

[0115] After obtaining the answer result corresponding to the verification question text through step (2), if the answer result corresponding to the verification question text is inconsistent with the real answer marking result corresponding to the verification question text (such as the manually marked answer text result), the verification question text can be used again as a sample question text to update the parameters of the intelligent question answering model.

[0116] Through the above embodiments, the intelligent question and answer model can be effectively verified using the verification question text. When the predicted answer result corresponding to the verification question text is inconsistent with the actual answer marking result corresponding to the verification question text, the intelligent question and answer model can be adjusted and updated in time, which helps to improve the prediction accuracy and precision of the intelligent question and answer model.

[0117] In this way, through the above steps S101-S102, the pre-built intelligent question-answering model can be used to accurately predict the answer text corresponding to the target question text. To facilitate understanding of the text processing method provided by this application, the following will introduce the overall process of text processing in this application in the form of examples.

[0118] For example: Figure 3 As shown, before processing the target question text, we can first automatically mine question-answer pairs such as "Q1: Real estate lottery, user targets; Q1': Who are the users of good real estate; A1: Urgent need, no real estate locally... Qm: Real estate lottery, related materials; Qm': What needs to be prepared for the real estate lottery; Am: Urgent need talents:...; Ordinary residents without urgent needs:..." from the unsupervised document "Notice on Real Estate Lottery" by executing the above steps A1-A4. Then, by executing the above steps B1-B3, we can automatically mine the extended questions such as "1: Who can participate in the lottery... n: Who is the target of this house purchase lottery?", so that we can use these data as training data to train an intelligent question-answering model.

[0119] On this basis, if Figure 3 As shown, after the target question text "Who are the eligible parties for the property lottery?" is input into the intelligent question-answering model, it can be predicted that the answer text corresponding to the target question text is "Urgent need, no property locally".

[0120] In summary, the present embodiment provides a text processing method, which first obtains the target question text to be answered; then inputs the target question text into a pre-built intelligent question-answering model to predict the answer text corresponding to the target question text; wherein, the intelligent question-answering model is obtained based on the question-answer pairs automatically mined out using unsupervised documents, and the extended questions are trained; the extended questions are obtained based on the questions mined from the unsupervised corpus and the question-answer pairs. It can be seen that since the present embodiment uses a pre-built intelligent question-answering model to intelligently answer the target question text, the efficiency of intelligent question-answering is effectively improved, and the intelligent question-answering model is obtained based on the question-answer pairs automatically mined out using unsupervised documents, and the extended questions are trained, there is no need for manual sorting of the question-answer pairs, eliminating the influence of the subjectivity of manual sorting, thereby improving the text processing effect and the efficiency of intelligent question-answering.

[0121] Second embodiment

[0122] This embodiment will introduce a text processing device. For related content, please refer to the above method embodiment.

[0123] See also Figure 4 , is a schematic diagram of the composition of a text processing device provided in this embodiment, the device 400 includes:

[0124] The first acquisition unit 401 is used to acquire the target question text to be answered;

[0125] The prediction unit 402 is configured to input the target question text into a pre-built intelligent question-answering model to predict an answer text corresponding to the target question text;

[0126] Among them, the intelligent question-answering model is trained based on question-answer pairs automatically mined using unsupervised documents and extended questions; the extended questions are mined based on unsupervised corpus and questions in the question-answer pairs.

[0127] In one implementation of this embodiment, the apparatus further includes:

[0128] A second acquisition unit is used to acquire unsupervised documents;

[0129] An input unit, configured to input the title text in the unsupervised document into a pre-trained language model to obtain a preset question label classification to which the title text belongs and a classification result of each word in the title text being selected as a question;

[0130] a generating unit, configured to generate questions in a question-answer pair using a preset question template according to the preset question label classification to which the title text belongs and the classification result of each word in the title text being selected as a question;

[0131] The mining unit is used to automatically mine the answer corresponding to the question in the question-answer pair by using a machine reading comprehension MRC model and the paragraph content of the question in the question-answer pair in the unsupervised document.

[0132] In one implementation of this embodiment, the mining unit is specifically configured to:

[0133] By using the machine reading comprehension (MRC) model, all answers corresponding to the question in the question-answer pair are automatically mined from the paragraph content in the unsupervised document, and the answer with the highest confidence is selected from all the answers as the final answer corresponding to the question.

[0134] In one implementation of this embodiment, the apparatus further includes:

[0135] The third acquisition unit is used to acquire unsupervised corpus;

[0136] A calculation unit, configured to calculate the similarity between the question in the question-answer pair and each candidate question in the unsupervised corpus;

[0137] A selection unit is used to select a candidate question corresponding to a similarity that meets a preset condition as an answer to the extended question corresponding to the question in the question-answer pair.

[0138] In an implementation of this embodiment, the preset condition includes that the similarity is greater than a preset threshold.

[0139] In one implementation of this embodiment, the apparatus further includes:

[0140] A fourth acquisition unit is configured to acquire sample question texts; the sample question texts include questions in sample question-answer pairs automatically mined through unsupervised documents, and sample extended questions automatically mined based on the questions in the sample question-answer pairs;

[0141] The training unit is used to train the pre-built initial intelligent question-answering model using the sample question text and its corresponding answer text to obtain the intelligent question-answering model.

[0142] In one implementation of this embodiment, the apparatus further includes:

[0143] A fifth obtaining unit, configured to obtain a verification question text;

[0144] An obtaining unit, configured to input the verification question text into the intelligent question-answering model and obtain an answer result corresponding to the verification question text;

[0145] An updating unit is used to update the intelligent question-answering model by reusing the verification question text as the sample question text when the answer result corresponding to the verification question text is inconsistent with the answer marking result corresponding to the verification question text.

[0146] Furthermore, an embodiment of the present application also provides a text processing device, comprising: a processor, a memory, and a system bus;

[0147] The processor and the memory are connected via the system bus;

[0148] The memory is used to store one or more programs, and the one or more programs include instructions. When the instructions are executed by the processor, the processor executes any one of the implementation methods of the above text processing method.

[0149] Furthermore, an embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a terminal device, the terminal device executes any implementation method of the above-mentioned text processing method.

[0150] Furthermore, an embodiment of the present application also provides a computer program product, which, when running on a terminal device, enables the terminal device to execute any implementation method of the above-mentioned text processing method.

[0151] Through the description of the above embodiments, it can be seen that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the methods described in each embodiment of the present application or certain parts of the embodiments.

[0152] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the methods.

[0153] It should also be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0154] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A text processing method, characterized in that: include: Get the target question text to be answered; Input the target question text into a pre-built intelligent question-answering model to predict the answer text corresponding to the target question text; The intelligent question-answering model is trained based on question-answer pairs automatically mined from unsupervised documents and extended questions; the extended questions are mined from unsupervised corpus and questions in the question-answer pairs; The mining process of the question-answer pair is as follows: Obtain unsupervised documents; Inputting the title text in the unsupervised document into a pre-trained language model to obtain a preset question label classification to which the title text belongs and a classification result of each word in the title text being selected as a question; Using a preset question template, based on the preset question label classification to which the title text belongs and the classification result of each word in the title text being selected as a question, a question in a question-answer pair is generated; the preset question label classification is a 5w1h system; the question type of the preset question template belongs to the question classification type of the 5w1h system; Automatically mine the answer corresponding to the question in the question-answer pair using a machine reading comprehension (MRC) model and the paragraph content of the question in the question-answer pair in the unsupervised document; The method of utilizing a machine reading comprehension (MRC) model and the paragraph content of the question in the question-answer pair in the unsupervised document to automatically mine the answer corresponding to the question in the question-answer pair includes: By using the machine reading comprehension (MRC) model, all answers corresponding to the question in the question-answer pair are automatically mined from the paragraph content in the unsupervised document, and the answer with the highest confidence is selected from all the answers as the final answer corresponding to the question.

2. The method according to claim 1, characterized in that The mining process of the expansion problem is as follows: Obtain unsupervised corpus; Calculate the similarity between the question in the question-answer pair and each candidate question in the unsupervised corpus; The candidate question corresponding to the similarity that meets the preset conditions is selected as the extended question answer corresponding to the question in the question-answer pair.

3. The method according to claim 2, characterized in that The preset condition includes that the similarity is greater than a preset threshold.

4. The method according to claim 1, wherein The intelligent question-answering model is constructed as follows: Obtaining sample question text; the sample question text includes questions in sample question-answer pairs automatically mined through unsupervised documents, and sample extended questions automatically mined based on the questions in the sample question-answer pairs; The sample question text and its corresponding answer text are used to train a pre-built initial intelligent question-answering model to obtain the intelligent question-answering model.

5. The method according to claim 4, characterized in that The method further comprises: Get the verification question text; Input the verification question text into the intelligent question-answering model to obtain an answer result corresponding to the verification question text; When the answer result corresponding to the verification question text is inconsistent with the answer marking result corresponding to the verification question text, the verification question text is used again as the sample question text and the intelligent question-answering model is updated.

6. A text processing device, characterized in that: include: A first acquisition unit is used to acquire the target question text to be answered; A prediction unit, configured to input the target question text into a pre-built intelligent question-answering model and predict an answer text corresponding to the target question text; The intelligent question-answering model is trained based on question-answer pairs automatically mined from unsupervised documents and extended questions; the extended questions are mined from unsupervised corpus and questions in the question-answer pairs; The device further comprises: A second acquisition unit is used to acquire unsupervised documents; An input unit, configured to input the title text in the unsupervised document into a pre-trained language model to obtain a preset question label classification to which the title text belongs and a classification result of each word in the title text being selected as a question; a generating unit, configured to generate a question in a question-answer pair using a preset question template according to a preset question label classification to which the title text belongs and a classification result of each word in the title text being selected as a question; the preset question label classification is a 5w1h system; and the question type of the preset question template belongs to a question classification type of the 5w1h system; A mining unit, configured to automatically mine the answer corresponding to the question in the question-answer pair by using a machine reading comprehension (MRC) model and the paragraph content of the question in the question-answer pair in the unsupervised document; The excavation unit is specifically used for: By using the machine reading comprehension (MRC) model, all answers corresponding to the question in the question-answer pair are automatically mined from the paragraph content in the unsupervised document, and the answer with the highest confidence is selected from all the answers as the final answer corresponding to the question.

7. A text processing device, characterized in that: include: Processor, memory, system bus; The processor and the memory are connected via the system bus; The memory is configured to store one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by the processor, the processor is enabled to perform the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • A method and an apparatus for generating a question-answer pair

    CN108959559A

  • Entity extraction method and device

    CN113095083A

  • Question and answer pair mining method and device

    CN113569018A