Data processing method and related apparatus
Through the big model, the problem of difficult to meet the efficiency and quality of manual maintenance of corpus in the intelligent customer service system is solved, and the efficient service and quality improvement of the intelligent customer service system is achieved.
Patent Information
- Application Number
- PCT/CN2024/112578
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-13
- Filing Date
- 2024-08-16
- Publication Date
- 2025-04-17
AI Technical Summary
The existing intelligent customer service system relies on manual maintenance of the corpus, which makes it difficult for update efficiency and quality to meet service needs.
Through the big model, weft standard questions, similar questions and answers, we generate high-quality corpus for training a smaller second model to improve the efficiency of corpus construction and update.
It reduces the high cost and quality fluctuations caused by manual maintenance and improves the service quality and efficiency of the intelligent customer service system.
Smart Images

Figure CN2024112578_17042025_PF_FP_ABST
Abstract
Description
A data processing method and related device
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on October 13, 2023, with application number 2023113351698 and application name “A data processing method and related device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] This application relates to the field of data processing, and in particular to natural language processing technology. Background Art
[0003] At present, intelligent customer service is used in many online customer service and question-and-answer scenarios to provide services to users as an alternative to manual service.
[0004] In related technologies, small models are generally used to implement intelligent customer service. These models primarily rely on a corpus to provide services to users. The corpus contains a large number of question-answer pairs, known as frequently asked questions (FAQs), which serve as training samples for the small model. The questions in the FAQs serve as the model input for the training samples, and the answers serve as the sample labels for the training samples. By training the small model with training samples from the corpus, the small model learns the knowledge in the corpus and is able to interact with users within the knowledge provided by the corpus.
[0005] It can be seen that the richness and accuracy of the corpus will directly affect the service quality that the small model can provide as an intelligent customer service. At present, the corpus is mainly maintained manually, resulting in the corpus update efficiency and corpus quality being unable to meet the service needs of intelligent customer service.
[0006] Summary of the Invention
[0007] In order to solve the above technical problems, the present application provides a data processing method and related devices, which effectively improve the construction efficiency and update efficiency of the corpus through a large model, and reduce the high cost and quality fluctuations caused by manual maintenance.
[0008] The embodiments of this application disclose the following technical solutions:
[0009] In one aspect, an embodiment of the present application provides a data processing method, which is executed by a computer device, and the method includes:
[0010] Obtain raw data related to the question-answering task;
[0011] Determining corresponding initial corpus using a first model based on the original data, wherein the initial corpus includes standard questions and answers corresponding to the standard questions;
[0012] According to the standard question, corresponding similar questions are determined by the first model, and the text similarity between the corresponding similar questions and the standard question meets the similarity condition;
[0013] A corpus is generated based on the initial corpus and the similar questions corresponding to the standard questions in the initial corpus, wherein the corpus includes standard questions, answers corresponding to the standard questions, and similar questions. The corpus in the corpus is used as training samples to train a second model for performing the question-answering task, wherein the scale of the second model is smaller than that of the first model. The standard questions or similar questions in the training samples are used as inputs of the second model, and the answers corresponding to the standard questions in the training samples are used as sample labels.
[0014] The second model is trained using the training samples, and the trained second model is used to generate corresponding reply answers to user questions obtained in the question-answering task.
[0015] In one aspect, an embodiment of the present application provides a data processing device, comprising an acquisition unit, a determination unit, a generation unit, and a training unit:
[0016] The acquisition unit is used to acquire raw data related to the question-answering task;
[0017] The determining unit is configured to determine corresponding initial corpus based on the original data using a first model, wherein the initial corpus includes standard questions and answers corresponding to the standard questions;
[0018] The determining unit is further configured to determine corresponding similar questions using the first model according to the standard question, wherein the text similarity between the corresponding similar questions and the standard question meets a similarity condition;
[0019] The generating unit is configured to generate a corpus based on the initial corpus and the similar questions corresponding to the standard questions in the initial corpus, wherein the corpus in the corpus includes standard questions, answers corresponding to the standard questions, and similar questions, and the corpus in the corpus is used as training samples to train a second model for performing the question-answering task, wherein the scale of the second model is smaller than that of the first model, the standard questions or the similar questions in the training samples are used as inputs of the second model, and the answers corresponding to the standard questions in the training samples are used as sample labels;
[0020] The training unit is used to train the second model using the training samples, and the trained second model is used to generate corresponding reply answers to user questions obtained in the question-answering task.
[0021] On the other hand, an embodiment of the present application provides a computer device, the computer device including a processor and a memory:
[0022] The memory is used to store a computer program and transmit the computer program to the processor;
[0023] The processor is configured to execute the method described above according to the computer program.
[0024] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which is used to store a computer program. The computer program executes the method described in the above aspects when a computer device executes the computer program.
[0025] On the other hand, an embodiment of the present application provides a computer program product including a computer program, which, when executed on a computer device, enables the computer device to execute the method described above.
[0026] As can be seen from the above technical solution, when providing interactive question-answering services for question-answering tasks, a corpus is constructed to train a corresponding, smaller second model. Based on the raw data related to the question-answering task, the larger first model is used to determine standard questions, similar questions whose textual similarity to the standard questions meets the similarity criteria, and the answers corresponding to the standard questions. Compared to the second model, the model service provided by the first model is not limited to the knowledge of the training samples used. It possesses efficient semantic understanding and inductive capabilities, accurately extracting standard questions and answers from the raw data and creating similar questions that conform to linguistic expression conventions based on textual similarity. A corpus is generated based on the corpus consisting of standard questions, similar questions, and answers, and used to train the second model. While the second model can only provide interactive question-answering services within the knowledge of the training samples used, the first model extracts and creates high-quality corpus that is both accurate and comprehensive. This reduces the high cost and quality fluctuations associated with manual maintenance, enabling the second model to generate high-quality responses to user questions collected in the question-answering task. Furthermore, the first model effectively improves the efficiency of corpus construction and updating. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] 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 only 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.
[0028] FIG1 is a schematic diagram of a data processing scenario provided in an embodiment of the present application;
[0029] FIG2 is a flow chart of a data processing method provided in an embodiment of the present application;
[0030] FIG3 is a schematic diagram showing a corpus provided in an embodiment of the present application;
[0031] FIG4 is a schematic diagram of providing a corpus for a second model based on a first model according to an embodiment of the present application;
[0032] FIG5 is a schematic diagram of corpus generation of a robot question-answering platform provided in an embodiment of the present application;
[0033] FIG6 is a device structure diagram of a data processing device provided in an embodiment of the present application;
[0034] FIG7 is a structural diagram of a terminal device provided in an embodiment of the present application;
[0035] FIG8 is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] The embodiments of the present application are described below with reference to the accompanying drawings.
[0037] The accuracy of small models used to provide interactive question-and-answer services in online customer service and Q&A scenarios is directly related to the quality of the corpus used as training samples. However, in related technologies, corpus maintenance is primarily done manually, for example, by manually extracting standard questions, answers, and similar questions. This inefficiency results in corpus updates and corpus quality that are difficult to meet the service requirements of intelligent customer service.
[0038] To this end, an embodiment of the present application provides a data processing method that effectively improves the efficiency of corpus construction and update through a large model, solving the problems of high cost and quality fluctuations caused by manual maintenance.
[0039] The data processing method of this application involves artificial intelligence technology.
[0040] It mainly involves computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning. For example, the large model in this application can extract standard questions and answers from the original data based on computer vision technology, speech processing technology, natural language processing technology, etc., and determine the corresponding similar questions based on the standard questions. For example, the small model in this application can be based on machine learning, using the target corpus in the corpus as training samples, and training the small model as an intelligent customer service role in the target question-answering task to provide question-answering interactive services.
[0041] The data processing method provided in the embodiments of the present application can be implemented by a computer device, which can be a terminal device or a server. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Terminal devices include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. The terminal device and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in this application.
[0042] It is understandable that in the specific implementation of this application, the original data obtained may involve relevant data such as user information. When the above embodiments of this application are applied to specific products or technologies, any one of them needs to obtain user permission or consent separately, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0043] First, a brief description of the professional terms that may be involved in the embodiments of this application is given:
[0044] Corpus: refers to the FAQ data used to train and optimize the intelligent customer service system (small model), including standard questions, answers, and similar questions;
[0045] Standard questions: The core part of the corpus, which are typical and representative questions, are used to help the intelligent customer service system identify user needs;
[0046] Similar questions: In intelligent customer service systems or chatbots, these questions have similar meanings to standard questions but are expressed slightly differently.
[0047] Intelligent Customer Service System: An intelligent customer service system is an automated customer service solution based on artificial intelligence technology. It simulates human customer service to automatically answer user questions or guide users to complete operations. In this embodiment, this is achieved through a small model.
[0048] The first model: also known as the large model, refers to a neural network model with a large number of parameters and complex structure in the field of artificial intelligence and deep learning;
[0049] The second model, also known as the small model, uses a neural network model with fewer parameters and a simpler structure. Compared to large models, this type of model has lower computational complexity and faster inference speed when processing user questions and providing answers. It is suitable for use in scenarios with limited computing resources. Intelligent customer service systems use small models.
[0050] Figure 1 is a schematic diagram of a data processing scenario provided by an embodiment of the present application, using server 100 as an example of the aforementioned computer device. Server 100 is configured with a first model, and server 200 is a server for providing question-answering interactive services for question-answering tasks, which may be configured with a second model.
[0051] For question-answering tasks, a corpus is required to train the corresponding second model. Based on the raw data related to the question-answering task, server 100 uses the first model to determine standard questions, similar questions whose textual similarity to the standard questions meets the similarity criteria, and answers to the standard questions. Because the model services provided by the first model are not limited to the knowledge of the training samples used, compared to the second model, it has efficient semantic understanding and inductive capabilities. It can accurately extract standard questions and answers from the raw data and create similar questions that conform to linguistic expression habits based on textual similarity. The standard questions, similar questions, and answers form a corpus, and the resulting corpus is then used to form a corpus.
[0052] Server 100 can send a corpus to server 200 to train the second model. Since the second model can only provide question-answering interactive services within the knowledge of the training samples used, high-quality corpus with accuracy and comprehensiveness can be obtained through the refinement and creation of the first model, reducing the high cost and quality fluctuation impact caused by manual maintenance, so that the second model can generate high-quality replies to user questions obtained in the question-answering task, and the first model can effectively improve the efficiency of corpus construction and update.
[0053] FIG2 is a flow chart of a data processing method provided in an embodiment of the present application. The method may be executed by a computer device. In this embodiment, the computer device is described as a server. The method includes:
[0054] S201: Obtaining raw data related to the question-answering task.
[0055] A question-answering task can be a data processing task to implement intelligent question-answering interactive services in a certain field. The field can refer to certain products or certain businesses, etc.
[0056] For example, the intelligent question-and-answer interactive service can be an intelligent customer service system for certain products, or an intelligent question-and-answer system or chatbot for certain businesses.
[0057] The original data is the historical data of the field involved in the question-answering task. These historical data carry information related to the field. This information can be refined and summarized by the first model to obtain knowledge related to the question-answering interaction.
[0058] This application does not limit the content type of the original data. For example, in one possible implementation, the original data includes at least one of historical question-and-answer text data and domain knowledge text data related to the question-and-answer task.
[0059] The historical question-and-answer text data may be the content asked by users through social platforms such as forums, social software, shopping software, etc. in the field involved in the question-and-answer task and the content answered by other professionals.
[0060] The content of domain knowledge text data may not be in the form of questions and answers, for example, it may be explanatory text, papers, etc. Since the first model has the ability to understand and extract semantics, the domain knowledge text data can also be extracted into corresponding standard questions and answers through the first model.
[0061] S202: Determine corresponding initial corpus using a first model based on the original data.
[0062] As mentioned above, the first model (large model) and the second model (small model) have essential differences in parameters, structure, and model inference speed.
[0063] In the natural language processing mainly involved in the embodiments of this application, the differences between the first model and the second model are mainly reflected in the following aspects:
[0064] Number of parameters: The first model typically has more parameters, while the second model has fewer parameters. The number of parameters determines the complexity and capacity of the model. The first model, with its greater number of parameters, is generally more expressive and can capture more data features, but this also carries the risk of overfitting.
[0065] Training Sample Size: The first model typically requires more training samples to optimize parameters, while the second model can be trained with fewer training samples. For large data sets, the first model can typically learn more knowledge and features, but also requires more computing resources and time.
[0066] Computing resources and time: The first model requires more computing resources (such as GPUs, TPUs, etc.) and time for training and inference. In contrast, the second model requires fewer computing resources and time, making it more suitable for deployment and use on devices with limited resources.
[0067] Performance: The first model generally performs better on various natural language processing tasks, especially on complex tasks and large datasets. However, as the model size increases, the performance improvement may gradually saturate. In contrast, the second model may perform worse on some simple tasks and small datasets, but it is still a good choice when computing resources are limited.
[0068] Applicable Scenarios: The first and second models each have their own applicable scenarios. For complex tasks and large datasets, the first model may be a better choice due to its stronger expressiveness and performance. For simple tasks, small datasets, or scenarios with limited computing resources (such as target question answering tasks), the second model may be a more appropriate choice due to its lower computational resources and time requirements.
[0069] In general, the model with more than 1-3 billion parameters and good text generation capabilities can be called the first model, that is, the large model.
[0070] The knowledge learned by the first model enables it to provide services beyond the knowledge in the training sample, meaning it possesses the ability to organize, summarize, and create knowledge at the linguistic level. However, the scope of content that the second model can output is limited to the knowledge in the training sample. This means the second model lacks the necessary linguistic organization, summarization, and creativity, and its output range does not exceed the range of answers in the training sample. It should be noted that the output range of the second model is primarily based on substantive content. In some cases, the second model can also add non-substantive content to enhance the user interaction experience, such as modal particles and auxiliary words.
[0071] In this embodiment of the present application, question-answer extraction primarily utilizes the capabilities of the first model to analyze the raw data. Leveraging the first model's contextual understanding, semantic analysis, and summarization and extraction capabilities, combined with appropriate prompts and model parameter adjustments, it effectively extracts standard questions and corresponding answers suitable for training the second model. These standard questions and corresponding answers constitute the initial corpus.
[0072] For example, the original data is historical question-answer text data, as follows:
[0073] User A: I would like to consult
[0074] User A: How to effectively extract intelligent customer service corpus
[0075] User B: Hello, there are many methods.
[0076] User B: The commonly used method in the industry is XXX
[0077] Through the large model, we can get the corresponding initial corpus, the standard questions and answers are:
[0078] [{"question":"How to extract intelligent customer service corpus","answer":"The common method is XXX"}]
[0079] S203: Determine corresponding similar questions according to the standard question using the first model.
[0080] It should be noted that the main purpose of the determined corpus is to be used for training the second model. In order for the second model to learn the knowledge in the corpus, a certain number of training samples are required. If the training samples are insufficient, underfitting problems will occur.
[0081] However, for a standard question and answer in an initial corpus, the number of training samples generated is very small. If similar questions are not generalized, it is difficult for the second model to learn the knowledge of the initial corpus during the training process based only on standard questions and answers.
[0082] Therefore, this application further leverages the semantic understanding and refinement capabilities of the first model, using text similarity as a generalization guide to generate similar questions to the standard question through the first model. The text similarity between the generated similar questions and the corresponding standard questions meets the similarity condition.
[0083] As mentioned above, similar questions and standard questions have similar meanings, but are expressed slightly differently. That is, standard questions and corresponding similar questions are asking the same question, but differ in expression form and sentence structure.
[0084] For example, the standard question is: "How to effectively refine the intelligent customer service corpus?" Based on text similarity as a generalization guide, similar questions generated by the first model may include: "What are the effective ways to refine the intelligent customer service corpus?", "How can the corpus of intelligent customer service be effectively refined?", "What are the ways to effectively refine the intelligent customer service corpus?", etc.
[0085] The similar questions obtained through generalization can effectively expand the training samples related to the standard question. For example, a training sample can be formed by the answers corresponding to a similar question and the standard question. This ensures that the second model learns the necessary knowledge during training.
[0086] S204: Generate a corpus based on the initial corpus and the similar questions corresponding to the standard questions in the initial corpus.
[0087] The corpus in the corpus includes standard questions, answers corresponding to the standard questions, and similar questions corresponding to the standard questions. The corpus in the corpus is used as training samples to train a second model used to perform the question-answering task.
[0088] Since during the training process, the standard questions and the corresponding similar questions all use the answers to the standard questions as sample labels, in order to facilitate maintenance, in an embodiment of the present application, the training samples are maintained in the form of a corpus, and the standard questions, the similar questions corresponding to the standard questions, and the answers corresponding to the standard questions are all carried in the same corpus. When the second model needs to be trained, training samples can be generated based on the corpus in the corpus.
[0089] The standard question or the similar question in the training sample is used as the input of the second model, and the answer corresponding to the standard question in the training sample is used as a sample label.
[0090] It is emphasized again that, as mentioned above, the second model is used to provide question-answering interaction services within the knowledge of the training samples used, and the model service provided by the first model is not limited to the knowledge of the training samples used.
[0091] S205: The second model is trained using the training samples, and the trained second model is used to generate corresponding reply answers to the user questions obtained in the question-answering task.
[0092] Because intelligent customer service requires efficiency and timeliness, the industry currently uses the second model. Its core is training with a corpus. As long as the corpus is sufficiently rich, it can cover a wide range of user questions. Furthermore, the second model has a short training cycle, allowing for rapid iteration and upgrades based on ever-changing Q&A needs, enabling timely launch to meet these demands.
[0093] This not only requires that the model parameters and scale cannot be too large, but also requires that the training samples can be constructed quickly and in a timely manner for training. In other words, even if the second model meets the fast and accurate requirements of question-answering tasks such as intelligent customer service, the speed of generating training samples needs to be able to keep up with the iteration speed of new question-answering requirements. However, in related technologies, corpus operations rely on manual labor, which is in itself inconsistent with the efficiency and timeliness required by intelligent customer service. The first model is introduced in this application to effectively solve the problems of training sample generation and generalization efficiency.
[0094] Thus, when providing interactive question-answering services for question-answering tasks, a corpus is required to train a corresponding, smaller second model. Based on the raw data related to the question-answering task, the larger first model is used to determine standard questions, similar questions whose textual similarity to the standard questions meets the similarity criteria, and the answers corresponding to the standard questions. Compared to the second model, the model services provided by the first model are not limited to the knowledge of the training samples used. It possesses efficient semantic understanding and inductive capabilities, accurately extracting standard questions and answers from the raw data and creating similar questions that conform to linguistic expression conventions based on textual similarity. A corpus is generated based on the corpus consisting of standard questions, similar questions, and answers, and used to train the second model. Since the second model only needs to provide interactive question-answering services within the knowledge of the training samples used, the first model extracts and creates high-quality corpus that is both accurate and comprehensive. This reduces the high cost and quality fluctuations associated with manual maintenance, enabling the second model to generate high-quality responses to user questions collected in the question-answering task. Furthermore, the first model effectively improves the efficiency of corpus construction and updating.
[0095] Since the original data obtained contains a certain proportion of non-essential content, such as some modal particles, pictures, emoticons, links, etc. in the historical question and answer text data, these non-essential contents are of no help to the first model in generating standard questions and answers, but will instead increase unnecessary computational effort.
[0096] To this end, in a possible implementation, S201: determining corresponding initial corpus using a first model based on the original data includes:
[0097] S2011: Filtering the original data to remove invalid text irrelevant to the question-answering task from the original data to obtain first text data;
[0098] S2012: performing keyword recognition on the first text data, filtering out object information including the keyword from the first text data, and obtaining second text data;
[0099] S2013: Determine the initial corpus corresponding to the second text data using the first model.
[0100] The invalid text filtered out by the server from the original data through data filtering is text irrelevant to the question-answering task, such as the non-substantive content mentioned above. This type of invalid text accounts for a large proportion in historical question-answering text data.
[0101] For example, the following are raw data in various formats:
[0102] {"MsgType":4,"Rich":[{"MsgType":1,"Content":"[Rose] Haha, I'd like to ask how to extract intelligent customer service corpus."}]}
[0103] {"MsgType":4,"Rich":[{"MsgType":2,"Url":"https: / / www.xxxx.png"}]}
[0104] "[Bow], I see. The corpus includes standard questions, similar questions, and answers. Thank you very much."
[0105] After data filtering, the first text data obtained is:
[0106] ["I would like to ask how to extract corpus for intelligent customer service", "corpus includes standard questions, similar questions, and answers"].
[0107] In addition to filtering out such invalid text, the embodiment of the present application also takes into account the removal of sensitive information. If such information is learned by the second model, it may appear as an answer in the question-and-answer interaction scenario, thereby causing the leakage of sensitive information.
[0108] Therefore, this application performs desensitization processing on the first text data through keyword recognition. The keywords used in keyword recognition can be pre-set based on sensitive information, that is, customized keywords can be used to identify the first text data based on different desensitization requirements.
[0109] The server can accurately identify object information involving keywords from the first text data through keyword matching, such as content matching and regular matching, that is, determine the object information involving sensitive content, and filter out the object information from the first text data to obtain the second text data.
[0110] The second text data is text data from which invalid content and sensitive information have been removed. For the first model, it can effectively improve the model processing efficiency and reduce the occupancy of model resources.
[0111] Text similarity is the basis for the server to determine similar questions based on the standard question. It can represent the similarity between the standard question and the similar question in the text dimension. When the text similarity of two questions meets the similarity condition, it can be determined that the query requirements of the two questions are similar.
[0112] In an embodiment of the present application, text similarity may be expressed through multiple dimensions. For example, in one possible implementation, text similarity includes at least one of semantic similarity and representational similarity.
[0113] Semantic similarity is used to identify the similarity between two questions at the semantic level. The higher the semantic similarity, the closer the meanings expressed by the two questions are.
[0114] Representational similarity is used to identify the similarity between two questions at the sentence structure level. The higher the representational similarity, the more similar the sentence structures of the two questions are.
[0115] When the text similarity includes the semantic similarity, the similarity condition is that the semantic similarity is greater than a first similarity threshold;
[0116] When the text similarity includes the representation similarity, the similarity condition is that the representation similarity is less than a second similarity threshold.
[0117] In other words, when determining text similarity from a semantic perspective, the greater the semantic similarity, the better. This ensures that the query requirements expressed by similar questions are nearly consistent with those of the standard question. When determining text similarity from a representational perspective, the greater the dissimilarity in sentence structure, the better. This allows similar questions to be distinguished from the standard question in sentence structure, providing richer information for model training.
[0118] Since the quality of the second model directly depends on the quality of the corpus, the maintenance of the corpus includes the maintenance of the corpus quality.
[0119] The more important part of the corpus is the standard questions, and the quality of the standard questions directly affects the quality of similar questions determined based on text similarity. Therefore, in one possible implementation, after S204: generating a corpus based on the initial corpus and the similar questions corresponding to the standard questions in the initial corpus, the method further includes:
[0120] S11: taking any two standard questions in the corpus as a standard question pair, and determining the semantic similarity between the two standard questions;
[0121] S12: In response to the semantic similarity between the two standard questions being greater than an adjustment threshold, adjusting the two corpora to which the two standard questions belong in the corpus to form one corpus.
[0122] For standard questions, different standard questions should reflect different inquiry requirements. Otherwise, the relationship between standard questions will no longer be satisfied, and the relationship between standard questions and similar questions will be satisfied. In other words, standard questions need to be somewhat distinct from each other. If the inquiry requirements expressed by standard questions are too similar, it may confuse the secondary model during the model training process. The learned knowledge will not be able to distinguish which standard question the user's input question corresponds to. Since different standard questions correspond to different answers, the secondary model may return an incorrect answer.
[0123] When generating standard questions corresponding to the original data through the first model, the generation of a standard question may not refer too much to other generated standard questions. Therefore, in order to improve the quality of the corpus, the quality of the standard questions in the corpus can be tested through semantic similarity.
[0124] When the semantic similarity between two standard questions in a standard question pair is less than or equal to an adjustment threshold, such as 0.9, the server determines that the query requirements expressed by the two standard questions are sufficiently distinguishable and can be effectively applied to the training of the second model.
[0125] When the semantic similarity between two standard questions in a standard question pair exceeds an adjustment threshold, such as 0.9, the server determines that the query requirements expressed by these two standard questions are insufficiently distinguishable. If both are used as training samples to train the second model, the second model may confuse the two standard questions, reducing model accuracy. In this case, the server can adjust the two corpora containing these two standard questions, combining them into a single corpus. For example, this can be done by deleting one of the standard questions or by reconstructing a unified standard question based on the two standard questions. The adjustment method is not specified here.
[0126] By testing the quality of standard questions in the corpus through semantic similarity, we can effectively eliminate standard questions whose inquiry requirements are difficult to distinguish, improve the quality of the corpus, and thus help improve the training quality of the second model.
[0127] In this application, the original data can be updated over time. Through the data processing method provided in the embodiments of this application, new standard questions, similar questions, and answers can be determined based on the updated original data. New corpus can be generated from these newly determined standard questions, similar questions, and answers. These corpus will be added to the established corpus as incremental corpus, which will be used to iteratively update the second model by generating new training samples, so that the second model can learn the knowledge corresponding to the new query requirements in a timely manner, thereby providing a highly timely question-answering interactive service.
[0128] In other words, new corpus will be added to the corpus of the second model at any time. For the standard questions in this part of the corpus, we also need to pay attention to the above issues to avoid confusion in the inquiry requirements.
[0129] Therefore, in a possible implementation, after S204: generating a corpus based on the initial corpus and the similar questions corresponding to the standard questions in the initial corpus, the method further includes:
[0130] S21: Determine the corresponding pending initial corpus using the first model according to the updated original data;
[0131] S22: in response to the semantic similarity between the undetermined standard question in the undetermined initial corpus and the target standard question in the corpus being greater than an adjustment threshold, updating the corpus to which the target standard question belongs based on the undetermined initial corpus;
[0132] S23: In response to the semantic similarity between the pending standard question in the pending initial corpus and any standard question in the corpus being less than or equal to the adjustment threshold, determining that the pending standard question meets the conditions for being added to the corpus, using the pending initial corpus as the initial corpus, and performing the operation of determining corresponding similar questions based on the standard question using the first model.
[0133] It can be seen that when the semantic similarity of the pending standard question as an incremental standard question is less than or equal to the adjustment threshold, such as 0.9, relative to the existing standard questions in the corpus, the server can determine that the query requirements of the pending standard question are distinguishable from all query requirements in the current corpus and can be added to the corpus as a new standard question. At this time, similar questions can be generated and corpus can be constructed based on the pending standard question.
[0134] When the semantic similarity between the pending standard question as an incremental standard question and a standard question in the corpus (denoted as the target standard question) is greater than an adjustment threshold, for example, 0.9, the server can determine that the query requirements of the pending standard question and the query requirements of the target standard question are difficult to distinguish and should actually be treated as a standard question. In this case, the pending initial corpus will not be used as an independent corpus, but needs to be updated to the corpus involved in the target standard question as a supplement to the corpus. It should be noted that after the update, there is still only one standard question in the corpus. How to update the pending standard question and the target standard question into one standard question can be referred to the aforementioned implementation method and will not be repeated here.
[0135] By testing the quality of the incremental standard questions in the corpus through semantic similarity, we can effectively avoid adding standard questions with difficult-to-distinguish inquiry requirements into the corpus, thereby improving the quality of the corpus and further improving the training quality of the second model.
[0136] Since training samples can also be generated based on similar questions, in addition to testing the quality of the standard questions in the corpus, similar questions also play a crucial role in influencing the accuracy of the second model training, requiring effective quality testing. Although the server generates similar questions corresponding to standard questions based on text similarity, effectively ensuring the quality of similar questions relative to the standard questions, issues may arise between similar questions in different corpora.
[0137] In a possible implementation, after S204: generating a corpus based on the initial corpus and the similar questions corresponding to the standard questions in the initial corpus, the method further includes:
[0138] S31: arbitrarily selecting a first corpus and a second corpus from the corpus;
[0139] S32: Determine text similarity between similar questions in the first corpus and similar questions in the second corpus;
[0140] S33: In response to the text similarity between the similar questions in the first corpus and the similar questions in the second corpus satisfying the similar question confusion condition, determining that the first corpus and the second corpus have confusion problems, and removing the first corpus and the second corpus from the corpus.
[0141] This application discovered that similar questions corresponding to different standard questions may be confused based on text similarity. This is because similar questions are determined based on text similarity with the standard question. During the determination process, only the text similarity between the standard question and the similar question is considered. When the semantic similarity of two standard questions (from different corpora) is close but does not reach the adjustment threshold, the similar questions corresponding to the two standard questions may have similar text similarity. If this is not identified, the second model may confuse the two corpora when training samples generated by such similar questions.
[0142] This results in that when the second model processes the user question input by the user, it assumes that the user question involves corpus a, but because the text similarity between similar questions in corpus a and similar questions in corpus b meets the similar question confusion condition, the second model learns incorrect knowledge during training and may use the answer in corpus b as the response to the user question, resulting in intelligent question-answering interaction that does not meet user needs.
[0143] To this end, this application will identify similar questions between each other in the corpus. By determining the textual similarity between similar questions in different corpora, similar questions that may cause the above-mentioned problems can be identified based on similar question confusion conditions. For example, in response to the textual similarity between similar questions meeting the similar question confusion conditions, it is determined that the first corpus and the second corpus have confusion issues. The server can remove the first and second corpora from the corpus to prevent the training samples generated by the first and second corpora from causing the second model to learn inappropriate knowledge.
[0144] The first corpus and the second corpus removed from the corpus can be processed, for example, by merging the two corpora or adjusting similar questions in the two corpora. When they meet the conditions for being added to the corpus again, they can be added back to the corpus.
[0145] After determining the corpus through the first model, it is also necessary to determine the solvability of the corpus in the question-and-answer interaction scenario. This solvability can be used to identify whether the user's inquiry needs can be solved through intelligent question-and-answer interaction. When the solvability of a corpus is insufficient, even if the second model learns relevant knowledge through the corpus, the reply answer given is still difficult to meet the user's inquiry needs related to the corpus.
[0146] Therefore, for corpora with insufficient solvability, even if their quality can pass the quality test of the aforementioned embodiment, they still cannot be used to train the second model, or in other words, they are of little significance for training the second model.
[0147] Therefore, in order to improve the quality of the corpus used to train the second model, it is necessary to accurately screen out other corpora that are easily confused with the corpus with insufficient solvability.
[0148] Therefore, in a possible implementation, after S204: generating a corpus based on the initial corpus and the corresponding similar questions, the method further includes:
[0149] S41: Based on the solvability of the corpus in the question-answering interaction scenario, the corpus in the corpus is divided into a solvable corpus set and an unsolvable corpus set, wherein the solvable corpus set includes a first standard question and the unsolvable corpus set includes a second standard question;
[0150] S42: Determine text similarity between the first standard question and the second standard question;
[0151] S43: In response to the text similarity between the first standard question and the second standard question satisfying the standard question confusion condition, determining that the corpus to which the first standard question belongs has a confusion problem, and removing the corpus to which the first standard question belongs from the corpus.
[0152] Based on the degree of solvability, the corpus in the corpus can be divided into a solvable corpus set and an unsolvable corpus set. The solvability of the corpus in the solvable corpus meets the requirements of the question-answering interaction scenario, while the solvability of the corpus in the unsolvable corpus does not meet the requirements of the question-answering interaction scenario. The division of the solvable corpus set into the unsolvable corpus set can be achieved based on a solvability threshold. The solvability threshold can be set based on experience or based on the interaction accuracy of the question-answering interaction scenario, and this application does not limit this.
[0153] Standard questions in a solvable corpus can be considered solvable, while standard questions in an unsolvable corpus can be considered unsolvable. Solvable standard questions are those that can be solved with the existing corpus, while unsolvable standard questions require manual intervention and cannot be solved with the existing corpus. If the similarity between these two is too high, it will firstly make it difficult for the subsequent text classification model to clearly classify the samples. Secondly, from a business perspective, the two belong to different business areas, and their corpora should not have too high similarity. If corpora with high similarity appear, they should be detected and confirmed by relevant staff.
[0154] For a first standard question in a solvable corpus and a second standard question in an unsolvable corpus, the server can determine the textual similarity between the first and second standard questions. Based on the relationship between the textual similarity and the standard question confusion condition, the server can determine whether the first standard question has a confusion issue. If the standard question confusion condition is determined to be met, the corpus containing the first standard question is removed from the corpus, thereby improving the corpus quality.
[0155] As mentioned above, to avoid underfitting, the corpus needs to have a certain number of similar questions. However, after passing the aforementioned quality check, it is possible that some corpora may not contain enough similar questions to meet the training requirements. Therefore, it is necessary to determine whether the number of similar questions in the corpus meets the requirements before using the corpus for training.
[0156] Therefore, in a possible implementation, before S204: training the second model using the training samples, the method further includes:
[0157] S51: Determine the number of similar questions included in the corpus;
[0158] S52: In response to the number of similar questions included in the corpus being less than the target number required for training, the target number of similar questions is determined by the first model according to standard questions in the corpus.
[0159] When the server finds that the number of similar questions in the corpus is insufficient, it can adopt the aforementioned S203 method to generate the required number of similar questions through the first model based on the standard questions in the corpus and add them to the corpus.
[0160] This can effectively improve the quality of the target corpus and reduce the occurrence of underfitting in training.
[0161] In order to intuitively reflect the status of the corpus and facilitate maintenance, in a possible implementation, the method further includes:
[0162] S61: Determine quality parameters of similar questions in the corpus based on text similarity of similar questions in the corpus;
[0163] S62: Displaying the corpus and the quality parameters on a corpus management interface.
[0164] As shown in Figure 3, the content contained in a corpus is shown, including:
[0165] Standard Question: "Can one corporate social identity be linked to multiple merchant identities?"
[0166] Answer: "Yes, there is a document you can refer to at the following URL..."
[0167] And similar questions: "Can one corporate social identity be bound to multiple merchant identities?", "How many merchant identities can be bound to one corporate social identity?", "How many merchant identities can be bound to one corporate social identity?", etc.
[0168] For each similar question, a quality parameter is displayed based on its text similarity with the standard question, such as 98.81, 84.32, etc. The larger the parameter value, the more the text similarity between the similar question and the standard question meets the similarity criteria.
[0169] By displaying quality parameters, the similarity quality of the corpus can be intuitively reflected, which is convenient for subsequent maintenance.
[0170] FIG4 shows a schematic diagram of providing a corpus for a small model (i.e., the second model) based on a large model (i.e., the first model), which can realize efficient operation of the corpus based on the large model.
[0171] The server uses the power of large models to automatically extract standard questions and similar questions from massive amounts of raw data, and then automatically generalizes the standard questions into a sufficient number of similar questions in batches. It also supports quality testing of standard questions and similar questions, thereby effectively improving the training and iteration speed of small models and enhancing the operational efficiency and quality of intelligent customer service.
[0172] FIG5 shows a schematic diagram of corpus generation of a robot question-answering platform, which includes a robot question-answering management platform and a corpus operation platform.
[0173] The corpus operation platform can leverage large models to filter raw data, identify keywords, refine questions and answers, generalize standard questions, and detect duplicate corpus. The robotic question-answering management platform maintains a corpus for training, iterating, and updating small models, which are used to provide intelligent customer service capabilities for the robotic question-answering management platform. The robotic question-answering management platform can also collect relevant raw data in real time and provide it to the corpus operation platform.
[0174] Raw data filtering:
[0175] Based on business characteristics, some obvious polite words, meaningless words, emoticons, and image links are filtered out, such as various emoticons, interjections such as "haha", etc. After integrating and filtering the original data, a piece of data that is easy to analyze is obtained, which is recorded as the first text data.
[0176] Keyword identification:
[0177] Customizable keywords can be used. The first text data can accurately identify data that hits the custom keywords through content matching and regular matching, and remove them to obtain the second text data.
[0178] Question and answer summary:
[0179] Question and answer extraction mainly uses the capabilities of large models to analyze original data or secondary text data. By utilizing the context understanding, semantic analysis, summary and extraction capabilities of the large model, combined with appropriate prompts and adjusting model parameters, standard questions and answers can be effectively extracted.
[0180] Standard question generalization:
[0181] After question and answer extraction is complete, the extracted standard questions need to be generalized. Therefore, by extracting more similar questions from the standard questions and enriching the corpus, the small model can more accurately identify the user's questions and generate corresponding answers (solutions). This also utilizes the power of the large model and adjusts the model temperature to a higher value to control the diversity and randomness of the generated similar questions, which better meets the expected diversity and randomness of user questions.
[0182] Duplicate corpus detection:
[0183] Based on the above principles of corpus quality measurement, text similarity calculation can be carried out in various forms, as shown below.
[0184] Representation of similarity: Hamming distance, Levenshtein distance, Euclidean distance, and Manhattan distance can be used to determine it.
[0185] Semantic similarity: It can be determined using the CoSENT text matching model, the BERT model (text vector representation), and the SentenceBERT text matching model.
[0186] Based on the embodiments corresponding to the aforementioned Figures 1 to 5 , Figure 6 is a device structure diagram of a data processing device provided in an embodiment of the present application. The data processing device 600 includes an acquisition unit 601, a determination unit 602, a generation unit 603, and a training unit 604:
[0187] The acquisition unit 601 is used to acquire original data related to the question-answering task;
[0188] The determining unit 602 is configured to determine corresponding initial corpus based on the original data using a first model, where the initial corpus includes standard questions and answers corresponding to the standard questions;
[0189] The determining unit 602 is further configured to determine corresponding similar questions based on the standard question using the first model, wherein the text similarity between the corresponding similar questions and the standard question meets a similarity condition;
[0190] The generating unit 603 is configured to generate a corpus based on the initial corpus and the similar questions corresponding to the standard questions in the initial corpus, wherein the corpus in the corpus includes standard questions, answers corresponding to the standard questions, and similar questions. The corpus in the corpus is used as training samples to train a second model for performing the question-answering task, wherein the scale of the second model is smaller than that of the first model. The standard questions or similar questions in the training samples are used as inputs of the second model, and the answers corresponding to the standard questions in the training samples are used as sample labels.
[0191] The training unit 604 is used to train the second model using the training samples, and the trained second model is used to generate corresponding reply answers to user questions obtained in the question-answering task.
[0192] In a possible implementation manner, the determining unit is further configured to:
[0193] Performing data filtering on the original data to filter out invalid text irrelevant to the question-answering task from the original data to obtain first text data;
[0194] performing keyword recognition on the first text data, filtering out object information including the keyword from the first text data, and obtaining second text data;
[0195] An initial corpus corresponding to the second text data is determined using a first model.
[0196] In a possible implementation, the original data includes at least one of historical question-and-answer text data and domain knowledge text data related to the question-and-answer task.
[0197] In a possible implementation, the text similarity includes at least one of semantic similarity and representational similarity;
[0198] When the text similarity includes the semantic similarity, the similarity condition is that the semantic similarity is greater than a first similarity threshold;
[0199] When the text similarity includes the representation similarity, the similarity condition is that the representation similarity is less than a second similarity threshold.
[0200] In a possible implementation manner, the determining unit is further configured to:
[0201] Taking any two standard questions in the corpus as a standard question pair, and determining the semantic similarity of the two standard questions;
[0202] In response to the semantic similarity between the two standard questions being greater than an adjustment threshold, two corpora to which the two standard questions belong in the corpus are adjusted to form one corpus.
[0203] In a possible implementation manner, the determining unit is further configured to:
[0204] Determining the corresponding pending initial corpus using the first model according to the updated original data;
[0205] In response to a semantic similarity between a pending standard question in the pending initial corpus and a target standard question in the corpus being greater than an adjustment threshold, updating the corpus to which the target standard question belongs based on the pending initial corpus;
[0206] In response to the semantic similarity between the pending standard question in the pending initial corpus and any standard question in the corpus being less than or equal to the adjustment threshold, it is determined that the pending standard question meets the conditions for being added to the corpus, the pending initial corpus is used as the initial corpus, and the operation of determining the corresponding similar question according to the standard question through the first model is performed.
[0207] In a possible implementation manner, the determining unit is further configured to:
[0208] arbitrarily selecting a first corpus and a second corpus from the corpus;
[0209] Determining text similarity between similar questions in the first corpus and similar questions in the second corpus;
[0210] In response to the text similarity between similar questions in the first corpus and similar questions in the second corpus satisfying a similar question confusion condition, it is determined that the first corpus and the second corpus have confusion problems, and the first corpus and the second corpus are removed from the corpus.
[0211] In a possible implementation manner, the determining unit is further configured to:
[0212] Based on the solvability of the corpus in a question-answering interaction scenario, the corpus in the corpus is divided into a solvable corpus set and an unsolvable corpus set, wherein the solvable corpus set includes a first standard question and the unsolvable corpus set includes a second standard question;
[0213] determining text similarity between the first standard question and the second standard question;
[0214] In response to the text similarity between the first standard question and the second standard question satisfying a standard question confusion condition, it is determined that the corpus to which the first standard question belongs has a confusion problem, and the corpus to which the first standard question belongs is removed from the corpus.
[0215] In a possible implementation manner, the determining unit is further configured to:
[0216] Determining the number of similar questions included in the corpus;
[0217] In response to the number of similar questions included in the corpus being less than a target number required for training, the target number of similar questions is determined by the first model based on standard questions in the corpus.
[0218] In a possible implementation, the device further includes a display unit, and the display unit is configured to:
[0219] Determining quality parameters of similar questions in the corpus based on text similarity of similar questions in the corpus;
[0220] The corpus and the quality parameters are displayed on the corpus management interface.
[0221] The present application also provides a computer device, which is the aforementioned computer device and may include a terminal device or a server. The aforementioned data processing device may be configured in the computer device. The computer device is described below with reference to the accompanying drawings.
[0222] If the computer device is a terminal device, as shown in FIG7 , an embodiment of the present application provides a terminal device, taking a mobile phone as an example:
[0223] FIG7 is a block diagram showing a partial structure of a mobile phone related to a terminal device provided in an embodiment of the present application. Referring to FIG7 , the mobile phone includes components such as a radio frequency (RF) circuit 1410, a memory 1420, an input unit 1430, a display unit 1440, a sensor 1450, an audio circuit 1460, a wireless fidelity (WiFi) module 1470, a processor 1480, and a power supply 1490. Those skilled in the art will appreciate that the mobile phone structure shown in FIG7 does not limit the mobile phone and may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0224] The following is a detailed introduction to the various components of the mobile phone in conjunction with Figure 7:
[0225] The RF circuit 1410 may be used for receiving and sending signals during information transmission or calls. In particular, after receiving downlink information from the base station, it is sent to the processor 1480 for processing. In addition, the designed uplink data is sent to the base station.
[0226] Memory 1420 can be used to store software programs and modules. Processor 1480 executes the various functional applications and data processing of the mobile phone by running the software programs and modules stored in memory 1420. Memory 1420 may mainly include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area may store data created based on the use of the mobile phone (such as audio data, a phone book, etc.). In addition, memory 1420 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0227] The input unit 1430 may be configured to receive input digital or character information and generate key signal input related to user settings and function control of the mobile phone. Specifically, the input unit 1430 may include a touch panel 1431 and other input devices 1432 .
[0228] The display unit 1440 may be configured to display information input by the user or information provided to the user, as well as various menus of the mobile phone. The display unit 1440 may include a display panel 1441 .
[0229] The mobile phone may also include at least one sensor 1450, such as a light sensor, a motion sensor, and other sensors.
[0230] The audio circuit 1460 , the speaker 1461 , and the microphone 1462 can provide an audio interface between the user and the mobile phone.
[0231] WiFi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 1470, providing users with wireless broadband Internet access.
[0232] The processor 1480 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. It executes various functions of the mobile phone and processes data by running or executing software programs and / or modules stored in the memory 1420 and calling data stored in the memory 1420.
[0233] The mobile phone also includes a power supply 1490 (such as a battery) for supplying power to various components.
[0234] In this embodiment, the processor 1480 included in the terminal device is also used to execute the data processing method provided in the embodiment of the present application.
[0235] If the computer device is a server, an embodiment of the present application also provides a server, as shown in Figure 8, which is a structural diagram of a server 1500 provided in an embodiment of the present application. The server 1500 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 1522 (for example, one or more processors) and a memory 1532, and one or more storage media 1530 (for example, one or more mass storage devices) storing application programs 1542 or data 1544. Among them, the memory 1532 and the storage medium 1530 can be temporary storage or permanent storage. The program stored in the storage medium 1530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 1522 can be configured to communicate with the storage medium 1530 to execute a series of instruction operations in the storage medium 1530 on the server 1500.
[0236] The server 1500 may also include one or more power supplies 1526, one or more wired or wireless network interfaces 1550, one or more input and output interfaces 1558, and / or one or more operating systems 1541, such as Windows Server 2003. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM etc.
[0237] The steps executed by the server in the above embodiment may be based on the server structure shown in FIG8 .
[0238] In addition, an embodiment of the present application further provides a storage medium, which is used to store a computer program, and the computer program is used to execute the method provided by the above embodiment.
[0239] An embodiment of the present application further provides a computer program product including a computer program, which, when executed on a computer device, enables the computer device to execute the method provided in the above embodiment.
[0240] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the above-mentioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the above-mentioned storage medium can be at least one of the following media: read-only memory (English: Read-only Memory, abbreviated: ROM), RAM, magnetic disk or optical disk, etc., various media that can store computer programs.
[0241] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.
[0242] The above is only one specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Moreover, based on the implementation methods provided in the above aspects, the present application can also be further combined to provide more implementation methods. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A data processing method, executed by a computer device, comprising: Obtain raw data related to the question-answering task; According to the original data, a corresponding initial corpus is determined by a first model, wherein the initial corpus includes a standard question and an answer corresponding to the standard question; According to the standard question, a corresponding similar question is determined by the first model, and the text similarity between the similar question having a corresponding relationship and the standard question meets the similarity condition; A corpus is generated based on the initial corpus and the similar questions corresponding to the standard questions in the initial corpus, wherein the corpus in the corpus includes standard questions, answers corresponding to the standard questions, and similar questions, and the corpus in the corpus is used as training samples to train a second model for performing the question-answering task, wherein the scale of the second model is smaller than that of the first model, the standard questions or the similar questions in the training samples are used as inputs of the second model, and the answers corresponding to the standard questions in the training samples are used as sample labels; The second model is trained using the training samples, and the trained second model is used to generate corresponding reply answers to user questions obtained in the question-answering task.
2. According to the method of claim 1, determining the corresponding initial corpus by using the first model according to the original data comprises: Performing data filtering on the original data, filtering out invalid text irrelevant to the question-answering task from the original data, and obtaining first text data; Performing keyword recognition on the first text data, filtering out object information including the keyword from the first text data, and obtaining second text data; An initial corpus corresponding to the second text data is determined by using the first model.
3. According to the method of claim 1 or 2, the original data includes at least one of historical question and answer text data and domain knowledge text data related to the question and answer task.
4. The method according to any one of claims 1 to 3, wherein the text similarity comprises at least one of semantic similarity and representational similarity; When the text similarity includes the semantic similarity, the similarity condition is that the semantic similarity is greater than a first similarity threshold; When the text similarity includes the representation similarity, the similarity condition is that the representation similarity is less than a second similarity threshold.
5. The method according to any one of claims 1 to 4, after generating a corpus based on the initial corpus and the similar questions corresponding to the standard questions in the initial corpus, the method further comprises: Taking any two standard questions in the corpus as a standard question pair, and determining the semantic similarity of the two standard questions; In response to the semantic similarity between the two standard questions being greater than an adjustment threshold, two corpora to which the two standard questions belong in the corpus are adjusted to adjust the two corpora into one corpus.
6. The method according to any one of claims 1 to 5, after generating a corpus based on the initial corpus and the similar questions corresponding to the standard questions in the initial corpus, the method further comprises: Determining the corresponding pending initial corpus through the first model according to the updated original data; In response to the semantic similarity between the undetermined standard question in the undetermined initial corpus and the target standard question in the corpus being greater than an adjustment threshold, updating the corpus to which the target standard question belongs according to the undetermined initial corpus; In response to the semantic similarity between the pending standard question in the pending initial corpus and any standard question in the corpus being less than or equal to the adjustment threshold, it is determined that the pending standard question meets the conditions for being added to the corpus, the pending initial corpus is used as the initial corpus, and the operation of determining the corresponding similar question according to the standard question through the first model is performed.
7. The method according to any one of claims 1 to 6, after generating a corpus based on the initial corpus and the similar questions corresponding to the standard questions in the initial corpus, the method further comprises: arbitrarily selecting a first corpus and a second corpus from the corpus; Determining text similarity between similar questions in the first corpus and similar questions in the second corpus; In response to the text similarity between the similar questions in the first corpus and the similar questions in the second corpus satisfying a similar question confusion condition, it is determined that the first corpus and the second corpus have confusion problems, and the first corpus and the second corpus are removed from the corpus.
8. The method according to any one of claims 1 to 7, after generating a corpus based on the initial corpus and the similar questions corresponding to the standard questions in the initial corpus, the method further comprises: Based on the solvability of the corpus in the question-answering interaction scenario, the corpus in the corpus is divided into a solvable corpus set and an unsolvable corpus set, wherein the solvable corpus set includes a first standard question, and the unsolvable corpus set includes a second standard question; Determining text similarity between the first standard question and the second standard question; In response to the text similarity between the first standard question and the second standard question satisfying a standard question confusion condition, it is determined that the corpus to which the first standard question belongs has a confusion problem, and the corpus to which the first standard question belongs is removed from the corpus.
9. The method according to any one of claims 1 to 8, before training the second model by using the training samples, the method further comprises: Determining the number of similar questions included in the corpus; In response to the number of similar questions included in the corpus being less than a target number required for training, the target number of similar questions is determined by the first model based on standard questions in the corpus.
10. The method according to any one of claims 1 to 9, further comprising: Determining quality parameters of similar questions in the corpus according to text similarities of similar questions in the corpus; The corpus and the quality parameters are displayed on the corpus management interface.
11. A data processing device, comprising an acquisition unit, a determination unit, a generation unit and a training unit: The acquisition unit is used to acquire raw data related to the question-answering task; The determining unit is used to determine the corresponding initial corpus according to the original data through the first model, wherein the initial corpus includes a standard question and an answer corresponding to the standard question; The determining unit is further configured to determine corresponding similar questions according to the standard question through the first model, wherein the text similarity between the similar questions having a corresponding relationship and the standard question meets a similarity condition; The generating unit is used to generate a similarity between the initial corpus and the standard question in the initial corpus. A corpus is generated from the question, wherein the corpus includes standard questions, answers corresponding to the standard questions, and similar questions, and the corpus in the corpus is used as training samples to train a second model for performing the target question-answering task, wherein: The scale of the second model is smaller than that of the first model, the standard question or the similar question in the training sample is used as an input of the second model, and the answer corresponding to the standard question in the training sample is used as a sample label; The training unit is used to train the second model through the training samples, and the trained second model is used to generate corresponding reply answers for the user questions obtained in the question-answering task.
12. A computer device, comprising a processor and a memory: The memory is used to store a computer program and transmit the computer program to the processor; The processor is configured to execute the method according to any one of claims 1 to 10 according to the computer program.
13. A computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, wherein the computer program, when executed by a computer device, implements the method according to any one of claims 1 to 10.
14. A computer program product comprising a computer program, which, when executed on a computer device, causes the computer device to execute the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Natural language processing model training method, task execution method, equipment and system
CN111079406A
Knowledge graph question-answering system based on semantic space sharing
CN111897944A
Question and answer robot training method, question and answer method and device
CN116150306A
Data processing method and related device
CN117332062A
Intelligent question answering method, apparatus, and device, and computer-readable storage medium
US20220198154A1
Cited By
Intelligent assistant question answering method and device based on large language model, equipment and medium
CN120705270A
Method, system and equipment for detecting interview auxiliary answering based on comparison of multiple models
CN121301971A
