Model training method, information processing method, device, equipment and storage medium

By using seed training data to generate matching generated data, and selecting data whose prediction intention is consistent with the generation intention for model training, the problem of difficult data collection in traditional methods is solved, and the training efficiency and accuracy of the dialogue understanding model are improved.

CN114398908BActive Publication Date: 2025-01-24ALIBABA (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When traditional methods train dialogue understanding models, it is difficult to search for data from the same field from the web crawler data, resulting in low training efficiency and accuracy.

Method used

By using multiple seed training data training dialogue and understanding models, and generate generating data that matches the seed training data, select the generating data that matches the generating intention and generate intention for pseudo -data training.

Benefits of technology

It improves the training efficiency and accuracy of the dialogue understanding model, solves the problem of difficult data collection, generates a large amount of weakly supervised data, and ensures data quality through filtering of predicted intentions and generated intentions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114398908B_ABST
    Figure CN114398908B_ABST
Patent Text Reader

Abstract

The present application provides a model training method, information processing method, device, equipment and storage medium, wherein the method comprises: training a dialogue understanding model according to a plurality of seed training data, and generating generated data matching the seed training data according to various sub-training data in at least part of the seed training data; selecting generated data whose predicted intent matches the generated intent from the generated data; wherein the generated intent of the generated data is the intent of the corresponding seed training data, and the predicted intent is the intent predicted by the dialogue understanding model for the generated data; and performing pseudo data training on the dialogue understanding model according to the selected generated data. The present application solves the problem that it is difficult for traditional methods to collect data from web crawler data using a retrieval method, and improves the overall training efficiency and accuracy of the dialogue understanding model.
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 model training method, information processing method, device, equipment and storage medium. Background Art

[0002] The dialogue understanding model can analyze the information input by the user, determine the user's intention, and push corresponding reply information to the user based on the intention. It plays a very important role in the field of natural language processing.

[0003] In order to train the dialogue understanding model, a large amount of training data is required. The traditional method is to train the model by retrieving data in the same field as the training data. However, there is little human-computer dialogue data that can be retrieved on the Internet, so it is difficult to search for data in the same field from web crawler data, resulting in low overall training efficiency and accuracy of the dialogue understanding model. Summary of the invention

[0004] The main purpose of the embodiments of the present application is to provide a model training method, information processing method, device, equipment and storage medium to quickly and accurately generate data for training a dialogue understanding model, thereby improving the efficiency and accuracy of training a dialogue understanding model.

[0005] In a first aspect, an embodiment of the present application provides a model training method, comprising:

[0006] Training a dialogue understanding model based on the plurality of seed training data, and generating generated data matching the seed training data based on various sub-training data in at least a portion of the seed training data;

[0007] Selecting generated data whose predicted intent matches the generated intent from the obtained generated data; wherein the generated intent of the generated data is the intent of the corresponding seed training data, and the predicted intent is the intent predicted by the dialogue understanding model on the generated data;

[0008] The dialogue understanding model is trained with pseudo data according to the selected generated data.

[0009] Optionally, generating generated data matching the seed training data according to various sub-training data in at least part of the seed training data includes:

[0010] Dividing the at least part of the seed training data into at least one group of seed training data, wherein each group includes at least one seed training data and various sub-training data correspond to the same intent;

[0011] According to each set of seed training data, generated data matching the set of seed training data is generated, and the number of the generated data is one or more.

[0012] Optionally, generating generated data that matches the set of seed training data includes:

[0013] Splice the seed training data in the group;

[0014] According to the concatenated data, prompt generation is performed based on the pre-trained language model to obtain corresponding generated data.

[0015] Optionally, generated data whose predicted intent matches the generated intent is selected from the obtained generated data, including:

[0016] From the generated data, select the data that matches the semantics of any seed training data and whose predicted intent matches the generated intent. Figure 1 The generated data is consistent.

[0017] Optionally, from the generated data, select the data that matches the semantics of any seed training data and whose predicted intent matches the generated intent. Figure 1 Consistently generated data, including:

[0018] For each seed training data, determining the semantic matching degree between each generated data and the seed training data, and selecting a preset number of generated data with the highest semantic matching degree and / or generated data with a semantic matching degree greater than a threshold, to obtain adjacent generated data;

[0019] Predicting adjacent generated data using the dialogue understanding model to obtain predicted intent of the adjacent generated data;

[0020] From adjacent generated data, select the generated intent and predicted intent Figure 1 The generated data is consistent.

[0021] Optionally, predicting the adjacent generated data by the dialogue understanding model to obtain the predicted intent of the adjacent generated data includes: predicting the adjacent generated data by the dialogue understanding model to obtain a pseudo label of the adjacent generated data, wherein the pseudo label includes a predicted intent and a predicted slot value;

[0022] According to the selected generated data, pseudo data training is performed on the dialogue understanding model, including: according to the selected generated data and the corresponding pseudo labels, the seed training data and the corresponding labels, continuing to train the dialogue understanding model.

[0023] In a second aspect, an embodiment of the present application provides an information processing method, including:

[0024] Obtaining request information input by the user, and determining the intent corresponding to the request information through a dialogue understanding model;

[0025] Outputting reply information according to the intention;

[0026] The dialogue understanding model is trained according to the method described in any one of the first aspects.

[0027] In a third aspect, an embodiment of the present application provides a model training device, comprising:

[0028] A generation module, configured to train a dialogue understanding model based on a plurality of seed training data, and generate generated data matching the seed training data based on various sub-training data in at least a portion of the seed training data;

[0029] A matching module, used to select generated data whose predicted intent matches the generated intent from the obtained generated data; wherein the generated intent of the generated data is the intent of the corresponding seed training data, and the predicted intent is the intent predicted by the dialogue understanding model on the generated data;

[0030] A training module is used to perform pseudo data training on the dialogue understanding model according to the selected generated data.

[0031] In a fourth aspect, an embodiment of the present application provides an information processing device, including:

[0032] An acquisition module is used to acquire the request information input by the user and determine the intent corresponding to the request information through a dialogue understanding model;

[0033] An output module, used for outputting reply information according to the intention;

[0034] The dialogue understanding model is trained according to the device described in the third aspect.

[0035] In a fifth aspect, an embodiment of the present application provides an electronic device, including:

[0036] at least one processor; and

[0037] a memory communicatively coupled to the at least one processor;

[0038] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the electronic device to execute the method described in any one of the above aspects.

[0039] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method described in any one of the above aspects is implemented.

[0040] In a seventh aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements the method described in any of the above aspects when executed by a processor.

[0041] The model training method, information processing method, apparatus, device and storage medium provided in the present application can train a dialogue understanding model based on multiple seed training data, and generate generated data matching the seed training data based on various sub-training data in at least part of the seed training data, and select generated data whose predicted intent matches the generated intent from the obtained generated data, wherein the generated intent of the generated data is the intent of the corresponding seed training data, and the predicted intent is the intent obtained by predicting the generated data by the dialogue understanding model, and the dialogue understanding model is trained with pseudo data based on the selected generated data. In this way, a large amount of weakly supervised data can be generated first through the seed training data, which solves the problem that it is difficult for traditional methods to collect data from web crawler data using a retrieval method, and then the generated data is filtered by the predicted intent and the generated intent, so that the generated data with a higher credibility of the predicted label can be quickly and accurately found for model training, thereby improving the overall training efficiency and accuracy of the dialogue understanding model. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0043] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;

[0044] Figure 2 A schematic diagram of an application of a dialogue understanding model provided in an embodiment of the present application;

[0045] Figure 3 A flowchart of a model training method provided in an embodiment of the present application;

[0046] Figure 4 A schematic diagram for comparing a predicted intent and a generated intent provided in an embodiment of the present application;

[0047] Figure 5 A schematic diagram of obtaining generated data provided in an embodiment of the present application;

[0048] Figure 6 A schematic diagram of a process for screening generated data provided in an embodiment of the present application;

[0049] Figure 7 A flowchart of another model training method provided in an embodiment of the present application;

[0050] Figure 8 A flowchart of an information processing method provided in an embodiment of the present application;

[0051] Fig. 9 A schematic diagram of the structure of a model training device provided in an embodiment of the present application;

[0052] Fig.10 A schematic diagram of the structure of an information processing device provided in an embodiment of the present application;

[0053] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0054] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0055] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.

[0056] First, the terms involved in this application are explained:

[0057] Prompt generation technology: prompt-based generation, given a data, generates data that matches the data. For example, given a text, generates other texts similar to the text.

[0058] Dialogue understanding: natural language understanding, which is the ability to determine the corresponding intention based on the previous context of the dialogue, and this intention can be used to determine the following of the dialogue.

[0059] Weak supervision: weakly supervised. Common types include incomplete supervision, inexact supervision, inaccurate supervision, etc.

[0060] Self-training: self-training, using a small amount of labeled data and a large amount of unlabeled data to jointly train the model.

[0061] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1As shown, the server can train the dialogue understanding model according to the training data, and send the trained dialogue understanding model to the terminal device. The terminal device can interact with the user based on the model. For example, when the user enters request information, the terminal device can determine the reply information corresponding to the request information through the model and push it to the user.

[0062] In addition, the model training and use process can be adjusted according to actual needs. For example, the model can be trained by the terminal device and the trained model can be used. Alternatively, the model can be trained and used by the server. When in use, the terminal device can upload the user's request information to the server, and obtain the reply information returned by the server and push it to the user.

[0063] Optionally, the dialogue understanding model in the embodiment of the present application may refer to a model used to determine the intent of an input request. Figure 2 This is a schematic diagram of an application of a dialogue understanding model provided in an embodiment of the present application. Figure 2 As shown, the request information input by the user is "What's the weather like in Beijing tomorrow?". Through the dialogue understanding model, it can be determined that the corresponding intention is "Get the weather". In this way, by understanding the intention of the request information, the reply information can be determined according to the corresponding intention. For example, the reply information can be "Beijing will be cloudy and turn to light rain tomorrow, please remember to bring an umbrella."

[0064] Optionally, in addition to being used to determine intent, the dialogue understanding model can also be used to determine slot values. A slot value may be at least one parameter value corresponding to an intent. For example, in the above example, the corresponding slot values ​​may include: location = "Beijing", time = "tomorrow". According to the intent "get weather" and the slot values ​​"Beijing" and "tomorrow", the reply information can be determined more accurately.

[0065] In the embodiments of the present application, the dialogue understanding model can be applied to any product that needs to recognize user intentions, for example, it can be applied to navigation apps, video apps, smart speakers, etc. It can support users to request information through text input, and it can also support users to use voice assistants. Users can request information through voice input, and the device will convert voice into text and determine the corresponding reply information.

[0066] In order to train the dialogue understanding models used in different products, it is often necessary to obtain a large amount of training data in the corresponding fields. For example, the dialogue understanding models involved in navigation apps require a large amount of navigation-related human-computer dialogue data, and the dialogue understanding models involved in video apps require a large amount of video-related human-computer dialogue data. Traditional methods generally obtain data by retrieving web crawler data, which is inefficient. In addition, there is not enough human-computer dialogue data on the Internet, so there is still a problem of insufficient data when training the model, resulting in poor model accuracy.

[0067] In view of this, the embodiment of the present application provides a model training method, which first obtains an original dialogue understanding model through training of multiple seed training data, and obtains generated data matching the seed training data through prompt generation technology. Since there are multiple seed training data, at least one corresponding generated data can be generated according to at least one seed training data each time. Multiple generated data can be obtained through multiple prompt generation, and then the generated data are tested for consistency to screen out generated intent and predicted intent. Figure 1 The original dialogue understanding model can be further trained based on the filtered generated data to obtain a new dialogue understanding model.

[0068] Among them, the generated intent corresponding to each generated data may refer to the intent of the seed training data corresponding to the generated data, and the predicted intent may refer to the intent predicted by the original dialogue understanding model for the generated data.

[0069] In this way, a large amount of weakly supervised human-computer dialogue data can be generated through the prompt generation technology, which solves the problem that it is difficult for traditional methods to collect human-computer dialogue data in the same field from web crawler data using retrieval methods. The generated data is then filtered by predicted intent and generated intent. If the generated intent of the generated data is inconsistent with the predicted intent, it means that the quality of the generated data is poor, and its predicted intent has poor credibility as a pseudo-label. Therefore, it is discarded and only the generated intent and predicted intent are retained. Figure 1 Consistent generated data can be quickly and accurately found to have high data quality and high prediction label credibility for model training, thus improving the overall training efficiency and accuracy of the dialogue understanding model.

[0070] Some embodiments of the present application are described in detail below in conjunction with the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and the features in the embodiments can be combined with each other. In addition, the step sequence in the following method embodiments is only an example and not a strict limitation.

[0071] Figure 3 The flowchart of a model training method provided in the embodiment of the present application is shown in FIG. The execution subject of the method in the present embodiment can be applied to any device with data processing function, such as a terminal device and / or a server. Figure 3 As shown, the method may include:

[0072] Step 301: train a dialogue understanding model based on multiple seed training data, and generate generated data matching the seed training data based on various sub-training data in at least part of the seed training data.

[0073] Optionally, a seed training data set can be obtained. The seed training data set may include multiple seed training data. The seed training data may be natural language text information, specifically, a query (request information) in human-computer dialogue data. The seed training data may correspond to a label, and the label may include an intent. The label may be obtained through manual labeling or other methods.

[0074] The initial dialogue understanding model can be trained through multiple seed training data and corresponding labels in the seed training data set, and the obtained dialogue understanding model can be recorded as the original dialogue understanding model.

[0075] In addition, the corresponding generated data can be obtained according to the seed training data through the prompt generation technology. The prompt generation technology can be used to generate generated data that matches the seed training data, for example, generated data similar to the seed training data.

[0076] Part or all of the seed training data can be selected from the seed training data set for prompt generation. When generating prompts, one seed training data can be used as input to obtain corresponding generated data, or multiple seed training data can be used as input to obtain corresponding generated data. Prompt generation can be performed once or multiple times to obtain enough generated data.

[0077] It should be noted that, in this step, training the dialogue understanding model and obtaining the generated data can be performed simultaneously or successively, and this embodiment does not limit the execution order of the two.

[0078] Step 302: Select generated data whose predicted intent matches the generated intent from the obtained generated data.

[0079] Among them, the generation intention of the generated data is the intention of the corresponding seed training data, and the predicted intention is the intention obtained by predicting the generated data through the dialogue understanding model.

[0080] Optionally, for each generated data, the generated data may be input into the original dialogue understanding model trained in step 301 to obtain the intent corresponding to the generated data.

[0081] In one example, the predicted intent matches the generated intent. Figure 1 For any seed training data, assuming its intention is A, the generated data corresponding to the seed training data can be obtained through the prompt generation technology, and the predicted intention of the generated data can be predicted to determine whether it is consistent with A. If not, the generated data is discarded.

[0082] Figure 4A schematic diagram for comparing predicted intent and generated intent provided in an embodiment of the present application. Figure 4 As shown in the figure, there are three seed training data, and their intentions are A, B, and C respectively. According to the three seed training data, the corresponding generated data are obtained respectively. Then, through the dialogue understanding model, the intention of each generated data is obtained, assuming to be A, B, and D. By comparing the generated intention and the predicted intention, it can be seen that the first two generated data meet the requirements, while the third generated data does not meet the requirements and needs to be eliminated.

[0083] In another example, the predicted intent matches the generated intent. Figure 1 To or close to.

[0084] Step 303: Perform pseudo-data training on the dialogue understanding model according to the selected generated data.

[0085] After the generated data whose predicted intent matches the generated intent is screened out, the original dialogue understanding model trained in step 301 can be further trained based on the screened generated data. The labels corresponding to the generated data are not determined by manual labeling, but are generated by prediction of the original dialogue understanding model, so they can be considered as pseudo data, and the training of the model based on the generated data can be considered as pseudo data training.

[0086] Optionally, seed training data may be added during training, that is, this step may specifically include: training the dialogue understanding model according to the selected generated data and seed training data.

[0087] In practical applications, steps 301 to 303 may be repeated multiple times. Each time step 301 or step 303 is repeated, the latest dialogue understanding model obtained by the current training may be trained. The seed training data set used in each training may be the same or different. For example, in different iterations, other seed training data with labels may be added, or generated data with pseudo labels may be added to the seed training data set for further training.

[0088] By repeatedly executing the above steps, the dialogue understanding model can be self-trained. The resulting dialogue understanding model can be deployed on a server or terminal device for use when interacting with users.

[0089] In summary, the model training method provided in this embodiment can train a dialogue understanding model based on multiple seed training data, and generate generated data matching the seed training data based on various sub-training data in at least part of the seed training data, and select generated data whose predicted intent matches the generated intent from the obtained generated data, wherein the generated intent of the generated data is the intent of the corresponding seed training data, and the predicted intent is the intent obtained by predicting the generated data through the dialogue understanding model, and the dialogue understanding model is trained with pseudo data based on the selected generated data. In this way, a large amount of weakly supervised data can be generated through the seed training data first, which solves the problem that it is difficult for traditional methods to collect data from web crawler data using a retrieval method, and then the generated data is filtered by the predicted intent and the generated intent, so that the generated data with a higher credibility of the predicted label can be quickly and accurately found for model training, thereby improving the overall training efficiency and accuracy of the dialogue understanding model.

[0090] In one or more embodiments of the present application, optionally, generating generated data matching the seed training data according to various sub-training data in at least part of the seed training data may include:

[0091] Divide at least part of the seed training data into at least one group of seed training data, wherein each group includes at least one seed training data and various sub-training data correspond to the same intent; and generate generated data matching the group of seed training data according to each group of seed training data, wherein the number of the generated data is one or more.

[0092] Optionally, seed training data with the same intent may be screened out from a plurality of seed training data, and a number of seed training data with the same intent may be randomly selected as a group for prompt generation.

[0093] For example, there may be multiple seed training data with the intent of "getting weather", from which some or all of the seed data may be selected as a group, and the corresponding generated data of the group may be obtained. For seed training data with other intents, the corresponding generated data may also be obtained in groups.

[0094] Optionally, a set of generated data may be generated correspondingly based on a set of seed training data with the same intent. A set of generated data may include one or more generated data. Each generated data is similar to a seed training data and may be a sentence.

[0095] In summary, by extracting several seed training data with the same intent and using them together for prompt generation, generated data can be obtained based on more knowledge learned, thereby improving the quality of generated data and the model training effect of the dialogue understanding model.

[0096] Figure 5 A schematic diagram of obtaining generated data provided in an embodiment of the present application. Figure 5 As shown, generating generated data that matches the group of seed training data may include: splicing the seed training data in the group; and performing prompt generation based on the pre-trained language model according to the spliced ​​data to obtain corresponding generated data.

[0097] Optionally, during splicing, a separator can be set between adjacent seed training data. For example, the seed training data can be spliced ​​together with a vertical line, and the seed training data obtained after splicing is input into the pre-trained language model to obtain generated data of a preset length, wherein the preset length can be set according to actual needs. For example, it can be set to obtain generated data of 500 words.

[0098] Optionally, the generated data output by the pre-trained language model may be separated by a delimiter, and one or more generated data, i.e., one sentence or more sentences, may be obtained through the delimiter.

[0099] See also Figure 5 There are three seed training data, namely "What is the weather in Beijing today", "What is the weather in Yuhang, Hangzhou", and "What is the weather in Chongqing this weekend". The corresponding intentions are all "Get the weather". These three seed training data are spliced ​​into prefixes and input into the pre-trained language model to obtain the generated data of preset length, which is divided into "The weather is very good today", "What will be the highest temperature tomorrow", "What will be the weather in Wuhan tomorrow", "What is the weather in Yuncheng today", etc.

[0100] Optionally, the pre-trained language model can adopt existing models, such as GPT3, T5 and other models, and can use the continuation function of these models themselves. By inputting a set of data as the previous context, the model can output the following context similar to the previous context.

[0101] Alternatively, a pre-trained language model can be designed and trained separately as needed. For example, multiple sets of matching natural language text information can be manually annotated, and the model can be trained with the manually annotated data so that the trained model can output matching data based on the input data.

[0102] In summary, by splicing a set of seed training data and inputting them into models such as GPT3 for prompt generation, it is possible to quickly and accurately obtain generated data that matches the set of seed training data, thereby improving the efficiency and accuracy of the generated data.

[0103] In other optional implementations, a single seed training data may be used as input to obtain corresponding generated data.

[0104] In one or more embodiments of the present application, optionally, selecting generated data whose predicted intent matches the generated intent from the obtained generated data may include: selecting, from the obtained generated data, generated data whose semantics matches any seed training data and whose predicted intent matches the generated intent. Figure 1 The generated data is consistent.

[0105] Optionally, the generated data can be screened by semantic retrieval and consistency screening; wherein the semantic retrieval is used to screen out generated data that matches the semantics of various sub-training data; and the consistency screening is used to screen out generated data that matches the semantics of various sub-training data. Figure 1 The generated data is consistent.

[0106] There is no restriction on the order of semantic search and consistency screening. Part of the data can be screened out from the generated data through semantic search first, and then the screened data can be further screened for consistency. Alternatively, part of the data can be obtained through consistency screening first, and then further screened through semantic search. The generated data that has passed the semantic search and consistency screening can be used as training data for the next step of training.

[0107] In practical applications, if a generated data does not match the semantics of various sub-training data, it means that the generated data is semantically far from the current seed training data set, so it is discarded.

[0108] In summary, through semantic retrieval and consistency screening, the final generated data can meet the requirements in terms of intent and semantic description, thereby improving the quality of the generated training data and further improving the model training effect.

[0109] Figure 6 A schematic diagram of a process for screening generated data provided in an embodiment of the present application. Figure 6 As shown in the figure, from the generated data, select the semantics that matches any seed training data and the predicted intent is consistent with the generated intent. Figure 1 The generated data may include:

[0110] Step 601: for each seed training data, determine the semantic matching degree between each generated data and the seed training data, and select a preset number of generated data with the highest semantic matching degree and / or generated data with a semantic matching degree greater than a threshold to obtain adjacent generated data.

[0111] This step can be used to implement semantic retrieval. Optionally, the semantic matching degree between the seed training data and each generated data can be determined by a semantic retrieval model, wherein the semantic retrieval model can use a vector semantic model such as SimCSE (Simple Contrastive Learning of Sentence Embeddings), or a simple character matching model.

[0112] In one example, for each seed training data, the Top-N generated data can be semantically retrieved, for example, N=3, and then the three generated data with the highest matching degree with the seed training data can be selected as the generated data matching the seed training data.

[0113] In another example, for each seed training data, generated data with a semantic matching degree greater than a threshold can be found. For example, if the threshold is set to 0.8, generated data with a matching degree greater than 0.8 with the seed training data can be screened out as generated data matching the seed training data.

[0114] In yet another example, a preset number of generated data with the highest semantic matching degree and generated data with a semantic matching degree greater than a threshold value may be selected.

[0115] The generated data screened out through semantic retrieval is recorded as adjacent generated data, which represents a part of the generated data that is semantically closest to the seed training data set.

[0116] Step 602: predict adjacent generated data using the dialogue understanding model to obtain predicted intent of the adjacent generated data.

[0117] Optionally, the dialogue understanding model may be a dialogue understanding model trained by seed training data. Pseudo labels of adjacent generated data may be obtained by the dialogue understanding model, and the pseudo labels may include predicted intent.

[0118] Step 603: Select the generated intention and the predicted intention from the adjacent generated data. Figure 1 The generated data is consistent.

[0119] In practical applications, for multiple generated data obtained through prompt generation technology, semantic retrieval and consistency screening can be used to filter them layer by layer, first filtering out adjacent generated data that meet the semantic requirements, and then using the dialogue understanding model to predict the intent of the adjacent generated data, without having to input all the generated data through the prompt generation technology into the dialogue understanding model for intent prediction. After intent prediction, consistency screening can be performed to further filter out the generated intent and the predicted intent. Figure 1 The generated data is used for subsequent training.

[0120] In summary, by first performing semantic retrieval to obtain adjacent generated data, and then filtering out semantic Figure 1 The consistent generated data can effectively improve the efficiency of screening generated data and further improve the overall training efficiency of the model.

[0121] In one or more embodiments of the present application, optionally, the generated intent and the predicted intent are selected from the adjacent generated data. Figure 1 The consistent generated data may include: selecting generated data whose generation intent, prediction intent and semantic retrieval intent are consistent from adjacent generated data; wherein the semantic retrieval intent of the generated data is the intent of the seed training data that matches the semantics of the generated data.

[0122] Exemplarily, prompt generation is performed based on seed training data P to obtain corresponding generated data. During the semantic retrieval process, the seed training data with the highest semantic match with the generated data is Q. Then, it can be detected whether the intention of the seed training data P, the intention of the seed training data Q, and the predicted intention of the generated data are consistent. If they are consistent, they can be used for subsequent training.

[0123] In summary, the training effect of the model can be further improved by performing consistency screening on generation intent, prediction intent, and semantic retrieval intent.

[0124] In one or more embodiments of the present application, optionally, predicting the adjacent generated data by the dialogue understanding model to obtain the predicted intent of the adjacent generated data may include: predicting the adjacent generated data by the dialogue understanding model to obtain a pseudo label of the adjacent generated data, wherein the pseudo label includes a predicted intent and a predicted slot value. When training the dialogue understanding model based on the generated data, the predicted intent and the predicted slot value may be used to train the dialogue understanding model, so that the trained dialogue understanding model has not only the ability to predict intent, but also the ability to predict slot values.

[0125] Optionally, the performing pseudo-data training on the dialogue understanding model according to the selected generated data may include: continuing to train the dialogue understanding model according to the selected generated data and the corresponding pseudo-labels, the seed training data and the corresponding labels.

[0126] In practical applications, the selected generated data and the original seed training data can be merged, and the dialogue understanding model can be further trained based on the merged data.

[0127] In summary, by predicting intent and predicting slot values, we can train a more functional dialogue understanding model. By merging generated data with seed training data, we can train the dialogue understanding model based on more and more accurate samples, thereby improving the accuracy of the dialogue understanding model.

[0128] Figure 7 A flowchart of another model training method provided in an embodiment of the present application. This embodiment is based on the technical solution provided in the previous embodiment, and provides a specific implementation method for completing model training by sequentially performing initial training, prompt generation, semantic retrieval, and consistency screening. Figure 7 As shown, the method includes:

[0129] Step a: Use the seed training data to train the dialogue understanding model to obtain the original dialogue understanding model.

[0130] Optionally, there may be multiple seed training data. Each seed training data may be a sentence with a corresponding label. The label may include intent and further may include slot values, which may be obtained through manual annotation or other methods.

[0131] Step b: filter out seed training data with the same intent and randomly select some data from them.

[0132] Specifically, samples with the same intent can be screened out from the seed training data, and several samples with the same intent can be randomly selected from the seed training data. For example, three queries with the intent of "getting the weather" are extracted, namely: "What is the weather in Beijing today", "What is the weather in Yuhang, Hangzhou", and "What is the weather in Chongqing this weekend".

[0133] Step c: Use the same intention data as a prefix to generate prompts and obtain generated data.

[0134] Optionally, you can concatenate the extracted queries of the same intent into prefixes and use a large-scale pre-trained model, such as the GPT3 model, to generate prompts. Repeat steps b and c several times until you get enough generated data. Optionally, you can select seed training data of different intents each time to get generated data corresponding to seed training data of more intents.

[0135] Step d: For each seed training data, semantic retrieval is performed in the generated data to obtain adjacent generated data.

[0136] Optionally, multiple seed training data may be traversed, and for each seed training data, Top-N generated data may be semantically retrieved from the generated data.

[0137] Exemplarily, three adjacent generated data are retrieved: "What will be the highest temperature tomorrow", "What will be the weather in Wuhan tomorrow", and "What is the weather like in Yuncheng today".

[0138] Step e: Use the original dialogue understanding model to perform pseudo-label prediction to obtain predicted intent, and filter out predicted intent and generated intent. Figure 1 The generated data is consistent.

[0139] Optionally, for each data in the adjacent generated data, the original dialogue understanding model can be used to perform pseudo-label prediction to obtain the predicted intent and predicted slot value, and then filter out the predicted intent and generated intent. Figure 1 The data.

[0140] For example, generated data 4 will be deleted because the predicted intention is "obtain temperature", which is inconsistent with the generated intention "obtain weather". In the figure, the deleted line added to generated data 4 indicates that the data will be eliminated.

[0141] Step f: merge the filtered generated data and the original seed training data, continue training, and obtain a new dialogue understanding model.

[0142] Specifically, the filtered generated data and the original seed training data can be used to train the original dialogue understanding model to obtain a new dialogue understanding model.

[0143] Through the above steps a to f, the self-training of the dialogue understanding model can be achieved. Optionally, steps a to f can be repeated to continuously add new generated data and train the model to improve the prediction effect of the model.

[0144] In summary, by using prompt generation technology to generate weakly supervised human-computer dialogue data, we can solve the problem that traditional methods are difficult to collect human-computer dialogue data in the same field from web crawler data using retrieval methods. Then, we use semantic retrieval methods to screen out the Top-N data closest to the existing training data and perform consistency screening. Finally, we use the screened data for self-training, thereby achieving the purpose of improving the accuracy of the dialogue understanding model.

[0145] In one or more embodiments of the present application, optionally, when generating prompts, at least part of the seed training data can be divided into at least one group of seed training data according to the intent and slot value, and each group includes seed training data corresponding to the same intent and slot value, and based on each group of seed training data, generated data matching the group of seed training data is generated.

[0146] Correspondingly, selecting generated data whose predicted intent matches the generated intent from the obtained generated data may include: selecting generated data whose predicted intent matches the generated intent and whose predicted slot value matches the generated slot value from the obtained generated data; wherein the predicted slot value is the slot value obtained by predicting the generated data through the dialogue understanding model, and the generated slot value is the slot value of the seed training data corresponding to the generated data.

[0147] For example, the seed training data with the intent of "get weather" and slot values ​​including "Beijing" and "tomorrow" can be taken as a group, and the generated data corresponding to the group can be obtained through the prompt generation technology. During consistency screening, the predicted intent and predicted slot value of the generated data can be obtained through the trained dialogue understanding model, and the generated data with the predicted intent not being "get weather" or the predicted slot value not including "Beijing" and "tomorrow" can be discarded.

[0148] In summary, prompt generation through intent and slot values ​​can make the seed training data used for prompt generation more concentrated, and the generated data obtained has a higher match with the seed training data. Consistency screening through intent and slot values ​​can obtain higher-quality generated data, further improving the model training effect.

[0149] Figure 8 The flowchart of an information processing method provided in an embodiment of the present application is shown in FIG. The information processing method can be applied to any device with information processing capabilities, such as a terminal device and / or a server. Figure 8 As shown, the method may include:

[0150] Step 801: Obtain request information input by the user, and determine the intent corresponding to the request information through a dialogue understanding model.

[0151] Wherein, the dialogue understanding model is trained according to the model training method described in any embodiment of the present application.

[0152] In practical applications, the seed training data and generated data used to train the model can both be natural language text information, and the trained model can be used to predict the corresponding intent based on the natural language text information.

[0153] When in use, the request information obtained may be any type of information, such as text information, voice information, image information, etc. For example, according to the voice information or image information input by the user, the voice information or image information may be converted to obtain corresponding text information, and then the corresponding intention may be determined through the dialogue understanding model.

[0154] Step 802: Output reply information according to the intention.

[0155] Optionally, after the intention is determined, the reply information may be determined according to the intention. The specific implementation method of determining the reply information according to the intention is not limited in the embodiment of the present application.

[0156] For example, if the intention is to "play jokes", jokes can be obtained from a joke library and pushed to the user.

[0157] Optionally, the output of the dialogue understanding model may include not only the intent but also the slot value, and the reply information may be determined based on the intent and the slot value.

[0158] For example, the intent corresponding to the request information is "get weather", and the slot value is time = "tomorrow", location = "Beijing", then the weather in Beijing tomorrow can be queried and pushed to the user.

[0159] Optionally, there may be at least one way to output the reply information, including but not limited to: display, voice playback, sending to other devices, etc.

[0160] In actual applications, the terminal device can be deployed with a trained dialogue understanding model, directly process the request information input by the user according to the model, and output the reply information. Alternatively, the trained dialogue understanding model can be deployed on the server. After the terminal device obtains the request information input by the user, it can send the request information to the server, and the server will get the corresponding intent based on the model and feed it back to the terminal device. Alternatively, the server will feed back the reply information determined according to the intent to the terminal device, and the terminal device will push it to the user.

[0161] In summary, the information processing method provided in this embodiment can use the dialogue understanding model trained based on the prompt generation technology to perform information processing. A large amount of weakly supervised human-computer dialogue data can be generated through the prompt generation technology, which solves the problem that it is difficult for traditional methods to collect human-computer dialogue data in the same field from web crawler data using a retrieval method. Combined with the consistency screening of predicted intent and generated intent, it is possible to quickly and accurately find generated data with high data quality and high prediction label credibility for model training, thereby improving the accuracy of the dialogue understanding model, thereby improving the accuracy of the output reply information and improving the user experience.

[0162] In the embodiments of the present application, there is no limitation on the devices for training and using the model. The training and use process may involve one or more devices. For example, in the model training process, some steps may be performed by the terminal device and other steps may be performed by the server.

[0163] Corresponding to the above-mentioned model training method, an embodiment of the present application also provides a model training device. Fig. 9 This is a schematic diagram of the structure of a model training device provided in an embodiment of the present application. Fig. 9 As shown, the device comprises:

[0164] A generation module 901 is used to train a dialogue understanding model based on a plurality of seed training data, and to generate generated data matching the seed training data based on various sub-training data in at least a portion of the seed training data;

[0165] A matching module 902 is used to select generated data whose predicted intent matches the generated intent from the obtained generated data; wherein the generated intent of the generated data is the intent of the corresponding seed training data, and the predicted intent is the intent predicted by the dialogue understanding model for the generated data;

[0166] The training module 903 is used to perform pseudo data training on the dialogue understanding model according to the selected generated data.

[0167] In one or more embodiments of the present application, optionally, when generating the generated data matching the seed training data according to various sub-training data in at least part of the seed training data, the generating module 901 is specifically configured to:

[0168] Dividing the at least part of the seed training data into at least one group of seed training data, wherein each group includes at least one seed training data and various sub-training data correspond to the same intent;

[0169] According to each set of seed training data, generated data matching the set of seed training data is generated, and the number of the generated data is one or more.

[0170] In one or more embodiments of the present application, optionally, when generating the generated data matching the set of seed training data, the generating module 901 is specifically configured to:

[0171] Splice the seed training data in the group;

[0172] According to the concatenated data, prompt generation is performed based on the pre-trained language model to obtain corresponding generated data.

[0173] In one or more embodiments of the present application, optionally, the matching module 902 is specifically configured to:

[0174] From the generated data, select the data that matches the semantics of any seed training data and whose predicted intent matches the generated intent. Figure 1 The generated data is consistent.

[0175] In one or more embodiments of the present application, optionally, the matching module 902 is specifically configured to:

[0176] For each seed training data, determining the semantic matching degree between each generated data and the seed training data, and selecting a preset number of generated data with the highest semantic matching degree and / or generated data with a semantic matching degree greater than a threshold, to obtain adjacent generated data;

[0177] Predicting adjacent generated data using the dialogue understanding model to obtain predicted intent of the adjacent generated data;

[0178] From adjacent generated data, select the generated intent and predicted intent Figure 1 The generated data is consistent.

[0179] In one or more embodiments of the present application, optionally, when the matching module 902 predicts the adjacent generated data through the dialogue understanding model to obtain the predicted intention of the adjacent generated data, it is specifically used to: predict the adjacent generated data through the dialogue understanding model to obtain a pseudo label of the adjacent generated data, wherein the pseudo label includes a predicted intention and a predicted slot value.

[0180] The training module 903 is specifically used to continue training the dialogue understanding model according to the selected generated data and the corresponding pseudo labels, the seed training data and the corresponding labels.

[0181] The model training device provided in the embodiment of the present application can be used to perform the above Figures 1 to 7 The technical solution of the illustrated embodiment has similar implementation principles and technical effects, and will not be described in detail in this embodiment.

[0182] Corresponding to the above information processing method, an embodiment of the present application also provides an information processing device. Fig.10 This is a schematic diagram of the structure of an information processing device provided in an embodiment of the present application. Fig.10 As shown, the device comprises:

[0183] The acquisition module 1001 is used to acquire the request information input by the user and determine the intention corresponding to the request information through the dialogue understanding model;

[0184] Output module 1002, used to output reply information according to the intention;

[0185] The dialogue understanding model is trained by the model training device described in any of the above embodiments.

[0186] The information processing device provided in the embodiment of the present application can be used to perform the above Figure 8 The technical solution of the illustrated embodiment has similar implementation principles and technical effects, and will not be described in detail in this embodiment.

[0187] Fig.11This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.11 As shown, the electronic device of this embodiment may include:

[0188] at least one processor 1101; and

[0189] A memory 1102 communicatively connected to the at least one processor;

[0190] The memory 1102 stores instructions that can be executed by the at least one processor 1101, and the instructions are executed by the at least one processor 1101 to enable the electronic device to execute the method described in any of the above embodiments.

[0191] Optionally, the memory 1102 may be independent or integrated with the processor 1101 .

[0192] The implementation principle and technical effects of the electronic device provided in this embodiment can be found in the aforementioned embodiments and will not be described in detail here.

[0193] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method described in any of the above embodiments is implemented.

[0194] An embodiment of the present application further provides a computer program product, including a computer program, which implements the method described in any of the above embodiments when executed by a processor.

[0195] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.

[0196] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present application.

[0197] It should be understood that the above-mentioned processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and can also be a USB flash drive, a mobile hard disk, a read-only memory, a disk or an optical disk, etc.

[0198] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0199] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device or a main control device.

[0200] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0201] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0202] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an 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 is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0203] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A model training method, characterized in that: include: Training a dialogue understanding model according to the plurality of seed training data, and dividing at least part of the seed training data into at least one group of seed training data, wherein each group includes at least one seed training data and various sub-training data correspond to the same intent; According to each set of seed training data, generating generated data matching the set of seed training data, wherein the number of the generated data is one or more; Selecting generated data whose predicted intent matches the generated intent from the obtained generated data; wherein the generated intent of the generated data is the intent of the corresponding seed training data, and the predicted intent is the intent predicted by the dialogue understanding model on the generated data; The dialogue understanding model is trained with pseudo data according to the selected generated data.

2. The method according to claim 1, characterized in that Generate generated data that matches the set of seed training data, including: Splice the seed training data in the group; According to the concatenated data, prompt generation is performed based on the pre-trained language model to obtain corresponding generated data.

3. The method according to claim 1 or 2, characterized in that: Select generated data whose predicted intent matches the generated intent from the generated data, including: From the generated data obtained, select the generated data that matches the semantics of any seed training data and whose predicted intent is consistent with the generated intent.

4. The method according to claim 3, characterized in that From the generated data obtained, select the generated data that matches the semantics of any seed training data and whose predicted intent is consistent with the generated intent, including: For each seed training data, determining the semantic matching degree between each generated data and the seed training data, and selecting a preset number of generated data with the highest semantic matching degree and / or generated data with a semantic matching degree greater than a threshold, to obtain adjacent generated data; Predicting adjacent generated data using the dialogue understanding model to obtain predicted intent of the adjacent generated data; From the adjacent generated data, the generated data whose generated intent is consistent with the predicted intent is selected.

5. The method according to claim 4, characterized in that Predicting the adjacent generated data by the dialogue understanding model to obtain the predicted intent of the adjacent generated data includes: predicting the adjacent generated data by the dialogue understanding model to obtain a pseudo label of the adjacent generated data, wherein the pseudo label includes a predicted intent and a predicted slot value; According to the selected generated data, pseudo data training is performed on the dialogue understanding model, including: according to the selected generated data and the corresponding pseudo labels, the seed training data and the corresponding labels, continuing to train the dialogue understanding model.

6. An information processing method, characterized in that: include: Obtaining request information input by the user, and determining the intent corresponding to the request information through a dialogue understanding model; Outputting reply information according to the intention; The dialogue understanding model is trained according to the method described in any one of claims 1 to 5.

7. A model training device, characterized in that: include: A generation module, configured to train a dialogue understanding model according to a plurality of seed training data, and divide at least a portion of the seed training data into at least one group of seed training data, wherein each group includes at least one seed training data and various sub-training data correspond to the same intent; According to each set of seed training data, generating generated data matching the set of seed training data, wherein the number of the generated data is one or more; A matching module, used to select generated data whose predicted intent matches the generated intent from the obtained generated data; wherein the generated intent of the generated data is the intent of the corresponding seed training data, and the predicted intent is the intent predicted by the dialogue understanding model on the generated data; A training module is used to perform pseudo data training on the dialogue understanding model according to the selected generated data.

8. An information processing device, characterized in that: include: An acquisition module is used to acquire the request information input by the user and determine the intent corresponding to the request information through a dialogue understanding model; An output module, used for outputting reply information according to the intention; The dialogue understanding model is trained according to the device according to claim 7.

9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the electronic device to perform the method described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the method according to any one of claims 1 to 6 is implemented.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Dialogue understanding model training method and device, equipment and storage medium

    CN112507099A

  • Information retrieval using natural language dialogue

    IN201917051891A