Transaction data processing method and device, storage medium and electronic equipment
By adaptively adjusting the variable-size diffusion model in the diffusion model, the problem of excessive computing burden on the traditional diffusion model is solved, and a more efficient data generation process is achieved, and the generation speed and quality are improved.
Patent Information
- Application Number
- CN202510344939.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-07-29
AI Technical Summary
During the data generation process, the traditional diffusion model has an overload of computational burden because the input data size remains unchanged, especially in the early stages of high noise levels, which increases unnecessary computational burden.
The variable-size diffusion model is adopted to adaptively adjust the data size according to the characteristics of the current denoising step during the diffusion model inference process, and the data size conversion module is realized, and the dimension embedding vector is injected for diffusion denoising processing.
It significantly reduces the amount of inference calculations, improves the generation speed, and improves the performance of model inference, reduces the overall computational complexity, while ensuring the quality and efficiency of the generated data.
Smart Images

Figure CN120386591A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and in particular, to a method, apparatus, storage medium, and electronic device for transaction data processing. Background Art
[0002] In recent years, in multi-modal transaction data generation tasks such as images, audio, and video, the transaction data generation model for transaction data has made remarkable progress in the fields of computer vision, natural language processing, etc. In particular, the diffusion model has received extensive attention due to its outstanding performance in data generation tasks such as high-fidelity image generation and text-to-image generation. The basic principle of the diffusion model is as follows: gradually add noise to the original real data (such as images, voices, etc.) to make it gradually degrade into random noise distribution data, forming a forward diffusion process from low noise to high noise; then in the inference stage, through the reverse process, gradually remove the noise to restore the clear target data. The diffusion model learns the ability to restore from the noise distribution to the original data distribution, that is, to remove the noise through a series of iterative steps to reconstruct the clear target data.
[0003] Since the diffusion model can capture complex distributions and detailed features during the multi-step iterative denoising process, it shows high quality and diversity in various data generation tasks. At the same time, with the continuous evolution of deep learning hardware and algorithms, the training and application of the diffusion model on large-scale text and image data have become more and more mature, and it has become one of the current mainstream generation models, thus better performing transaction data generation processing. Summary of the Invention
[0004] This specification provides a method, apparatus, storage medium, and electronic device for transaction data processing. The technical solutions are as follows:
[0005] In a first aspect, this specification provides a method for transaction data processing, the method including:
[0006] In a transaction data generation task scenario, determine the initial noise transaction data for the transaction processing diffusion model;
[0007] Based on the initial noise transaction data, use the transaction processing diffusion model to perform multi-step inference step denoising processing in sequence;
[0008] In the denoising process of multi-step inference steps, determine the diffusion process parameters corresponding to the current inference step and the first noisy transaction data. Based on the diffusion process parameters, determine the transaction data size for the first noisy transaction data. Based on the transaction data size, perform a size adjustment operation on the first noisy transaction data to obtain the second noisy transaction data. Based on the transaction data size, determine the size embedding vector for the first noisy transaction data. Based on the size embedding vector and the first noisy transaction data, perform a data denoising process operation to obtain the third noisy transaction data. Perform a size restoration operation on the third noisy transaction data to obtain the fourth noisy transaction data;
[0009] If there is a next inference step for the current inference step, use the next inference step as the current inference step and the fourth noisy transaction data as the first noisy transaction data, and execute the step of determining the diffusion process parameters corresponding to the current inference step and the first noisy transaction data;
[0010] If there is no next inference step for the current inference step, control the transaction processing diffusion model based on the fourth noisy data to output the target generated transaction data for the transaction data generation task.
[0011] In a second aspect, this specification provides a transaction data processing device, the device includes:
[0012] A data determination module, configured to determine the initial noisy transaction data for the transaction processing diffusion model in the transaction data generation task scenario;
[0013] A diffusion denoising module, configured to perform a multi-step inference step denoising process in sequence using the transaction processing diffusion model based on the initial noisy transaction data;
[0014] The diffusion denoising module is configured to, in the multi-step inference step denoising process, determine the diffusion process parameters corresponding to the current inference step and the first noisy transaction data, determine the transaction data size for the first noisy transaction data based on the diffusion process parameters, perform a size adjustment operation on the first noisy transaction data based on the transaction data size to obtain the second noisy transaction data, determine the size embedding vector for the first noisy transaction data based on the transaction data size, perform a data denoising process operation based on the size embedding vector and the first noisy transaction data to obtain the third noisy transaction data, and perform a size restoration operation on the third noisy transaction data to obtain the fourth noisy transaction data;
[0015] The diffusion denoising module is configured to, if there is a next inference step in the current inference step, use the next inference step as the current inference step and use the fourth noisy transaction data as the first noisy transaction data, and execute the step of determining the diffusion process parameters corresponding to the current inference step and the first noisy transaction data;
[0016] The diffusion denoising module is configured to, if there is no next inference step in the current inference step, control the transaction processing diffusion model to output target generated transaction data for the transaction data generation task based on the fourth noisy data.
[0017] In a third aspect, this specification provides a computer storage medium storing at least one instruction, and the instruction is adapted to be loaded and executed by a processor to perform the method steps of one or more embodiments of this specification.
[0018] In a fourth aspect, this specification provides a computer program product storing at least one instruction, and the instruction is adapted to be loaded and executed by a processor to perform the method steps of one or more embodiments of this specification.
[0019] In a fifth aspect, this specification provides an electronic device, which may include: a processor and a memory; wherein, the memory stores a computer program, and the computer program is adapted to be loaded and executed by the processor to perform the method steps of one or more embodiments of this specification.
[0020] The beneficial effects brought by the technical solutions provided in some embodiments of this specification at least include:
[0021] In one or more embodiments of this specification, the electronic device dynamically determines and adjusts the data size for each inference step in the reverse denoising process of multiple inference steps, and transmits the corresponding data size information to the transaction processing diffusion model through an embedding vector, so that the transaction processing diffusion model can perform noise removal with the optimal resolution data size in each inference step, thereby effectively reducing the calculation cost while ensuring the gradual restoration of the details of the generated data, realizing an inference acceleration method for a variable-size diffusion model, and finally improving the quality and efficiency of the generation result. It can adaptively adjust the data size according to the characteristics of the current denoising step during the diffusion model inference process instead of keeping the data size unchanged, thereby significantly reducing the inference calculation amount and increasing the generation speed. For example, a lower-resolution data representation can be used in the initial stage of denoising, and gradually upgraded to the final required high-resolution output as the inference iteration denoising progresses, which not only helps to reduce the overall computational complexity, but also improves the performance of the transaction processing diffusion model during inference. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] To more clearly illustrate the technical solutions in this specification or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of this specification. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0023] Figure 1 is a schematic diagram of the scenario of a transaction data processing system provided by this specification;
[0024] Figure 2 is a schematic flowchart of a transaction data processing method provided by this specification;
[0025] Figure 3 is a schematic diagram of the scenario of accelerating the inference of a variable-size diffusion model provided by this specification;
[0026] Figure 4 is a schematic flowchart of data size determination provided by this specification;
[0027] Figure 5 is a schematic flowchart of determining the target data size combination provided by this specification;
[0028] Figure 6 is a schematic flowchart of the transaction processing diffusion scenario provided by this specification;
[0029] Figure 7 is a schematic diagram of the structure of a transaction data processing device provided by this specification;
[0030] Figure 8 is a schematic diagram of the structure of an electronic device provided by this specification. Specific embodiments
[0031] The following will clearly and completely describe the technical solutions in this specification in conjunction with the drawings in this specification. Obviously, the described embodiments are only some embodiments of this specification, rather than all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope protected by this specification.
[0032] In the description of this specification, it should be understood that terms such as "first", "second", etc. are only used for descriptive purposes and cannot be construed as indicating or implying relative importance. In the description of this specification, it should be noted that unless otherwise clearly specified and limited, "including" and "having", as well as any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally further include steps or units not listed, or may optionally further include other steps or units inherent to these processes, methods, products, or devices. For those of ordinary skill in the art, the specific meanings of the above terms in this specification can be understood in specific circumstances. In addition, in the description of this specification, unless otherwise stated, "a plurality of" means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0033] In the related art for transaction data processing, the diffusion model, as an emerging generative model, has received extensive attention because it can generate high-quality data samples through a step-by-step denoising process. The diffusion model imitates the diffusion process in the physical world to generate data. Specifically, the diffusion model first adds noise to the original data to gradually degrade it into a random noise distribution; then, in the reverse process, the model learns the ability to recover from the noise distribution to the original data distribution, that is, to remove the noise through a series of iterative steps to reconstruct clear target data. This method is particularly suitable for data generation tasks in multiple modalities such as images, audio, and video.
[0034] However, in the application of traditional diffusion models, the size of the input data remains unchanged throughout the generation process, which means that even in the early stage with a high noise level, high-resolution processing is required, undoubtedly increasing the unnecessary computational burden. To overcome this problem,
[0035] This specification presents a transaction data processing method that integrates a variable-size diffusion model acceleration technique. This method can adaptively adjust the data size according to the characteristics of the current denoising step during the diffusion model inference process, thereby significantly reducing the inference computation amount and improving the generation speed. For example, at the initial stage of denoising, lower-resolution data representations can be used, and as the iteration progresses, it can be gradually upgraded to the final required high-resolution output. Such a strategy not only helps reduce the overall computational complexity but also improves the performance during model inference. The variable-size diffusion model inference technique involved in the transaction data processing method first configures an adaptive selection of the inference data size for each inference step of the diffusion model, realizes the conversion of the data size through a size conversion module, and injects a size embedding vector for diffusion denoising and then data generation.
[0036] This method is of great significance for promoting the practical application of generative models, especially in resource-constrained environments or scenarios with high real-time requirements, where it has good data processing effects.
[0037] The following will explain this specification in detail with specific embodiments.
[0038] Please refer to Figure 1 , which is a schematic diagram of the scenario of a transaction data processing system provided by this specification. As Figure 1 shown, the transaction data processing system can at least include a client cluster and a service platform 100.
[0039] The client cluster can include at least one client. As Figure 1 shown, it specifically includes client 1 corresponding to user 1, client 2 corresponding to user 2,..., client n corresponding to user n, where n is an integer greater than 0.
[0040] Each client in the client cluster can be an electronic device with communication functions. Such electronic devices include but are not limited to: wearable devices, handheld devices, personal computers, tablets, in-vehicle devices, smartphones, computing devices, or other processing devices connected to a wireless modem, etc. In different networks, the electronic device can be called by different names. For example: user equipment, access terminal, user unit, user station, mobile station, mobile unit, remote station, remote terminal, mobile device, user terminal, electronic device, wireless communication device, user agent or user device, cellular phone, cordless phone, personal digital assistant (PDA), electronic device in a 5G network or future evolved network, etc.
[0041] The service platform 100 may be a separate server device, such as a rack-mounted, blade, tower, or cabinet-style server device, or a hardware device with strong computing capabilities such as a workstation or a mainframe computer; it may also be a server cluster composed of multiple servers. The servers in the service cluster may be composed symmetrically, where each server is functionally equivalent and has an equivalent status in the transaction link, and each server can provide services independently. The independent service provision can be understood as not requiring the assistance of another server.
[0042] In one or more embodiments of the present specification, the service platform 100 can establish a communication connection with at least one client in the client cluster, and complete the data interaction during the transaction data processing based on this communication connection, such as online transaction data interaction.
[0043] It should be noted that the service platform 100 and at least one client in the client cluster establish a communication connection through a network for interactive communication. Among them, the network can be a wireless network or a wired network. The wireless network includes but is not limited to a cellular network, a wireless local area network, an infrared network, or a Bluetooth network. The wired network includes but is not limited to an Ethernet, a universal serial bus (USB), or a controller area network. In one or more embodiments of the specification, technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. are used to represent the data (such as the target compressed package) exchanged through the network. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), and Internet Protocol Security (IPsec) can be used to encrypt all or some of the links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above data communication technologies.
[0044] The embodiment of the transaction data processing system provided in this specification and the transaction data processing method in one or more embodiments belong to the same concept. In one or more embodiments of the specification, the execution subject corresponding to the transaction data processing method may be an electronic device, and the electronic device may be the service platform 100 described above; in one or more embodiments of the specification, the execution subject corresponding to the transaction data processing method may also be a client, which is specifically determined based on the actual application environment. For the embodiment of the transaction data processing system, the implementation process can be seen in detail in the following method embodiments, which will not be elaborated here.
[0045] Based on Figure 1 the scene schematic diagram shown below, the transaction data processing method provided in one or more embodiments of this specification will be introduced in detail.
[0046] Please refer to Figure 2 , which is a flowchart of a transaction data processing method provided in one or more embodiments of this specification. This method can be implemented depending on a computer program and can run on a transaction data processing device based on the von Neumann architecture. This computer program can be integrated into an application or run as an independent tool class application. The transaction data processing device may be an electronic device.
[0047] Specifically, the transaction data processing method includes:
[0048] S102: In the transaction data generation task scenario, determine the initial noise transaction data for the transaction processing diffusion model;
[0049] The "transaction data generation task scenario" can be understood in a broad context as various data generation scenarios related to generative large language models (such as generative AI), including multiple modalities such as images, videos, and texts. In other words, as long as it is in a task of "needing to generate data with structured or unstructured characteristics", it can be regarded as a "transaction data generation" process. The specific application fields and data forms (images, texts, videos, audios, etc.) will be determined according to transaction requirements and are not limited here.
[0050] Transaction processing diffusion model: It can be understood as a variable-size diffusion generation model based on the concept of the diffusion model, used to complete the transaction data generation task according to the initial noise transaction data to generate the target generated transaction data.
[0051] Initial noise transaction data: It refers to a set of random noise data in the transaction data generation task scenario input to the transaction processing diffusion model at the beginning of the denoising inference (generation). Usually, the initial noise transaction data is obtained by sampling from a random noise distribution after adding noise to an original transaction data.
[0052] In this step, in the scenario corresponding to the target "transaction data generation task", a set of initial noisy transaction data is selected or generated for the "transaction processing diffusion model" for denoising based on the multi-step inference step denoising process. It can be understood as the starting point of the multi-step inference step denoising process corresponding to the data generation stage of the "diffusion model".
[0053] In this specification, at different model processing stages, the initial noisy transaction data can be the sample data in the model training stage of the transaction processing diffusion model (which can be called sample initial noisy transaction data), or the actual data in the model application stage of the transaction processing diffusion model (which can be called actual initial noisy transaction data).
[0054] S104: Based on the initial noisy transaction data, use the transaction processing diffusion model to perform multi-step inference step denoising processing in sequence. During the multi-step inference step denoising process, refer to the next step S106.
[0055] Multi-step inference steps: In the transaction processing diffusion model, the generation process is usually discretized into inference steps corresponding to several time steps. Each time step will execute an inference step for denoising prediction, so that the data (initial noisy transaction data) gradually changes from the "noisy state" to the "clear state".
[0056] Denoising processing: The transaction processing diffusion model estimates or restores transaction data closer to the true distribution based on the current noisy initial noisy transaction data through multi-step inference.
[0057] S106: Determine the diffusion process parameters and the first noisy transaction data corresponding to the current inference step. Based on the diffusion process parameters, determine the transaction data size for the first noisy transaction data. Perform a size adjustment operation on the first noisy transaction data based on the transaction data size to obtain the second noisy transaction data. Determine the size embedding vector for the first noisy transaction data based on the transaction data size. Perform a data denoising processing operation on the first noisy transaction data based on the size embedding vector and the first noisy transaction data to obtain the third noisy transaction data. Perform a size restoration operation on the third noisy transaction data to obtain the fourth noisy transaction data.
[0058] Diffusion process parameters: Refer to the hyperparameters or scheduling parameters (such as noise intensity, signal retention coefficient, time step index, etc.) used in each time step of the transaction processing diffusion model, which are used to control how to denoise in that step.
[0059] First noisy transaction data: In the description of this solution, the "first noisy transaction data" refers to the noisy data that needs to be processed at the current time step t. Different from the initial noisy transaction data, this is the intermediate state left after several steps of denoising.
[0060] Before the start of each reverse inference step in the denoising process of multi-step inference steps, obtain the pre-defined diffusion process parameters (e.g., determinable during the model training phase), and use the data output from the previous inference step as the "first noise transaction data" for the current step. The input for the starting inference step is the initial noise transaction data.
[0061] Schematically, read the current time step t: According to the iteration index or global scheduling, obtain the diffusion process parameters corresponding to the current inference step. For example, {α t , σ t}. Use the output data obtained from the previous inference step as the "first noise transaction data" for the current inference step. If the current inference step is the starting inference step, then use the initial noise transaction data as the "first noise transaction data". For the current inference steps after the starting inference step, use the output data obtained from the previous inference step as the "first noise transaction data" for the current inference step.
[0062] Optionally, as Figure 3 shown, Figure 3 is a schematic diagram of a scenario for accelerating the inference of a variable-size diffusion model provided in this specification. The black solid arrows in the figure represent the data path, which is the core process of the diffusion model inference. The blue solid arrows represent the control path. The figure only schematically shows two data sizes for illustration purposes, but can be naturally extended to multiple data sizes;
[0063] In Figure 3 , multiple key parts of the transaction processing diffusion model are schematically shown: adaptive size selection, size conversion module, size embedding, and cross-size consistency constraint. And only two resolutions, "large size" and "small size", are shown in the example (more sizes can be extended in actual applications). If the current inference step is the starting inference step, that is, the inference step 1 shown in Figure 3 , then use the initial noise transaction data (the initial noise shown in Figure 3 ) as the "first noise transaction data". For the current inference steps after inference step 1, such as inference step 2, inference step 3,..., inference step N, use the output data obtained from the previous inference step as the "first noise transaction data" for the current inference step.
[0064] For any current inference step i, determine the diffusion process parameters and the first noise transaction data corresponding to the current inference step i. Specifically, first perform adaptive size selection, and query the diffusion process parameters corresponding to the current inference step i according to the pre-determined diffusion process parameter information (which can be understood as the total diffusion process parameters, and can be a diffusion process parameter table) (e.g., {α t , σ t});
[0065] Further, based on the diffusion process parameters, the data size of the first noisy transaction data is determined to obtain the transaction data size. For example, if the current noise is large, a lower resolution (smaller data size) may be selected to save computational effort; if the noise is already low, a higher resolution can be selected to recover more details.
[0066] Further, through, such as Figure 3 the "size conversion" in, a size adjustment operation is performed on the first noisy transaction data based on the transaction data size to obtain the second noisy transaction data;
[0067] Further, through, such as Figure 3 the "size embedding" in, the size embedding vector for the first noisy transaction data is determined based on the transaction data size ( Figure 3 the size embedding shown), the size embedding vector: is a vector representation obtained by encoding the current data size and serves as a conditional hint.
[0068] Then, a data denoising process operation is performed based on the size embedding vector and the first noisy transaction data to obtain the third noisy transaction data, and a size restoration operation is performed on the third noisy transaction data to obtain the fourth noisy transaction data; it can be understood that after combining the first noisy transaction data with the size embedding vector, it is input into the transaction processing diffusion model to perform a denoising process once. This process utilizes the denoising ability of the diffusion model to reduce the noise in the data, making the data closer to the distribution of the real transaction data, and generating the third noisy transaction data for the current inference step. Subsequently, a size restoration operation is performed on the third noisy transaction data to obtain the fourth noisy transaction data. At this time, the fourth noisy transaction data has the same data size as the original input data;
[0069] Optionally, the size adjustment operation includes a downsampling operation, and the size restoration operation includes an upsampling operation;
[0070] Schematically, the up / downsampling operation can be implemented through linear interpolation, cubic interpolation, etc., or can also be implemented using a trained size conversion module;
[0071] Optionally, in the denoising process of multiple-step inference steps, the transaction data size corresponding to the starting inference step is the same as the data size of the first noisy transaction data of the starting inference step; the transaction data size corresponding to the ending inference step is the same as the data size of the first noisy transaction data corresponding to the ending inference step, and the transaction data size corresponding to the middle inference step is less than or equal to the data size of the first noisy transaction data corresponding to the middle inference step.
[0072] S108: If there is a next inference step for the current inference step, then use the next inference step as the current inference step and use the fourth noisy transaction data as the first noisy transaction data, and perform the step of determining the diffusion process parameters corresponding to the current inference step and the first noisy transaction data;
[0073] Illustratively, after executing the current inference step, it can be determined whether there is a next inference step according to the end condition. Then use the next inference step as the current inference step and use the fourth noisy transaction data as the first noisy transaction data, and then execute S106;
[0074] End condition: It can be determined whether to end the inference based on a fixed number of inference steps, the noise level being lower than a certain threshold, or other metrics.
[0075] S110: If there is no next inference step for the current inference step, then control the transaction processing diffusion model to output the target generated transaction data for the transaction data generation task based on the fourth noisy data.
[0076] No next inference step: It means that all preset denoising iterations have been completed, or a certain convergence / termination condition has been reached.
[0077] Target generated transaction data: The finally output high-quality transaction generated data, which is close to the real distribution and can be used in subsequent analysis, simulation, testing and other scenarios.
[0078] In one or more embodiments of this specification, the electronic device dynamically determines and adjusts the data size for each inference step in the reverse denoising process of multiple-step inference steps, and transmits the corresponding data size information to the transaction processing diffusion model through the embedding vector, so that the transaction processing diffusion model can perform noise removal at the optimal resolution in each inference step. Thus, while ensuring the gradual restoration of the details of the generated data, the calculation cost is effectively reduced, realizing a method for accelerating the inference of a variable-size diffusion model, and finally improving the quality and efficiency of the generation result. It can adaptively adjust the data size according to the characteristics of the current denoising step during the diffusion model inference process, thereby significantly reducing the inference calculation amount and increasing the generation speed. For example, in the initial stage of denoising, a lower-resolution data representation can be used, and as the inference iteration denoising progresses, it is gradually increased to the final required high-resolution output, which not only helps to reduce the overall computational complexity, but also improves the performance during the inference of the transaction processing diffusion model.
[0079] Please refer to Figure 4 , Figure 4 is a schematic flowchart of a data size determination proposed in one or more embodiments of this specification. For the specific execution of determining the transaction data size based on the diffusion process parameters for the first noisy transaction data, the following method can be referred to:
[0080] S202: Obtain the target data size combination determined based on the diffusion process parameters;
[0081] Diffusion process parameters: In the transaction processing diffusion model, parameters (such as the noise injection factor σ t , the signal retention coefficient α t , the negative half - logarithm signal - to - noise ratio, etc.) describe the noise state and signal strength of the data in each inference time step. These diffusion process parameters can usually be determined after the model training of the transaction processing diffusion model is completed.
[0082] Target data size combination: It is a set of data size schemes calculated and recommended in advance based on the diffusion process parameters. The target data size combination specifies the optimal transaction data size that can be used for subsequent processing for each inference step at each time step in the entire inference process through candidate size generation and evaluation.
[0083] Exemplarily, usually a series of candidate sizes are first determined according to the diffusion process parameters. For example, in the image generation scenario, the candidate sizes may include 64×64, 128×128, 256×256, etc. For each candidate size, the data conversion process is simulated through downsampling - upsampling operations, and the corresponding approximate information loss (such as the mean square error) is calculated to evaluate the impact of the conversion on information retention under different candidate data sizes, so as to finally determine an optimal target data size combination for the transaction data generation task scenario.
[0084] S204: Query the transaction data size corresponding to the current inference step in the target data size combination.
[0085] Current inference step: It refers to the inference step corresponding to time t in the currently executing generation process.
[0086] Transaction data size: Specifically, it refers to the data size (such as resolution, data dimension, or batch size, etc.) that should be adopted in the data conversion, denoising, etc. processes at the current time step. Usually, according to time t, the transaction data size corresponding to the current inference step can be directly queried in the target data size combination.
[0087] Schematically, the target data size combination usually exists in the form of a sequence or a mapping. Each element or entry corresponds to an inference time step. When the inference step corresponding to a certain time t is executed, the index of the current inference step (such as the step number) is used to query in the target data size combination. Through the query, the transaction data size of the current inference step is determined. This transaction data size will then be used for size conversion operations, size embedding generation, and subsequent denoising processing to ensure that the data processing at the current step is carried out with the optimal size.
[0088] In this specification, by querying a target data size combination generated in advance based on diffusion process parameters, the specific transaction data size used in the current inference step is determined, providing accurate size guidance for subsequent size conversion, embedding, and denoising processing. This ensures that in the entire reverse denoising process, the data processing at each step can be dynamically adjusted to the optimal size, thereby effectively reducing the computational cost while ensuring the generation quality.
[0089] Furthermore, the following is a schematic illustration of the process of pre-determining the target data size combination. As Figure 5 shown, Figure 5 is a schematic flowchart for determining the target data size combination.
[0090] Combined with Figure 3 , for the transaction processing diffusion model, the adaptive size selection module can automatically select the most appropriate data size for each iteration step, enabling the overall inference process to achieve a balance between computational cost and information loss. The goal of adaptive size selection is to automatically select the appropriate data size for each inference step according to the diffusion process parameters to minimize the size conversion information loss caused by size conversion. Specifically, the adaptive size selection module first estimates the information loss caused by each data conversion, then constructs a signal ordinary differential equation based on the provided diffusion process parameters, and finally determines the data size that minimizes the total information loss for each inference step according to the information loss, the signal ordinary differential equation, and the inference cost upper limit. The following is a schematic illustration of the process of pre-determining the target data size combination of the adaptive size selection module in combination with S302 - S310;
[0091] S302: Determine the inference cost upper limit parameter for the denoising processing process of the multi-step inference step, and determine multiple candidate data sizes corresponding to each inference step;
[0092] Inference cost upper limit parameter: Refers to the maximum computational overhead or cumulative information loss allowed in the entire multi-step inference (denoising) process. This parameter can be preset according to system resources, time requirements, or other performance indicators.
[0093] Candidate data sizes: For each inference step, a series of possible data sizes (such as the resolution of an image, the dimension of data, etc.) preset according to the task requirements and data type. The entire inference process is divided into multiple discrete time steps 1, 2,..., N. Each step has a set of candidate data sizes {s1, s2,...} to choose from.
[0094] Schematically, determine the upper limit of the inference cost: According to the system performance and the requirements of the generation task, set an upper limit value as the threshold that the total cost or cumulative error of all subsequent candidate size combinations shall not exceed. Generate candidate data sizes: For each inference step, preset a set of possible sizes according to the actual task scenario. For example, in an image generation task, the candidate sizes may include 64×64, 128×128, 256×256, etc.;
[0095] S304: Taking each of the candidate data sizes of the inference step as a reference, predict the loss of size conversion information corresponding to each inference step;
[0096] Exemplarily, taking each of the candidate data sizes of the inference step as a reference, estimate the information loss brought by data conversion. Specifically, it can be to first collect the intermediate samples of the diffusion model inference, and then perform a size adjustment operation (such as downsampling) and a size restoration operation (such as upsampling operation) for each size, and calculate the average difference (such as mean square error) between the reconstructed sample after upsampling and the original sample before downsampling as an approximation of the information loss;
[0097] Specifically: In the denoising process of multiple inference steps, determine the diffusion process parameters corresponding to the current inference step and predict the first noise transaction data. Based on the diffusion process parameters, determine the candidate data size for the predicted first noise transaction data. Perform a size adjustment operation on the predicted first noise transaction data based on the candidate data size to obtain the predicted second noise transaction data. Determine the size embedding vector for the predicted first noise transaction data based on the candidate data size. Perform a data denoising operation on the predicted first noise transaction data based on the size embedding vector and the predicted first noise transaction data to obtain the predicted third noise transaction data. Perform a size restoration operation on the predicted third noise transaction data to obtain the predicted fourth noise transaction data; Then, based on the predicted first noise transaction data and the predicted fourth noise transaction data, perform a data conversion loss determination process to obtain the size conversion information loss.
[0098] Further, when performing the operation of taking each of the candidate data sizes of the inference step as a reference and predicting the loss of size conversion information corresponding to each inference step, the following method can be referred to:
[0099] A2: Determine the predicted first noise transaction data before the size adjustment operation in each inference step;
[0100] A4: Predict the predicted fourth noise transaction data after the size restoration operation in each inference step based on the candidate data size;
[0101] A6: Perform a data conversion loss determination process based on the predicted first noise transaction data and the predicted fourth noise transaction data to obtain the size conversion information loss.
[0102] In some embodiments, the loss of size conversion information, which can also be referred to as the loss of approximate information, is used to quantify the instantaneous information loss caused by resolution conversion (data size conversion). However, the generation process of the diffusion model is a process that evolves over time (or discrete time steps), which is characterized by the signal attenuation model shown below (which can be regarded as a kind of signal decreasing ordinary differential equation (Signal ODE)). If only the instantaneous conversion error is considered and the "cumulative impact on the signal in subsequent time steps" is not considered, then the overall generation quality cannot be accurately grasped; the signal ODE can provide feedback on how the error at the current time step t will be amplified or attenuated during the subsequent inference process, thereby affecting the final generation result. Therefore, in this specification, the loss of size conversion information is combined with the local error description of the signal attenuation model to obtain a more comprehensive "local error" to guide the adaptive size selection.
[0103] The loss of size conversion information can be calculated using a preset loss function, which includes but is not limited to the contrast loss function, Euclidean distance loss function, mean square error loss function, and so on.
[0104] S306: Based on the diffusion process parameters of each inference step, model the inference noise attenuation process of the initial noise transaction data to obtain a signal attenuation model;
[0105] The input of S306 is the diffusion process parameters The corresponding diffusion process is represented by the following formula:
[0106] x t =α t x0 + σ t ∈, where 0 ≤ t ≤ T is the time
[0107] (Note Figure 3 The inference step number in the appendix is the number starting from t = T after discretization of the time), x t is the (predicted) first noise transaction data corresponding to the inference step at time t (usually an intermediate noisy sample), x0 is the (predicted) fourth noise transaction data (which can also be the sample - target generation transaction data generated by multiple-step inference steps), ∈ is the standard Gaussian noise, α0 = 1, σ0 = 0; the α t is the noise attenuation factor, the σ t is the noise injection factor, t is the step time number of the inference step, and T is the maximum value of the step time number;
[0108] The "signal" - the signal component of the transaction data corresponding to the above diffusion process is defined as y t =(xt -σ t ∈) / α t , which represents the estimated noise-free sample (transaction data signal component) at time t, that is, the noisy sample x t in the "signal component", y0 = x0 is exactly the finally generated sample;
[0109] Signal y t obeys the signal ordinary differential equation, written as:
[0110]
[0111] where f θ (x t , t) is a diffusion model in the form of data prediction (it predicts the noise-free sample at time t, that is, the signal component), and can also be called the diffusion denoising processing operation of the original diffusion representation model. λ t =-log(α t / σ t ) is called the negative semi-logarithmic signal-to-noise ratio, and λ′ t is the derivative of λ t with respect to time t;
[0112] Furthermore, specifically, the diffusion process parameters for each of the inference steps are executed, and the inference noise attenuation process of the initial noise transaction data is modeled to obtain a signal attenuation model, which can be referred to as follows:
[0113] B2: Determine the noise attenuation factor and noise injection factor for each of the inference steps, and based on the noise attenuation factor and the noise injection factor, use the first calculation formula to determine the negative semi-logarithmic signal-to-noise ratio parameter, and perform derivative calculation processing on the negative semi-logarithmic signal-to-noise ratio parameter to obtain the negative semi-logarithmic signal-to-noise ratio derivative parameter;
[0114] Diffusion process parameters is the noise attenuation factor, σt is the noise injection factor, t is the step time serial number of the inference step, and T is the maximum value of the step time serial number;
[0115] The first calculation formula satisfies the following formula:
[0116] λ t =-log(α t / σ t )
[0117] where the λ t is the negative semi-logarithmic signal-to-noise ratio parameter, and the αtis the noise attenuation factor, σt is the noise injection factor, and t is the step time serial number of the inference step; the negative half-logarithmic signal-to-noise ratio parameter can be used to control the speed of signal evolution over time. Different from "λ1, λ2, …" in discrete time, in continuous form, λ is a function λ(t), evolving monotonically or non-monotonically as t ranges from 0 to T.
[0118] B4: Determine the predicted first noise transaction data corresponding to each inference step;
[0119] B6: Determine the original diffusion characterization model corresponding to the transaction processing diffusion model in the data prediction inference mode;
[0120] Schematically, in the data prediction inference mode, construct the original diffusion characterization model corresponding to the transaction processing diffusion model, and the diffusion denoising processing operation of the original diffusion characterization model is denoted as f θ (x t , t).
[0121] B8: Characterize the transaction data signal component corresponding to the inference noise attenuation process of the initial noise transaction data using the second calculation formula;
[0122] The "signal" corresponding to the above diffusion process - the transaction data signal component is defined as y t =(x t - σ t ∈) / α t , which represents the estimated noise-free sample (transaction data signal component) at time t, that is, the "signal component" in the noisy sample x t , and y0 = x0 is exactly the finally generated sample;
[0123] The second calculation formula satisfies the following formula:
[0124] y t =(x t - σ t ∈) / α t
[0125] where, y t is the transaction data signal component, x t is the predicted first noise transaction data corresponding to the inference step, ∈ represents standard Gaussian noise, and the noise attenuation factor α0 corresponding to the inference step of the starting step time serial number is 1, and the noise injection factor σ0 corresponding to the inference step of the ending step time serial number is 0;
[0126] B10: Using the third calculation formula based on the negative semi-logarithmic signal-to-noise ratio derivative parameter, the original diffusion characterization model, and the transaction data signal component, model the inference noise attenuation process of the initial noisy transaction data to obtain a signal attenuation model;
[0127] Schematically, the signal y t obeys the signal ordinary differential equation, expressed as the third calculation formula:
[0128] where f θ (x t , t) is a diffusion model in the form of data prediction (it predicts the noise-free sample at time t, i.e., the signal component), which can also be called the diffusion denoising processing operation of the original diffusion characterization model. λ t =-log(α t / σ t ) is called the negative semi-logarithmic signal-to-noise ratio, and λ' t is the derivative of λ t with respect to time t;
[0129] Furthermore, the third calculation formula satisfies the following formula:
[0130]
[0131] where d represents the differential operator, λt t is the negative semi-logarithmic signal-to-noise ratio derivative parameter, and f θ (x t , t) represents the diffusion denoising processing operation of the original diffusion characterization model. λ' t characterizes the speed at which the signal approaches the ideal state.
[0132] S308: Using the inference cost upper limit parameter as a reference, based on the signal attenuation model and the size conversion information loss, perform candidate data size combination search processing on all inference steps to obtain multiple candidate data size combinations and determine the candidate cumulative error of the candidate data size combination, where the candidate cumulative error of the candidate data size combination is less than or equal to the inference cost upper limit parameter;
[0133] When changing the data size at a certain moment t, an instantaneous error (for example, information loss caused by downsampling and upsampling) will be introduced. This error is not only the current deviation but also affects the subsequent evolution of the signal. The signal differential equation tells us how this error will be "transmitted" or "amplified" in the next time if there is an error currently.
[0134] Simply put, assume the error at the inference step at time t is Then, within a very short period of time in the next step, this error will be amplified or attenuated at a rate (determined by λ′ t ), thereby affecting the future value of the signal y t . To measure the effect of this error propagation, an approximate formula for the local error - the fourth calculation formula - is proposed as follows;
[0135] Furthermore, to perform the candidate data size combination search process for all inference steps based on the signal attenuation model and the loss of dimension conversion information with reference to the upper limit parameter of the inference cost, and to determine the candidate cumulative error of the candidate data size combination, the following method can be referred to:
[0136] C2: Based on the multiple candidate data sizes corresponding to each of the inference steps, determine multiple reference data size combinations corresponding to all the inference steps, where the reference data size combination includes the reference data sizes corresponding to all the inference steps;
[0137] C4: According to the reference data size combination, based on the negative semi - logarithm signal - to - noise ratio derivative parameter of the signal attenuation model and the loss of dimension conversion information, use the fourth calculation formula to determine the local error of the size change for each inference step. Based on all the local errors of the size change, determine the reference candidate cumulative error corresponding to the reference data size combination, and obtain the reference combined inference cost corresponding to the reference data size combination;
[0138] Among them, the fourth calculation formula satisfies the following formula:
[0139]
[0140] Among them, the represents the local error of the size change, the L represents the reference data size; λ′ t is the negative semi - logarithm signal - to - noise ratio derivative parameter, representing the rate that controls the amplification or attenuation of the error in the signal differential equation; the represents the loss of dimension conversion information, representing the instantaneous information loss caused by the resolution conversion. The t is the step time sequence number of the inference step. The product of the negative semi - logarithm signal - to - noise ratio derivative parameter and the loss of dimension conversion information gives the additional impact of this instantaneous error on the signal within a very short period of time in the future (such as the next step), that is, the "local error of the size change".
[0141] In this specification, the introduction of the signal differential equation serves here to provide a mathematical tool to amplify or attenuate the instantaneous error introduced by changing the data size according to the "sensitivity" of signal evolution, so as to quantify the possible impact of this error on subsequent signal evolution. This quantification helps to balance the computational cost and the generated quality in adaptive size selection.
[0142] C6: From the reference data size combinations, determine multiple candidate data size combinations for which the reference combination inference cost is less than or equal to the inference cost upper limit parameter, and obtain the candidate cumulative errors corresponding to the candidate data size combinations.
[0143] S310: From multiple candidate data size combinations, determine the target data size combination indicated by the minimum candidate cumulative error, where the target data size combination includes the transaction data sizes corresponding to multiple of the inference steps.
[0144] Among all possible candidate data size combinations, through dynamic programming or a search algorithm with pruning, find a size selection path with the minimum cumulative error under a given inference cost upper limit as the target data size combination. In this way, not only can the continuous description of the signal ODE be used to measure the subsequent impact, but also the instantaneous resolution conversion error can be quantified using the approximate information loss.
[0145] Exemplarily, the determination of the target data size combination refers to the approximate information loss, the inference cost upper limit, and the signal ordinary differential equation, where the inference cost upper limit is an additional hyperparameter provided.
[0146] According to the signal ordinary differential equation, the local error of the signal y when the size is changed to L at time t t is denoted by the fourth calculation formula as where ‖·‖ is a difference function (such as the mean square error), is the approximate information loss - size conversion information loss brought by converting the first noise transaction data predicted at time t to the candidate data size L.
[0147] For a given inference cost upper limit C, search for the combination s ∈ S with the minimum cumulative error among all data size combinations S whose cost does not exceed C. The reference data size combination refers to the tuple s = (L1,..., L N formed by the data sizes L1,..., L at each inference step n = 1,..., N N ) ∈ S. The cumulative error E(s) of the combination s is calculated by summing up the local errors n at the time t corresponding to each inference step n accumulatively The cost C(s) is calculated by taking the single - inference cost C(L at each inference step nn ) The accumulated C(s) = C(L n ), where the definition of the inference cost C(L) is the cost of performing one inference with the data size L;
[0148] In the previous step, any appropriate search algorithm can be adopted, such as the exhaustive method, the search algorithm with pruning, or the dynamic programming algorithm. This method gives a dynamic programming algorithm as an example: First, initialize the closed set as the set of data sizes L at the inference step 1 where all computational costs do not exceed C i forming a unit group ; Subsequently, for 1 < n ≤ N, update the closed set as where satisfies Here, ⊕ is the tuple concatenation operator; finally, select and the combination s that satisfies C(s) ≤ C;
[0149] In this specification, according to the parameters {α t , σ t} of the diffusion process, the data sizes adopted in each step of the inference are automatically determined, without relying on artificial prior knowledge, and the optimal data size can be automatically selected in the sense of minimizing the cumulative error of the signal ordinary differential equation;
[0150] Optionally, refer to Figure 3 , the transaction processing diffusion model includes a size conversion module, a size embedding module, and a basic diffusion model module (such as the diffusion model shown in Figure 3 ), please refer to Figure 6 , Figure 6 is a flow schematic diagram of a transaction processing diffusion scenario. The first noisy transaction data is size-adjusted to obtain the second noisy transaction data based on the transaction data size, the size embedding vector for the first noisy transaction data is determined based on the transaction data size, the data denoising process is performed on the first noisy transaction data based on the size embedding vector and the first noisy transaction data to obtain the third noisy transaction data, and the size reduction operation is performed on the third noisy transaction data to obtain the fourth noisy transaction data. The following method can be referred to:
[0151] S402: The first noisy transaction data is size-adjusted by the size conversion module based on the transaction data size to obtain the second noisy transaction data;
[0152] The size conversion module is an additional module added to the transaction processing diffusion model, responsible for mutually converting data between different data sizes. The design goal is to minimize the information loss caused by the size conversion operation itself, thereby reducing the overall information loss. The diffusion model containing the size conversion module. The most basic size conversion operations include linear up / downsampling, cubic up / downsampling, etc. This method proposes using a lightweight learnable module as the data size conversion module to adapt to various modalities of data. A separate conversion module can be adopted for each pair of sizes, or a part of the parameters can be shared between different size pairs. For example, in sizes L1 < L2 < L3, can share a part of the parameters with;
[0153] Model structure of the size conversion module: The size conversion module mainly includes two modules: downsampling and upsampling. Optionally, the downsampling module realizes the conversion of data from a large size to a small size. The input is large-size data, and the output is small-size data; upsampling realizes the conversion of data from a small size to a large size. The input is small-size data, and the output is large-size data; in this specification, the size adjustment operation is performed by the downsampling module, and the size restoration operation is performed by the upsampling module;
[0154] S404: Determine the size embedding vector for the first noisy transaction data based on the transaction data size through the size embedding module;
[0155] Schematically, the size embedding link modifies the basic diffusion model module of the transaction processing diffusion model, enabling the diffusion model to have the ability to distinguish different-size data. This link requires fine-tuning of the basic diffusion model module. Specifically, the size embedding link encodes the current transaction data size into a continuous high-dimensional embedding vector and injects it into the basic diffusion model module in the form of a condition, and processes it together with the basic diffusion model module, and performs fine-tuning together during the model training stage;
[0156] Size encoding process of the size embedding module: For size L, size encoding maps L to a continuous high-dimensional vector c L , that is, the size embedding vector. Since both size and position are positive real numbers, size encoding can adopt a mapping method similar to position encoding.
[0157] Optionally, the example method adopted is to round the transaction data size to the nearest integer and then look up the learnable encoding table to obtain the size encoding (referred to as learnable size encoding);
[0158] Optionally, it can also be adopted to multiply the transaction data size by a set of frequency features and then use it as the frequency of a set of cosine functions (referred to as cosine-encoded size encoding). For data with a dimension of two or more, the size is a tuple composed of positive real numbers. In this method, the vectors obtained by encoding each value as described above are concatenated to obtain the final size encoding vector;
[0159] S406: The third noisy transaction data is obtained by performing data denoising processing operations on the first noisy transaction data based on the size embedding vector through the basic diffusion model module;
[0160] S408: The fourth noisy transaction data is obtained by performing size reduction operations on the third noisy transaction data through the size conversion module.
[0161] Further, to perform the operation of determining the size embedding vector for the first noisy transaction data based on the transaction data size through the size embedding module, and performing data denoising processing operations on the first noisy transaction data based on the size embedding vector through the basic diffusion model module, the following method can be adopted:
[0162] S2: The size embedding module performs embedding encoding on the transaction data size to obtain the size embedding vector for the first noisy transaction data;
[0163] The size embedding vector refers to a high-dimensional vector obtained after being encoded by the size embedding module. The size embedding vector carries the key information of the current transaction data size, is used to indicate the size characteristics of the current data for the basic diffusion model module, and helps the basic diffusion model module make more accurate judgments in subsequent denoising processing.
[0164] Exemplarily, the transaction data size used in the current inference step has been determined in advance based on factors such as diffusion process parameters and information loss. For example, 128×128 (for image generation tasks), and the determined data size is passed as input to the size embedding module. This module first preprocesses the size (such as normalization or discretization), and then converts it into a fixed-length high-dimensional vector through a lookup table or positional encoding. For example, if the size 128×128 is mapped to a 256-dimensional vector. The obtained high-dimensional vector is the "size embedding vector" for the first noisy transaction data in the current inference step. This vector will carry the size information for subsequent conditional injection use.
[0165] S4: The size embedding vector is used as the conditional injection information for the first noisy transaction data, and the first noisy transaction data and the size embedding vector are input into the basic diffusion model module. The third noisy transaction data is obtained by performing data denoising processing operations through the basic diffusion model module.
[0166] Conditional injection: Combine additional information (here the size embedding vector) with the main input data (the first noisy transaction data) as the input condition for the diffusion model to help the model complete denoising processing more accurately.; The size embedding vector is used as additional conditional injection into the basic diffusion model module is denoted as The example conditional injection method adopted in this method is to add to the encoded vector of time in the diffusion model, but other methods can also be adopted. For example, for a diffusion model based on the Transformer architecture, it can be spliced into the token embedding sequence;
[0167] In this specification, the pre-determined transaction data size is encoded through a size embedding module to generate a size embedding vector. This vector effectively captures the current data size information. The size embedding vector is combined with the first noisy transaction data as conditional information and input into the basic diffusion model module. With the denoising ability of the model, the third noisy transaction data with reduced noise and enhanced details is generated. Ensure that the diffusion model can make full use of the current data size information during the denoising process, so as to achieve more efficient and accurate noise removal and data restoration in multiple steps of iteration.
[0168] Furthermore, for the size conversion module, the following method is adopted to adjust the model parameters during the model training process of the transaction processing diffusion model, as follows:
[0169] D2: During the model training process, determine the sample first noisy transaction data corresponding to the inference step and the sample fourth noisy transaction data after the size reduction operation;
[0170] Sample first noisy transaction data: In a certain inference step, it is the original noisy sample data input to the size conversion module. It is the data obtained from the initial noise after several previous iterations during the model inference or training process, and still contains a relatively high noise component.
[0171] Sample fourth noisy transaction data: After being processed by the size conversion module and then restored to the expected size through the size reduction operation. Usually, the size conversion module first converts the data to other sizes (such as downsampling to a smaller resolution or performing other size adjustments), and then restores the data back to the original or target size through the reduction operation. The fourth noisy transaction data is the restored data, which should ideally be consistent with the first noisy transaction data without information loss.
[0172] Schematically, during the model training process, the following operations are performed for each sample or batch of samples:
[0173] 1) Obtain the first noisy transaction data: Select the original noisy data that has not undergone the size conversion operation in the current inference step as the "sample first noisy transaction data". This is usually the input data before the size conversion module is executed.
[0174] 2) Perform size conversion and size reduction: Input the first noisy transaction data into the size conversion module to perform downsampling or other size transformation operations to generate intermediate state data.
[0175] Then, the intermediate state data is restored back to the original or expected size through size restoration operations (such as upsampling or interpolation) to obtain the "sample fourth noise transaction data".
[0176] 3) Save the data pair: At this time, there is a pair of data: the first noise transaction data (original input) and the fourth noise transaction data (the result after size conversion and restoration), which is used for subsequent calculation of the reconstruction error.
[0177] D4: Calculate the reconstruction loss for the size conversion module based on the sample first noise transaction data and the sample fourth noise transaction data, and use the reconstruction loss to adjust the model parameters of the size conversion module.
[0178] Loss function used for the reconstruction loss: The main loss function required for training the size conversion module is the reconstruction loss, that is, to ensure that the result after the large-size data is first downsampled by the downsampling module and then upsampled by the upsampling module is as close as possible under a given distance metric (such as L1, L2 distance, LPIPS perceptual distance, etc.); in addition, adversarial loss can also be used to improve the training effect;
[0179] Reconstruction loss: It refers to the error metric calculated by comparing the difference between the original data (the first noise transaction data) and the data after size conversion and restoration (the fourth noise transaction data). Common measurement methods include L1 loss (absolute error), L2 loss (mean square error), etc.
[0180] Training data: Collect the intermediate noise-free samples (signals) of the diffusion model inference as large-size data;
[0181] Training method: The size conversion module can be trained independently or jointly optimized with the diffusion model. The training method is to minimize the aforementioned loss function on the aforementioned training data;
[0182] Model parameter adjustment: It refers to using optimization methods such as backpropagation algorithm and gradient descent to update the weights of the size conversion module using the reconstruction loss, so that the size conversion and restoration operations can preserve the information of the original data as much as possible and reduce information loss.
[0183] Schematically, for each training sample (or batch), calculate the reconstruction loss between the sample first noise transaction data and the sample fourth noise transaction data. Take the reconstruction loss as the objective function, calculate the gradient through backpropagation, and use gradient descent, Adam or other optimization algorithms to update the parameters in the size conversion module (such as the weights of the downsampling and upsampling networks). The goal is to minimize the reconstruction loss, so that the data sample fourth noise transaction data obtained after size conversion and restoration is as close as possible to the original data sample first noise transaction data, achieving the optimization of information preservation.
[0184] In this specification, in step D2, a pair of data is obtained from the training samples: the original noisy data without size conversion (the first noisy transaction data) and the data after size conversion and restoration (the fourth noisy transaction data). This provides a direct comparison basis for the subsequent calculation of the reconstruction loss. In step D4, this pair of data is used to calculate the reconstruction loss (such as L1 or L2 loss), and based on this, the parameters of the size conversion module are adjusted through backpropagation to minimize the information loss during the size conversion process, thereby ensuring high-fidelity data in the generation task. This parameter adjustment process ensures that the size conversion module can effectively retain the details and features of the original data during the model training process, and thus improve the generation quality of the entire diffusion model during the reverse denoising process.
[0185] Furthermore, for the basic diffusion model module or the transaction processing diffusion model, the following method is adopted to adjust the model parameters during the model training process of the transaction processing diffusion model, as follows:
[0186] E2: During the model training process, determine the real generated transaction data and the sample third noisy transaction data after data denoising in each inference step, and determine the diffusion loss based on the sample third noisy transaction data and the real generated transaction data using the fifth calculation formula;
[0187] Real generated transaction data: refers to the "real" or "target" data samples used during training. The generated transaction data finally output by the transaction processing diffusion model can be used as the real generated transaction data; for example, in an image scenario, it can refer to the original clear image, and in a text scenario, it can refer to the noise-free text sequence; it can also be the pre-set real generated transaction data;
[0188] Sample third noisy transaction data: refers to the intermediate result obtained after the model performs data denoising at a certain step (or multiple steps) in the multi-step inference (denoising) process. It has lower noise than the initial noisy transaction data but may not have reached the final clear state yet.
[0189] The fifth calculation formula satisfies the following formula:
[0190]
[0191] wherein, the L1 represents the diffusion loss, the represents the sample third noisy transaction data obtained after data denoising by the basic diffusion model module, the x t represents the predicted first noisy transaction data corresponding to the inference step, the c L represents the size embedding vector, the x0 represents the real generated transaction data, and the t is the step time serial number of the inference step;
[0192] The diffusion loss L1 generally represents the distance metric between the third noisy transaction data and the true generated transaction data, which is used to guide the model to continuously reduce the difference between the two during the training process.
[0193] Schematically, step E2 emphasizes how to calculate the diffusion loss using the true generated transaction data and the third noisy transaction data generated in each inference step during the model training process. This loss function quantifies the difference between the two through the "fifth calculation formula", providing a basis for subsequent parameter updates, so that the diffusion model gradually converges to the ability to generate high-quality transaction data during the multi-step iterative denoising process.
[0194] E4: Determine the reference third noisy transaction data after the diffusion denoising process of the predicted first noisy transaction data based on the original diffusion representation model in the inference step, and determine the cross-size consistency loss using the sixth calculation formula based on the reference third noisy transaction data and the sample third noisy transaction data;
[0195] Original diffusion representation model: Refers to the basic diffusion model that has been trained before introducing variable-size mechanisms such as "size conversion module" and "size embedding module". It is usually regarded as a baseline or reference, which can denoise the noisy data and output a relatively stable intermediate result.
[0196] Predicted first noisy transaction data: In the current inference step, the model has performed a series of processing on the input data (which may include size transformation, embedding, etc.) to obtain the transaction data in the noisy state, which is called the "first noisy transaction data". The term "predicted" means that these predicted first noisy transaction data are the noisy samples obtained after some pre-inference or conversion operations.
[0197] Reference third noisy transaction data: The intermediate result obtained after inputting the "predicted first noisy transaction data" into the "original diffusion representation model" for denoising operation. The reason for being used as a "reference" is that it does not contain the influence of any variable-size mechanism and represents the "standard" denoising output of the original model at this time step and this noise level.
[0198] Sample third noisy transaction data: Refers to the intermediate result obtained after the denoising operation of the current (new) model - transaction processing diffusion model under the same inference step through mechanisms such as size conversion and size embedding. It is at the same inference time step as the "reference third noisy transaction data", but due to the variable-size processing of the new model, there may be differences in their outputs.
[0199] The goal of cross - size consistency constraint is to minimize the information loss caused by data size conversion. Specifically, this method designs a cross - size consistency loss to ensure that each step of the inference of the transaction processing diffusion model with variable - size diffusion mode is consistent with the original diffusion model (which can be understood as only containing the basic diffusion model module).
[0200] The sixth calculation formula satisfies the following formula:
[0201]
[0202] Wherein, the L2 represents the cross - size consistency loss, and the f θ (x t , t) represents the reference third noise transaction data obtained after the original diffusion characterization model without the size conversion module performs data denoising processing on the predicted first noise transaction data.
[0203] Schematically, the introduction of cross - size consistency loss can ensure the smoothness of multi - size switching: the new model will switch to a lower or higher resolution at some time steps, which may cause information loss or prediction deviation; aligning with the output of the original model can reduce the "jumps" or "distortions" that occur in multi - step inferences. Also, for the prediction path of its original model (the original diffusion characterization model), the original model is regarded as a "reliable baseline" that can give relatively stable denoising results at the same noise level. The cross - size consistency constraint ensures that the results of the new model do not deviate too much from the baseline, thus ensuring that the new model (transaction processing diffusion model) still maintains good generation quality under the variable - size strategy. And it can improve training stability. When the new model introduces size conversion and embedding, there may be a large parameter space or uncertainty. By adding the consistency loss with the "reference third noise transaction data" during training, it can help the model converge faster and more stably.
[0204] E6: Adjust the model parameters of the basic diffusion model module or the transaction processing diffusion model based on the diffusion loss and the cross - size consistency loss;
[0205] Based on the two losses calculated previously: the diffusion loss and the cross - size consistency loss, they are combined to jointly form the total loss function, and backpropagation and parameter update are performed on the basic diffusion model module or the transaction processing diffusion model (whether it is the original basic diffusion model or the modified transaction processing diffusion model).
[0206] Backpropagation involves calculating gradients for model parameters (including those of the base diffusion model, the scale conversion module, and the scale embedding module). During backpropagation, the diffusion loss forces the model to adjust weights to bring the denoised output closer to the real data. Meanwhile, the cross-scale consistency loss constrains the model's output after the scale-changing operation to align with the reference result.
[0207] Parameter update is to update the model parameters using gradient descent or its variants (such as Adam, RMSProp). The updated parameters will improve the denoising results produced by the model in the next forward propagation in terms of quality and multi-scale stability.
[0208] The above method can achieve the following effects:
[0209] Ensure denoising effect: Diffusion loss ensures that the denoising results output by the model (such as the third noise transaction data) are as close as possible to the real data (or the target noise-free data), thereby enabling the model to effectively reduce noise at each step;
[0210] Maintaining multi-scale stability: The cross-scale consistency loss constrains the model to maintain consistent denoising results at different scales. This ensures that after introducing modules such as scale conversion and scale embedding, the model output will not deviate significantly due to changes in resolution.
[0211] By combining diffusion loss and cross-scale consistency loss, with the combined loss as the training objective, backpropagation is used to update the parameters of the entire model (including the basic diffusion module and the transaction processing diffusion module). This process enables the model to not only accurately denoise and restore real data features, but also maintain output consistency after introducing a multi-scale processing mechanism, ultimately achieving high-quality and efficient data generation.
[0212] The following will be combined Figure 7 , the transaction data processing device provided in this specification is introduced in detail. It should be noted that, Figure 7 The transaction data processing device shown is used to execute the Figures 1 to 6 For the convenience of explanation, only the parts related to this specification are shown. For the specific technical details not disclosed, please refer to this specification. Figures 1 to 6 The embodiment shown.
[0213] See Figure 7 , which shows a schematic diagram of the structure of the transaction data processing device of this specification. The transaction data processing device 1 can be implemented as all or part of the user electronic device through software, hardware, or a combination of both. According to some embodiments, the transaction data processing device 1 includes a data determination module 11 and a diffusion denoising module 12, which are specifically used to:
[0214] A data determination module 11, configured to determine initial noisy transaction data for a transaction processing diffusion model in a transaction data generation task scenario;
[0215] A diffusion denoising module 12, configured to perform multi-step inference step denoising processing on the basis of the initial noisy transaction data by using a transaction processing diffusion model;
[0216] The diffusion denoising module 12 is configured to, in the multi-step inference step denoising processing, determine a diffusion process parameter and first noisy transaction data corresponding to the current inference step, determine a transaction data size by performing data size determination on the first noisy transaction data based on the diffusion process parameter, perform a size adjustment operation on the first noisy transaction data based on the transaction data size to obtain second noisy transaction data, determine a size embedding vector for the first noisy transaction data based on the transaction data size, perform a data denoising processing operation on the basis of the size embedding vector and the first noisy transaction data to obtain third noisy transaction data, and perform a size restoration operation on the third noisy transaction data to obtain fourth noisy transaction data;
[0217] The diffusion denoising module 12 is configured to, if there is a next inference step for the current inference step, use the next inference step as the current inference step and use the fourth noisy transaction data as the first noisy transaction data, and execute the step of determining the diffusion process parameter and the first noisy transaction data corresponding to the current inference step;
[0218] The diffusion denoising module 12 is configured to, if there is no next inference step for the current inference step, control the transaction processing diffusion model to output target generated transaction data for the transaction data generation task based on the fourth noisy data.
[0219] Optionally, the determining a transaction data size by performing data size determination on the first noisy transaction data based on the diffusion process parameter includes:
[0220] Obtaining a target data size combination determined based on the diffusion process parameter, and querying the transaction data size corresponding to the current inference step in the target data size combination.
[0221] Optionally, the apparatus 1 is further configured to:
[0222] Determine an inference cost upper limit parameter for the multi-step inference step denoising processing, and determine multiple candidate data sizes corresponding to each inference step;
[0223] Taking the candidate data sizes of each inference step as a reference, predicting the size conversion information loss corresponding to each inference step;
[0224] Model the inference noise attenuation process of the initial noisy transaction data based on the diffusion process parameters of each inference step to obtain a signal attenuation model.
[0225] Taking the inference cost upper limit parameter as a reference, perform a candidate data size combination search process on all inference steps based on the signal attenuation model and the size conversion information loss to obtain multiple candidate data size combinations and determine the candidate cumulative error of the candidate data size combinations, where the candidate cumulative error of the candidate data size combinations is less than or equal to the inference cost upper limit parameter.
[0226] Determine the target data size combination indicated by the minimum candidate cumulative error from multiple candidate data size combinations, where the target data size combination includes the transaction data sizes corresponding to multiple inference steps.
[0227] Optionally, predicting the size conversion information loss for each inference step with reference to the candidate data sizes of the inference steps includes:
[0228] Determine the predicted first noisy transaction data before the size adjustment operation in each inference step.
[0229] Predict the predicted fourth noisy transaction data after the size reduction operation in each inference step based on the candidate data sizes.
[0230] Perform data conversion loss determination processing based on the predicted first noisy transaction data and the predicted fourth noisy transaction data to obtain the size conversion information loss.
[0231] Optionally, modeling the inference noise attenuation process of the initial noisy transaction data based on the diffusion process parameters of each inference step to obtain a signal attenuation model includes:
[0232] Determine the noise attenuation factor and noise injection factor of each inference step, use the first calculation formula to determine the negative semi-logarithmic signal-to-noise ratio parameter based on the noise attenuation factor and the noise injection factor, and perform derivative calculation processing on the negative semi-logarithmic signal-to-noise ratio parameter to obtain the negative semi-logarithmic signal-to-noise ratio derivative parameter.
[0233] Determine the predicted first noisy transaction data corresponding to each inference step.
[0234] Determine the original diffusion characterization model corresponding to the transaction processing diffusion model in the data prediction inference mode.
[0235] Use the second calculation formula to represent the transaction data signal component corresponding to the inference noise attenuation process of the initial noisy transaction data.
[0236] Using the third calculation formula based on the negative semi-logarithmic signal-to-noise ratio derivative parameter, the original diffusion characterization model, and the transaction data signal component, model the inference noise attenuation process of the initial noisy transaction data to obtain a signal attenuation model;
[0237] The first calculation formula satisfies the following formula:
[0238] λ t =-log(α t / σ t )
[0239] where, the λ t is the negative semi-logarithmic signal-to-noise ratio parameter, the α t is the noise attenuation factor, the σ t is the noise injection factor, and t is the step time sequence number of the inference step;
[0240] The second calculation formula satisfies the following formula:
[0241] y t =(x t -σ t ∈) / α t
[0242] where, the y t is the transaction data signal component, the x t is the predicted first noisy transaction data corresponding to the inference step, ∈ represents standard Gaussian noise, and the noise attenuation factor α0 corresponding to the inference step at the starting step time sequence number is 1, and the noise injection factor σ0 corresponding to the inference step at the ending step time sequence number is 0;
[0243] The third calculation formula satisfies the following formula:
[0244]
[0245] where, d represents the differential operator, the λ' t is the negative semi-logarithmic signal-to-noise ratio derivative parameter, and f θ (x t ,t) represents the diffusion denoising processing operation of the original diffusion characterization model.
[0246] Optionally, taking the inference cost upper limit parameter as a reference, based on the signal attenuation model and the size conversion information loss, perform candidate data size combination search processing on all inference steps to obtain multiple candidate data size combinations and determine the candidate cumulative error of the candidate data size combinations, including:
[0247] Based on multiple candidate data sizes corresponding to each of the inference steps, determine multiple reference data size combinations corresponding to all the inference steps, where the reference data size combinations include reference data sizes corresponding to all the inference steps;
[0248] According to the reference data size combinations, based on the negative semi-logarithmic signal-to-noise ratio derivative parameter of the signal attenuation model and the size conversion information loss, use the fourth calculation formula to determine the local error of size change for each inference step, determine the reference candidate cumulative error corresponding to the reference data size combination based on all the local errors of size change, and obtain the reference combination inference cost corresponding to the reference data size combination;
[0249] From the reference data size combinations, determine multiple candidate data size combinations where the reference combination inference cost is less than or equal to the inference cost upper limit parameter, and obtain the candidate cumulative error corresponding to the candidate data size combinations;
[0250] Among them, the fourth calculation formula satisfies the following formula:
[0251]
[0252] Among them, the represents the local error of size change, the L represents the reference data size, λ′ t is the negative semi-logarithmic signal-to-noise ratio derivative parameter, the represents the size conversion information loss, and the t is the step time sequence number of the inference step.
[0253] Optionally, the transaction processing diffusion model includes a size conversion module, a size embedding module, and a basic diffusion model module. The size adjustment operation is performed on the first noisy transaction data based on the transaction data size to obtain the second noisy transaction data, the size embedding vector for the first noisy transaction data is determined based on the transaction data size, the data denoising processing operation is performed on the third noisy transaction data based on the size embedding vector and the first noisy transaction data to obtain the third noisy transaction data, and the size reduction operation is performed on the third noisy transaction data to obtain the fourth noisy transaction data, including:
[0254] Perform a size adjustment operation on the first noisy transaction data based on the transaction data size through the size conversion module to obtain the second noisy transaction data;
[0255] Determine the size embedding vector for the first noisy transaction data based on the transaction data size through the size embedding module;
[0256] The base diffusion model module performs data denoising processing on the basis of the size embedding vector and the first noisy transaction data to obtain third noisy transaction data;
[0257] The size conversion module performs size reduction on the third noisy transaction data to obtain fourth noisy transaction data.
[0258] Optionally, the device is further configured to:
[0259] During model training, determine the sample first noisy transaction data corresponding to the inference step and the sample fourth noisy transaction data after size reduction operation;
[0260] Calculate the reconstruction loss for the size conversion module based on the sample first noisy transaction data and the sample fourth noisy transaction data, and use the reconstruction loss to adjust the model parameters of the size conversion module.
[0261] Optionally, the size embedding module determines a size embedding vector for the first noisy transaction data based on the transaction data size, and the base diffusion model module performs data denoising processing on the basis of the size embedding vector and the first noisy transaction data to obtain third noisy transaction data, including:
[0262] The size embedding module performs embedding encoding on the transaction data size to obtain a size embedding vector for the first noisy transaction data;
[0263] Use the size embedding vector as the conditional injection information of the first noisy transaction data, input the first noisy transaction data and the size embedding vector into the base diffusion model module, and perform data denoising processing through the base diffusion model module to obtain third noisy transaction data.
[0264] Optionally, the device is further configured to:
[0265] During model training, determine the real generated transaction data and the sample third noisy transaction data after data denoising processing in each inference step, and determine the diffusion loss based on the sample third noisy transaction data and the real generated transaction data using the fifth calculation formula;
[0266] Determine the reference third noisy transaction data after diffusion denoising processing of the predicted first noisy transaction data based on the original diffusion representation model in the inference step, and determine the cross-size consistency loss based on the reference third noisy transaction data and the sample third noisy transaction data using the sixth calculation formula;
[0267] Adjust the model parameters of the basic diffusion model module or the transaction processing diffusion model based on the diffusion loss and the cross - size consistency loss;
[0268] The fifth calculation formula satisfies the following formula:
[0269]
[0270] Wherein, the L1 represents the diffusion loss, and the represents the sample third noise transaction data obtained after data denoising processing by the basic diffusion model module, the x t represents the predicted first noise transaction data corresponding to the inference step, the c L represents the size embedding vector, the x0 represents the real generated transaction data, and the t is the step time sequence number of the inference step;
[0271] The sixth calculation formula satisfies the following formula:
[0272]
[0273] Wherein, the L2 represents the cross - size consistency loss, and the f θ (x t , t) represents the reference third noise transaction data obtained after the original diffusion characterization model without the size conversion module performs data denoising processing on the predicted first noise transaction data.
[0274] Optionally, the size adjustment operation includes a downsampling operation, and the size reduction operation includes an upsampling operation; and / or,
[0275] In the multi - step inference step denoising process, the data size of the transaction data corresponding to the starting inference step is the same as the data size of the first noise transaction data of the starting inference step; the data size of the transaction data corresponding to the ending inference step is the same as the data size of the first noise transaction data corresponding to the ending inference step, and the data size of the transaction data corresponding to the middle inference step is less than or equal to the data size of the first noise transaction data corresponding to the middle inference step.
[0276] It should be noted that when the transaction data processing device provided in the above embodiment executes the transaction data processing method, only the above - mentioned division of each functional module is used for illustration. In practical applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the transaction data processing device provided in the above embodiment and the embodiment of the transaction data processing method belong to the same concept, and the implementation process is detailed in the method embodiment, which will not be repeated here.
[0277] The above serial numbers of this specification are only for description and do not represent the advantages or disadvantages of the embodiments.
[0278] This specification also provides a computer storage medium, which can store multiple instructions. The instructions are suitable for being loaded and executed by a processor as described above Figures 1 to 6 in the described embodiment of the transaction data processing method. The specific execution process can be referred to Figures 1 to 6 the specific description of the described embodiment, which will not be elaborated here.
[0279] This specification also provides a computer program product, which stores at least one instruction. The at least one instruction is loaded and executed by the processor as described above Figures 1 to 6 in the described embodiment of the transaction data processing method. The specific execution process can be referred to Figures 1 to 6 the specific description of the described embodiment, which will not be elaborated here.
[0280] Please refer to Figure 8 , which is a block diagram of the structure of an electronic device provided by an embodiment of this specification. The electronic device in this specification may include one or more of the following components: a processor 1010, a memory 1020, an input device 1030, an output device 1040, and a bus 1050. The processor 1010, the memory 1020, the input device 1030, and the output device 1040 may be connected through the bus 1050.
[0281] The processor 1010 may include one or more processing cores. The processor 1010 connects various parts within the entire electronic device through various interfaces and lines. By running or executing instructions, programs, code sets, or instruction sets stored in the memory 1020, and by invoking data stored in the memory 1020, it performs various functions of the electronic device and processes data. Optionally, the processor 1010 may be implemented in at least one of the hardware forms of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 1010 may integrate a combination of one or more of a central processing unit (CPU), a graphics processing unit (GPU), and a modem, etc. Among them, the CPU mainly processes the operating system, user interface, application programs, etc.; the GPU is responsible for rendering and drawing display content; the modem is used to process wireless communication. It can be understood that the above modem may not be integrated into the processor 1010 and may be implemented separately through a communication chip.
[0282] The memory 1020 may include random access memory (RAM) and may also include read-only memory (ROM). Optionally, the memory 1020 includes a non-transitory computer-readable storage medium. The memory 1020 can be used to store instructions, programs, code, code sets, or instruction sets.
[0283] Among them, the input device 1030 is used to receive input instructions or data. The input device 1030 includes, but is not limited to, a keyboard, a mouse, a camera, a microphone, or a touch device. The output device 1040 is used to output instructions or data. The output device 1040 includes, but is not limited to, a display device and a speaker, etc. In the embodiments of this specification, the input device 1030 may be a temperature sensor for obtaining the operating temperature of the electronic device. The output device 1040 may be a speaker for outputting an audio signal.
[0284] In addition, those skilled in the art can understand that the structure of the electronic device shown in the above drawings does not limit the electronic device. The electronic device may include more or fewer components than shown in the drawings, or combine certain components, or have different component arrangements. For example, the electronic device also includes components such as a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (WIFI) module, a power supply, and a Bluetooth module, which will not be elaborated here.
[0285] In the embodiments of this specification, the execution subject of each step may be the electronic device introduced above. Optionally, the execution subject of each step is the operating system of the electronic device. The operating system may be the Android system, the IOS system, or other operating systems, which are not limited in the embodiments of this specification.
[0286] In Figure 8 the electronic device, the processor 1010 may be used to call the program stored in the memory 1020 and execute it to implement the transaction data processing method as described in various method embodiments of this specification.
[0287] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it may include the processes of the above method embodiments. Among them, the storage medium may be a magnetic disk, an optical disk, a read-only memory, or a random access memory, etc.
[0288] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.), and signals involved in the embodiments of this specification are all authorized by the user or fully authorized by all parties. And the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions. For example, the object features, interaction behavior features, and user information involved in this specification are all obtained under full authorization.
[0289] The above-disclosed are only the preferred embodiments of this specification. Of course, the scope of rights of this specification cannot be limited thereby. Therefore, equivalent changes made according to the claims of this specification still fall within the scope covered by this specification.
Claims
1. A transaction data processing method, the method comprising: In a transaction data generation task scenario, determining initial noisy transaction data for a transaction processing diffusion model; Performing multi-step inference step denoising processing on the initial noisy transaction data in sequence using the transaction processing diffusion model; During the multi-step inference step denoising processing, determining the diffusion process parameters corresponding to the current inference step and the first noisy transaction data, determining the transaction data size by determining the data size of the first noisy transaction data based on the diffusion process parameters, performing a size adjustment operation on the first noisy transaction data based on the transaction data size to obtain the second noisy transaction data, determining a size embedding vector for the first noisy transaction data based on the transaction data size, performing a data denoising processing operation on the first noisy transaction data based on the size embedding vector and the first noisy transaction data to obtain the third noisy transaction data, and performing a size restoration operation on the third noisy transaction data to obtain the fourth noisy transaction data; If there is a next inference step for the current inference step, taking the next inference step as the current inference step and taking the fourth noisy transaction data as the first noisy transaction data, and performing the step of determining the diffusion process parameters corresponding to the current inference step and the first noisy transaction data; If there is no next inference step for the current inference step, controlling the transaction processing diffusion model to output target generated transaction data for the transaction data generation task based on the fourth noisy data.
2. The method according to claim 1, wherein the determining the transaction data size by determining the data size of the first noisy transaction data based on the diffusion process parameters comprises: Obtaining a target data size combination determined based on the diffusion process parameters, and querying the transaction data size corresponding to the current inference step in the target data size combination.
3. The method according to claim 2, the method further comprising: Determining an inference cost upper limit parameter for the multi-step inference step denoising processing, and determining multiple candidate data sizes corresponding to each inference step; Predicting the size conversion information loss corresponding to each inference step with reference to the candidate data sizes of the inference step; Based on the diffusion process parameters of each inference step, modeling the inference noise attenuation process of the initial noisy transaction data to obtain a signal attenuation model; With reference to the inference cost upper limit parameter, performing a candidate data size combination search process on all inference steps based on the signal attenuation model and the size conversion information loss to obtain multiple candidate data size combinations and determining the candidate cumulative error of the candidate data size combination, the candidate cumulative error of the candidate data size combination being less than or equal to the inference cost upper limit parameter; Determining, from the multiple candidate data size combinations, the target data size combination indicated by the minimum candidate cumulative error, the target data size combination including the transaction data sizes corresponding to multiple inference steps.
4. The method according to claim 3, wherein predicting the loss of dimension conversion information with reference to each candidate data dimension of the inference step comprises: Determining the predicted first noisy transaction data before the dimension adjustment operation in each inference step; Predicting the fourth noisy transaction data after the dimension restoration operation in each inference step based on the candidate data dimensions; Performing data conversion loss determination processing based on the predicted first noisy transaction data and the predicted fourth noisy transaction data to obtain the loss of dimension conversion information.
5. The method according to claim 3, wherein modeling the inference noise attenuation process of the initial noisy transaction data based on the diffusion process parameters of each inference step to obtain a signal attenuation model comprises: Determining the noise attenuation factor and the noise injection factor of each inference step, determining the negative semi-logarithmic signal-to-noise ratio parameter using a first calculation formula based on the noise attenuation factor and the noise injection factor, and performing derivative calculation processing on the negative semi-logarithmic signal-to-noise ratio parameter to obtain the negative semi-logarithmic signal-to-noise ratio derivative parameter; Determining the predicted first noisy transaction data corresponding to each inference step; Determining the original diffusion characterization model corresponding to the transaction processing diffusion model in the data prediction inference mode; Characterizing the transaction data signal component corresponding to the inference noise attenuation process of the initial noisy transaction data using a second calculation formula; Modeling the inference noise attenuation process of the initial noisy transaction data using a third calculation formula based on the negative semi-logarithmic signal-to-noise ratio derivative parameter, the original diffusion characterization model, and the transaction data signal component to obtain a signal attenuation model; The first calculation formula satisfies the following formula: λ t = -log(α t / σ t ) wherein, the λ t is the negative semi-logarithmic signal-to-noise ratio parameter, the α t is the noise attenuation factor, the σ t is the noise injection factor, and t is the step time sequence number of the inference step; The second calculation formula satisfies the following formula: y t =(x t -σ t ∈) / α t wherein, the y t is the transaction data signal component, the x t is the predicted first noise transaction data corresponding to the inference step, the ∈ represents standard Gaussian noise, and the noise attenuation factor α0 corresponding to the inference step of the starting step time sequence number is 1, and the noise injection factor σ0 corresponding to the inference step of the ending step time sequence number is 0; The third calculation formula satisfies the following formula: wherein, the d represents a differential operator, and the λ′ t is the negative semi-logarithmic signal-to-noise ratio derivative parameter, and the f θ (x t , t) represents the diffusion denoising process operation of the original diffusion characterization model.
6. The method according to claim 3, wherein with reference to the inference cost upper limit parameter, performing candidate data dimension combination search processing on all inference steps based on the signal attenuation model and the loss of dimension conversion information to obtain multiple candidate data dimension combinations and determining the candidate cumulative error of the candidate data dimension combinations comprises: Based on the multiple candidate data dimensions corresponding to each inference step, determining multiple reference data dimension combinations corresponding to all inference steps, the reference data dimension combinations including the reference data dimensions corresponding to all inference steps; According to the reference data dimension combinations, determining the local dimension change error of each inference step using a fourth calculation formula based on the negative semi-logarithmic signal-to-noise ratio derivative parameter of the signal attenuation model and the loss of dimension conversion information, determining the reference candidate cumulative error corresponding to the reference data dimension combination based on all the local dimension change errors, and obtaining the reference combination inference cost corresponding to the reference data dimension combination; Determining from the reference data dimension combinations that the reference combination inference cost is less than or equal to the inference cost upper limit parameter to obtain multiple candidate data dimension combinations, and obtaining the candidate cumulative error corresponding to the candidate data dimension combinations; wherein the fourth calculation formula satisfies the following formula: Among them, the represents the local error of the dimensional change, the L represents the reference data dimension, and λ′ t is the negative semi-logarithmic signal-to-noise ratio derivative parameter, and the represents the loss of dimensional conversion information, and the t is the step time serial number of the inference step.
7. According to the method described in claim 1, the transaction processing diffusion model includes a size conversion module, a size embedding module, and a basic diffusion model module. The method includes performing a size adjustment operation on the first noisy transaction data according to the transaction data size to obtain second noisy transaction data, determining a size embedding vector for the first noisy transaction data based on the transaction data size, performing a data denoising operation on the first noisy transaction data based on the size embedding vector and the first noisy transaction data to obtain third noisy transaction data, and performing a size restoration operation on the third noisy transaction data to obtain fourth noisy transaction data, including: Performing a size adjustment operation on the first noisy transaction data according to the transaction data size through the size conversion module to obtain second noisy transaction data; Determining a size embedding vector for the first noisy transaction data based on the transaction data size through the size embedding module; Performing a data denoising operation on the first noisy transaction data based on the size embedding vector and the first noisy transaction data through the basic diffusion model module to obtain third noisy transaction data; Performing a size restoration operation on the third noisy transaction data through the size conversion module to obtain fourth noisy transaction data.
8. According to the method described in claim 7, the method further includes: During the model training process, determining the sample first noisy transaction data corresponding to the inference step and the sample fourth noisy transaction data after the size restoration operation; Calculating a reconstruction loss for the size conversion module based on the sample first noisy transaction data and the sample fourth noisy transaction data, and adjusting the model parameters of the size conversion module using the reconstruction loss.
9. According to the method described in claim 7, the method of determining a size embedding vector for the first noisy transaction data based on the transaction data size through the size embedding module and performing a data denoising operation on the first noisy transaction data based on the size embedding vector and the first noisy transaction data through the basic diffusion model module includes: Performing embedding encoding on the transaction data size through the size embedding module to obtain a size embedding vector for the first noisy transaction data; Using the size embedding vector as the conditional injection information of the first noisy transaction data, inputting the first noisy transaction data and the size embedding vector into the basic diffusion model module, and performing a data denoising operation through the basic diffusion model module to obtain third noisy transaction data.
10. According to the method described in claim 9, the method further includes: During the model training process, determining the real generated transaction data and the sample third noisy transaction data after the data denoising operation in each inference step, and determining a diffusion loss based on the sample third noisy transaction data and the real generated transaction data using a fifth calculation formula; Determining the reference third noisy transaction data after the diffusion denoising operation on the predicted first noisy transaction data based on the original diffusion representation model in the inference step, and determining a cross-size consistency loss based on the reference third noisy transaction data and the sample third noisy transaction data using a sixth calculation formula; Adjust the model parameters of the basic diffusion model module or the transaction processing diffusion model based on the diffusion loss and the cross - size consistency loss; The fifth calculation formula satisfies the following formula: Among them, the L1 represents the diffusion loss, and the represents the sample third noise transaction data obtained after data denoising by the basic diffusion model module, and the x t represents the predicted first noise transaction data corresponding to the inference step, the c L represents the size embedding vector, the x0 represents the true generated transaction data, and the t is the step time sequence number of the inference step; The sixth calculation formula satisfies the following formula: Among them, the L2 represents the cross-dimensional consistency loss, and the f θ (x t , t) represents the reference third noise transaction data obtained after the original diffusion characterization model without the dimension conversion module performs data denoising processing on the predicted first noise transaction data.
11. The method according to claim 1, wherein the size adjustment operation includes a downsampling operation, and the size restoration operation includes an upsampling operation; and / or, In the denoising process of multiple - step inference steps, the size of the transaction data corresponding to the starting inference step is the same as the data size of the first noisy transaction data of the starting inference step; the size of the transaction data corresponding to the ending inference step is the same as the data size of the first noisy transaction data corresponding to the ending inference step, and the size of the transaction data corresponding to the middle - segment inference step is less than or equal to the data size of the first noisy transaction data corresponding to the middle - segment inference step.
12. A transaction data processing device, the device includes: A data determination module, configured to determine initial noisy transaction data for a transaction processing diffusion model in a transaction data generation task scenario; A diffusion denoising module, configured to perform denoising processing for multiple - step inference steps in sequence using the transaction processing diffusion model based on the initial noisy transaction data; The diffusion denoising module, configured to, in the denoising process of multiple - step inference steps, determine the diffusion process parameters and the first noisy transaction data corresponding to the current inference step, determine the transaction data size by determining the data size of the first noisy transaction data based on the diffusion process parameters, perform a size adjustment operation on the first noisy transaction data based on the transaction data size to obtain a second noisy transaction data, determine a size embedding vector for the first noisy transaction data based on the transaction data size, perform a data denoising operation on the first noisy transaction data based on the size embedding vector and the first noisy transaction data to obtain a third noisy transaction data, and perform a size restoration operation on the third noisy transaction data to obtain a fourth noisy transaction data; The diffusion denoising module, configured to, if there is a next inference step for the current inference step, use the next inference step as the current inference step and the fourth noisy transaction data as the first noisy transaction data, and execute the step of determining the diffusion process parameters and the first noisy transaction data corresponding to the current inference step; The diffusion denoising module, configured to, if there is no next inference step for the current inference step, control the transaction processing diffusion model to output the target generated transaction data for the transaction data generation task based on the fourth noisy data.
13. A computer storage medium, the computer storage medium stores multiple instructions, and the instructions are suitable for being loaded and executed by a processor to perform the method steps of any one of claims 1 - 11.
14. A computer program product, the computer program product stores at least one instruction, and the at least one instruction is loaded and executed by a processor to perform the method steps of any one of claims 1 - 11.
15. An electronic device, comprising: A processor and a memory; wherein, the memory stores a computer program, and the computer program is adapted to be loaded and executed by the processor to perform the method steps of any one of claims 1 to 11.