Power data missing value completion method and system based on time perception diffusion
By constructing a TIED-GAN model, combining noise predictors and discriminators, the problem that the power data missing value completion model in the prior art fails to effectively consider the timing and continuous loss characteristics, and the accurate completion of power data missing values and data quality improvement is achieved.
Patent Information
- Application Number
- CN202510368683.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-27
AI Technical Summary
The existing diffusion-based power data missing value completion model fails to effectively consider the timing and continuous loss characteristics of power data, resulting in poor completion effect.
A method for completing the missing value of power data based on time-aware diffusion is proposed. By constructing a TIED-GAN model, combining noise predictors and discriminators, sampling noise data and inputting to generate adversarial models for training, and generating predicted noise data to complete the missing value.
Accurate completion of missing values of power data is achieved, data quality is improved, and downstream tasks are ensured, especially when processing the timing and long-term dependence of power data.
Smart Images

Figure CN119884626A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power data management, and specifically relates to a method and system for completing missing values of power data based on time-aware diffusion. Background Art
[0002] The statements herein merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] With the continuous development of technologies such as smart grids, renewable energy and electrification, the power system is undergoing a digital transformation. A large number of sensors and monitoring devices are deployed in the power system, collecting various parameter data in real time, providing comprehensive monitoring and control capabilities for system operation. The data assets of power companies present typical big data characteristics. These power data come from all aspects of power generation and power use, including power grid operation, equipment management, marketing services and enterprise management, and contain rich information reflecting the production and operation of power companies and customer service status.
[0004] However, in the new power system, there are many types of equipment, wide distribution, and great differences, which leads to increased uncertainty in the acquisition of power grid measurement data and a high rate of random data missing. Power outages will cause power supply interruptions in the entire area, so relevant power data cannot be recorded or collected during the power outage, which will lead to data loss during the power outage. The time series data at the last moment before the power outage is likely to be closely related to the data at the first moment after the restoration. For power data, most of its applications and algorithms require data without missing values. The quality of power data will also affect the efficiency of downstream tasks such as data anomaly detection and data classification. Bad power data will bring deviations to subsequent tasks and call the effectiveness of subsequent tasks into question. Therefore, it is urgent to mine potential missing rules based on massive power data, and then build a power data missing value completion model to provide effective guarantee for the quality of power data and downstream tasks.
[0005] In recent years, with the advancement of the field of power data governance technology, the score-based diffusion model has stood out with its excellent generation performance and completion effect. The score-based diffusion model is a type of deep generation model that generates samples by gradually converting noise into credible data samples through denoising, and this type of model has achieved the most advanced sample quality in many tasks such as image generation and audio synthesis, which is better than other generation models including autoregressive models. Score-based diffusion models can also be applied to missing data value completion. Thanks to the powerful generation effect of the diffusion model, these models have the advantage of generating results with smaller average errors in estimation work. However, in previous diffusion-based completion models, the sampled noise information has not been well utilized, and the results can only be used to train noise predictors. In addition, the inventors found that due to the particularity of power data missing, such as the power outage mentioned above, power data may be continuously missing for a period of time, which requires the corresponding missing model to consider the missing time interval. However, the previous diffusion-based completion model did not consider the time interval when applied to power data, which is inconsistent with the missing situation of power data, so it is difficult to achieve accurate completion of missing values of power data. Summary of the invention
[0006] The purpose of the present invention is to overcome the shortcomings of the above-mentioned prior art and provide a method and system for completing missing values of power data based on time-aware diffusion. According to the collected massive power data, the missing values of the power data are completed by constructing a TIED-GAN model.
[0007] In order to achieve the above object, the present invention is implemented through the following technical solutions: On the one hand, the technical solution of the present invention provides a method for completing missing values of power data based on time-aware diffusion, comprising: Obtain power data and preprocess it, and randomly mask a portion of the power data to represent missing values; Sampling noise data, adding the noise data to the masked power data, and inputting the noise data together with the unmasked original power data into a pre-built generative adversarial model based on time-aware diffusion for training to obtain predicted noise data; The predicted noise data is removed from the power data in the masked part with the noise data added, and the completion result of the missing values of the power data is obtained.
[0008] In at least one embodiment, the generative adversarial model based on time-aware diffusion includes a noise predictor and a discriminator; the noise predictor is used to output predicted noise data based on the power data of the masked part of the noise data added and the unmasked original power data; the discriminator discriminates the real sampled noise and the generated noise data based on the noise data output by the noise predictor and the sampled noise data, thereby assisting in generating a better noise predictor.
[0009] In at least one embodiment, the noise predictor includes a time-aware transformer layer and a feature transformer layer; according to the missing characteristics of the power data, the position encoding module of the transformer is rewritten in the time-aware transformer layer to capture information related to the missing time interval; the feature transformer layer takes the tensor of each time point as input to learn the time dependency.
[0010] In at least one embodiment, the discriminator includes a downsampling convolution block, a self-attention convolution block, and an upsampling convolution block.
[0011] In at least one embodiment, during training, the loss function of the noise predictor is composed of the reconstruction error and the discriminator's discrimination result.
[0012] In at least one embodiment, the loss function of the noise predictor is: ; In the formula, is the reconstruction error, is the discriminator’s discrimination result.
[0013] In at least one embodiment, the reconstruction error It is the reconstruction error between the noise result output by the noise predictor and the actual sampled noise, which is calculated as follows: ; In the formula, is the original data, is the real sampled noise data, is the predicted noise data generated by the noise predictor, and t is the time step; For noise targets, Observe the data for a given condition.
[0014] In at least one embodiment, the discriminator discriminates the result The calculation formula is: ; In the formula, is the real sampled noise data, Predicted noise data generated for the noise predictor.
[0015] In at least one embodiment, the power data includes multivariable power data of the substation and daily power consumption data of power users; preprocessing includes data cleaning, data definition and storage; randomly masking a part of the information according to the missing rate to represent missing data; the sampled noise data is Gaussian noise.
[0016] On the other hand, the technical solution of the present invention also provides a power data missing value completion system based on time-aware diffusion, comprising: The data acquisition module is configured to: acquire power data and perform preprocessing, and randomly mask a portion of the power data to represent missing values; The noise data prediction module is configured to: sample noise data, add the noise data to the masked power data, and input the noise data together with the unmasked original power data into a pre-built time-aware diffusion-based generative adversarial model for training to obtain predicted noise data; The data completion module is configured to remove the predicted noise data from the power data in the masked part with the noise data added, so as to obtain the completion result of the missing value of the power data.
[0017] The beneficial effects of the technical solution of the present invention are as follows: (1) Based on the collected massive power data, the present invention constructs a TIED-GAN model to complete the missing values of the power data, which not only provides complete and accurate power data, but also ensures the data quality of downstream tasks (for example, power data anomaly detection and power data classification).
[0018] (2) Aiming at the time series and long-term dependence of power data, the present invention adopts a score-based diffusion model to complete the missing values of power data. On the one hand, the powerful generation effect of the score-based diffusion model ensures the generation quality of power data. On the other hand, the proposed TIED-GAN model takes the time interval as an additional input of the time encoder to improve the accuracy of completion in view of the continuous missing characteristics of power data.
[0019] (3) The present invention utilizes the structure of a generative adversarial network and adds a discriminator after the noise predictor to assist in generating a better noise predictor, thereby improving the completion performance of the model.
[0020] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0022] Figure 1 It is a schematic diagram of the overall process of a method for completing missing values of power data based on time-aware diffusion provided by an embodiment of the present invention; Figure 2 It is a structural schematic diagram of each module of a method for completing missing values of power data based on time-aware diffusion provided by an embodiment of the present invention; Figure 3 It is an overall architecture diagram of the TIED-GAN model provided by an embodiment of the present invention; Figure 4 is a structural diagram of a noise predictor of a TIED-GAN model provided in an embodiment of the present invention; Figure 5 4 is a discriminator structure diagram of the TIED-GAN model provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0023] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used in the present invention have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0024] Terminology explanation: Scored-based diffusion model: A scored-based diffusion model is a mathematical model that describes how information or influence propagates in a complex network. Unlike traditional integer-order diffusion models, the scored-based diffusion model uses fractional-order calculus concepts to describe the non-local and non-Markov properties of the propagation process.
[0025] Fractional diffusion models usually consist of fractional differential equations or fractional difference equations, where fractional derivatives describe memory effects and long-range dependencies in the propagation process. The characteristic of this model is that it can better capture the characteristics of nonlinearities and nonlocal interactions existing in real systems.
[0026] Generative Adversarial Networks: Generative Adversarial Networks (GAN) is a deep learning model proposed by Ian Goodfellow et al. in 2014. GAN consists of two neural networks: the generator and the discriminator, which are trained in a competitive and adversarial manner to achieve the purpose of generating realistic samples.
[0027] Generator: The generator receives a random noise vector as input and tries to generate fake samples similar to real samples. It generates new samples by learning the characteristics of the data distribution, and its goal is to deceive the discriminator as much as possible so that it cannot distinguish between the generated fake samples and real samples.
[0028] Discriminator: The discriminator receives fake samples and real samples generated by the generator and tries to distinguish them. It is similar to a binary classifier, and its goal is to distinguish real samples from generated fake samples. The task of the discriminator is to determine whether the input sample is a real sample or a fake sample generated by the generator.
[0029] As introduced in the background technology, the purpose of the present invention is to overcome the shortcomings of the above-mentioned prior art and provide a method and system for completing missing values of power data based on time-aware diffusion. According to the collected massive power data, the missing values of the power data are completed by constructing a TIED-GAN model.
[0030] Example 1 In a typical embodiment of the present invention, Figure 1 and Figure 2 As shown, this embodiment discloses a method for completing missing values of power data based on time-aware diffusion, including: S100. Obtain power data and preprocess it, and randomly mask a portion of the power data to represent missing values; S200. Sampling noise data, adding the noise data to the masked power data, and inputting the noise data together with the unmasked original power data into a pre-built generative adversarial model based on time-aware diffusion for training to obtain predicted noise data; S300. Remove the predicted noise data from the power data in the masked part with the noise data added, and obtain the completion result of the missing value of the power data.
[0031] The following is combined with Figure 1-Figure 5 Provide detailed explanation.
[0032] S100. Obtain power data and perform preprocessing, and randomly mask a portion of the power data to represent missing values.
[0033] In this embodiment, various database data obtained based on the online platform are used as application examples. Different types of electricity-related power data are massively collected and preprocessed, and then a part of the information is randomly masked according to the missing rate to represent the missing data.
[0034] Specifically, S101: power data acquisition, including multivariate power data of substations (ETT data set) and daily power consumption data (Electricity data set).
[0035] The ETT dataset comes from two substations and covers two years of data. The ETT dataset provides data on seven variables, including oil temperature, characteristic load on the high-voltage side, low load on the high-voltage side, characteristic load on the medium-voltage side, low load on the medium-voltage side, characteristic load on the low-voltage side, and low load on the low-voltage side. For ETTm1, "m" means that data is recorded every 15 minutes, for a total of 69,680 time points. On the other hand, ETTh1 is equivalent to the hourly data of ETTm1, and each hour contains 17,420 time steps. The ETT dataset helps to understand the operating status of power transformers and provides important information for the monitoring and maintenance of transformers, and provides important information for the monitoring and maintenance of power systems.
[0036] The Electricity dataset records the electricity consumption of 321 users, which is recorded every hour for two years, totaling 26,304 time steps. The Electricity dataset provides a detailed understanding of electricity consumption, which helps to analyze and predict the user's electricity consumption behavior and electricity consumption.
[0037] S102: Data preprocessing: Data preprocessing is performed on the massive amount of power data obtained, including data cleaning, data definition and storage. Data cleaning removes outliers based on statistical methods to improve data integrity and consistency. Data definition enhances the expression of time series rules by unifying units and aligning timestamps. The data storage distributed system (HDFS / S3) achieves efficient access and accelerates query with time partitioning and indexing.
[0038] S103: Random masking: Randomly mask a portion of the pre-processed power data according to the missing rate to represent missing data.
[0039] Assumptions is a time series power data sample, whose shape is ,in is the length of the time series, is the number of data features. In this embodiment, the time length Assume that ( ) is the observation mask sample, if ,represent Missing, if ,represent During the training process, multiple mask matrices of the same shape can be used to achieve the purpose of self-supervised training through masks.
[0040] S200. Sample noise data, add the noise data to the masked power data, and input the noise data together with the unmasked original power data into a pre-built generative adversarial model based on time-aware diffusion for training to obtain predicted noise data.
[0041] S201: Sampling noise. In this embodiment, sampled Gaussian noise data is used as input and output for training a time-aware diffusion-based generative adversarial model (TIED-GAN model).
[0042] S202: Build a TIED-GAN model.
[0043] The overall structure of the TIED-GAN model is as follows Figure 3 As shown, it includes a noise predictor and a discriminator. The noise predictor is used to train based on the power data of the masked part with noise data added and the unmasked original power data and some additional parameters (for example, the number of time embedding layers and the number of feature embedding layers) as inputs, and outputs predicted noise data; the discriminator is trained based on the noise data output by the noise predictor and the sampled noise data. The trained discriminator can distinguish between the real sampled noise and the generated noise data, and use the discrimination result as part of the noise predictor loss function to assist in generating a better noise predictor.
[0044] Among them, the noise predictor is a diffusion model based on scores. This type of model is a latent variable model composed of two processes: a forward process and a reverse process. Both the forward process and the reverse process are parameterized Markov chains.
[0045] The forward process refers to the process of gradually adding Gaussian noise to the data until the data becomes random noise. , each step of the diffusion process, which contains a total of T steps, is a data set obtained in the previous step. Add Gaussian noise as follows: (1) here is the variance used in each step, which is between 0 and 1. Usually, the later steps will use a larger variance, that is, satisfy Under a well-designed variance strategy, if the diffusion step number T is large enough, then the final result is The original data is completely lost and becomes a random noise. Each step of the forward process generates a noisy data , the entire forward process is a Markov chain: (2) The reverse process is a denoising process. If we know the true distribution of each step in the reverse process , then from a random noise Neural networks can be used to estimate these distributions. The reverse process is also defined as a Markov chain, except that it is composed of a series of Gaussian distributions parameterized by neural networks. Gradually removing noise can generate a real sample, so the reverse process is also the process of generating data, as shown below: (3) (4) here ,and are parameterized Gaussian distributions whose means and variances are determined by the trained network and Given. is the conditional distribution in the reverse process The covariance matrix of Simplified to a variance vector In fact, the diffusion model is to get these trained networks, because they constitute the final generation model: (5) Denoise Diffusion Probabilistic Model (DDPM), which takes into account the forward process The specific parameterization is as follows: in is a trainable denoising function, Represents the first t The variance of the Gaussian noise added in the first step (i.e., the noise intensity), Before t The proportion of original data retained by the cumulative step; In the reverse process Denoising Generation The mean of is the inverse process variance vector and is fixed as a parameter, for ; To adjust the variance of the conditional distribution in the backward process to ensure that it matches the forward process, this means replacing the original predicted mean with predicted noise, i.e. training a good noise predictor.
[0046] Under this parameterization, the inverse process can be trained by solving the following optimization problem: (6) Denoising function Estimated noise vector It is added to the noisy input This training objective is also viewed as a weighted combination of denoised score matches used to train score-based generative models. After training, we can extract from formula (3) .
[0047] The reverse process of the diffusion model is used to train the noise predictor through the forward process. Step by step, the reverse process is a denoising process and also a data generation process. To have good quality of generated data or good missing value completion results, you first need to train a good noise predictor. .for DDPM training is used in the main body, and specific conditions are given to observe data and missing completion targets , sample out the noise target , for the next training.
[0048] In this embodiment, the noise predictor Then add a discriminator d , auxiliary Generates noise results that are close to sampling. d Distinguishing between real sampling noise , and the noise generated , for trained ,like The closer the noise is to the real sampling , The closer it is to 1. The discriminant result will be used as the training noise predictor part of.
[0049] Training the noise predictor The loss function consists of two parts: reconstruction error and discriminator judgment result.
[0050] Among them, the reconstruction error is the reconstruction error between the noise result output by the noise predictor and the actual sampled noise, and is calculated as follows: (7) The calculation formula of the discriminator's discrimination result is: (8) Based on this, the noise predictor The loss function is: (9) like Figure 4 As shown, in structure, the noise predictor Two single-layer transformer encoders are introduced, namely the time-aware transformer layer and the feature transformer layer: according to the missing characteristics of power data, in the time-aware transformer layer, the position encoding module of Transformer is rewritten to enable it to capture the information related to the missing time interval; the feature transformer layer takes the tensor of each time point as input to learn the temporal dependency.
[0051] When the generator is trained, the input data ( ) is processed by Conv1×1 and ReLU. The diffusion embedding step is transformed by the fully connected layer (FC) and SiLU activation function, connected with the additional information and processed by Conv1×1. In residual layer 0, the time-aware Transformer layer and the feature Transformer layer capture the relationship between time and features, the gated unit regulates the information flow, and Conv1×1 completes the information fusion and conversion. The processing results interact with the subsequent layers through skip connections and enter the residual layer 1 until the residual layer N −1. The information processed by each layer is processed through Conv1×1, ReLU and other operations, and finally output. The parameters are continuously adjusted during training to make the generated data close to the real data distribution. Transformer is a model architecture that avoids repetition and relies entirely on the attention mechanism to draw the global dependency between input and output. When constructing the model input data, data sequence information is added by adding position encoding to the input data. The dimension of the position encoding information is the same as the feature dimension of the input data at each time point. The concatenated data and the encoded position are used as the input of the model. The position encoding formula of Transformer is as follows: (10) In the formula, t is the timestamp of the input data in a day, i is the dimension, K is the sampling frequency of the data. TIED-GAN uses time-aware position encoding instead of Transformer’s position encoding, specifically: (11) Based on this, using variables i and j denote the position index and time-aware position embedding dimension respectively. TPos ( i ) function is used to merge position indexes i and time interval information, helping the model to pass trainable parameters , and b Capturing time-aware positional information enables the model to learn flexible functions.
[0052] like Figure 5 As shown, the discriminator includes a downsampling convolution block, a self-attention convolution block, and an upsampling convolution block.
[0053] In the downsampling convolution block, the Leaky-ReLU activation function and the 3×3 convolution layer appear alternately. Leaky-ReLU can effectively avoid the problem of gradient vanishing and provide a more stable gradient flow for network training; while the 3×3 convolution layer focuses on extracting local features in the input data, capturing the pattern and structure of the data in a small range through convolution operations. The subsequent pooling operation reduces the dimension of the data, reduces the subsequent calculation amount, expands the receptive field, and provides a more representative low-dimensional feature representation for subsequent feature processing.
[0054] The self-attention convolution block is a key part of the entire structure, which is dedicated to mining the global dependencies between data features. First, the input data is linearly transformed through multiple 1×1 convolutional layers to adjust the channel dimension of the data. Then, the downsampling operation further reduces the data dimension. Then, the Softmax function is used to calculate the attention weights between different positions, so that the model can pay attention to the long-distance information interaction in the data. Finally, the attention weights are weighted and fused with the original data to enhance the model's understanding of the overall structure and semantics of the data.
[0055] The function of the upsampling convolution block is to restore the low-dimensional features processed by the self-attention convolution block to the appropriate dimension, and further extract and optimize the features. Among them, the application of spectral normalization technology can effectively prevent the gradient explosion of the model during the training process and ensure the stability of the training. The ReLU activation function introduces nonlinear factors to the model, enhances the expressive ability of the model, and enables it to learn more complex functional relationships. The upsampling layer increases the data dimension through interpolation and other methods, and the 3×3 convolution layer extracts features from the restored data again to further refine and integrate the feature information.
[0056] In the discrimination process, the input data flows through the downsampling convolution block, the self-attention convolution block, and the upsampling convolution block in sequence. In this process, the data is continuously extracted, dependencies are mined, and dimensions are adjusted. Finally, the processed data is summarized through operations such as global pooling, and the discrimination result is output to determine whether the input data comes from the real data distribution or the data generated by the generative model.
[0057] During the training process, the real data and the generated data will be input into the discriminator network respectively. The discriminator will discriminate the input data according to the above processing flow and output a judgment result. Subsequently, this judgment result is compared with the real label of the data (the real data label is marked as 1, and the generated data label is marked as 0), and the difference between the two is calculated using formula (8) as the loss function. Based on the calculated loss value, the gradient is transferred to the various parameters of the network (such as the weight parameters of the convolutional layer) through the back propagation algorithm, so as to update these parameters, continuously adjust the internal structure and parameter values of the discriminator, and gradually improve the discriminator's ability to distinguish between real data and generated data, so that it can make more accurate judgments in subsequent discrimination tasks.
[0058] Introducing a discriminator as the opponent of the generator in the GAN structure can distinguish between real sampling noise and generated noise data, and assist in generating a better noise predictor. The closer the noise is to the real sampling , The closer it is to 1. Train the discriminator d The loss function as follows: (12) in, is the real sampled noise data, Predicted noise data generated for the noise predictor.
[0059] S300. Remove the predicted noise data from the power data in the masked part with the noise data added, and obtain the completion result of the missing value of the power data.
[0060] In the masked part of the power data with added noise data, the noise data generated by the trained noise predictor is removed, and the result obtained is the completion result of the missing values of the power data.
[0061] The power data set is divided into a training set, a validation set, and a test set in a ratio of 8:1:1, wherein the training set is used for model training, the validation set is used for hyperparameter determination, and the test set is used to verify model performance. Tables 1 and 2 show the experimental results of the method of the present invention compared with the existing methods. MSE stands for mean square error, MAE stands for mean absolute error, and RMSE stands for root mean square error.
[0062] Table 1. Experimental results of TIED-GAN and other baselines on the ETT dataset
[0063] Table 2. Experimental results of TIED-GAN and other baselines on the Electricity dataset
[0064] It can be seen from the results in Tables 1 and 2 that TIED-GAN outperforms other benchmark models on the power data set: compared with the best benchmark model, the proposed model reduces the root mean square error (RMSE) by about 50% and the mean absolute error (MAE) by about 25%. This is mainly because the model disclosed in this embodiment makes full use of noise information and time interval information, which enables TIED-GAN to obtain a noise predictor that can produce better results. When processing power data information, CSDI and SSSD did not use time interval information as an additional input, so the experimental results obtained were poor. This also indirectly shows that time interval information is an indispensable part when processing missing value interpolation of time series power data. It can be seen that the method of this embodiment is superior to the existing completion method in the work of power data completion.
[0065] Example 2 In a typical implementation of the present invention, this embodiment discloses a power data missing value completion system based on time-aware diffusion, including: The data acquisition module is configured to: acquire power data and perform preprocessing, and randomly mask a portion of the power data to represent missing values; The noise data prediction module is configured to: sample noise data, add the noise data to the masked power data, and input the noise data together with the unmasked original power data into a pre-built time-aware diffusion-based generative adversarial model for training to obtain predicted noise data; The data completion module is configured to remove the predicted noise data from the power data in the masked part with the noise data added, so as to obtain the completion result of the missing value of the power data.
[0066] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for completing missing values of power data based on time-aware diffusion, characterized in that: include: Obtain power data and preprocess it, and randomly mask a portion of the power data to represent missing values; Sampling noise data, adding the noise data to the masked power data, and inputting the noise data together with the unmasked original power data into a pre-built generative adversarial model based on time-aware diffusion for training to obtain predicted noise data; The predicted noise data is removed from the power data in the masked part with the noise data added, and the completion result of the missing values of the power data is obtained.
2. A method for completing missing values of power data based on time-aware diffusion according to claim 1, characterized in that: The generative adversarial model based on time-aware diffusion includes a noise predictor and a discriminator; the noise predictor is used to output predicted noise data based on the power data of the masked part of the noise data added and the unmasked original power data; the discriminator discriminates the real sampled noise and the generated noise data based on the noise data output by the noise predictor and the sampled noise data, and assists in generating a better noise predictor.
3. A method for completing missing values of power data based on time-aware diffusion as claimed in claim 2, characterized in that: The noise predictor includes a time-aware transformer layer and a feature transformer layer; according to the missing characteristics of power data, the position encoding module of the transformer is rewritten in the time-aware transformer layer to capture information related to the missing time interval; the feature transformer layer takes the tensor of each time point as input to learn the time dependency.
4. A method for completing missing values of power data based on time-aware diffusion as claimed in claim 2, characterized in that: The discriminator includes a downsampling convolution block, a self-attention convolution block and an upsampling convolution block.
5. The method for completing missing values of power data based on time-aware diffusion according to claim 2, characterized in that: During training, the loss function of the noise predictor is composed of the reconstruction error and the discriminator's judgment result.
6. A method for completing missing values of power data based on time-aware diffusion as claimed in claim 5, characterized in that: The loss function of the noise predictor is: ; In the formula, is the reconstruction error, is the discriminator’s discrimination result.
7. A method for completing missing values of power data based on time-aware diffusion according to claim 6, characterized in that: The reconstruction error It is the reconstruction error between the noise result output by the noise predictor and the actual sampled noise, which is calculated as follows: ; In the formula, is the original data, is the real sampled noise data, The predicted noise data generated by the noise predictor, t is the time step; For noise targets, Observe the data for a given condition.
8. The method for completing missing values of power data based on time-aware diffusion according to claim 6, characterized in that: The discriminator determines the result The calculation formula is: ; In the formula, is the real sampled noise data, Predicted noise data generated for the noise predictor.
9. The method for completing missing values of power data based on time-aware diffusion according to claim 1, characterized in that: The power data includes multivariable power data of substations and daily power consumption data of power users; preprocessing includes data cleaning, data definition and storage; randomly masking a part of the information according to the missing rate to represent missing data; the sampled noise data is Gaussian noise.
10. A power data missing value completion system based on time-aware diffusion, characterized in that: include: The data acquisition module is configured to: acquire power data and perform preprocessing, and randomly mask a portion of the power data to represent missing values; The noise data prediction module is configured to: sample noise data, add the noise data to the masked power data, and input the noise data together with the unmasked original power data into a pre-built time-aware diffusion-based generative adversarial model for training to obtain predicted noise data; The data completion module is configured to remove the predicted noise data from the power data in the masked part with the noise data added, so as to obtain the completion result of the missing value of the power data.
Citation Information
Patent Citations
Contrast-agent-free medical diagnostic imaging
CA3104607A1
New energy time sequence output data generation method and device
CN119441748A
Time sequence missing value filling method and system based on diffusion model
CN119537816A
Kimbab Container
KR1020250138418A
Method, device, and storage medium for deep learning based domain adaptation with data fusion for aerial image data analysis
US20220092420A1
Cited By
Industrial data interaction method, interaction platform and application thereof
CN120974080A
Sample generation method, apparatus and device, and readable storage medium
CN121412662A