Synthetic data generation method and device, equipment, medium and product

By generating synthetic data using artificial intelligence technology and utilizing hierarchical diffusion and conditional sampling, the problem of low security of real customer data in the testing process is solved, achieving efficient and accurate data testing.

CN121455818APending Publication Date: 2026-02-03INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511539787.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

In existing technologies, real customer data has low security during the testing phase, and the methods for generating test data cannot achieve accurate data testing, resulting in low efficiency in generating synthetic data.

Method used

Artificial intelligence technology is used to generate synthetic data. Through hierarchical/progressive diffusion and conditional sampling, a diffusion model is introduced to split the data and process noise. The diffusion model is then trained with conditional constraint information to generate high-quality synthetic data.

Benefits of technology

While ensuring data security, it improved the accuracy and efficiency of data testing and the efficiency of generating synthetic data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121455818A_ABST
    Figure CN121455818A_ABST
Patent Text Reader

Abstract

The invention provides a synthetic data generation method and device, equipment, a medium and a product, and relates to the field of machine learning. Comprises: acquiring an initial data sample; performing data splitting processing on the initial data sample according to preset logic layer classification information to obtain multiple pieces of logic layer information of the initial data sample; performing forward diffusion processing on the logic layer information according to preset logic level classification information corresponding to the logic layer information to obtain a noise data sample; generating condition constraint information according to the logic layer information; obtaining an initial diffusion model; and training an initial diffusion model according to the initial data sample, the noise data sample and the conditional constraint information to obtain a target diffusion model. The technical problems that in the prior art, real customer data is low in safety in the test link, and a test data generation method cannot achieve accurate data testing, so that the generation efficiency of synthetic data is low are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine learning, and more particularly to a method, apparatus, device, medium, and product for generating synthetic data. Background Technology

[0002] In traditional software development and maintenance processes, a large amount of real transaction data is typically needed as a test sample to ensure the correctness, performance, and stability of new features and systems. However, directly using real customer data for testing is becoming increasingly difficult and risky. On the one hand, the use of real data may infringe on customer privacy and raise legal and reputational risks; on the other hand, frequent data breaches have exacerbated the need for data protection technologies.

[0003] Currently, existing solutions mainly use technologies such as data anonymization and data obfuscation to protect personal privacy to a certain extent and to process complex data patterns and relationships to some degree.

[0004] However, in existing technologies, real customer data has low security during the testing phase, and the methods for generating test data cannot achieve accurate data testing, resulting in low efficiency in generating synthetic data. Summary of the Invention

[0005] This application provides a method, apparatus, device, medium, and product for generating synthetic data, in order to solve the problem that in the prior art, real customer data has low security in the testing process, and the test data generation method cannot achieve accurate data testing, resulting in low efficiency in generating synthetic data.

[0006] In a first aspect, this application provides a method for generating synthetic data, including:

[0007] Obtain initial data samples;

[0008] Based on the preset logical hierarchy classification information, the initial data sample is split into multiple logical layers to obtain the initial data sample.

[0009] Based on the preset logical layer classification information corresponding to the logical layer information, the logical layer information is subjected to forward diffusion processing to obtain noisy data samples.

[0010] Generate condition constraint information based on the logical layer information;

[0011] Obtain the initial diffusion model; wherein, the initial diffusion model includes an inverse denoising module;

[0012] Based on the initial data samples, noisy data samples, and conditional constraint information, an initial diffusion model is trained to obtain a target diffusion model; wherein, the target diffusion model is used to transform the input random noise information and conditional constraint information into synthetic data.

[0013] In one possible design, based on the preset logical hierarchy classification information corresponding to the logical layer information, the logical layer information is forward diffused to obtain noisy data samples, including:

[0014] Based on the preset logical hierarchy classification information corresponding to the logical layer information, determine the corresponding forward diffusion steps, noise diffusion model type, and noise scheduling strategy;

[0015] The corresponding noise step equation is determined based on the number of forward diffusion steps, the type of noise diffusion model, and the noise scheduling strategy.

[0016] According to the noise step equation, Gaussian noise is added to the logic layer information to obtain noisy data samples.

[0017] In one possible design, the pre-defined logical hierarchy of information includes at least one of the following: user basic information layer, account status layer, transaction behavior sequence layer, and risk label layer.

[0018] In one possible design, the noise diffusion model type includes at least one of a low-dimensional diffusion model, a time-series diffusion model, and a graph diffusion model; wherein the number of diffusion steps in the low-dimensional diffusion model is less than or equal to 50.

[0019] In one possible design, condition constraint information is generated based on the logic layer information, including:

[0020] Based on the information from the logic layer, determine the corresponding business tag;

[0021] Generate condition constraint information based on business tags.

[0022] In one possible design, the conditional constraint information includes at least one of the following: the user's customer segment information, product type information, and risk level information. The customer segment information includes multiple factors such as age range, product list, transaction type, amount threshold, and time window.

[0023] In one possible design, the initial diffusion model includes an initial teacher model and an initial student model;

[0024] Accordingly, based on the initial data samples, noisy data samples, and conditional constraint information, an initial diffusion model is trained to obtain the target diffusion model, including:

[0025] Based on the initial data samples, noisy data samples, and conditional constraints, the initial teacher model is fine-tuned to obtain the target teacher model, and the knowledge distillation parameters of the target teacher model are obtained.

[0026] The initial student model is subjected to knowledge distillation using model parameters to obtain the target diffusion model.

[0027] In one possible design, the initial diffusion model also includes a discriminator module for identifying the initial data samples and the synthetic data. The discriminator module is also used to identify long-tailed pattern samples and / or rare pattern samples in the initial data samples.

[0028] Secondly, this application provides an apparatus for generating synthetic data, comprising:

[0029] The first acquisition module is used to acquire initial data samples;

[0030] The first processing module is used to perform data splitting processing on the initial data sample according to the preset logical hierarchy classification information, so as to obtain multiple logical layer information of the initial data sample.

[0031] The second processing module is used to perform forward diffusion processing on the logical layer information according to the preset logical layer classification information corresponding to the logical layer information, so as to obtain noisy data samples.

[0032] The generation module is used to generate condition constraint information based on the logic layer information;

[0033] The second acquisition module is used to acquire the initial diffusion model; wherein the initial diffusion model includes an inverse denoising module.

[0034] The training module is used to train an initial diffusion model based on initial data samples, noisy data samples, and conditional constraint information to obtain a target diffusion model; wherein, the target diffusion model is used to transform the input random noise information and conditional constraint information into synthetic data.

[0035] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;

[0036] The memory stores the instructions that the computer executes;

[0037] The processor executes computer execution instructions stored in memory to implement the method for generating synthetic data as described in the first aspect of the invention.

[0038] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement a method for generating synthetic data as described in the first aspect of the invention.

[0039] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements a method for generating synthetic data according to the first aspect of the invention.

[0040] This application provides a method, apparatus, device, medium, and product for generating synthetic data, comprising: acquiring an initial data sample; performing data splitting processing on the initial data sample according to preset logical hierarchy classification information to obtain multiple logical layer information of the initial data sample; performing forward diffusion processing on the logical layer information according to the preset logical hierarchy classification information corresponding to the logical layer information to obtain noisy data samples; generating conditional constraint information based on the logical layer information; acquiring an initial diffusion model; wherein the initial diffusion model includes a reverse denoising module; and training the initial diffusion model based on the initial data sample, noisy data samples, and conditional constraint information to obtain a target diffusion model. Compared with the existing technology where real customer data has low security in the testing phase and the test data generation method cannot achieve accurate data testing, resulting in low efficiency in generating synthetic data, this application uses artificial intelligence technology to generate high-quality synthetic data to replace the application of real customer data in the testing phase, thereby improving the accuracy of data testing while ensuring data security. In the process of generating synthetic data, hierarchical / progressive diffusion and conditional sampling are introduced to improve training efficiency, thereby improving the efficiency of synthetic data generation. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 A schematic diagram of a system architecture for a method of generating synthetic data provided in an embodiment of this application;

[0043] Figure 2 A flowchart illustrating a method for generating synthetic data provided in this application embodiment. Figure 1 ;

[0044] Figure 3 A flowchart illustrating a method for generating synthetic data provided in this application embodiment. Figure 2 ;

[0045] Figure 4 A flowchart illustrating a method for generating synthetic data provided in this application embodiment. Figure 3 ;

[0046] Figure 5 This is a schematic diagram of the structure of the apparatus for generating synthetic data provided in the embodiments of this application;

[0047] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0048] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0049] In the embodiments of this application, the terms "first" and "second" are used to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, nor do they necessarily imply difference. It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner. In the embodiments of this application, "at least one" refers to one or more, and "more than one" refers to two or more.

[0050] It should be noted that the phrase "at...time" in the embodiments of this application can refer to the instant at which a certain situation occurs, or to a period of time after the occurrence of a certain situation; the embodiments of this application do not specifically limit this. Furthermore, the method for generating synthetic data provided in the embodiments of this application is merely an example, and the method for generating synthetic data may include more or less content.

[0051] To facilitate a clear description of the technical solutions in the embodiments of this application, some terms and technologies involved in the embodiments of this application will be briefly introduced below:

[0052] Diffusion Model (DM) is a generative model originally derived from the diffusion process theory in physics. In recent years, it has been introduced into the field of machine learning, particularly demonstrating great potential in generative modeling. In the context of deep learning, the diffusion model is a generative method based on an iterative denoising process, used to generate high-quality image, audio, and even text data. Its core idea is to gradually add noise to the data through a series of carefully designed diffusion steps until it is completely randomized, and then gradually restore the original state of the data through a reverse process, i.e., a denoising step, thereby generating new samples.

[0053] Data masking is a common data protection method that reduces data identifiability by replacing or hiding sensitive information (such as names, account numbers, transaction amounts, etc.). Common techniques include substitution, obfuscation, and generalization. For example, replacing real account numbers with fictitious numbers that maintain the same format, or replacing personal names with anonymous labels like "Customer A." This method is simple and easy to implement, but it may disrupt the logical relationships and distribution characteristics between data, affecting the effectiveness of testing.

[0054] Data obfuscation: Data obfuscation techniques further enhance data protection by not only replacing sensitive data but also altering its structure and form through algorithms, making the original data difficult to recover. For example, by applying mathematical transformations to transaction amounts, the statistical characteristics remain unchanged, but individual values ​​cannot be mapped to actual transactions. This method improves data security but may also introduce additional computational complexity and testing difficulty.

[0055] Differential privacy: Differential privacy is a mathematical framework that protects individual privacy by introducing random noise during the data query process, ensuring that the distribution of query results remains largely unchanged regardless of whether individual data is included in the database. Systems can use differential privacy techniques to process aggregated query results, but the application of this method on large datasets still faces challenges in terms of efficiency and accuracy.

[0056] In traditional software development and maintenance processes, a large amount of real transaction data is typically needed as a test sample to ensure the correctness, performance, and stability of new features and systems. However, directly using real customer data for testing is becoming increasingly difficult and risky. On the one hand, the use of real data may infringe on customer privacy and raise legal and reputational risks; on the other hand, frequent data breaches have exacerbated the need for data protection technologies.

[0057] Existing solutions, such as data anonymization and data obfuscation techniques, can protect personal privacy to some extent, but there is still a risk of information recovery, and they are insufficient in handling complex data patterns and correlations, which may affect the authenticity and accuracy of the test.

[0058] Standard Diffusion Models (especially large-scale models in the image and audio domains) typically require massive amounts of data and extremely long training times, involving hundreds or even thousands of iterative denoising processes. This results in extremely high computational costs (computing power, time, and energy consumption) for model training and inference. This is an unbearable burden for internal banking systems that need to generate data quickly or have limited resources.

[0059] However, each of the above technologies has its limitations. For example, data anonymization and obfuscation may damage the intrinsic connections of data, affecting the comprehensiveness and accuracy of testing. While synthetic data generation and differential privacy technologies theoretically provide stronger privacy protection, in practical applications, issues such as model training complexity, data quality control, and how to balance privacy protection and data usability still need to be addressed.

[0060] To address the aforementioned issues, the inventors, during their research on the low efficiency of synthetic data generation, discovered that existing technologies suffer from low security in the testing phase due to the use of real customer data, and that the methods for generating test data cannot achieve accurate data testing, thus resulting in low efficiency in synthetic data generation. Therefore, the inventors considered using artificial intelligence technology to generate high-quality synthetic data to replace the application of real customer data in the testing phase, thereby improving data testing accuracy while ensuring data security. In the synthetic data generation process, hierarchical / progressive diffusion and conditional sampling are introduced, improving training efficiency. Based on this, embodiments of this application provide a method, apparatus, device, medium, and product for generating synthetic data, applicable to the field of machine learning, aiming to solve the problem of low efficiency in the generation of synthetic data in existing technologies.

[0061] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0062] Figure 1 This is a schematic diagram of the system architecture for a method of generating synthetic data according to an embodiment of this application. The synthetic data generation system is a computer device. Figure 1 In the above architecture, at least one of data acquisition device 101, processing device 102 and display device 103 is included.

[0063] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the processing system architecture of the method for generating synthetic data. In other feasible embodiments of this application, the above architecture may include more or fewer components than illustrated, or combine some components, or divide some components, or arrange different components, which can be determined according to the actual application scenario and is not limited here. Figure 1 The components shown can be implemented in hardware, software, or a combination of both.

[0064] In the specific implementation process, the data acquisition device 101 may include an input / output interface or a communication interface. The data acquisition device 101 can connect to the processing device through the input / output interface or the communication interface to obtain initial data samples.

[0065] The processing device 102 can train an initial diffusion model to obtain a target diffusion model.

[0066] The display device 103 can also be a touch screen or the screen of a terminal device, used to receive user commands while displaying the above-mentioned content, so as to realize interaction with the user.

[0067] It should be understood that the aforementioned processing device can be implemented by a processor reading instructions from memory and executing those instructions, or it can be implemented by a chip circuit.

[0068] Furthermore, the network architecture and business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0069] The technical solution of this application will be described in detail below with reference to specific embodiments:

[0070] Figure 2 A flowchart illustrating a method for generating synthetic data provided in this application embodiment. Figure 1 ,like Figure 2 As shown, the method includes:

[0071] S201. Obtain initial data samples.

[0072] S202. Based on the preset logical hierarchy classification information, perform data splitting processing on the initial data sample to obtain multiple logical hierarchy information of the initial data sample.

[0073] The preset logical hierarchy classification information includes at least one of the following: user basic information layer, account status layer, transaction behavior sequence layer, and risk label layer.

[0074] S203. Based on the preset logical layer classification information corresponding to the logical layer information, perform forward diffusion processing on the logical layer information to obtain noisy data samples.

[0075] S204. Generate condition constraint information based on the logic layer information.

[0076] Specifically, the corresponding business tags are determined based on the information from the logic layer.

[0077] Specifically, condition constraint information is generated based on business tags.

[0078] The conditional constraint information includes at least one of the following: the user's customer segment information, product type information, and risk level information. The customer segment information includes multiple factors such as age range, product list, transaction type, amount threshold, and time window.

[0079] For example, based on the inherent structure and business logic of bank data, it can be decomposed into multiple logical layers (such as user basic information layer, account status layer, transaction behavior sequence layer, and risk label layer).

[0080] Specifically, bank data is split into three layers based on business logic:

[0081] Optional, static layer (user profile: age / occupation / asset level) → adopts a low-dimensional diffusion model (diffusion steps T=50).

[0082] Optional, dynamic layer (transaction sequence: timestamp / amount / type) → adopts temporal diffusion model (LSTM-UNet hybrid architecture, T=200).

[0083] Optional, the association layer (across entity relationships: account-counterpartie network) → adopts a graph diffusion model (graph convolutional embedding diffusion process).

[0084] Furthermore, different diffusion steps and noise scheduling strategies are designed for different levels of data characteristics (such as static attributes, time series, and the proportion of categorical variables).

[0085] To give a further example, for the relatively stable and low-dimensional user basic information layer, fewer diffusion steps are used; for the complex, high-dimensional, and time-dependent transaction behavior sequence layer, more steps are retained to capture details.

[0086] Furthermore, strong constraints (such as business labels like customer segmentation, product type, and risk level) are introduced during the generation process, guiding the model to sample and denoise only within a specific conditional subspace. This significantly reduces the search space, minimizes unnecessary computation, and improves training and generation efficiency.

[0087] Specifically, a condition vector c is generated using business tags (such as customer segment IDs) and input into each layer of the model.

[0088] Furthermore, the output of the static layer serves as the initial condition for the dynamic layer, and the output of the dynamic layer drives the generation of the associated layer, achieving hierarchical conditional coupling, as shown in the formula:

[0089] x_dynamic=f(x_static,c,z)

[0090] S205. Obtain the initial diffusion model.

[0091] The initial diffusion model includes an inverse denoising module.

[0092] Specifically, the goal of the reverse denoising module is to start with completely noisy data and gradually work its way back to the original data. This requires the model to learn a denoising process, reducing noise at each step and gradually restoring the clarity of the data.

[0093] Specifically, the reverse process can be seen as the inverse of the forward process, but direct reverse reasoning is not feasible because the forward process is random and irreversible. Therefore, a neural network needs to be trained to predict how to denoise at each step.

[0094] Furthermore, the inverse process is typically modeled based on the following equation, which attempts to find a denoising function:

[0095]

[0096] in, These are the parameters of the neural network.

[0097] Furthermore, the inverse step equation is:

[0098]

[0099] in, It is the mean predicted by the neural network. It is a time step The variance is usually related to Related.

[0100] Furthermore, a suitable loss function is needed to train the denoising network.

[0101] Optionally, minimizing the gap between the predicted denoised result and the actual noise-free data can be achieved by likelihood maximization or variational lower bounds (such as ELBO in variational autoencoders).

[0102] During training, the model is required to perform training on a given... In this case, prediction is made through multi-step iterative steps. .

[0103] Among them, a dedicated loss function component is used to penalize the model for violating the known conditional probability distribution or correlation between features when generating data (such as by using mutual information maximization or conditional adversarial training), ensuring that the generated data not only conforms to the univariate distribution, but also accurately reflects the complex multivariate relationship network in bank data.

[0104] The goal of training the diffusion model is to teach it how to perform the inverse denoising process effectively and accurately. This is typically achieved by maximizing the similarity between the data distribution and the model-generated distribution, which can be guided by methods such as variational bounds or maximum likelihood estimation.

[0105] S206. Based on the initial data samples, noisy data samples, and conditional constraint information, train the initial diffusion model to obtain the target diffusion model.

[0106] The target diffusion model is used to transform the input random noise information and conditional constraint information into synthetic data.

[0107] It should be noted that an efficient conditional information injection channel is designed in the core architecture of the diffusion model (such as the residual block of UNet).

[0108] Here, the condition information is no longer just simple category labels or low-dimensional vectors, but a highly structured condition descriptor that can contain any combination of conditions specified by the user (such as age range, product list, transaction type, amount threshold, time window, etc.).

[0109] Specifically, at each step of the denoising process, this conditional information is deeply integrated into the intermediate representation of the model through adaptive layer normalization, attention mechanisms, or feature concatenation, which strongly guides the generation process to strictly follow the user-defined conditional distribution.

[0110] For example, the condition encoding of a structured conditional injector is: user input condition (such as "35 < age < 45") "Cross-border transfer > 50,000") → Parsed as a structured tensor C.

[0111] Furthermore, the model is modified by embedding conditional attention gates into the residual blocks of U-Net:

[0112] class ConditionalGate(nn.Module):

[0113] def forward(x,C):

[0114] attn=Softmax(Linear([x,C])) # Calculate conditional attention weights

[0115] return x*attn+C

[0116] This embodiment provides a method for generating synthetic data, including: acquiring initial data samples; performing data splitting on the initial data samples according to preset logical hierarchy classification information to obtain multiple logical layer information of the initial data samples; performing forward diffusion processing on the logical layer information according to the preset logical hierarchy classification information corresponding to the logical layer information to obtain noisy data samples; generating conditional constraint information based on the logical layer information; acquiring an initial diffusion model; wherein the initial diffusion model includes a reverse denoising module; and training the initial diffusion model based on the initial data samples, noisy data samples, and conditional constraint information to obtain a target diffusion model. Compared with the existing technology where real customer data has low security in the testing phase and the test data generation method cannot achieve accurate data testing, resulting in low efficiency in generating synthetic data, this application uses artificial intelligence technology to generate high-quality synthetic data to replace the application of real customer data in the testing phase, thereby improving the accuracy of data testing while ensuring data security. In the process of generating synthetic data, hierarchical / progressive diffusion and conditional sampling are introduced to improve training efficiency, thereby improving the efficiency of synthetic data generation.

[0117] Figure 3 A flowchart illustrating a method for generating synthetic data provided in this application embodiment. Figure 2 ,like Figure 3 As shown, the specific implementation steps of S203 above include:

[0118] S301. Based on the preset logical layer classification information corresponding to the logical layer information, determine the corresponding forward diffusion steps, noise diffusion model type, and noise scheduling strategy.

[0119] Specifically, the forward diffusion process begins with a clean data sample. This sample comes from the real data distribution.

[0120] Furthermore, the model proceeds according to a predetermined number of steps. Gradually Add noise. The noise at each step is usually Gaussian noise (i.e., noise with a mean of 0 and a certain standard deviation), and the amount of noise gradually increases with the number of steps.

[0121] S302. Determine the corresponding noise step equation based on the number of forward diffusion steps, the noise diffusion model type, and the noise scheduling strategy.

[0122] Among them, the noise diffusion model types include at least one of the following: low-dimensional diffusion model, time-series diffusion model, and graph diffusion model.

[0123] In the low-dimensional diffusion model, the number of diffusion steps is less than or equal to 50.

[0124] Specifically, each step of diffusion can be formalized as a Markov process.

[0125] Among them, the Step data By the previous step and Gaussian noise This is calculated. This process can be described using the noise step equation:

[0126]

[0127] in, It is a sequence of hyperparameters that controls the amount of noise at each step. It is an identity matrix, ensuring that the noise is isotropic. With time steps... The increase, The noise level gradually increases, making the data increasingly resemble a Gaussian noise distribution.

[0128] S303. According to the noise step equation, Gaussian noise is added to the logic layer information to obtain noisy data samples.

[0129] In this embodiment, after After the step, the raw data It was completely "blurred," becoming almost pure noise, that is... Approximately Gaussian distribution Complete diffusion has been achieved.

[0130] In this embodiment, by classifying and determining the forward diffusion steps, noise diffusion model type, and scheduling strategy based on the logic layer information, and by accurately adding Gaussian noise in conjunction with the noise step equation, efficient and controllable noise reduction processing of logic layer information is achieved. This not only adapts to the diffusion requirements of different data structures such as low-dimensional, time-series, and graph, but also ensures computational efficiency through step limits (e.g., ≤50 steps for low-dimensional models). Finally, high-quality noise reduction data samples are generated to improve the effect of subsequent model training or generation tasks, thereby improving the generation efficiency of synthetic data.

[0131] Figure 4 A flowchart illustrating a method for generating synthetic data provided in this application embodiment. Figure 3 ,like Figure 4 As shown, the initial diffusion model includes an initial teacher model and an initial student model; therefore, the specific implementation steps of S206 above include:

[0132] S401. Based on the initial data samples, noisy data samples, and conditional constraint information, fine-tune the initial teacher model to obtain the target teacher model and acquire the knowledge distillation parameters of the target teacher model.

[0133] The initial target teacher model is a full-step diffusion model (T=1000) pre-trained on desensitized historical data.

[0134] S402. Using model parameters, perform knowledge distillation on the initial student model to obtain the target diffusion model.

[0135] The initial student model consisted of a lightweight U-Net (with 50% fewer channels) and a residual jump accelerator (skipping 40% of the diffusion steps).

[0136] For example, the specific operating procedure of a distillation mechanism is as follows:

[0137] First, the teacher model outputs the noise prediction at step t: .

[0138] Secondly, the student model directly predicts the noise at step t+Δt: .

[0139] The loss function is: L_distill=||ε_teacher-ε_student||+λ·KL(distribution_teacher||distribution_student).

[0140] It should be noted that the inference speed can be increased by 5 times under the distillation mechanism, while the GPU memory usage is reduced by 60%.

[0141] It should be noted that standard diffusion models, when modeling data distribution, may be more inclined to learn the main patterns and common associations in the data, while being less capable of capturing crucial but less frequent "long-tail" patterns (such as rare transaction patterns, abnormal behavior of specific customer groups, and marginal cases) and highly complex nonlinear dependencies between features (such as the risk probability under different combinations of transaction types, times, locations, and amounts). The generated synthetic data may approximate real data in overall statistical properties, but it may be distorted in key details and complex relationships, affecting the effectiveness of testing, especially risk control model testing.

[0142] To address the aforementioned shortcomings, the initial diffusion model also includes a discriminator module, which is used to identify the initial data samples and synthetic data. The discriminator module is also used to identify long-tailed pattern samples and / or rare pattern samples in the initial data samples.

[0143] It should also be noted that, for long-tail pattern samples, the sampling strategy of the training data is optimized, and the rare pattern samples identified are oversampled.

[0144] It should also be noted that regularization terms or constraints based on business rules and domain knowledge are added to the training objective function of the diffusion model.

[0145] For example, the model must meet hard logical constraints during the generation process, such as "the total amount of multiple transactions by the same customer cannot exceed their account balance" and "the probability of transactions in specific high-risk areas triggering additional risk control rules needs to be increased".

[0146] Furthermore, adversarial components are introduced into the training framework of the diffusion model.

[0147] Specifically, an additional discriminator network is trained whose task is not only to distinguish between real and generated data, but also to focus on identifying data samples that represent long-tail patterns or key edge cases.

[0148] Specifically, through this adversarial process, the generator (diffusion model) is forced to learn to generate synthetic data containing rich long-tail patterns that are more difficult for the discriminator to recognize, thereby significantly improving the model's ability to cover rare but important patterns.

[0149] For example, the discriminator network consists of a multi-scale convolutional network and a key feature focusing head. The adversarial training process is shown in Table 1.

[0150] Table 1

[0151]

[0152] Furthermore, for data with strong correlations (such as user social networks and counterparty networks), graph neural network layers are fused into the neural network architecture of the diffusion model.

[0153] Specifically, at each step of the denoising process, the model not only considers the current data point itself, but also aggregates information from its neighboring nodes through a graph structure, thereby more effectively capturing and generating data with complex dependencies.

[0154] For example, hard constraint injection of business rules is achieved by constraining the encoder design time limit.

[0155] The input is: banking business rules (such as "daily transfer limit ≤ account balance") → which is transformed into the logical expression F(x)≥0.

[0156] The embedding method involves adding a constraint gradient term to the inverse denoising step of the diffusion model.

[0157] x_{t-1}=μ_θ(x_t,t)-σ_t∇_{x_t}F(x_t)

[0158] To give another example, if the generated data violates the balance rules, a forced gradient backhaul will be performed to adjust the distribution of transaction amounts.

[0159] It should also be noted that during the model training phase, the model is encouraged to learn to encode different semantic attributes of bank data (such as demographic information, transaction behavior, and risk labels) into different, relatively independent subspaces of the latent space.

[0160] Specifically, during condition generation, users can precisely manipulate these decoupled attribute subspace vectors to independently control specific aspects of the generated data (such as changing only the user's income level without affecting their trading habits), achieving more accurate and flexible condition data generation to meet the needs of various complex test cases.

[0161] For example, during training, attribute decoupling loss is used to minimize the mutual information between different attributes:

[0162] L_disentangle=|MI(latent key_z1,z2)|

[0163] Among them, it supports independent adjustment of attributes during generation (such as modifying only "income level" without changing "transaction habits").

[0164] It should also be noted that the Differential Privacy (DP) framework has been formally introduced into the training algorithm of the diffusion model.

[0165] Specifically, when calculating gradients to update model parameters, gradient clipping is performed, and calibration noise (such as Gaussian noise) that meets differential privacy requirements is added. This is achieved by strictly controlling the privacy budget. It provides quantifiable and mathematically provable privacy protection for the entire synthetic data generation process, ensuring that even if an attacker has strong background knowledge and computing power, they cannot infer from the generated synthetic data or the model itself whether any particular individual exists in the original training set.

[0166] For example, the gradient perturbation mechanism is as follows:

[0167] First, calculate the batch gradient g → trim to the threshold ||g||_2≤C.

[0168] Secondly, add Gaussian noise: g_DP=g+N(0,σ^2C^2I).

[0169] Finally, the privacy budget is allocated as follows: noise scale σ is dynamically attenuated according to the training epoch (satisfying...) -DP).

[0170] It should also be noted that a dedicated synthetic data privacy assessment module was established. This module simulates various known privacy attack methods (such as membership inference attacks, attribute inference attacks, and model inversion attacks) to conduct active attack tests on the generated synthetic dataset.

[0171] Specifically, by analyzing the success rate of attacks, the privacy risk of the generated data is quantitatively assessed, and model parameters (such as noise level and DP budget) are dynamically adjusted or the model is retrained based on the assessment results to ensure that the generated synthetic data always meets the most stringent privacy protection standards.

[0172] For example, the robustness testing process for privacy attacks is as follows:

[0173] First, input: generate dataset D_synth.

[0174] Secondly, simulated attacks.

[0175] Next, the members infer: the shadow model is trained to determine whether a sample is in the training set.

[0176] Then, attribute inference: reconstruct sensitive fields using partial data.

[0177] Finally, the output is a privacy risk score R_privacy. If R > the threshold, model retraining is triggered.

[0178] In this embodiment, during the model training phase, a pre-trained "teacher" diffusion model on a large general dataset (or a de-identified historical dataset) is used to guide a lighter "student" model. The student model learns the score function or intermediate representation predicted by the teacher model during the denoising process, significantly reducing the number of parameters and computational steps required for inference while maintaining generation quality. This makes it more suitable for deployment in internal computing environments for real-time or on-demand data generation, thereby improving the efficiency of synthetic data generation.

[0179] This application also provides a possible embodiment in which the process of generating synthetic data is as follows:

[0180] The first step is for the test system to submit a generation request containing condition C to the synthetic data engine.

[0181] The second step involves the synthetic data engine initiating a hierarchical conditional diffusion generation process: the static layer first generates profile data; the dynamic layer receives the profile data and condition C and then generates transaction data; the association layer constructs a transaction network based on the results of the first two layers.

[0182] The third step is for the engine to perform business rule constraint checks. If a violation of the rules is detected, the gradient correction mechanism is triggered.

[0183] The fourth step involves the engine performing long-tail adversarial calibration, using discriminator feedback to optimize the generated quality.

[0184] The fifth step is for the synthetic data engine to return the processed synthetic dataset to the test system.

[0185] Step 6: The test system initiates a privacy assessment command.

[0186] Step 7: The synthetic data engine performs member inference or attribute attack tests to verify privacy and security.

[0187] Step 8: The engine finally outputs a privacy risk report to the test system.

[0188] In this embodiment, through the full-process design of layered conditional diffusion generation (static layer profile data generation, dynamic layer transaction data synthesis, and associated layer transaction network construction), business rule constraint checking and gradient correction, long-tail adversarial calibration optimization, and full-cycle privacy assessment, the high efficiency and controllability of synthetic data generation, strong compliance of business rules, optimization of long-tail data quality, and quantifiable verification of privacy and security risks are achieved, ultimately forming a closed-loop solution from data generation to security assessment.

[0189] Figure 5 This is a schematic diagram of the structure of the apparatus for generating synthetic data provided in the embodiments of this application, as shown below. Figure 5 As shown, the device includes: a first acquisition module 51, a first processing module 52, a second processing module 53, a generation module 54, a second acquisition module 55, and a training module 56.

[0190] The first acquisition module 51 is used to acquire initial data samples;

[0191] The first processing module 52 is used to perform data splitting processing on the initial data sample according to the preset logical hierarchy classification information, so as to obtain multiple logical layer information of the initial data sample.

[0192] The second processing module 53 is used to perform forward diffusion processing on the logic layer information according to the preset logic layer classification information corresponding to the logic layer information, so as to obtain noisy data samples.

[0193] The generation module 54 is used to generate condition constraint information based on the logic layer information;

[0194] The second acquisition module 55 is used to acquire the initial diffusion model; wherein the initial diffusion model includes an inverse denoising module;

[0195] Training module 56 is used to train an initial diffusion model based on initial data samples, noisy data samples and conditional constraint information to obtain a target diffusion model; wherein, the target diffusion model is used to transform the input random noise information and conditional constraint information into synthetic data.

[0196] In one possible design, based on the preset logical hierarchy classification information corresponding to the logical layer information, the logical layer information is forward diffused to obtain noisy data samples, including:

[0197] The second processing module 53 is also used to determine the corresponding forward diffusion step number, noise diffusion model type and noise scheduling strategy based on the preset logical layer classification information corresponding to the logical layer information.

[0198] The corresponding noise step equation is determined based on the number of forward diffusion steps, the type of noise diffusion model, and the noise scheduling strategy.

[0199] According to the noise step equation, Gaussian noise is added to the logic layer information to obtain noisy data samples.

[0200] In one possible design, the pre-defined logical hierarchy of information includes at least one of the following: user basic information layer, account status layer, transaction behavior sequence layer, and risk label layer.

[0201] In one possible design, the noise diffusion model type includes at least one of a low-dimensional diffusion model, a time-series diffusion model, and a graph diffusion model; wherein the number of diffusion steps in the low-dimensional diffusion model is less than or equal to 50.

[0202] In one possible design, condition constraint information is generated based on the logic layer information, including:

[0203] The generation module 54 is also used to determine the corresponding business tag based on the logic layer information;

[0204] Generate condition constraint information based on business tags.

[0205] In one possible design, the conditional constraint information includes at least one of the following: the user's customer segment information, product type information, and risk level information. The customer segment information includes multiple factors such as age range, product list, transaction type, amount threshold, and time window.

[0206] In one possible design, the initial diffusion model includes an initial teacher model and an initial student model;

[0207] Accordingly, based on the initial data samples, noisy data samples, and conditional constraint information, an initial diffusion model is trained to obtain the target diffusion model, including:

[0208] The training module 56 is also used to fine-tune the initial teacher model based on the initial data samples, noisy data samples and conditional constraint information to obtain the target teacher model and acquire the knowledge distillation parameters of the target teacher model.

[0209] The initial student model is subjected to knowledge distillation using model parameters to obtain the target diffusion model.

[0210] In one possible design, the initial diffusion model also includes a discriminator module for identifying the initial data samples and the synthetic data. The discriminator module is also used to identify long-tailed pattern samples and / or rare pattern samples in the initial data samples.

[0211] The synthetic data generation apparatus provided in this embodiment can execute a synthetic data generation method of the above embodiment. Its implementation principle and technical effect are similar, and will not be described again here.

[0212] In a specific implementation of the aforementioned method for generating synthetic data, each module can be implemented as a processor. The processor can execute computer execution instructions stored in the memory, thereby enabling the processor to execute the aforementioned method for generating synthetic data.

[0213] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 6 As shown, the electronic device 60 includes at least one processor 61 and a memory 62. The electronic device 60 also includes a communication component 63. The processor 61, memory 62, and communication component 63 are connected via a bus 64.

[0214] In a specific implementation, at least one processor 61 executes computer execution instructions stored in memory 62, causing at least one processor 61 to execute a method in the field of machine learning as executed on the electronic device side.

[0215] The specific implementation process of processor 61 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0216] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0217] The memory may include high-speed RAM, and may also include non-volatile storage (NVM), such as at least one disk storage.

[0218] The bus can be an Industry Standard Architecture (ISA) bus, 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, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0219] The above description of the functions implemented by electronic devices and main control devices has introduced the solutions provided by the embodiments of the present invention. It is understood that, in order to implement the above functions, the electronic device or main control device includes hardware structures and / or software modules corresponding to the execution of each function. By combining the units and algorithm steps of the various examples described in the embodiments of the present invention, the embodiments of the present invention can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the technical solutions of the embodiments of the present invention.

[0220] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the above-described method in the field of machine learning.

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

[0222] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in an electronic device or a host device.

[0223] This application also provides a computer program product, comprising: a computer program stored in a readable storage medium, wherein at least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program to cause the electronic device to perform the scheme provided in any of the above embodiments.

[0224] 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; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disk, or optical disk.

[0225] The technical solutions of this application have been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it is readily understood by those skilled in the art that the scope of protection of this application is obviously not limited to these specific embodiments. The above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit them. Although this application 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 or all of the technical features therein. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A method for generating synthetic data, characterized in that, include: Obtain initial data samples; Based on the preset logical hierarchy classification information, the initial data sample is split into multiple logical layers to obtain the initial data sample. Based on the preset logical hierarchy classification information corresponding to the logical layer information, the logical layer information is subjected to forward diffusion processing to obtain noisy data samples. Based on the aforementioned logic layer information, condition constraint information is generated; Obtain an initial diffusion model; wherein the initial diffusion model includes an inverse denoising module; Based on the initial data sample, the noisy data sample, and the conditional constraint information, the initial diffusion model is trained to obtain the target diffusion model; wherein, the target diffusion model is used to transform the input random noise information and conditional constraint information into synthetic data.

2. The method according to claim 1, characterized in that, Based on the preset logical hierarchy classification information corresponding to the logical layer information, the logical layer information is subjected to forward diffusion processing to obtain noisy data samples, including: Based on the preset logical hierarchy classification information corresponding to the logical layer information, determine the corresponding forward diffusion steps, noise diffusion model type, and noise scheduling strategy; Based on the forward diffusion step count, the noise diffusion model type, and the noise scheduling strategy, determine the corresponding noise step equation; According to the noise step equation, Gaussian noise is added to the logic layer information to obtain noisy data samples.

3. The method according to claim 2, characterized in that, The preset logical hierarchy classification information includes at least one of the following: user basic information layer, account status layer, transaction behavior sequence layer, and risk label layer.

4. The method according to claim 3, characterized in that, The noise diffusion model type includes at least one of low-dimensional diffusion model, time-series diffusion model and graph diffusion model; wherein the number of diffusion steps in the low-dimensional diffusion model is less than or equal to 50.

5. The method according to claim 1, characterized in that, The step of generating condition constraint information based on the logical layer information includes: Based on the aforementioned logic layer information, determine the corresponding business tag; Based on the business tags, generate condition constraint information.

6. The method according to claim 5, characterized in that, The conditional constraint information includes at least one of the following: the user's customer segment information, product type information, and risk level information. The customer segment information includes multiple parameters such as age range, product list, transaction type, amount threshold, and time window.

7. The method according to any one of claims 1 to 6, characterized in that, The initial diffusion model includes an initial teacher model and an initial student model; Accordingly, training the initial diffusion model based on the initial data samples, the noisy data samples, and the conditional constraint information to obtain the target diffusion model includes: Based on the initial data samples, the noisy data samples, and the conditional constraint information, the initial teacher model is fine-tuned and trained to obtain the target teacher model, and the knowledge distillation parameters of the target teacher model are obtained. Using the model parameters, the initial student model is subjected to knowledge distillation to obtain the target diffusion model.

8. The method according to any one of claims 1 to 6, characterized in that, The initial diffusion model also includes a discriminator module, which is used to identify the initial data sample and the synthetic data. The discriminator module is also used to identify long-tailed pattern samples and / or rare pattern samples in the initial data sample.

9. A device for generating synthetic data, characterized in that, include: The first acquisition module is used to acquire initial data samples; The first processing module is used to perform data splitting processing on the initial data sample according to the preset logical hierarchy classification information, so as to obtain multiple logical layer information of the initial data sample. The second processing module is used to perform forward diffusion processing on the logical layer information according to the preset logical layer classification information corresponding to the logical layer information, so as to obtain noisy data samples. The generation module is used to generate condition constraint information based on the logical layer information; The second acquisition module is used to acquire an initial diffusion model; wherein the initial diffusion model includes an inverse denoising module; The training module is used to train the initial diffusion model based on the initial data sample, the noisy data sample, and the conditional constraint information to obtain the target diffusion model; wherein the target diffusion model is used to transform the input random noise information and conditional constraint information into synthetic data.

10. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 8.

12. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 8.