Model training method and device, electronic equipment and storage medium
By using adversarial training of generative adversarial networks, the generator generates nuisance phone call text under the guidance of category labels, solving the problem of semantic destruction during data augmentation and achieving model training with high accuracy and high generalization ability.
Patent Information
- Application Number
- CN202310142363.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-17
- Publication Date
- 2026-03-31
- Estimated Expiration
- 2043-02-17
AI Technical Summary
When performing data augmentation with limited sample data, existing technologies are prone to disrupting the original text structure, resulting in the generation of negative samples and affecting the model's recognition accuracy.
Generative adversarial networks are used. Through adversarial training between the generator and the discriminator, the generator learns the semantic information of harassing phone call texts and adds category labels during the generation process to generate expanded text of the specified category.
The generated augmented text is semantically consistent with the real text, avoiding the generation of negative samples and improving the model's recognition accuracy and generalization ability.
Smart Images

Figure CN116910529B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a model training method, apparatus, electronic device, and storage medium. Background Technology
[0002] Training a model with high recognition accuracy requires a large amount of labeled sample data. For limited sample data, one way to improve the model's recognition accuracy is to perform data augmentation operations on the sample data. Related techniques include back translation, synonym replacement, random insertion, random swapping, and random deletion to augment the sample data. However, these methods may disrupt the original text structure, leading to the generation of negative samples. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a model training method, apparatus, electronic device, and storage medium, aiming to achieve controllable generation of sample data.
[0004] The technical solution of this invention is implemented as follows:
[0005] On one hand, embodiments of the present invention provide a model training method, the method comprising:
[0006] The generator and discriminator in the generative adversarial network model are iteratively trained based on the training sample set; the training samples in the training sample set are set with defined category labels; the training samples of the generator are real text, and the training samples of the discriminator are the real text and the expanded text generated by the generator; the discrimination result of the discriminator includes: the category determination result of the expanded text, and the authenticity determination result of the expanded text;
[0007] Once the generative adversarial network model is determined to meet the training termination condition, the trained generative adversarial network model is obtained.
[0008] In the above scheme, before iteratively training the generator and discriminator in the generative adversarial network model based on the training sample set, the method further includes:
[0009] The discriminator is pre-trained based on a first loss function; the first loss function includes a true / false determination loss function and a classification determination loss function.
[0010] The generator is pre-trained based on the second loss function.
[0011] In the above scheme, the method further includes:
[0012] After each iteration of training of the generative adversarial network model, the text evaluation index BLEU value is calculated based on the augmented text generated by the generator.
[0013] The step of determining that the generative adversarial network model meets the training termination condition includes:
[0014] If the difference between the BLEU values corresponding to two consecutive rounds of iterative training is less than a set value, the generative adversarial network model is determined to meet the training termination condition.
[0015] In the above scheme, the iterative training of the generator and discriminator in the generative adversarial network model based on the training sample set includes:
[0016] During the training of the discriminator, the discriminator's discrimination results for the real text and the expanded text generated by the generator are obtained;
[0017] The third loss function of the discriminator is updated based on the discrimination result;
[0018] The discriminator is retrained based on the updated third loss function.
[0019] In the above scheme, the iterative training of the generator and discriminator in the generative adversarial network model based on the training sample set includes:
[0020] During the training of the generator, the expanded text is generated based on the generator;
[0021] The value of a set value function is determined based on the expanded text; the value of the set value function represents the discrimination result of the discriminator on the expanded text;
[0022] The generator's fourth loss function is updated based on the value of the value function;
[0023] The generator is retrained based on the updated fourth loss function.
[0024] In the above scheme, determining the value of the set value function based on the expanded text includes:
[0025] When the generator generates each character or word of the expanded text, the subsequent content of the expanded text is completed based on a keyword generation algorithm;
[0026] Based on the supplementary text corresponding to each character or word, determine the value of the corresponding set value function.
[0027] In the above scheme, updating the generator's fourth loss function based on the value function includes:
[0028] Based on the value of the set value function corresponding to each character or word, update the fourth loss function of the generator; or,
[0029] Determine the average value of the set value function corresponding to all characters or words in the expanded text, and update the fourth loss function of the generator based on the average value.
[0030] On the other hand, embodiments of the present invention provide a sample data augmentation method, the method comprising:
[0031] The set category labels are input into the generator in the generative adversarial network model; the generative adversarial network model includes the generator and the discriminator; the generative adversarial network model is trained based on a training sample set, and the training samples in the training sample set are set with the set category labels; the training samples of the generator are real text, and the training samples of the discriminator are the real text and the expanded text generated by the generator; the discrimination result of the discriminator includes the category determination result of the expanded text and the authenticity determination result of the expanded text;
[0032] Obtain the sample data output by the generator that corresponds to the set category label.
[0033] On the other hand, embodiments of the present invention provide a model training apparatus, the apparatus comprising:
[0034] The training module is used to iteratively train the generator and discriminator in the generative adversarial network model based on a training sample set; the training samples in the training sample set are set with defined category labels; the training samples of the generator are real text, and the training samples of the discriminator are the real text and the expanded text generated by the generator; the discrimination result of the discriminator includes: the category determination result of the expanded text, and the authenticity determination result of the expanded text;
[0035] The determination module is used to determine whether the generative adversarial network model meets the training termination condition, thereby obtaining the trained generative adversarial network model.
[0036] On the other hand, embodiments of the present invention provide a sample data enhancement device, the device comprising:
[0037] An input module is used to input a set category label into the generator of the generative adversarial network model; the generative adversarial network model includes the generator and a discriminator; the generative adversarial network model is trained based on a training sample set, wherein the training samples in the training sample set are set with the set category label; the training samples of the generator are real text, and the training samples of the discriminator are the real text and the expanded text generated by the generator; the discrimination result of the discriminator includes a category determination result for the expanded text and a authenticity determination result for the expanded text;
[0038] The acquisition module is used to acquire the sample data output by the generator that corresponds to the set category label.
[0039] On the other hand, embodiments of the present invention provide an electronic device including a processor and a memory interconnected thereto, wherein the memory is used to store a computer program, the computer program including program instructions, and the processor is configured to invoke the program instructions to execute the steps of the model training method provided in the first aspect of the present invention or the steps of the sample data augmentation method provided in the second aspect of the present invention.
[0040] On the other hand, embodiments of the present invention provide a computer-readable storage medium, comprising: the computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the steps of the model training method provided in the first aspect of the present invention or the steps of the sample data augmentation method provided in the second aspect.
[0041] This invention, through iterative training of the generator and discriminator in a generative adversarial network (GAN) model using a training sample set, determines the GAN model to meet the training termination condition, thus obtaining a trained GAN model. The training samples in the training sample set are labeled with specific categories. The generator's training samples are real text, while the discriminator's training samples are real text and augmented text generated by the generator. The discriminator's judgment results include category determination for the augmented text and authenticity determination for the augmented text. This invention, through adversarial training of the generator and discriminator, enables the generator to learn the semantic information of harassing phone call text, allowing it to generate sample data with more accurate categories and more realistic content, ensuring semantic consistency between the augmented sample data and the original sample data. The specified category labels are used as input conditions for the generator, allowing it to control the category of the generated text and achieve text data augmentation for a specified category. Using the augmented text data and the original text data together as training data for the classifier improves the classifier's classification performance. Attached Figure Description
[0042] Figure 1 This is a schematic diagram illustrating the implementation process of a model training method provided in an embodiment of the present invention;
[0043] Figure 2 This is a schematic diagram of the structure of a generator provided in an embodiment of the present invention;
[0044] Figure 3 This is a schematic diagram of the structure of a discriminator provided in an embodiment of the present invention;
[0045] Figure 4 This is a schematic diagram of a generative adversarial network structure provided in an embodiment of the present invention;
[0046] Figure 5 This is a schematic diagram illustrating the implementation process of a sample data augmentation method provided in an embodiment of the present invention;
[0047] Figure 6 This is a schematic diagram of a data augmentation process provided in an embodiment of the present invention;
[0048] Figure 7 This is a schematic diagram of a model training device provided in an embodiment of the present invention;
[0049] Figure 8 This is a schematic diagram of a sample data enhancement device provided in an embodiment of the present invention;
[0050] Figure 9 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0051] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0052] With the development of the information age, the leakage of personal privacy is becoming increasingly common. The leakage of personal phone numbers is the most prevalent phenomenon in today's information age. Once obtained by criminals, these phone numbers are sold or published online, causing people to suffer from harassing phone calls. Telecommunications operators can improve user experience and increase user loyalty by addressing the problem of harassing calls.
[0053] With the development of artificial intelligence technology, using AI to identify nuisance calls has become the mainstream technology for combating nuisance calls. However, training a model with high accuracy and strong generalization ability requires a large amount of labeled data. Currently, the main method for obtaining labeled data is to hand it over to data companies for manual annotation. For tens of thousands of nuisance calls every day, manual annotation is not only costly, but also prone to low-quality annotation due to human factors.
[0054] Therefore, for limited data, the method to improve the recognition accuracy and generalization ability of the model is to perform data augmentation operations. For text data, the relevant technical solutions are mainly as follows: (1) Back translation: Translate the text into another language and then translate it back. (2) Synonym replacement: Randomly select several non-stop words from the sentence and replace them with randomly selected synonyms. (3) Random insertion: Find a random non-stop word and a random synonym in the sentence and insert the synonym into a random position in the sentence. (4) Random swap: Randomly select two characters or words in the sentence and swap their positions. (5) Random deletion: Randomly delete characters or words in the sentence with a fixed probability.
[0055] The data augmentation methods mentioned above all have a certain probability of disrupting the original text structure and altering its semantic information, leading to negative effects on the model. For example, back-translation relies on the translator's capabilities, and the translated content may differ significantly from the original data. For short texts, random swapping or deletion may directly disrupt the original semantic structure, damaging keywords belonging to that category (such as express delivery, card application, and class booking), resulting in a large number of negative samples.
[0056] To address the shortcomings of the aforementioned related technologies, this invention provides a model training method that utilizes a Generative Adversarial Network (GAN) for data augmentation. The GAN consists of a discriminator and a generator. The generator generates fake data, while the discriminator determines the authenticity of the input data. During training, the generator continuously optimizes and generates fake data that is difficult for the discriminator to judge, while the discriminator continuously optimizes to improve its ability to distinguish between real and fake data. Through adversarial learning, the generated fake data becomes very similar to the real data. The neural network and adversarial learning enable the generator to effectively learn the semantic information of nuisance phone call text, preventing damage to the semantic structure of the original text. Category labels are used as input conditions for the generator, allowing it to control the category of the generated text and achieve the effect of augmenting nuisance phone call data for a specified category. Finally, the augmented nuisance phone call text data and the original text data are used together as training data for the classifier, improving the classifier's classification performance.
[0057] It should be understood that the above-mentioned harassing phone call text is only one application example, and the embodiments of the present invention can also be applied to data enhancement in other scenarios.
[0058] To illustrate the technical solution described in this invention, specific embodiments are described below.
[0059] Figure 1This is a schematic diagram illustrating the implementation flow of a model training method provided in an embodiment of the present invention. The execution subject of the model training method is an electronic device, including desktop computers, laptops, and servers. The server can be a physical device or a virtualized device deployed in the cloud. (Reference) Figure 1 Model training methods include:
[0060] S101, the generator and discriminator in the generative adversarial network model are iteratively trained based on the training sample set; the training samples in the training sample set are set with defined category labels; the training samples of the generator are real text, and the training samples of the discriminator are the real text and the expanded text generated by the generator; the discrimination result of the discriminator includes: the category determination result of the expanded text, and the authenticity determination result of the expanded text.
[0061] The main idea of Generative Adversarial Networks (GANs) is to train a generator and a discriminator against each other through continuous adversarial training. Ultimately, this makes it difficult for the discriminator to distinguish between data generated by the generator (text, images, audio, etc.) and real data. The generator learns the features of the training set data and, under the guidance of the discriminator, tries to fit the distribution of random noise as closely as possible to the true distribution of the training data, thus generating similar data with the features of the training set. The discriminator is responsible for distinguishing whether the input data is real or fake data generated by the generator and provides feedback to the generator. The two networks are trained alternately, improving their abilities simultaneously, until the data generated by the generator network becomes indistinguishable from real data and reaches a certain balance with the ability of the discriminator network.
[0062] In this embodiment, the training samples in the training sample set of the generative adversarial network model are labeled with specific categories. For example, for nuisance phone call text data, they can be divided into several categories such as financial marketing, high-frequency transactions, real estate marketing, and education and training. This data can originate from real-world phone recordings, which are then converted into text using speech recognition technology.
[0063] The generator's training samples are real text. Iteratively training the generator with real text allows it to learn the semantic representation of real text. This learning method maintains consistency between the input and output text semantics, avoiding the problem of destroying semantic information. Furthermore, by setting category labels, the generator can be guided to generate expanded text for specified categories.
[0064] The discriminator's training samples consist of real text and augmented text generated by the generator. The discriminator's training samples have real / fake labels and category labels. The discriminator's purpose is to determine whether the input text is real text or fake text (augmented text) and to classify the input text.
[0065] It's important to note that the optimization of the generator and discriminator must be performed alternately. With limited training data, optimizing the discriminator first can lead to overfitting, preventing the model from converging. Training a generative adversarial network (GAN) model involves two alternating phases: 1. Training the discriminator while fixing the generator network; 2. Training the generator while fixing the discriminator network. When training the generator, the discriminator's parameters do not need to be adjusted; conversely, when training the discriminator, the generator's parameters do not need to be adjusted.
[0066] For example, first train the discriminator: label the training set data with real labels (1) and the expanded text generated by the generator with fake labels (0), and feed them into the discriminator to train it. When calculating the loss function, make the discriminator's judgment of real data input approach true (1) and its judgment of fake data generated by the generator approach false (0). In this process, only the parameters of the discriminator are updated, not the parameters of the generator.
[0067] Then train the generator: label the fake data generated by the generator with real labels (1) and send it to the discriminator. When calculating the loss function, make the discriminator's judgment of the fake data generated by the generator approach true (1). In this process, only the parameters of the generator are updated, and the parameters of the discriminator are not updated.
[0068] By repeating the training process described above, both the generator and the discriminator become increasingly powerful. The generator continuously optimizes and generates fake data that is difficult for the discriminator to identify, while the discriminator continuously optimizes to improve its ability to distinguish between real and fake data. Through adversarial learning, a highly effective generator is ultimately obtained, making the augmented data generated by the generator very similar to the real data.
[0069] S102, determine that the generative adversarial network model meets the training termination condition, and obtain the trained generative adversarial network model.
[0070] In one embodiment, after multiple training iterations, the generative adversarial network (GAN) model achieves a distribution that fits the distribution of real samples, and the discriminator cannot distinguish whether the augmented samples are generated or real (e.g., both have a discrimination probability of 0.5). In other words, at this point, the GAN model meets the training termination condition.
[0071] In another embodiment, a Bilingual Evaluation Understudy (BLEU) metric can be computed after each round of training iterations. BLEU evaluates the quality of the translation work performed by the Natural Language Processing (NLP) system, comparing the machine-translated text with a reference translation considered correct. BLEU calculates a score based on the number of matches and similarity, ranging from 0 to 1. If the match is complete and perfect, the BLEU value is equal to 1. If there is no match at all, the BLEU score is 0.
[0072] Calculate the BLEU value of the expanded text generated by the generator after each round of training iterations. When the BLEU value no longer increases after a certain training period, it proves that the model has been trained to the optimal level, and the generative adversarial network model meets the training termination condition.
[0073] After the Generative Adversarial Network (GAN) model meets the training termination condition, the generator in the trained GAN model can be used for data augmentation. For example, the labels of the spam call text category, which has a small amount of data, can be used as input to the generator to generate a large number of samples. These samples can then be filtered, such as deduplicating and deleting texts with fewer than ten characters, to obtain expanded samples for the specified category. By performing the above operations on several spam call text categories with small amounts of data, the samples can be expanded to an appropriate scale and combined with the original data to form a new spam call dataset. This dataset can then be used to train an intent recognition model.
[0074] This invention employs a deep neural network to learn the semantic information of sentences and generate data. Compared with related techniques (back translation, synonym replacement, random insertion, random swapping, and random deletion), it can prevent the loss of key semantic information of the text during data augmentation, ensure that the augmented text remains semantically consistent with the original text, avoid the occurrence of negative samples, and to a certain extent avoid the negative effects on the classification of harassing phone calls.
[0075] This invention introduces a generative adversarial network (GAN) to augment data and incorporates labeled categories into the generator, enabling controlled generation of nuisance phone call text data. Because nuisance phone call text is unevenly distributed in real life, some categories may have significantly fewer nuisance call texts than others, leading to overfitting of the classifier during training. This invention allows for controlled text generation using a generator as needed, offering greater flexibility than related technologies.
[0076] This invention, through iterative training of the generator and discriminator in a generative adversarial network (GAN) model using a training sample set, determines the GAN model to meet the training termination condition, thus obtaining a trained GAN model. The training samples in the training sample set are labeled with specific categories. The generator's training samples are real text, while the discriminator's training samples are real text and augmented text generated by the generator. The discriminator's judgment results include: the category determination result for the augmented text and the authenticity determination result for the augmented text. This invention, through adversarial training of the generator and discriminator, enables the generator to learn the semantic information of harassing phone call text, allowing it to generate sample data with more accurate categories and more realistic content, ensuring semantic consistency between the augmented sample data and the original sample data. The specified category labels are used as input conditions for the generator, allowing it to control the category of the generated text and achieve text data augmentation for a specified category. Using the augmented text data and the original text data together as training data for the classifier improves the classifier's classification performance.
[0077] In one embodiment, before training, data analysis is performed on the entire training sample to select text categories with insufficient data volume as targets for data augmentation. The entire training sample is then processed to unify the input into a format where the input is category labels and the output is text.
[0078] In one embodiment, before iteratively training the generator and discriminator in the generative adversarial network model based on the training sample set, the method further includes:
[0079] The discriminator is pre-trained based on a first loss function; the first loss function includes a true / false determination loss function and a classification determination loss function.
[0080] The generator is pre-trained based on the second loss function.
[0081] To enable more stable training of generative adversarial networks (GANs), both the generator and discriminator need to be pre-trained. The purpose of pre-training is to enable the generator to generate text of a specified category and to give the discriminator a basic ability to judge the generated text, thus making it more stable during adversarial training.
[0082] refer to Figure 2 , Figure 2 This is a schematic diagram of a generator structure provided in an embodiment of the present invention. During generator pre-training, the input consists of categorized text and noise. The purpose of the categorized text is to serve as a condition for the generator, controlling which category the generator produces. The purpose of adding noise is to improve the model's generalization ability, prevent overfitting, and ensure the diversity of the text generated by the generator. For example, the noise can be misspelled words that do not change the original text category and semantic structure.
[0083] The generator employs a gated recurrent unit (GRU) encoder-decoder structure, which models text generation as a sequence-to-sequence task. By pre-training the generator, it learns the semantic representation of nuisance phone call text. This learning method maintains consistency between the input and output text semantics, avoiding the loss of semantic information. Furthermore, this structure can guide the generator to generate specific nuisance phone call text based on label categories.
[0084] Cross-entropy can be used as the loss function, and its formula is as follows:
[0085]
[0086] Therefore, the second loss function for pre-training is:
[0087]
[0088] Among them, y s For real text, G(x) s ) represents the text generated by the model, x s The input includes model labels and noise.
[0089] refer to Figure 3 , Figure 3 This is a schematic diagram of a discriminator provided in an embodiment of the present invention. The discriminator is composed of a Convolutional Neural Network (CNN). The input to the discriminator is generated samples and real samples. The purpose of the discriminator is to determine whether the input text is real text (true) or fake text (false) and to classify the input text. The purpose of pre-training the discriminator is to give it a basic ability to judge generated text, which makes it more stable in adversarial training.
[0090] The first loss function of the discriminator can also be the cross-entropy function C(p,q). Therefore, the loss functions for class determination and true / false determination are:
[0091]
[0092] Among them, L D_dis Let D(x) be the loss function for determining whether a statement is true or false. t ) represents the result of the input text determination, y d For authenticity labeling, L D_cls For the classification loss function, y c For category labels.
[0093] Therefore, the first loss function of the discriminator is the sum of the two loss functions above:
[0094] L D =αL D_dis +βL D_cls
[0095] α and β are adjustable parameters, α+β=1. The two parameters can be adjusted according to the actual situation, and the default values are 0.5 respectively.
[0096] refer to Figure 4 , Figure 4 This is a schematic diagram of a generative adversarial network structure provided by an embodiment of the present invention. The generator and discriminator are derived from the pre-trained embodiment described above.
[0097] In one embodiment, the method further includes:
[0098] After each iteration of training of the generative adversarial network model, the BLEU value is calculated based on the augmented text generated by the generator.
[0099] The step of determining that the generative adversarial network model meets the training termination condition includes:
[0100] If the difference between the BLEU values corresponding to two consecutive rounds of iterative training is less than a set value, the generative adversarial network model is determined to meet the training termination condition.
[0101] The BLEU score measures the quality of generated text; a higher BLEU score indicates that the generated text is closer to real text. The formula is as follows:
[0102]
[0103] The generator produces sentences called "candidates," and the provided standard translation is called "reference." An n-gram represents the number of characters or words extracted from the sentence, typically 2 to 5. Count clip This represents the number of times a specific n-gram appears in the actual text. The first summation symbol in the numerator counts all candidates, since there may be multiple sentences in the calculation. The second summation symbol counts all n-grams within a single candidate, while Count... clip(n-gram) represents the number of times a particular n-gram appears in the reference. Therefore, the numerator represents the number of n-gram words appearing in the reference for a given candidate. The first two summation symbols in the denominator have the same meaning as in the numerator; Count(n-gram′) represents the number of times n-gram′ appears in the candidate. In summary, the denominator is the total number of n-grams in all candidates.
[0104] When the BLEU score stops improving after a certain training period, it indicates that the model has been trained to its optimal state. Therefore, when the difference between the BLEU scores of two adjacent training rounds is less than a set value, the generative adversarial network model is considered to have met the training termination condition.
[0105] Related technologies determine whether the training termination condition is met based on the output of the discriminator. When the discriminator has difficulty distinguishing whether the text generated by the generator is real text or generated text, the training termination condition is determined to be met. However, "difficult to distinguish" is hard to define specifically. In contrast, this embodiment can accurately determine whether the training termination condition is met based on the BLEU value, which is more certain than related technologies.
[0106] In one embodiment, the iterative training of the generator and discriminator in the generative adversarial network model based on the training sample set includes:
[0107] During the training of the discriminator, the discriminator's discrimination results for the real text and the expanded text generated by the generator are obtained;
[0108] The third loss function of the discriminator is updated based on the discrimination result;
[0109] The discriminator is retrained based on the updated third loss function.
[0110] In one embodiment, the iterative training of the generator and discriminator in the generative adversarial network model based on the training sample set includes:
[0111] During the training of the generator, the expanded text is generated based on the generator;
[0112] The value of a set value function is determined based on the expanded text; the value of the set value function represents the discrimination result of the discriminator on the expanded text;
[0113] The generator's fourth loss function is updated based on the value of the value function;
[0114] The generator is retrained based on the updated fourth loss function.
[0115] In practical applications, the policy gradient algorithm can be used to update the generator's parameters. By leveraging reinforcement learning, the generator is guided to produce more realistic sentences by using the discriminator's output as a reward.
[0116] During generator training, the generator produces words or phrases for expanded text according to a time sequence, generating only one word or phrase at each time step. The generated sentence is considered as Y. 1:T =(y1,..y t-1 ,y T ), where y t This refers to treating the word or phrase generated at time t in the generated sentence as an action, and the sentences generated before time t-1 as a state. Therefore, the value function is calculated as follows:
[0117]
[0118] Among them G θ Let θ be the generator, and θ be the parameters of the generator. For discriminator, These are the parameters for the discriminator. Discriminator It includes not only determining the authenticity of the input text but also its category, consistent with the loss function used to update the discriminator in the pre-trained part. s is the sentence Y generated before time t. 1:t-1 'a' represents the current state, i.e., the generated sentence 'y'. t When t < T, the value function is calculated as follows: Since the generated sentence is incomplete, a keyword generation algorithm (such as Monte Carlo search) is used to complete the sentence, and then a discriminator derives a score. When t = T, the value function is... At this point, the generator has generated the entire sentence, so the value function is calculated based on the discriminator's judgment of the generated sentence. Therefore, the generator's fourth loss function is:
[0119]
[0120] Here, U~G represent sentences U generated in generator G.
[0121] When the generator can generate higher quality text, the discriminator's parameters also need to be updated to make it more capable of judging samples. The discriminator's third loss function is:
[0122]
[0123] Where P dataFor a real sample, the purpose of the discriminator is to determine as much as possible whether the input text is real text or generated text.
[0124] In one embodiment, determining the value of the set value function based on the augmented text includes:
[0125] When the generator generates each character or word of the augmented text, complete the subsequent content of the augmented text based on the keyword generation algorithm;
[0126] Based on the completed augmented text corresponding to each character or word, determine the value of the corresponding set value function.
[0127] Here, after the generator generates each character or word, complete the subsequent content of the text through the keyword generation algorithm. The keyword generation algorithm can be the Monte Carlo search algorithm. For example, assume that the text finally generated by the generator is "The weather is really nice today". When the generator starts generating text, it first generates "Today******", where "*****" is the content completed by the keyword generation algorithm, and calculate the value of the set value function corresponding to "Today******".
[0128] Then the generator generates "Today the ****", where "****" is the content completed by the keyword generation algorithm. Calculate the value of the set value function corresponding to "Today the ****".
[0129] Every time the generator generates a character or word, complete the subsequent content of the text through the keyword generation algorithm, and calculate the value of the set value function corresponding to the completed text. After the generator generates the entire sentence, calculate the value of the set value function corresponding to the entire sentence.
[0130] Updating the fourth loss function of the generator based on the value of the value function includes:
[0131] Based on the value of the set value function corresponding to each character or word, update the fourth loss function of the generator; or,
[0132] Determine the average value of the values of the set value functions corresponding to all characters or words in the augmented text, and update the fourth loss function of the generator based on the average value.
[0133] Here, there are two update methods. The first method is that after the generator generates each character or word, update the fourth loss function of the generator according to the value of the set value function corresponding to each character or word. Then, based on the updated fourth loss function, retrain the generator, and use the trained generator to generate the next character or word.
[0134] The second method does not update the fourth loss function during the generation of characters or words by the generator. Instead, it calculates the average value of the set value function corresponding to all characters or words, updates the generator's fourth loss function based on the average value, and then retrains the generator based on the updated fourth loss function.
[0135] Either update method can be chosen, and this embodiment does not limit it.
[0136] In this embodiment, during the training of the generative adversarial network model, the parameters of the discriminator are continuously updated based on the discrimination results, and the parameters of the generator are continuously updated based on the value function. This enables the generator to generate higher-quality text, while simultaneously strengthening the discriminator's ability to judge samples. Through adversarial training, the capabilities of both the generator and the discriminator are continuously enhanced, ultimately resulting in the data generated by the generator having the same distribution as real data.
[0137] Furthermore, the generative adversarial network model proposed in this embodiment of the invention has a low number of parameters, low hardware requirements, and can run on multiple platforms. It also has a simple and easy-to-use structure, and strong adaptability and portability.
[0138] Figure 5 This is a schematic diagram illustrating the implementation flow of a sample data augmentation method provided in an embodiment of the present invention. The execution subject of the sample data augmentation method is an electronic device, including desktop computers, laptops, and servers. The server can be a physical device or a virtualized device deployed in the cloud. (Reference) Figure 5 Sample data augmentation methods include:
[0139] S501, the set category labels are input into the generator in the generative adversarial network model; the generative adversarial network model includes the generator and the discriminator; the generative adversarial network model is trained based on a training sample set, and the training samples in the training sample set are set with the set category labels; the training samples of the generator are real text, and the training samples of the discriminator are the real text and the expanded text generated by the generator; the discrimination result of the discriminator includes the category determination result of the expanded text and the authenticity determination result of the expanded text.
[0140] S502, obtain the sample data output by the generator corresponding to the set category label.
[0141] The generative adversarial network model is the generative adversarial network model trained in the above embodiments. The training process of the model is detailed in the above method embodiments and will not be repeated here.
[0142] For a trained generative adversarial network model, this embodiment only needs to use the generator; the discriminator is only used during the training process.
[0143] By inputting a category label into the generator, the generator can output sample data corresponding to that category label. For example, for nuisance call text data, inputting the category label "financial marketing" will cause the generator to output nuisance call text related to "financial marketing".
[0144] This invention, through adversarial training between the generator and discriminator, enables the generator to learn the semantic information of harassing phone call text. This allows the generator to produce sample data with more accurate categories and more realistic content, ensuring semantic consistency between the augmented sample data and the original sample data. Furthermore, by setting category labels as input conditions for the generator, it can control the category of the generated text, achieving text data augmentation for a specified category. Using the augmented text data and the original text data together as training data for the classifier can improve the classifier's classification performance.
[0145] In practical applications, nuisance call text data can be categorized into several types, such as financial marketing, high-frequency transactions, real estate marketing, and education and training. This data originates from real-world phone recordings, which are then converted into text using speech recognition technology. After labeling, these texts are fed into a model for nuisance call scenario classification, i.e., intent recognition. Improving the accuracy of intent recognition requires a large amount of labeled data. However, in real-world scenarios, the amount of data collected varies greatly across categories, and the distribution of text volume within each nuisance call scenario is extremely uneven. Therefore, to ensure a good classification accuracy and generalization ability for the intent recognition model, data augmentation is needed for scenarios with limited data.
[0146] This invention can be applied to the intent understanding part of anti-harassment robots. In reality, the amount of harassment call text collected varies depending on the specific category of harassment calls, making it difficult to obtain large quantities of text from certain categories. To address this issue, this invention proposes a data augmentation method based on generative adversarial networks (GANs), which can augment a small amount of specific categories of text, improving the accuracy of intent recognition for harassment call text.
[0147] For example, by inputting the labels of spam call text categories with limited data into the generator, a large number of samples can be generated. These samples are then filtered, such as by removing duplicates and deleting texts with fewer than ten characters, resulting in expanded samples for the specified categories. By performing the above operations on several spam call text categories with limited data, the samples are expanded to an appropriate scale and then combined with the original data to form a new spam call dataset. This dataset can then be used to train an intent recognition model.
[0148] refer to Figure 6 , Figure 6This is a schematic diagram of a data augmentation process provided in an embodiment of the present invention. The data augmentation process includes:
[0149] The first step is data preprocessing.
[0150] First, data analysis was performed on the entire sample data to select text categories with insufficient data volume as targets for data augmentation. The entire sample data was then processed to a format where input is labels and output is text.
[0151] The second step is pre-training.
[0152] To make generative adversarial networks more stable
[0153] For localized training, the generator and discriminator need to be pre-trained. The specific implementation process is detailed in the method implementation example and will not be repeated here.
[0154] The third step is combat training.
[0155] The main idea of Generative Adversarial Networks (GANs) is to train a generator against a discriminator through continuous adversarial training. Ultimately, this makes it difficult for the discriminator to distinguish between data generated by the generator (text, images, audio, etc.) and real data. The generator, guided by the discriminator, learns the features of the training set data and tries to fit the distribution of random noise as closely as possible to the true distribution of the training data, thus generating similar data with the characteristics of the training set. The discriminator, on the other hand, is responsible for distinguishing whether the input data is real or fake data generated by the generator and provides feedback to the generator. The two networks train alternately, improving their capabilities simultaneously, until the data generated by the generator network becomes indistinguishable from real data and reaches a certain balance with the capabilities of the discriminator network.
[0156] The fourth step is data augmentation.
[0157] For example, by using the labels of text categories with limited data as input to the generator, a large number of augmented samples can be generated.
[0158] This invention, through adversarial training between the generator and discriminator, enables the generator to learn the semantic information of harassing phone call text. This allows the generator to produce sample data with more accurate categories and more realistic content, ensuring semantic consistency between the augmented sample data and the original sample data. Furthermore, by setting category labels as input conditions for the generator, it can control the category of the generated text, achieving text data augmentation for a specified category. Using the augmented text data and the original text data together as training data for the classifier can improve the classifier's classification performance.
[0159] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0160] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0161] It should be noted that the technical solutions described in the embodiments of the present invention can be combined arbitrarily without conflict.
[0162] In addition, in the embodiments of the present invention, "first," "second," etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0163] refer to Figure 7 , Figure 7 This is a schematic diagram of a model training device provided in an embodiment of the present invention, such as... Figure 7 As shown, the device includes:
[0164] The training module is used to iteratively train the generator and discriminator in the generative adversarial network model based on a training sample set; the training samples in the training sample set are set with defined category labels; the training samples of the generator are real text, and the training samples of the discriminator are the real text and the expanded text generated by the generator; the discrimination result of the discriminator includes: the category determination result of the expanded text, and the authenticity determination result of the expanded text;
[0165] The determination module is used to determine whether the generative adversarial network model meets the training termination condition, thereby obtaining the trained generative adversarial network model.
[0166] In one embodiment, the training module is further configured to:
[0167] The discriminator is pre-trained based on a first loss function; the first loss function includes a true / false determination loss function and a classification determination loss function.
[0168] The generator is pre-trained based on the second loss function.
[0169] In one embodiment, the device further includes:
[0170] The calculation module is used to calculate the text evaluation index BLEU value based on the augmented text generated by the generator after each round of training iteration of the generative adversarial network model.
[0171] The determining module determines that the generative adversarial network model meets the training termination condition, including:
[0172] If the difference between the BLEU values corresponding to two consecutive rounds of iterative training is less than a set value, the generative adversarial network model is determined to meet the training termination condition.
[0173] In one embodiment, the training module iteratively trains the generator and discriminator in the generative adversarial network model based on a training sample set, including:
[0174] During the training of the discriminator, the discriminator's discrimination results for the real text and the expanded text generated by the generator are obtained;
[0175] The third loss function of the discriminator is updated based on the discrimination result;
[0176] The discriminator is retrained based on the updated third loss function.
[0177] In one embodiment, the training module iteratively trains the generator and discriminator in the generative adversarial network model based on a training sample set, including:
[0178] During the training of the generator, the expanded text is generated based on the generator;
[0179] The value of a set value function is determined based on the expanded text; the value of the set value function represents the discrimination result of the discriminator on the expanded text;
[0180] The generator's fourth loss function is updated based on the value of the value function;
[0181] The generator is retrained based on the updated fourth loss function.
[0182] In one embodiment, the training module determines the value of a predetermined value function based on the augmented text, including:
[0183] When the generator generates each character or word of the expanded text, the subsequent content of the expanded text is completed based on a keyword generation algorithm;
[0184] Based on the supplementary text corresponding to each character or word, determine the value of the corresponding set value function.
[0185] In one embodiment, the training module updates the generator's fourth loss function based on the value function, including:
[0186] Based on the value of the set value function corresponding to each character or word, update the fourth loss function of the generator; or,
[0187] Determine the average value of the set value function corresponding to all characters or words in the expanded text, and update the fourth loss function of the generator based on the average value.
[0188] refer to Figure 8 , Figure 8 This is a schematic diagram of a sample data augmentation device provided in an embodiment of the present invention, as shown below. Figure 8 As shown, the device includes:
[0189] An input module is used to input a set category label into the generator of the generative adversarial network model; the generative adversarial network model includes the generator and a discriminator; the generative adversarial network model is trained based on a training sample set, wherein the training samples in the training sample set are set with the set category label; the training samples of the generator are real text, and the training samples of the discriminator are the real text and the expanded text generated by the generator; the discrimination result of the discriminator includes a category determination result for the expanded text and a authenticity determination result for the expanded text;
[0190] The acquisition module is used to acquire the sample data output by the generator that corresponds to the set category label.
[0191] In practical applications, the training module, determination module, input module, and acquisition module can be implemented by processors in electronic devices, such as central processing units (CPUs), digital signal processors (DSPs), microcontroller units (MCUs), or field-programmable gate arrays (FPGAs).
[0192] It should be noted that the model training device provided in the above embodiments is only illustrated by the division of the modules described above during model training. In practical applications, the above processing can be assigned to different modules as needed, that is, the internal structure of the device can be divided into different modules to complete all or part of the processing described above. In addition, the model training device and the model training method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0193] The aforementioned model training apparatus can be in the form of an image file. After execution, this image file can run as a container or virtual machine to implement the model training method described in this application. However, it is not limited to the image file format; any software that can implement the model training method described in this application is within the scope of protection of this application.
[0194] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiments of this application, the embodiments of this application also provide an electronic device. Figure 9 This is a schematic diagram of the hardware structure of the electronic device according to an embodiment of this application, as shown below. Figure 9 As shown, the electronic device includes:
[0195] A communication interface enables information exchange with other devices, such as network devices.
[0196] The processor, connected to the communication interface, enables information interaction with other devices and, when running a computer program, executes the methods provided by one or more technical solutions on the electronic device side. The computer program is stored in memory.
[0197] Of course, in practical applications, the various components in an electronic device are coupled together through a bus system. It can be understood that the bus system is used to achieve communication and connection between these components. In addition to the data bus, the bus system also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, in... Figure 9 The general will label all buses as bus systems.
[0198] The aforementioned electronic devices can be in cluster form, such as a cloud computing platform. A cloud computing platform is a business model that uses computing virtualization, network virtualization, and storage virtualization technologies to organize multiple independent server physical hardware resources into a pool of resources. It is a software-defined resource structure based on the development of virtualization technology, which can provide resource capabilities in the form of virtual machines, containers, etc. By eliminating the fixed relationship between hardware and operating system, relying on network connectivity for unified resource scheduling, and then providing the required virtual resources and services, it is a new type of IT software delivery model with characteristics such as flexibility, elasticity, distributed nature, multi-tenancy, and on-demand.
[0199] Current cloud computing platforms support several service models:
[0200] SaaS (Software as a Service): Cloud computing platform users do not need to purchase software, but instead rent software deployed on the cloud computing platform. Users do not need to maintain the software, as the software service provider will manage and maintain the software in its entirety.
[0201] PaaS (Platform as a Service): Cloud computing platform users (usually software developers) can build new applications or extend existing applications on the architecture provided by the cloud computing platform without having to purchase development, quality control or production servers.
[0202] IaaS (Infrastructure as a Service): Cloud computing platforms provide data centers, infrastructure hardware and software resources via the Internet. Cloud computing platforms under the IaaS model can provide servers, operating systems, disk storage, databases and / or information resources.
[0203] The memory in this application embodiment is used to store various types of data to support the operation of the electronic device. Examples of such data include any computer program used to operate on the electronic device.
[0204] It is understood that memory can be volatile or non-volatile, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); magnetic surface memory can be disk storage or magnetic tape storage. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memories described in the embodiments of this application are intended to include, but are not limited to, these and any other suitable types of memories.
[0205] The methods disclosed in the embodiments of this application can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in memory. The processor reads the program from the memory and, in conjunction with its hardware, completes the steps of the aforementioned method.
[0206] Optionally, when the processor executes the program, it implements the corresponding processes implemented by the electronic device in the various methods of the embodiments of this application. For the sake of brevity, these will not be described in detail here.
[0207] In an exemplary embodiment, this application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as a first memory storing a computer program, which can be executed by a processor of an electronic device to complete the steps described in the aforementioned method. The computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM.
[0208] In the several embodiments provided in this application, it should be understood that the disclosed apparatus, electronic devices, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components may be combined, or integrated into another system, or some features may be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0209] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0210] In addition, each functional unit in the various embodiments of this application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0211] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
[0212] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
[0213] It should be noted that the technical solutions described in the embodiments of this application can be combined arbitrarily without conflict.
[0214] In addition, in this application example, terms such as "first" and "second" are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0215] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A model training method, characterized in that, The method comprises: iteratively training a generator and a discriminator in a generative adversarial network model based on a training sample set; a training sample in the training sample set is provided with a set category label; the set category label is a real category of the training sample; a training sample of the generator is real text, and a training sample of the discriminator is the real text and augmented text generated by the generator; a discrimination result of the discriminator includes a category determination result of the augmented text and a true or false determination result of the augmented text; when training the generator, generating the augmented text based on the generator; determining a value of a set value function based on the augmented text; the value of the set value function represents the discrimination result of the discriminator on the augmented text; updating a fourth loss function of the generator based on the value of the value function; retraining the generator based on the updated fourth loss function; determining that the generative adversarial network model meets a training end condition to obtain a trained generative adversarial network model; the generator in the trained generative adversarial network model is used for data augmentation.
2. The method of claim 1, wherein, Before the iteratively training the generator and the discriminator in the generative adversarial network model based on the training sample set, the method further comprises: pre-training the discriminator based on a first loss function; the first loss function includes a true or false determination loss function and a category determination loss function; pre-training the generator based on a second loss function.
3. The method of claim 1, wherein, The method further comprises: after each round of iterative training of the generative adversarial network model, calculating a text evaluation index BLEU value based on the augmented text generated by the generator; the determination that the generative adversarial network model meets the training end condition comprises: if a difference between the BLEU values corresponding to two consecutive rounds of iterative training is less than a set value, it is determined that the generative adversarial network model meets the training end condition.
4. The method of claim 1, wherein, The iteratively training the generator and the discriminator in the generative adversarial network model based on the training sample set comprises: when training the discriminator, obtaining a discrimination result of the discriminator on the real text and the augmented text generated by the generator; updating a third loss function of the discriminator based on the discrimination result; retraining the discriminator based on the updated third loss function.
5. The method of claim 1, wherein, The determination of the value of the set value function based on the augmented text comprises: when each word or character of the augmented text is generated by the generator, completing subsequent content of the augmented text based on a keyword generation algorithm; determining a value of a corresponding set value function based on the augmented text completed for each word or character.
6. The method of claim 5, wherein, The updating of the fourth loss function of the generator based on the value of the value function comprises: updating the fourth loss function of the generator based on the value of the set value function corresponding to each word or character; or determining an average value of the values of the set value functions corresponding to all words or characters in the augmented text, and updating the fourth loss function of the generator based on the average value.
7. A sample data augmentation method of a generative adversarial network model trained based on the method of any one of claims 1 to 6. The method comprises: inputting a set category label into a generator in the generative adversarial network model; the generative adversarial network model comprises the generator and a discriminator; the generative adversarial network model is trained based on a training sample set, and a training sample in the training sample set is provided with the set category label; a training sample of the generator is real text, and a training sample of the discriminator is the real text and augmented text generated by the generator; a discrimination result of the discriminator comprises a category determination result of the augmented text and a true or false determination result of the augmented text; obtaining sample data corresponding to the set category label and output by the generator.
8. A model training apparatus, comprising: Comprise: a training module configured to iteratively train a generator and a discriminator in a generative adversarial network model based on a training sample set; a training sample in the training sample set is provided with a set category label; the set category label is a real category of the training sample; a training sample of the generator is real text, and a training sample of the discriminator is the real text and augmented text generated by the generator; a discrimination result of the discriminator comprises a category determination result of the augmented text and a true or false determination result of the augmented text; when training the generator, the training module is configured to generate the augmented text based on the generator, determine a value of a set merit function based on the augmented text, wherein the value of the set merit function represents the discrimination result of the discriminator on the augmented text, update a fourth loss function of the generator based on the value of the merit function, and retrain the generator based on the updated fourth loss function; a determination module configured to determine that the generative adversarial network model meets a training end condition, and obtain a trained generative adversarial network model; the generator in the trained generative adversarial network model is used for data augmentation.
9. A sample data augmentation apparatus, characterized by, Comprise: an input module configured to input a set category label into a generator in a generative adversarial network model; the generative adversarial network model is trained based on the model training apparatus of claim 8, and the generative adversarial network model comprises the generator and a discriminator; the generative adversarial network model is trained based on a training sample set, and a training sample in the training sample set is provided with the set category label; a training sample of the generator is real text, and a training sample of the discriminator is the real text and augmented text generated by the generator; a discrimination result of the discriminator comprises a category determination result of the augmented text and a true or false determination result of the augmented text; an obtaining module configured to obtain sample data corresponding to the set category label and output by the generator.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the model training method of any one of claims 1 to 6 or the sample data augmentation method of claim 7.
11. A computer readable storage medium, characterized in that, The computer readable storage medium stores a computer program, the computer program comprising program instructions, the program instructions causing the processor to execute the model training method according to any one of claims 1 to 6 or execute the sample data enhancement method according to claim 7 when executed by the processor.
Citation Information
Patent Citations
Text generation method and device, computer device and medium
CN109885667A
Training method of generative adversarial network, data classification method and related equipment
CN114118345A
