Data generation method and apparatus and related device

By acquiring raw sample data to generate candidate sample data and performing importance sampling, the problem of bias in the generation of sample data by generative models is solved, and the accuracy of model training is maintained while increasing the amount of sample data.

WO2026144380A1PCT designated stage Publication Date: 2026-07-09HUAWEI TECH CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2025-10-13
Publication Date
2026-07-09

AI Technical Summary

Technical Problem

When there is insufficient sample data, there may be a discrepancy between the sample data generated by the generative model and the original sample data, which may lead to bias during model training.

Method used

By acquiring multiple original sample data, generative models are used to generate candidate sample data. Then, augmented sample data that matches the distribution pattern of the original sample data is selected from the candidate sample data through methods such as importance sampling, so as to ensure that no bias is generated during model training.

Benefits of technology

While increasing the amount of sample data, we ensured the accuracy of model training, avoided model bias caused by sample data bias, and improved the model training effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025127208_09072026_PF_FP_ABST
    Figure CN2025127208_09072026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application is a data generation method, which is used for increasing the number of pieces of sample data for model training while avoiding model bias. The data generation method comprises: acquiring a plurality of pieces of original sample data; on the basis of the plurality of pieces of original sample data, generating a plurality of pieces of candidate sample data by means of a generative model; and on the basis of the plurality of pieces of original sample data, sampling the plurality of pieces of candidate sample data, so as to obtain a plurality of pieces of augmented sample data, wherein the original sample data and the augmented sample data are used for training a target model. In addition, further provided in the present application are a corresponding apparatus, a computing device cluster, a computer-readable storage medium and a computer program product.
Need to check novelty before this filing date? Find Prior Art

Description

A data generation method, apparatus and related equipment

[0001] This application claims priority to Chinese Patent Application No. 202411999578.2, filed with the State Intellectual Property Office of China on December 31, 2024, entitled “A Data Generation Method, Apparatus and Related Equipment”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of data processing technology, and in particular to a data generation method, apparatus and related equipment. Background Technology

[0003] With the development of computer technology, models have been widely used in many fields. When a model is needed to perform certain classification tasks, it can be trained using sample data and the categories of that data. After training, the model can then identify the data based on the actual data in the task, obtaining the classification results.

[0004] Clearly, both the quantity and accuracy of sample data affect the precision of the trained model. Therefore, it is desirable to train a model using a large amount of sample data. However, in some application scenarios, sample data may be limited, making it insufficient for adequate model training. To address this issue, generative models, such as Large Language Models (LLMs), can be used to generate sample data. In this way, by using generative models to generate new sample data based on the original sample data, the problem of insufficient original sample data can be solved.

[0005] However, there may be discrepancies between the generated sample data and the original sample data, resulting in poor training performance. Summary of the Invention

[0006] In view of this, this application provides a data generation method for generating enhanced sample data that matches the original sample data. This application also provides corresponding apparatus, computing device clusters, computer-readable storage media, and computer program products.

[0007] Firstly, this application provides a data generation method. When executing this data generation method, multiple original sample data can first be obtained. If the number of original sample data is insufficient to train the target model, multiple candidate sample data matching the original sample data can be generated using a generative model. Candidate sample data refers to unsampled data generated by the generative model based on the original sample data. Candidate sample data may have a distribution inconsistent with the original sample data. Therefore, multiple candidate sample data can be sampled based on multiple original sample data. The candidate sample data sampled during the sampling process can be called augmented sample data. Through sampling, multiple augmented sample data whose distribution patterns match the original sample data can be collected from the multiple candidate sample data, according to the distribution patterns of the original sample data. Because the distribution patterns of the augmented sample data are the same as those of the original sample data, training the model based on the augmented sample data will not cause model bias. Therefore, the target model can be trained using both augmented sample data and original sample data. On the one hand, the number of sample data can be supplemented by a generative model; on the other hand, sampling can ensure that the generated augmented sample data matches the original sample data. In this way, model training can be completed with sufficient sample data while ensuring that the model is not biased. In this way, the amount of sample data can be increased to complete the training of the model without causing the model to become biased.

[0008] In some possible implementations, importance sampling can be used to determine multiple augmentation samples. Specifically, the probability distribution of multiple original sample data can be determined first. Then, importance sampling can be performed on multiple candidate sample data based on the probability distribution of the original sample data to obtain multiple augmentation samples. In this way, the augmentation samples are sampled from multiple candidate sample data according to the probability distribution of the original sample data, so the probability distribution of the multiple augmentation samples is consistent with the probability distribution of the multiple original sample data. Therefore, using both augmentation samples and original sample data to train the target model will not affect the training results of the target model or introduce bias into the target model.

[0009] In some possible implementations, the probability distribution of the original sample data can be determined based on the correlation between the feature values ​​in the original sample data. Specifically, if the original sample data corresponds to multiple features, and each original sample data corresponds to a set of values ​​for multiple features, then when determining the probability distribution of the original sample data, one can first analyze the correlation between the values ​​of each feature based on the multiple original sample data to determine the correlation probability of multiple features, and then determine the probability distribution of the multiple original sample data based on the feature correlation probability. The feature correlation probability represents the probability that at least two features among multiple features are correlated. Based on the feature correlation probability, it can be determined which features among multiple features are correlated, and what influence the correlated features have on each other's values. Therefore, based on the feature correlation probability, the probability distribution of the original sample data can be accurately obtained.

[0010] In some possible implementations, feature association probabilities can be obtained based on the feature interaction matrix. Specifically, by processing the original sample data, an interaction matrix of multiple features can be obtained. The interaction matrix describes the probability that any two features among the multiple features have a correlation. The interaction matrix can be obtained, for example, using the Hessian integral algorithm. If each original sample data includes N features (N is a positive integer greater than 1), then the interaction matrix is ​​an N*N dimensional matrix, and the element in the i-th row and j-th column of the interaction matrix represents the probability that the value of the i-th feature among the N features has a correlation with the value of the j-th feature (i and j are positive integers not greater than N). Thus, by analyzing the interaction matrix, it is possible to determine which features among the multiple features have correlations, thereby obtaining the feature association probabilities.

[0011] In some possible implementations, the feature association probability among three or more features can be determined based on the feature association probability between pairwise features. Specifically, if the interaction degree matrix indicates a correlation between the values ​​of the first feature and the second feature, and the value of the third feature is also correlated with the value of the first feature, then it can be assumed that there is a correlation between the values ​​of the first feature, the second feature, and the third feature. Furthermore, the feature association probability of the first feature, the second feature, and the third feature can be determined based on the feature association probabilities of the first feature and the second feature, as well as the feature association probability of the first feature and the third feature. The feature association probability of the first feature, the second feature, and the third feature is the probability that there is a correlation between the values ​​of the first feature, the second feature, and the third feature.

[0012] In some possible implementations, candidate sample data can be generated according to the categories of the original sample data. Specifically, after obtaining multiple original sample data, these data can be clustered to determine multiple original sample categories. Then, a generative model can be used to generate multiple candidate sample data for each original sample category. Correspondingly, when sampling to determine multiple augmented sample data, sampling can be performed on the candidate sample data corresponding to each original sample category to determine multiple augmented sample data for each category. This approach of first clustering the original sample data and then generating the augmented sample data allows the generated candidate sample data to better match the original sample data. Sampling the candidate sample data for each original sample category ensures that the augmented sample data conforms to the distribution patterns of the original sample data within each category, further preventing bias in the target model.

[0013] In some possible implementations, clustering can be performed based on the latent space vectors of the original sample data. Specifically, a surrogate model with the same functionality as the target model can be determined first, and trained on multiple original sample data sets. Even if the number of original sample data sets is insufficient to train an accurate surrogate model, the feature extraction part of the surrogate model can still be sufficiently accurate. Next, multiple original sample data sets can be input into the surrogate model, and the latent space vectors of the feature extraction part of the surrogate model can be extracted to obtain the latent space vector corresponding to each original sample data set. Clustering the latent space vectors corresponding to multiple original sample data sets can yield multiple original sample categories. The latent space vectors obtained by feature extraction from the original sample data through the surrogate model can reflect the information implicit in the original sample data. Therefore, clustering the latent space vectors of multiple original sample data sets can accurately determine which original sample category each original sample data set belongs to.

[0014] Secondly, this application provides a data generation apparatus, the apparatus comprising: an acquisition unit for acquiring multiple raw sample data;

[0015] The generation unit is used to generate multiple candidate sample data based on the multiple original sample data using a generative model; the sampling unit is used to sample the multiple candidate sample data based on the multiple original sample data to obtain multiple enhanced sample data, wherein the original sample data and the enhanced sample data are used to train the target model.

[0016] In some possible implementations, the sampling unit is specifically used to determine the probability distribution of the plurality of original sample data; and to perform importance sampling on the plurality of candidate sample data according to the probability distribution of the plurality of original sample data to obtain a plurality of enhanced sample data.

[0017] In some possible implementations, the original sample data corresponds to multiple features, and each original sample data corresponds to a set of values ​​for the multiple features; the sampling unit is specifically used to analyze the multiple original sample data to determine the correlation probability of multiple features, wherein the correlation probability represents the probability that the values ​​of at least two features among the multiple features are correlated; and the probability distribution of the original sample data is determined based on the correlation probability.

[0018] In some possible implementations, the sampling unit is specifically used to analyze the multiple original sample data to obtain an interaction degree matrix of the multiple features. The interaction degree matrix is ​​an N*N dimension matrix, where the element in the i-th row and j-th column of the interaction degree matrix represents the probability that the value of the i-th feature is correlated with the value of the j-th feature. N is the number of the multiple features, and i and j are positive integers not greater than N. Based on the interaction degree matrix, the feature correlation probability between any two features is determined.

[0019] In some possible implementations, the N feature groups include a first feature, a second feature, and a third feature; the sampling unit is specifically used to determine that there is a correlation between the values ​​of the first feature, the second feature, and the third feature in response to the correlation between the values ​​of the first feature and the second feature, and the correlation between the values ​​of the first feature and the third feature; and to determine the feature correlation probability of the first feature, the second feature, and the third feature based on the feature correlation probability corresponding to the first feature and the second feature, and the feature correlation probability of the first feature and the third feature.

[0020] In some possible implementations, the generation unit is specifically used to cluster the plurality of original sample data to determine a plurality of original sample categories; for each original sample category, a plurality of candidate sample data is generated through a generative model; the sampling unit is specifically used to sample the candidate sample data for each original sample category based on the original sample data in the original sample category to obtain a plurality of augmented data for the original sample category.

[0021] In some possible implementations, the generation unit is specifically used to train a proxy model based on the plurality of original sample data, the proxy model having the same function as the target model; input the plurality of original sample data into the proxy model respectively, and extract the latent space vector corresponding to each original sample data; cluster the latent space vector corresponding to each original sample data to determine the plurality of original sample categories.

[0022] Thirdly, this application provides a computing device, the computing device including at least one processor and at least one memory; the at least one memory is used to store instructions, and the at least one processor executes the instructions stored in the at least one memory to cause the computing device to perform the method in the first aspect or any possible implementation thereof. It should be noted that the memory may be integrated into the processor or may be independent of the processor. The at least one computing device may also include a bus. The processor is connected to the memory via the bus. The memory may include readable storage and random access memory.

[0023] Fourthly, this application provides a computing device cluster, the computing device including at least one computing device, the at least one computing device including at least one processor and at least one memory; the at least one memory is used to store instructions, and the at least one processor executes the instructions stored in the at least one memory to cause the computing device cluster to perform the method in the first aspect or any possible implementation of the first aspect. It should be noted that the memory can be integrated into the processor or can be independent of the processor. The at least one computing device may also include a bus. The processor is connected to the memory via the bus. The memory may include readable storage and random access memory.

[0024] Fifthly, this application provides a computer-readable storage medium storing instructions that, when executed on at least one computing device, cause the at least one computing device to perform the method described in the first aspect or any implementation thereof.

[0025] In a sixth aspect, this application provides a computer program product containing instructions that, when run on at least one computing device, cause the at least one computing device to perform the method described in the first aspect or any implementation thereof.

[0026] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description

[0027] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings.

[0028] Figure 1 is a schematic diagram of an application scenario provided in an embodiment of this application;

[0029] Figure 2 is a flowchart illustrating a data generation method provided in an embodiment of this application.

[0030] Figure 3 is a schematic diagram of a data generation device provided in an embodiment of this application;

[0031] Figure 4 is a schematic diagram of a computing device provided in an embodiment of this application;

[0032] Figure 5 is a schematic diagram of a computing device cluster provided in an embodiment of this application;

[0033] Figure 6 is a schematic diagram of one implementation of the computing device cluster provided in the embodiments of this application. Detailed Implementation

[0034] The solutions in the embodiments provided in this application will now be described with reference to the accompanying drawings.

[0035] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application.

[0036] First, let me introduce some of the terms used in this application.

[0037] Sample data: Sample data refers to the data used to train the model. If the model to be trained is a classification model, each sample data can correspond to a label. The label represents the classification result of the sample data. For ease of explanation, if sample data corresponds to a label, the sample data and the label will be collectively referred to as sample data below. In the embodiments of this application, sample data includes original sample data and augmented sample data.

[0038] Raw sample data: Raw sample data refers to the original data used to train the model. Raw sample data can be obtained through data collection and other methods. The distribution of raw sample data represents the true distribution of the sample data.

[0039] Augmented sample data: Augmented sample data refers to sample data generated through a generative model. Furthermore, the distribution of the augmented sample data is consistent with that of the original sample data. When training the model, both the original sample data and the augmented sample data can be used together.

[0040] Features: In this embodiment, a feature refers to an explicit attribute in the sample data. For example, if the sample data is tabular data, then the feature could be the table header information. If the header information includes multiple header items, the sample data can correspond to multiple features, with each feature corresponding to one header item. The features of tabular data can also be called tabular features. That is, if an n*m table is used as the training dataset to train the model, then m original data points can be determined from it, and each original data point includes the feature values ​​of n features. It should be noted that the "feature" mentioned below has a different meaning from the "feature" extracted from data by an encoder in the field of model training.

[0041] Importance sampling is a statistical sampling method. When the target distribution and the sampling distribution are inconsistent, the weights of the sampling results are adjusted so that the data sampled from the sampling distribution can be used to estimate the expectation of the target distribution. In other words, when the distribution of dataset A is inconsistent with the distribution of dataset B, importance sampling can be used to sample data B1 from dataset B with the same distribution as dataset A.

[0042] If the training sample data is insufficient, the accuracy of the trained model may be poor. With the development of generative models such as large language models, when the original sample data is insufficient, generative models can be used to generate new sample data to increase the amount of sample data, thereby training the model more accurately. Specifically, the original sample data can be used as prompts to input into the large language model, which then generates new sample data based on the prompts.

[0043] However, the sample data generated by generative models may deviate from the actual sample data in some aspects, affecting the model's training results. For example, the distribution of actual sample data matches the true distribution of the data. However, the data generated by a generative model may have a random distribution or be influenced by the generative model itself, differing from the true distribution. Thus, when the original sample data is mixed with the sample data generated by the generative model, the distribution of the resulting sample data differs from the true distribution. Therefore, if the model is trained based on the sample data, it will be unable to learn the true distribution of the data, potentially leading to model bias.

[0044] Furthermore, if the sample data is tabular, there may be correlations between different features of the original sample data. These correlations cannot be learned by the generative model, even though the sample data generated by the generative model may contain these correlations. Therefore, during model training, the model may also be unable to learn the correlations between features.

[0045] Among some possible implementations, generative models with stronger analytical capabilities can be chosen to solve the above problems. However, this approach significantly increases costs and is not suitable for application scenarios involving model training.

[0046] Based on this, this application provides a data generation method, apparatus, and related equipment. Specifically, multiple original sample data can be acquired first. If the number of original sample data is insufficient to train the target model, multiple candidate sample data matching the original sample data can be generated first through a generative model. Candidate sample data refers to unsampled data generated by the generative model based on the original sample data. Candidate sample data may have a distribution inconsistent with the original sample data. Therefore, multiple candidate sample data can be sampled based on multiple original sample data. The candidate sample data sampled during the sampling process can be called augmented sample data. Through sampling, multiple augmented sample data whose distribution patterns match the original sample data can be collected from multiple candidate sample data according to the distribution patterns of the original sample data. Because the distribution patterns of the augmented sample data are the same as those of the original sample data, training the model based on the augmented sample data will not cause model bias. Therefore, the target model can be trained together using the augmented sample data and the original sample data. On the one hand, the number of sample data can be supplemented by the generative model; on the other hand, sampling can ensure that the generated augmented sample data matches the original sample data. In this way, model training can be completed with sufficient sample data while ensuring that the model is not biased. In this way, the amount of sample data can be increased to complete the training of the model without causing the model to become biased.

[0047] Next, various non-limiting specific implementation methods of the data generation process will be described in detail.

[0048] First, an exemplary application scenario is introduced. The data generation method provided in this application can be implemented by a data generation device. Optionally, the data storage can be applied to the server side.

[0049] Referring to Figure 1, Figure 1 is a schematic diagram of an application scenario of the data generation method provided in this application embodiment. The application scenario shown in Figure 1 includes a client 10, a server 20, and a generative model 30. The server 20 includes a data generation device 21. The data generation device 21 includes an acquisition unit 211, a generation unit 212, and a sampling unit 213. The server 20 also includes a model training device 22.

[0050] If a user wants to train a model, they can trigger a model training task through client 10. When triggering the model training task, the user can configure the model to be trained and multiple raw sample data used for training the model. Acquisition unit 211 can acquire multiple raw sample data. Generation unit 212 can call generative model 30 to generate multiple candidate sample data based on the multiple raw sample data. Sampling unit 213 can sample the multiple candidate sample data based on the multiple raw sample data to obtain multiple augmented sample data. The raw sample data and augmented sample data can be input into model training device 22. Model training device 22 can train the model based on the multiple raw sample data and multiple augmented sample data to complete the model training task triggered by the user.

[0051] The server-side component 20 can be implemented based on a single device or a cluster of devices. Optionally, the data generation device 21 and the model training device 22 can be deployed on the same device or on different devices within a cluster. Furthermore, the data generation device 21 and the model training device 22 can be distributed within the same region or in different regions. Further, the cluster implementing the data generation device 21 and the cluster implementing the model training device 22 can be distributed within the same availability zone (AZ) or in different AZs, each AZ comprising one or more geographically proximate data centers. Typically, a region can include multiple AZs.

[0052] The following section provides a detailed introduction to the specific implementation methods in the data generation process.

[0053] Referring to Figure 2, which is a flowchart illustrating a data generation method provided in this application, this method can be applied to the application scenario shown in Figure 1, or to other applicable application scenarios.

[0054] Specifically, the data generation method shown in Figure 2 may include:

[0055] S201: Obtain multiple raw sample data.

[0056] Before generating augmented sample data, multiple raw sample data sets can be obtained. These raw sample data sets are used to train the target model. The characteristics of the raw sample data match the characteristics of the data processed by the target model in actual operation. If the training of the target model is supervised training, the raw sample data can include both the input data and the output data of the target model.

[0057] The original sample data may include feature values ​​from multiple features. Optionally, multiple original sample data may come from the same table. Each row of data in the table corresponds to one original sample data. Different original sample data may correspond to the same table features.

[0058] Optionally, the raw sample data can be uploaded by the tenant that triggered the model training. For example, if a user wants to train a model to complete a classification task in a certain scenario, the user can call the model training cloud service through the client and upload the raw sample data to the server through the client. The server's data generation device can then obtain the raw sample data.

[0059] Alternatively, the raw sample data can be retrieved from a database. For example, in an enterprise's internal financial management application, various data can be recorded in a database during the work process. If model training is needed based on certain data, the corresponding data can be selected from the database and used as target sample data to train the target model.

[0060] S202: Generate multiple candidate sample data based on the multiple original sample data using a generative model.

[0061] After obtaining multiple original sample data sets, a generative model can be used to generate multiple candidate sample data sets based on these original sample data sets. The candidate sample data sets are generated by the generative model based on the original sample data sets. The format of the candidate sample data sets is the same as that of the original sample data sets. While candidate sample data sets can be used to train the target model, using them may lead to biases in the target model.

[0062] In some possible implementations, a prompt can be constructed based on multiple raw sample data sets and sent to the generative model. The prompt can include one or more raw sample data sets. The generative model can then generate multiple candidate sample data sets by referring to the raw sample data in the prompt.

[0063] While the above implementation can generate candidate sample data with the same format as the original sample data, the distribution of such candidate sample data may be relatively even, failing to reflect the characteristics of the original sample data. Therefore, some implementations first cluster the original sample data and then generate candidate sample data based on the clustering results.

[0064] Specifically, before generating candidate sample data, multiple original sample data can be clustered. During clustering, original sample data that are identical or similar can be grouped into one category. By clustering based on the original sample data, multiple original data can be divided into multiple categories according to their characteristics, resulting in multiple original sample categories. Each original sample category can include at least one original sample data with the same or similar attributes. In this way, clustering the original sample data before generating augmented sample data allows the generated candidate sample data to better match the original sample data. Sampling the candidate sample data for each original sample category ensures that the augmented sample data conforms to the distribution pattern of the original sample data within the original sample category, further avoiding bias in the target model.

[0065] After identifying multiple original sample categories, a generative model can generate multiple candidate sample data for each category. Specifically, for each original sample category, a prompt can be constructed and sent to the generative model. The generative model can then receive multiple prompts. For each prompt, the generative model can generate multiple candidate sample data, effectively generating multiple candidate sample data for each original sample category. In this way, a generative model can obtain multiple candidate sample data for multiple categories.

[0066] Optionally, when generating a prompt corresponding to a certain original sample category, one or more original sample data can be selected from the original sample data corresponding to that category and added to the prompt. In this way, after obtaining the prompt, the generative model can refer to the examples in the prompt to generate corresponding candidate sample data. Thus, by adding original sample data to the prompt, the generative model can generate candidate sample data according to the original sample data, thereby ensuring that the generated candidate sample data belongs to the original sample category.

[0067] Optionally, considering that the length of the prompt input to the generative model is often limited, the number of original sample data in the prompt can be pre-configured. If a certain original sample category contains a large number of original sample data, multiple original sample data can be selected from the original sample category on an average basis according to the clustering results. In this way, the resulting candidate sample data can reflect the characteristics of the original sample data in the original sample category on an average basis.

[0068] The following describes some methods for clustering raw sample data.

[0069] In the first implementation, clustering can be performed based on the semantics of the original sample data. Specifically, during clustering, semantic analysis is performed on multiple sets of sample data, and original sample data with the same or similar semantics are clustered into one class.

[0070] In the second implementation, clustering can be performed based on the edit distance of the original sample data. Specifically, during clustering, an original sample data point can first be selected as the cluster center. Next, the edit distances of other original sample data points to the cluster center can be calculated, and original sample data points whose edit distances to the cluster centers are less than a preset threshold can be grouped into the same cluster. Then, an original sample data point can be selected from the un-clustered original sample data as the cluster center, and clustering can continue based on the edit distance to the new cluster center.

[0071] In the third implementation, clustering can be performed based on the latent space vectors corresponding to the original sample data.

[0072] Specifically, a surrogate model can be created based on the target model. The surrogate model has the same function as the target model. That is, if the target model is used to classify data, then the surrogate model also has the ability to classify data. The target model can extract features from the data input to the target model. The surrogate model also includes a module for feature extraction.

[0073] Optionally, the surrogate model can have the same structure as the target model. Alternatively, the surrogate model can be a part of the target model. For example, the surrogate model can be the encoder network in the target model. Next, the surrogate model can be trained using multiple raw sample data sets. The trained surrogate model can extract features from the input data and perform recognition based on the extracted features. Even if the amount of raw sample data is insufficient to train an accurate surrogate model, the feature extraction part of the surrogate model can still be accurate enough to extract accurate latent space vectors from the raw sample data.

[0074] After training the surrogate model, the original sample data can be input back into the surrogate model, and the latent space vector corresponding to each original sample data can be extracted. Specifically, the surrogate model may include an encoder network. The encoder network is used to extract latent space vectors from the input data. After a certain original sample data is input into the surrogate model, the encoder network can map the original sample data into a latent space vector. The data generation device can extract the output of the encoder of the surrogate model to obtain the latent space vector of the original sample data.

[0075] After obtaining the latent space vector corresponding to each original sample data, clustering can be performed on the original sample data based on the latent space vector. Specifically, clustering can be performed on the latent space vector to determine the original sample category to which the latent space vector belongs. The original sample category to which the latent space vector belongs is the original sample category to which the original sample data belongs.

[0076] By training a surrogate model, the encoder network of the surrogate model can extract features from the input data relatively accurately. Thus, the latent space vectors obtained by feature extraction from the original sample data through the surrogate model can reflect the information implicit in the original sample data. Therefore, clustering the latent space vectors of multiple original sample data can accurately determine which original sample category each sample belongs to. Furthermore, clustering based on the latent space vectors of the original sample data yields more accurate clustering results.

[0077] It should be noted that the three implementation methods described above are merely examples. In practical applications, other methods can also be used to cluster the original sample data.

[0078] S203: Sample multiple candidate sample data based on multiple original sample data to obtain multiple enhanced sample data.

[0079] After generating multiple candidate sample data through a generative model, multiple enhanced sample data can be obtained by sampling multiple candidate sample data based on multiple original sample data.

[0080] When sampling from candidate sample data, multiple augmented sample data can be selected from multiple candidate samples according to the distribution pattern of the original sample data. Sampling according to the distribution pattern of the original sample data ensures that the distribution pattern of the multiple augmented sample data is the same as that of the multiple original sample data. Therefore, the effect of training the target model using augmented sample data is the same as that of training the target model using original sample data, and using augmented sample data to train the target model will not cause bias in the target model. Therefore, multiple augmented sample data and multiple original sample data can be used to train the target model. In this way, while avoiding bias in the target model, the amount of sample data for model training is increased, thus improving the model training effect.

[0081] The following section introduces some methods for implementing sampling.

[0082] In the first possible implementation, sampling can be performed based on the degree of overlap between the candidate sample data and the original sample data.

[0083] Specifically, the overlap between candidate sample data and original sample data can be calculated first, and sampling can be performed based on the degree of overlap. Specifically, candidate sample data with an overlap greater than a preset threshold with the original sample data can be selected as augmented sample data. Furthermore, to avoid sampling data that is completely identical to the original sample data, the overlap between the augmented sample data and the original sample data is not 100%.

[0084] In the second possible implementation, sampling can be performed based on the pattern of the feature's eigenvalues.

[0085] As mentioned earlier, the original sample data can include feature values ​​of multiple features. During sampling, the variation patterns and value ranges of each feature's value can be analyzed based on multiple original sample data. By sampling multiple candidate sample data according to the variation patterns and value ranges of the feature values, candidate sample data whose feature values ​​conform to the variation patterns can be selected as augmented sample data.

[0086] In the third possible implementation, sampling can be performed according to the importance sampling method.

[0087] Specifically, to ensure that the distribution patterns of the multiple augmented sample data obtained from sampling are the same as those of the multiple original sample data, importance sampling can be used to sample from multiple candidate sample data. Specifically, the probability distribution of the multiple original sample data can be determined first. Then, importance sampling can be performed on the multiple candidate sample data according to the probability distribution of the original sample data to obtain multiple augmented sample data. Through importance sampling, it can be ensured that the multiple augmented pseudo-sample data correspond to the same distribution as the multiple original sample data. Therefore, increasing the number of sample data for training the target model using augmented sample data will not change the distribution of the original sample data, and thus will not cause bias in the target model.

[0088] Optionally, if each original sample data includes multiple feature values ​​of multiple features, the probability distribution of the original sample data can be the probability distribution of the values ​​of the original sample data. That is, during importance sampling, the probability distribution of multiple feature values ​​can be determined first based on the original sample data, and then candidate sample data whose feature values ​​conform to the probability distribution can be selected from the candidate sample data as augmented sample data based on the probability distribution of the feature values.

[0089] The probability distribution of the original sample data can be obtained by statistically analyzing the values ​​of each feature in the original sample data. Specifically, for a single feature among multiple features, the probability of that feature taking each value can be calculated based on multiple original data sets. For example, assuming there are 100 original sample data sets, for feature X, 50 original sample data sets have the value X1, 20 original sample data sets have the value X2, and 30 original sample data sets have the value X3. Then, we can consider the probability of feature X taking the value X1 to be 50%, the probability of feature X taking the value X2 to be 20%, and the probability of feature X taking the value X3 to be 20%.

[0090] By combining the probabilities of different features taking different feature values ​​with the values ​​of each feature in the candidate sample data, the probability of each candidate sample data being sampled can be obtained. For example, the probability corresponding to each feature can be determined according to the values ​​of each feature in the candidate sample data, and the multiple probabilities can be multiplied together to obtain the probability of the candidate sample data being sampled. Based on the obtained probabilities, importance sampling can be performed to obtain multiple augmented sample data with the same distribution as the multiple original sample data.

[0091] The implementation described above assumes that the features are independent of each other. Therefore, when calculating the probability of multiple feature values ​​being sampled, i.e., the probability of candidate sample data being sampled, the probability of each feature value being sampled can be calculated separately, and the product of the probabilities of multiple feature values ​​being sampled can be used as the probability of candidate sample data being sampled.

[0092] However, in real-world applications, different features may exhibit correlations. These correlations are particularly evident in tabular data. The correlation between features refers to the relationship between the values ​​of those features. If two features are correlated, the value of one feature may influence the value of the other. Thus, the probability of a feature taking a certain value may be affected by the value of another feature. Therefore, when calculating the probability of candidate sample data being sampled, it is necessary to consider not only the probability of a single feature value being sampled but also the mutual influence between feature values.

[0093] For example, suppose the original sample data comes from employee registration forms, with each original sample corresponding to one employee. The original sample data includes several features such as employee ID, employee name, employee gender, and employee date of birth. Each original sample includes one employee's employee ID, employee name, employee gender, and date of birth. Generally, when naming a newborn, the name might be considered based on the newborn's existing name. Furthermore, as society develops, naming habits for newborns may change. Therefore, there might be a correlation between employee name and employee gender, and also between employee name and employee date of birth in the original sample data. That is, if an employee's gender is male, the probability of that employee having a female name is relatively low. If an employee's date of birth is from the last century, then that employee's name is more likely to reflect the characteristics of that era.

[0094] Accordingly, when performing importance sampling, the probability of candidate sample data being sampled can be calculated based on the semi-independence assumption. Based on the semi-independence assumption, if each candidate sample data includes feature values ​​of N features, then it can be assumed that k features are independent and Nk features are correlated (N is a positive integer greater than 1, and k is a positive integer less than N). When calculating the probability of candidate sample data being sampled, the probability of the feature values ​​of the k independent features being sampled can be calculated first. Then, the correlation between the Nk features can be analyzed to determine the probability of each group of correlated feature values ​​being sampled. Finally, the probabilities are multiplied together to obtain the probability of candidate sample data being sampled.

[0095] In the above implementation, it is necessary to first identify the associated features before calculating the probability of the candidate sample data being sampled. That is, it is necessary to first determine which features among the N features are independent, which features are associated, and which associated features have a relationship with each other.

[0096] Optionally, the feature association probability can be determined first. The feature association probability represents the probability that the values ​​of a feature are related. Specifically, the values ​​of each feature in the original sample data can be analyzed to determine whether there is a correlation between the feature values. If so, the probability of mutual correlation between the feature values ​​can be further calculated to obtain the feature association probability. The feature association probability represents the probability that at least two features among multiple features are related. Based on the feature association probability, it can be determined which features among multiple features are mutually related, and what kind of influence the mutually related features have on each other's values.

[0097] After determining the feature association probability, the probability distribution of the original sample data can be determined based on the feature association probability, and then the probability of the candidate sample data being sampled can be determined based on the probability distribution of the original sample data.

[0098] In some possible implementations, an interaction matrix of features can be constructed first based on multiple original sample data. Specifically, the number of rows and columns of the interaction matrix is ​​equal to the number of feature values ​​in the original sample data. Each element in the interaction matrix represents the probability that the feature values ​​of the two features corresponding to that element in the specified row and column are correlated. That is, if each original sample data includes N features, then the interaction matrix is ​​an N*N matrix. The element in the i-th row and j-th column of the interaction matrix represents the probability that the value of the i-th feature is correlated with the value of the j-th feature. Here, i and j are both positive integers not greater than N.

[0099] Optionally, the interaction matrix can be obtained using the Integrated Hessian algorithm. Specifically, the second gradient of the surrogate model, trained using multiple original sample data, can be determined and input into the Hessian integration algorithm. The Hessian integration algorithm can analyze the correlation between features to obtain the interaction matrix of the features. Accordingly, the interaction matrix can be a Hessian matrix.

[0100] After establishing the interaction level matrix, it can be analyzed to identify features with correlations and their correlation probabilities. Specifically, segmentation algorithms can be used to segment the interaction level matrix, identifying groups of features with strong correlations and thus obtaining their correlation probabilities. For example, the interaction level matrix can be mapped to an image, with each element corresponding to a pixel in the image. Then, image segmentation algorithms such as strong interaction graph segmentation can be used to segment the image, identifying pixels with strong interactions, and determining the features corresponding to these pixels as those with correlations, along with their correlation probabilities. In this way, even if the original sample data contains a large number of features, it is possible to find correlated features and determine their correlation probabilities through image processing.

[0101] In the interaction matrix, each element represents the probability that the values ​​of two features are related. However, in real-world scenarios, there may be three or more features that are related. Accordingly, after determining the feature interaction probability between two features using the interaction matrix, it is possible to further determine whether there are three or more features that are related.

[0102] Specifically, if multiple features include a first feature, a second feature, and a third feature, and an interaction matrix determines that there is a correlation between the values ​​of the first feature and the second feature, and also a correlation between the values ​​of the first feature and the third feature, then when determining the correlation between features, the first feature, the second feature, and the third feature can be considered to be correlated with each other. Accordingly, the correlation probabilities of the first feature, the second feature, and the third feature can be determined based on the correlation probabilities corresponding to the first feature and the second feature, and the correlation probabilities corresponding to the first feature and the third feature. Similarly, the correlation between four or more features can be determined, and the corresponding correlation probabilities can be determined.

[0103] Optionally, the correlation between the above-mentioned features can be related to the feature values. Specifically, a correlation is considered to exist between features only if the values ​​of two features are both related to a specific value of a third feature.

[0104] Let's continue with the example above. Assume the first feature can take values ​​a1 and a2, the second feature can take values ​​b1 or b2, and the third feature can take values ​​c1 and c3. If the first feature is a1, the second feature has an 80% probability of being b1. If the first feature is a2, the second feature has a 50% probability of being b1 and a 50% probability of being b2. Therefore, we can consider that the feature value b1 of the second feature is related to the feature value a1 of the first feature. Similarly, if the first feature is a1, the third feature has a 90% probability of being c1. If the first feature is c2, the third feature has a 50% probability of being c1 and a 50% probability of being c2. Therefore, we can consider that the feature value c1 of the third feature is related to the feature value a1 of the first feature.

[0105] Since there is a correlation between the feature value b1 of the second feature and the feature value a1 of the first feature, and the feature value c1 of the third feature is also correlated with the feature value a1 of the first feature, it can be assumed that there is a correlation between the feature values ​​a1 of the first feature, b1 of the second feature, and c1 of the third feature. The feature correlation probability includes the probability that the first feature is a1, the second feature is b1, and the third feature is c1.

[0106] If the first feature has a value of a2, the third feature has a 90% probability of having a value of c1. If the first feature has a value of c2, the third feature has a 50% probability of having a value of c1 and a 50% probability of having a value of c2. Therefore, we can consider that the feature value c1 of the third feature is correlated with the feature value a2 of the first feature. Since there is a correlation between the feature value b1 of the second feature and the feature value a1 of the first feature, and a correlation between the feature value c1 of the third feature and the feature value a2 of the first feature, and feature values ​​b1 and c2 are associated with different feature values ​​of the first feature, we can conclude that the second and third features are not simultaneously correlated with the first feature.

[0107] After determining the feature association probabilities, the probability of a candidate sample being sampled can be calculated based on the values ​​of each feature in the candidate sample data, combined with the probability of independent feature values ​​and the probability of associated features taking associated values. Then, importance sampling is performed on the candidate sample data according to these probabilities to obtain multiple augmented sample data. This ensures that the distribution of the augmented sample data is the same as the distribution of the original sample data, avoiding bias in the training of the target model.

[0108] It should be noted that the above three implementation methods are only examples. In actual application scenarios, other implementation methods can also be used for sampling.

[0109] This application provides a data generation method. Specifically, multiple original sample data can be obtained first. If the number of original sample data is insufficient to train the target model, multiple candidate sample data matching the original sample data can be generated using a generative model. Candidate sample data refers to data generated by the generative model based on the original sample data without importance sampling. Candidate sample data may have a distribution inconsistent with the original sample data. Therefore, importance sampling can be performed on multiple candidate sample data based on multiple original sample data. The candidate sample data sampled during the importance sampling stage can be called augmented sample data. Through importance sampling, multiple augmented sample data whose distribution patterns match the original sample data can be collected from multiple candidate sample data according to the distribution patterns of the original sample data. Because the distribution patterns of the augmented sample data are the same as those of the original sample data, training the model based on the augmented sample data will not cause model bias. Therefore, the target model can be trained together using augmented sample data and original sample data. On the one hand, the number of sample data can be supplemented by a generative model; on the other hand, importance sampling can ensure that the generated augmented sample data matches the original sample data. In this way, model training can be completed with sufficient sample data while ensuring that the model is not biased. In this way, the amount of sample data can be increased to complete the training of the model without causing the model to become biased.

[0110] This application embodiment also provides a data generation device 300. The data generation device 300 can be applied to the server 20 in the implementation shown in FIG1 to implement the functions of the data generation device 21. Specifically, as shown in FIG3, the data generation device 300 includes:

[0111] Acquisition unit 310 is used to acquire multiple raw sample data;

[0112] The generation unit 320 is used to generate multiple candidate sample data based on the multiple original sample data using a generative model;

[0113] The sampling unit 330 is used to sample the multiple candidate sample data based on the multiple original sample data to obtain multiple enhanced sample data, and the original sample data and the enhanced sample data are used to train the target model.

[0114] In practical applications, the data generation device 300 described above can be implemented in software or in hardware. For example, the implementation of the sampling unit 330 will be described below. Similarly, the implementation of the acquisition unit 310 and the generation unit 320 can refer to the implementation of the sampling unit 330.

[0115] As an example of a software functional unit, sampling unit 330 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, or a container. Further, the aforementioned computing instance may be one or more. For example, the resource allocation device may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.

[0116] It should be noted that if a cloud service system includes multiple resource pools, different resource pools can belong to different regions or Availability Zones (AZs), or they can belong to the same region or AZ.

[0117] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0118] As an example of a hardware functional unit, the sampling unit 330 may include at least one computing device, such as a server. Alternatively, the resource retrieval device may be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.

[0119] The sampling unit 330 includes multiple computing devices that can be distributed in the same region or in different regions. Similarly, the resource allocation device includes multiple computing devices that can be distributed in the same Availability Zone (AZ) or in different AZs. Likewise, the resource allocation device includes multiple computing devices that can be distributed in the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0120] It should be noted that, in other embodiments, the acquisition unit 310 can be used to execute any step in the data generation method, the generation unit 320 can be used to execute any step in the data generation method, and the sampling unit 330 can be used to execute any step in the data generation method. The steps implemented by the acquisition unit 310, the generation unit 320, and the sampling unit 330 can be specified as needed. By implementing different steps in the data generation method through the acquisition unit 310, the generation unit 320, and the sampling unit 330, all functions of the data generation device can be realized.

[0121] This application also provides a computing device 100. As shown in FIG4, the computing device 100 includes: a bus 102, a processor 104, a memory 106, and a communication interface 108. The processor 104, the memory 106, and the communication interface 108 communicate with each other via the bus 102. The computing device 100 may be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 100.

[0122] Bus 102 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, only one line is used in Figure 4, but this does not imply that there is only one bus or one type of bus. Bus 104 can include pathways for transmitting information between various components of computing device 100 (e.g., memory 106, processor 104, communication interface 108).

[0123] The processor 104 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0124] The memory 106 may include volatile memory, such as random access memory (RAM). The memory 106 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0125] The memory 106 stores executable program code, which the processor 104 executes to implement the functions of the aforementioned acquisition unit 310, generation unit 320, and sampling unit 330, thereby realizing the data generation method. That is, the memory 106 stores instructions for executing the data generation method.

[0126] The communication interface 108 uses transceiver modules such as, but not limited to, network interface cards and transceivers to enable communication between the computing device 100 and other devices or communication networks.

[0127] This application also provides a computing device cluster, including at least one computing device, each computing device including a processor and a memory; the processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster performs the data generation method provided by any possible implementation of the foregoing method embodiments.

[0128] Figure 5 is a schematic diagram of the computing device cluster, which includes at least one computing device 100 as shown in Figure 4. The computing device 100 can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device 100 can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.

[0129] In some possible implementations, the memory 106 of one or more computing devices 100 in a computing device cluster may store the same instructions for executing the data generation method.

[0130] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also store partial instructions for executing the data generation method. In other words, a combination of one or more computing devices 100 can jointly execute the instructions for executing the data generation method.

[0131] It should be noted that the memory 106 in different computing devices 100 within the computing device cluster can store different instructions, which are used to execute parts of the functions of the acquisition unit 310, the generation unit 320, and the sampling unit 330, respectively. That is, the instructions stored in the memory 106 of different computing devices 100 can implement the functions of one or more units of the acquisition unit 310, the generation unit 320, and the sampling unit 330.

[0132] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 6 illustrates one possible implementation. As shown in Figure 6, two computing devices 100A and 100B are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this type of possible implementation, the memory 106 in computing device 100A stores instructions for executing the functions of the acquisition unit 310 and the sampling unit 330. Simultaneously, the memory 106 in computing device 100B stores instructions for executing the functions of the generation unit 320.

[0133] The connection method between the computing device clusters shown in Figure 6 can be considered as follows: considering that the data generation method provided in this application needs to call the generative model when generating enhanced sample data, the function implemented by the generation unit 320 is considered to be executed by the computing device 100B.

[0134] It should be understood that the functions of computing device 100A shown in Figure 6 can also be performed by multiple computing devices 100. Similarly, the functions of computing device 100B can also be performed by multiple computing devices 100.

[0135] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to perform a data generation method.

[0136] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct a computing device to perform a data generation method.

[0137] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data generating method characterized by comprising: The method comprises: obtaining a plurality of original sample data; generating a plurality of candidate sample data according to the plurality of original sample data by a generative model; sampling the plurality of candidate sample data according to the plurality of original sample data to obtain a plurality of enhanced sample data, wherein the original sample data and the enhanced sample data are used for training a target model.

2. The method of claim 1, wherein, The sampling the plurality of candidate sample data according to the plurality of original sample data to obtain a plurality of augmented sample data comprises: determining a probability distribution of the plurality of original sample data; performing importance sampling on the plurality of candidate sample data according to the probability distribution of the plurality of original sample data to obtain a plurality of augmented sample data.

3. The method of claim 2, wherein, The original sample data corresponds to a plurality of features, and each original sample data corresponds to a group of values of the plurality of features; The determining a probability distribution of the plurality of original sample data comprises: analyzing the plurality of original sample data to determine a plurality of feature correlation probabilities, wherein the feature correlation probability represents a probability that the values of at least two features in the plurality of features are correlated; determining the probability distribution of the original sample data according to the feature correlation probability.

4. The method of claim 3, wherein, The analyzing the plurality of original sample data to determine a plurality of feature correlation probabilities comprises: analyzing the plurality of original sample data to obtain an interaction degree matrix of the plurality of features, wherein the interaction degree matrix is an N*N dimensional matrix, the element of the i-th row and the j-th column of the interaction degree matrix represents a probability that the value of the i-th feature and the value of the j-th feature in the plurality of features are correlated, N is the number of the plurality of features, and i and j are positive integers not greater than N; determining a feature correlation probability between any two features according to the interaction degree matrix.

5. The method of claim 4, wherein, The N feature groups comprise a first feature, a second feature, and a third feature; and the analyzing the plurality of original sample data to determine a plurality of feature correlation probabilities further comprises: in response to the values of the first feature and the second feature being correlated and the values of the first feature and the third feature being correlated, determining that the values of the first feature, the second feature, and the third feature are correlated; determining the feature correlation probability of the first feature, the second feature, and the third feature according to the feature correlation probability corresponding to the first feature and the second feature and the feature correlation probability of the first feature and the third feature.

6. The method according to any one of claims 1 to 5, characterized in that, The generating a plurality of candidate sample data according to the plurality of original sample data by a generative model comprises: clustering the plurality of original sample data to determine a plurality of original sample categories; for each original sample category, generating a plurality of candidate sample data by a generative model; The sampling the plurality of candidate sample data according to the plurality of original sample data to obtain a plural For each of the plurality of candidate sample data of the original sample category, the candidate sample data is sampled according to original sample data in the original sample category, to obtain a plurality of enhanced data of the original sample category.

7. The method of claim 6, wherein, The clustering of the plurality of original sample data to obtain a plurality of original sample categories comprises: training an agent model according to the plurality of original sample data, the agent model having the same function as the target model; inputting the plurality of original sample data into the agent model respectively, and extracting a hidden space vector corresponding to each original sample data; clustering the hidden space vector corresponding to each original sample data to determine a plurality of original sample categories.

8. A data generating apparatus characterized by comprising: The device comprises: an acquisition unit configured to acquire a plurality of original sample data; a generation unit configured to generate a plurality of candidate sample data according to the plurality of original sample data by using a generative model; a sampling unit configured to sample the plurality of candidate sample data according to the plurality of original sample data to obtain a plurality of enhanced sample data, wherein the original sample data and the enhanced sample data are used to train a target model.

9. The device of claim 8, wherein the sampling unit is specifically configured to determine a probability distribution of the plurality of original sample data; and perform importance sampling on the plurality of candidate sample data according to the probability distribution of the plurality of original sample data to obtain a plurality of enhanced sample data.

10. The apparatus of claim 9, wherein, each of the original sample data corresponds to a group of values of the plurality of features; the sampling unit is specifically configured to analyze the plurality of original sample data to determine a feature correlation probability, the feature correlation probability representing a probability that values of at least two features in the plurality of features are correlated; and determine the probability distribution of the original sample data according to the feature correlation probability.

11. The device of claim 10, wherein the sampling unit is specifically configured to analyze the plurality of original sample data to obtain an interaction degree matrix of the plurality of features, the interaction degree matrix being an N*N-dimensional matrix, an element in i-th row and j-th column of the interaction degree matrix representing a probability that a value of i-th feature in the plurality of features and a value of j-th feature are correlated, N being a number of the plurality of features, i and j being positive integers not greater than N; and determine a feature correlation probability between any two features according to the interaction degree matrix.

12. The apparatus of claim 11, wherein, the N feature groups comprise a first feature, a second feature, and a third feature; the sampling unit is specifically configured to, in response to a value of the first feature and a value of the second feature being correlated and a value of the first feature and a value of the third feature being correlated, determine that the value of the first feature, the value of the second feature, and the value of the third feature are correlated; and determine a feature correlation probability of the first feature, the second feature, and the third feature according to the feature correlation probability of the first feature and the second feature and the feature correlation probability of the first feature and the third feature.

13. The apparatus of any of claims 8-12, wherein: the generating unit is specifically configured to cluster the plurality of original sample data to determine a plurality of original sample categories; and for each of the original sample categories, generate a plurality of candidate sample data through a generative model. the sampling unit is specifically configured to, for each of the plurality of candidate sample data of the original sample category, sample the candidate sample data according to original sample data in the original sample category to obtain a plurality of augmented data of the original sample category.

14. The apparatus of claim 13, wherein: the generating unit is specifically configured to train an agent model according to the plurality of original sample data, the agent model having a same function as the target model; input the plurality of original sample data into the agent model respectively, and extract a latent space vector corresponding to each of the original sample data; and cluster the latent space vector corresponding to each of the original sample data to determine a plurality of original sample categories.

15. A computing device, comprising: the computing device includes a processor and a memory; the processor is configured to execute instructions stored in the memory to cause the computing device to perform the operation steps of the method of any of claims 1-7.

16. A cluster of computing devices, characterized in that, the computing device cluster includes at least one computing device, and each computing device includes a processor and a memory: the memory is configured to store instructions; the processor is configured to execute the instructions to cause the computing device cluster to perform the operation steps of the method of any of claims 1-7.

17. A computer-readable storage medium, characterized in that, the computer readable storage medium stores instructions, which when executed on a computing device, cause the computing device to perform the operation steps of the method of any of claims 1- 7.

18. A computer program product comprising instructions which, when executed on a computing device, cause the computing device to perform the operation steps of the method according to any of claims 1-7.