Power load data enhancement method and device and computer equipment
By using conditions to generate adversarial network model and Pearson correlation coefficient evaluation in power load data enhancement, the problem of insufficient quality of power load data enhancement in the existing technology is solved, the accuracy and application range of data are improved, and the stability of the power grid is ensured. run.
Patent Information
- Application Number
- CN202411165510.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-20
AI Technical Summary
The data quality generated by the power load data enhancement method based on the adversarial generation network in the prior art needs to be improved, and it is difficult to control the generation results and pattern crashes, which affects the accuracy and application scope of the data.
The target generator in the conditional generation adversarial network is used to construct a load data enhancement model, and the noise data and label data input are input for data enhancement, and the linear relationship between the enhanced load data and the actual load data is evaluated through the Pearson correlation coefficient to improve the Accuracy and quality of data.
It improves the application scope and interpretability of the power load data enhancement model, enhances the accuracy and reliability of the data, and ensures the stable operation and economic benefits of the power grid.
Smart Images

Figure CN119166992A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power load enhancement, and in particular to a method, device and computer equipment for enhancing power load data. Background Art
[0002] With the development of the power system in recent years, a large number of demand-side flexible resources have been connected to the system. Demand-side flexible resources represented by electric vehicles, photovoltaics, wind power and energy storage have brought advantages such as rapid frequency regulation to the operation of the power grid, but they have also brought challenges to the stable operation of the power grid. Research on the power consumption characteristics of the power system can effectively arrange power generation resources, reasonably dispatch transmission facilities, reduce energy waste, and improve the stability of the power grid.
[0003] The study of electricity consumption characteristics requires the characterization of the demand response potential of comprehensive energy users (such as mechanical processing industry, steel, cement, data center), which requires a large amount of electricity consumption data. However, due to the lack of dense user data and uneven distribution, these data need to be enhanced in order to better characterize user electricity consumption behavior and analyze their demand response potential. In related technologies, data enhancement of electric load data is performed based on adversarial generative networks, such as adversarial generative networks (GAN), deep convolutional generative adversarial networks (DCGAN), Wasserstein generative adversarial networks (WGAN) and cycle generative adversarial networks (CycleGAN).
[0004] However, the quality of load data generated by the data enhancement method based on the adversarial generative network in the related art needs to be improved. Summary of the invention
[0005] The present application provides a method, device and computer equipment for enhancing power load data, which solves the technical problem in the related art that the quality of load data generated by the data enhancement method based on adversarial generative network needs to be improved, and achieves the technical effect of improving the accuracy of generated power load data.
[0006] In order to achieve the above objectives, the main technical solutions adopted in this application include:
[0007] In a first aspect, an embodiment of the present application provides a method for enhancing electric load data, the method comprising: inputting noise data and label data for representing a specified response time period into a load data enhancement model for data enhancement to obtain enhanced load data within the specified response time period; wherein the load data enhancement model adopts a target generator in a conditional generative adversarial network that has completed training; determining an enhanced mean of the enhanced load data and an actual mean of the actual load data; performing linear correlation calculation based on the enhanced load data, the enhanced mean, the actual load data and the actual mean to obtain the Pearson correlation coefficient between the enhanced load data and the actual load data; wherein the Pearson correlation coefficient is used to characterize the linear relationship between the enhanced load data and the actual load data; and evaluating the enhanced load data within the specified response time period according to the Pearson correlation coefficient.
[0008] In a second aspect, an embodiment of the present application provides a device for enhancing power load data, the device comprising:
[0009] The enhanced data generation module is used to input noise data and label data used to represent a specified response time period into a load data enhancement model for data enhancement to obtain enhanced load data within the specified response time period; wherein the load data enhancement model adopts a target generator in a conditional generative adversarial network that has completed training.
[0010] The mean value determination module is used to determine the enhanced mean value of the enhanced load data and the actual mean value of the actual load data.
[0011] A linear relationship calculation module is used to perform linear correlation calculation based on the enhanced load data, the enhanced mean, the actual load data and the actual mean to obtain the Pearson correlation coefficient between the enhanced load data and the actual load data; wherein the Pearson correlation coefficient is used to characterize the linear relationship between the enhanced load data and the actual load data.
[0012] The load data evaluation module is used to evaluate the enhanced load data within the specified response time period according to the Pearson correlation coefficient.
[0013] In a third aspect, an embodiment of the present application provides a computer device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the method described in any of the above embodiments by executing the computer instructions.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to enable a computer to execute the method described in any of the above embodiments.
[0015] In a fifth aspect, an embodiment of the present application provides a computer program product, including computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in any of the above embodiments.
[0016] In an embodiment of the present application, a load data enhancement model is constructed using a target generator in a conditional generative adversarial network that has completed training, and noise data and label data used to represent a specified response period are input into the load data enhancement model for data enhancement to obtain enhanced load data within the specified response period. The enhanced load data within the specified response period is compared with the relevant technology, and a load data enhancement model is constructed using a target generator in a conditional generative adversarial network to solve the technical problems of difficult-to-control generation results and mode collapse in the relevant technology, thereby improving the application scope and interpretability of the load data enhancement model. Furthermore, in order to improve the accuracy of the enhanced load data within the specified response period, the linear relationship between the enhanced load data and the actual load data is evaluated to obtain the Pearson correlation coefficient between the enhanced load data and the actual load data. The Pearson correlation coefficient is used to evaluate the enhanced load data within the specified response period to improve the quality of the enhanced load data. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 A schematic diagram of a flow chart of a method for increasing power load provided in an embodiment of this specification;
[0019] Figure 2 A flowchart of a method for enhancing power load data provided in an embodiment of this specification;
[0020] Figure 3 A schematic diagram showing the comparison results between the real data and the generated data provided in the embodiments of this specification;
[0021] Figure 4 A flowchart of a method for enhancing power load data provided in an embodiment of this specification;
[0022] Figure 5a A flow chart of a load data enhancement model training process provided in an embodiment of this specification;
[0023] Figure 5bA framework diagram of a power load data enhancement model training provided in an embodiment of this specification;
[0024] Figure 6 A flowchart of a method for enhancing power load data provided in an embodiment of this specification;
[0025] Figure 7 A flowchart of a method for enhancing power load data provided in an embodiment of this specification;
[0026] Figure 8 A schematic diagram of a framework of a power load data enhancement device provided in an embodiment of this specification;
[0027] Fig. 9 A schematic diagram of the structure of a computer device provided in an embodiment of this specification. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0029] In the related technologies, methods such as Generative Adversarial Networks (GAN), Deep Convolutional Generative Adversarial Networks (DCGAN), Wasserstein Generative Adversarial Networks (WGAN) and Cycle Generative Adversarial Networks (Cycle GAN) are used to perform data enhancement for a specific type. However, these methods in the related technologies have problems such as difficulty in controlling the generation results and mode collapse, which make them have obvious defects in generation quality, interpretability and application scope.
[0030] Based on this, the present application embodiment proposes a method for enhancing power load data. Figure 1 This method builds a load data enhancement model based on the Conditional Generative Adversarial Network (CGAN), which mainly includes the following steps:
[0031] S110. Analyze the granularity and response characteristics of power loads.
[0032] Among them, the granularity of power load is mainly divided from the time dimension, such as minutes (min), hours (h), days (day), etc.; the response characteristics mainly include response time, response amount, and power transfer amount.
[0033] S120: Preprocessing the original power load data.
[0034] Among them, the preprocessing method includes using the Z-scores method to detect and remove outliers in the load data set, then dividing the data into feature data and label data, and then using Min-Max Scaling (minimum-maximum normalization) to scale the features, converting the normalized data format into the Pytorch tensor format, and finally saving the scaler corresponding to each label in a file for subsequent data enhancement. It should be noted that in each conditional label of the CGAN network, Min-MaxScaling (minimum-maximum normalization) is used to scale the features.
[0035] S130. Construct an industry user data set according to user load response characteristics.
[0036] Among them, different training sets are divided according to different response amounts (such as response amounts of 2%, 4%...). In the training set of the same response amount, the response time is used as the input condition, and the conditional label is attached to the first column before the data, such as using labels 1, 2, 3, 4, and 5 to represent different conditions. The data set is used to determine the input of the conditional generative adversarial network model. Exemplarily, the conditional response time period is represented by a label, and the five response time periods of 12:00 to 14:00, 13:00 to 15:00, 14:00 to 16:00, 15:00 to 17:00, and 16:00 to 18:00 are represented by five digital labels 1, 2, 3, 4, and 5 respectively.
[0037] S140. Establish a data enhancement model based on a conditional generative adversarial network.
[0038] Among them, the conditional generative adversarial network model is trained by inputting noise data, conditional data and real power load data. The conditional generative adversarial network model includes a generative network model and a discriminative network model. The generative network model is used to generate enhanced power load data, and the discriminative network model is used to discriminate whether the generated enhanced power load data is real data.
[0039] S150. Evaluate the effect of generated data based on the Pearson coefficient.
[0040] Among them, the trained generative network model is used to generate data, which is compared with the real data, and the Pearson coefficient is used to evaluate the effect of the generated data. When the output result is above 80%, it indicates strong similarity.
[0041] In the above embodiment, by setting up a conditional generative adversarial network model, the implicit deep relationship between complex nonlinear sequence data can be captured. Moreover, compared with related technologies, the target generator in the conditional generative adversarial network is used to construct a load data enhancement model, which solves the technical problems of difficult control of generated results and mode collapse in related technologies, and improves the application scope and interpretability of the load data enhancement model. At the same time, by obtaining real power load data, noise data and conditional data for model training, the relevance of power load enhancement data can be further improved, thereby improving the economic benefits of the power grid and ensuring the stable operation of the power grid.
[0042] According to an embodiment of the present application, an embodiment of a method for enhancing power load data is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0043] See also Figure 2 The power load data enhancement method provided in the embodiment of the present application may include the following steps:
[0044] S210: Input the noise data and the label data for representing the specified response period into the load data enhancement model to perform data enhancement, so as to obtain enhanced load data within the specified response period.
[0045] S220: Determine an enhanced mean value of the enhanced load data and an actual mean value of the actual load data.
[0046] S230, performing linear correlation calculation according to the enhanced load data, the enhanced mean, the actual load data and the actual mean, to obtain the Pearson correlation coefficient between the enhanced load data and the actual load data.
[0047] S240, evaluating the enhanced load data within the specified response period according to the Pearson correlation coefficient.
[0048] Among them, the load data enhancement model can use the target generator in the trained conditional generative adversarial network. The label data can be to represent the conditional response time period with a label, such as 5 response time periods 12:00-14:00, 13:00-15:00, 14:00-16:00, 15:00-17:00, 16:00-18:00. These 5 response time periods can be represented by 5 digital labels, such as 1, 2, 3, 4, 5, or 6, 7, 8, 9, 10.
[0049] In this embodiment, the Pearson correlation coefficient (or Pearson coefficient) is used to characterize the linear relationship between the enhanced load data and the actual load data. The overall correlation coefficient ρ is defined as the ratio of the covariance between two variables X and Y and the product of their standard deviations, and the calculation formula is as follows:
[0050]
[0051] By estimating the covariance and standard deviation of the sample, we can get the sample correlation coefficient (i.e., the sample Pearson correlation coefficient), which is usually represented by r and determined using the following formula:
[0052]
[0053]
[0054]
[0055] Among them, r XY It is used to reflect the linear correlation between two variables X and Y. XY The value ranges from -1 to 1, and the larger the absolute value, the stronger the correlation.
[0056] Specifically, since the discriminator is mainly used to help the generator learn to generate realistic data samples during the training process, the load data enhancement model in this embodiment adopts the target generator in the conditional generative adversarial network that has completed the training. Label data for representing the specified response period has been constructed in advance, so the noise data and label data are input into the load data enhancement model for enhancement, and the enhanced load data within the specified response period is generated to enhance the power load data of the power user.
[0057] Further, in order to evaluate the accuracy of the enhanced load data, first, the enhanced mean of the enhanced load data and the actual mean of the actual load data are determined. Secondly, a linear correlation calculation is performed based on the enhanced load data, the enhanced mean, the actual load data and the actual mean to obtain the Pearson correlation coefficient between the enhanced load data and the actual load data. Finally, the enhanced load data within the specified response period is evaluated based on the Pearson correlation coefficient. Please refer to Figure 3 The comparison results shown are based on the Pearson correlation coefficient to evaluate the effect of generating data. When the output result is above 80%, it indicates strong similarity. It should be noted that Figure 3 Shown in Figure 3 are response afterload data.
[0058] In this embodiment, the enhanced load data is recorded as X, the actual load data is recorded as Y, and the enhanced mean of the enhanced load data is recorded as The actual mean value of the actual load data is recorded as The Pearson correlation coefficient between the enhanced load data and the actual load data was calculated using the following formula:
[0059]
[0060] In the above embodiment, the target generator in the conditional generative adversarial network that has completed training is used to construct a load data enhancement model, and noise data and label data used to represent the specified response period are input into the load data enhancement model for data enhancement to obtain enhanced load data within the specified response period. The enhanced load data within the specified response period is compared with the relevant technology, and the target generator in the conditional generative adversarial network is used to construct the load data enhancement model to solve the technical problems of difficult control of the generated results and mode collapse in the relevant technology, thereby improving the application scope and interpretability of the load data enhancement model. Furthermore, in order to improve the accuracy of the enhanced load data within the specified response period, the linear relationship between the enhanced load data and the actual load data is evaluated to obtain the Pearson correlation coefficient between the enhanced load data and the actual load data. The Pearson correlation coefficient is used to evaluate the enhanced load data within the specified response period to improve the quality of the load data.
[0061] In some embodiments, the load data augmentation model includes a first input layer, a first fully connected layer, a second fully connected layer, a third fully connected layer, a fourth fully connected layer, and a first output layer connected in sequence. Figure 4 , the noise data and the label data used to represent the specified response period are input into the load data enhancement model for data enhancement, and the enhanced load data within the specified response period is obtained, including:
[0062] S310, input the noise data and label data into the first input layer to obtain intermediate representation data.
[0063] The label data of the specified response period can be recorded as the conditional label y, and the noise data can be recorded as the noise vector z. Specifically, the noise vector z and the conditional label y constitute the input. The input of the first input layer is the noise vector z and the conditional label y. Exemplarily:
[0064] input = [z, y]
[0065] input∈R noise_dim+label_dim
[0066] Among them, noise_dim and label_dim are the noise dimension and label dimension respectively.
[0067] S320: Input the intermediate representation data into the first fully connected layer to obtain first representation data.
[0068] The first fully connected layer can be understood as the first fully connected layer of the generator. Specifically, the first input layer outputs the intermediate representation data, the first fully connected layer is connected to the first input layer, the intermediate representation data is input into the first fully connected layer, and the intermediate representation data is processed by the activation function in the first fully connected layer to obtain the first representation data h1.
[0069] Exemplarily, the input dimension of the first fully connected layer is noise_dim+label_dim, the output dimension of the first fully connected layer is 256, and the first fully connected layer adopts the activation function Leaky ReLU.
[0070] h1=LeakyReLU(W1imput+b1)
[0071] W1∈R 256×(noise_dim+labe1_dim) , b1∈R 256
[0072] Among them, noise_dim and label_dim are the noise dimension and label dimension respectively, W1 and b1 are the weight coefficient and bias of the first fully connected layer respectively.
[0073] S330 , input the first representation data into the second fully connected layer to obtain second representation data.
[0074] The second fully connected layer can be understood as the second fully connected layer of the generator. Specifically, the second fully connected layer is connected to the first fully connected layer, the first fully connected layer outputs the first representation data to the second fully connected layer, and the first representation data is processed by the second fully connected layer to obtain the second representation data h2.
[0075] Exemplarily, the input dimension of the second fully connected layer is 256, the output dimension of the second fully connected layer is 512, and the second fully connected layer adopts the activation function Leaky ReLU.
[0076] h2=LeakyReLU(W2h1+b2)
[0077] W2∈R 512×256 , b2∈R 512
[0078] Among them, W2 and b2 are the weight coefficient and bias of the second fully connected layer respectively.
[0079] S340: Input the second representation data into the third fully connected layer to obtain third representation data.
[0080] The third fully connected layer can be understood as the third fully connected layer of the generator. Specifically, the third fully connected layer is connected to the second fully connected layer, the second fully connected layer outputs the second representation data to the third fully connected layer, and the second representation data is processed by the third fully connected layer to obtain the third representation data h3.
[0081] Exemplarily, the input dimension of the third fully connected layer is 512, the output dimension of the third fully connected layer is 1024, and the third fully connected layer adopts the activation function Leaky ReLU.
[0082] h3=LeakyReLU(W3h2+b3)
[0083] W3∈R 1024×512 , b3∈R 1024
[0084] Among them, W3 and b3 are the weight coefficient and bias of the third fully connected layer respectively.
[0085] S350 , input the third representation data into a fourth fully connected layer to obtain fourth representation data.
[0086] The fourth fully connected layer can be understood as the fourth fully connected layer of the generator. Specifically, the fourth fully connected layer is connected to the third fully connected layer, the third fully connected layer outputs the third representation data to the fourth fully connected layer, and the third representation data is processed by the fourth fully connected layer to obtain the fourth representation data h4.
[0087] Exemplarily, the input dimension of the fourth fully connected layer is 1024, the output dimension of the fourth fully connected layer is 2048, and the fourth fully connected layer adopts the activation function Leaky ReLU.
[0088] h4=LeakyReLU(W4h3+b4)
[0089] W4∈R 2048×1024 , b4∈R 2048
[0090] Among them, W4 and b4 are the weight coefficient and bias of the fourth fully connected layer respectively.
[0091] S360: Input the fourth representation data into the first output layer to obtain enhanced load data within a specified response period.
[0092] The first output layer may be an output layer of the generator. Specifically, the first output layer is connected to the fourth fully connected layer, the fourth fully connected layer outputs the fourth representation data to the first output layer, and the fourth representation data is processed by the first output layer to obtain enhanced load data.
[0093] Exemplarily, the input dimension of the first output layer is 2048, the output dimension of the first output layer is output_dim, and the first output layer adopts the activation function Tanh.
[0094] output=Tanh(W5h4+b5)
[0095] W5∈R output - dim×2048 , b5∈R output _ dim
[0096] Among them, output_dim is the output dimension, W5 and b5 are the weight coefficient and bias of the first output layer respectively.
[0097] It can be understood that noise_dim, label_dim, input_dim, and output_dim are the noise dimension, label dimension, input dimension, and output dimension, respectively.
[0098] In some embodiments, a residual layer is added to the fully connected layer of the load data enhancement model to add the input and output of the fully connected layer. A regularization technique is added after the fully connected layer of the load data enhancement model.
[0099] In this embodiment, a residual layer is added to the first fully connected layer, the input dimension of the first fully connected layer is noise_dim+label_dim, the output dimension of the first fully connected layer is 256, and the activation function is Leaky ReLU. Specifically, as shown in the following formula:
[0100] h1=LeakyReLU(W1input+b1)
[0101] W1∈R 256×(noise _din+label_ dim) , b1∈R 256
[0102] In this embodiment, a residual layer is added to the second fully connected layer, the input dimension of the second fully connected layer is 256, the output dimension of the second fully connected layer is 512, and the activation function Leaky ReLU is specifically as follows:
[0103] h2=LeakyReLU(W2h1+b2)
[0104] W2∈R 512×256 , b2∈R 512
[0105] output Layer2 =LeakyReLU(FC Layer2 (LeakyReLU
[0106] (FC Layer1 (input))+input))
[0107] Among them, FC Layer1 (input) represents the output of the first fully connected layer.
[0108] In this embodiment, a residual layer is added to the third fully connected layer, the input dimension of the third fully connected layer is 512, the output dimension of the third fully connected layer is 1024, and the activation function Leaky ReLU is specifically as follows:
[0109] h3=LeakyReLU(W3h2+b3)
[0110] W3∈R 1024×512 , b3∈R 1024
[0111] output Layer3 =LeakyReLU(FC Layer3 (LeakyReLU(FC Layer2
[0112] (LeakyReLU(FC Layer1 (input))+input))+
[0113] LeakyReLU(FC Layer1 (input)+input)))
[0114] In this embodiment, a residual layer is added to the fourth fully connected layer, the input dimension of the fourth fully connected layer is 1024, the output dimension is 2048, and the activation function Leaky ReLU is specifically as shown in the following formula:
[0115] h4=LeakyReLU(W4h3+b4)
[0116] W4∈R 2048×1024 , b4∈R 2048
[0117] oitput Layer4 =LeakyReLU(FC Layer4 (LeakyReLU
[0118] (FC Layer3 (LeakyReLU(FC Layer2
[0119] (LeakyReLU(FC Layer1 (input)+input))+
[0120] LeakyReLU(FC Layer1 (input)+input)))+
[0121] LeakyReLU(FC Layer2 (LeakyReLU(FC Layer1
[0122] (input)+input))+LeakyReLU(FC Layer1 (input)+input))))
[0123] In this embodiment, a residual layer is added to each fully connected layer, the input dimension of the output layer is 2048, the output dimension is output_dim, and the activation function Tanh is specifically as shown in the following formula:
[0124] output=Tanh(W5h4+b5)
[0125] W5∈R output×2048 , b4∈R output-dim
[0126] In the above embodiment, FC Layeri is the i-th fully connected layer, output Layeri is the output of the i-th layer, the result after being processed by the fully connected layer and the activation function.
[0127] In some embodiments, regularization techniques are added after the fully connected layers of the load data augmentation model.
[0128] After the activation function of each layer, Dropout regularization is performed, and the calculation is as follows:
[0129] h (l) =LeakyReLU(W (l) h (l-1) +d (l) )
[0130] h (l) = Dropout(h (l) , p)
[0131] Here h (l) represents the output of layer l, W (l) 、b (l) are the weight and bias of the lth layer respectively, and p is the probability of retaining the activation value.
[0132] In the above embodiment, by adding a residual layer to the hidden layer of the generator neural network, that is, adding the input and output of each layer, the original input information can be retained during the forward propagation process, thereby reducing the gradient disappearance and speeding up the training speed. Through the regularization technology, a certain proportion of neurons are randomly discarded, which has the effect of preventing data overfitting.
[0133] In some embodiments, see Figure 5a , the load data enhancement model is obtained by:
[0134] S510: Build a conditional generative adversarial network.
[0135] Among them, the conditional generative adversarial network includes a generator to be trained and a discriminator to be trained.
[0136] S520: construct a data set according to the user load response characteristics, and obtain historical load data and response period labels from the constructed data set.
[0137] S530, inputting random noise and response period labels into the generator to be trained to obtain generated load data.
[0138] S540, inputting the historical load data and the generated load data and the response period label into the discriminator to be trained respectively, and obtaining the discrimination result between the historical load data and the generated load data.
[0139] S550, updating parameters of the conditional generative adversarial network based on the generator loss data of the generator to be trained and the discriminator loss data of the discriminator to be trained.
[0140] S560. Construct a load data enhancement model based on the target generator in the conditional generative adversarial network that has completed training.
[0141] Specifically, see Figure 5b , Figure 5b The structure of the constructed conditional generative adversarial network is shown in the figure. The conditional generative adversarial network includes a generator to be trained and a discriminator to be trained. Different training sets are divided according to different response quantities. In the training set of the same response quantity, the response time is used as the input condition, and the conditional label is added before the data. The data set is used to determine the input of the conditional generative adversarial network model, that is, to obtain the historical load data and response period label from the constructed data set. After completing the model construction and data set construction, the constructed conditional generative adversarial network needs to be trained using the data set.
[0142] In this embodiment, random noise and response period labels are input into the generator to be trained to obtain generated load data. For example, the data representing random noise and the data representing response period labels are concatenated through the input layer of the generator to be trained to obtain concatenated data, which is then input into the fully connected layer of the generator to be trained to obtain generated load data.
[0143] In this embodiment, the historical load data and the response period label are input into the discriminator to be trained, and the generated load data and the response period label are input into the discriminator to be trained to obtain the discrimination result between the historical load data and the generated load data. For example, the discriminator to be trained includes an input layer and multiple fully connected layer output layers. The historical load data and the response period label are spliced through the input layer of the discriminator to be trained to obtain the historical spliced data, the generated load data and the response period label are spliced through the input layer of the discriminator to be trained to obtain the generated spliced data, the historical spliced data and the generated spliced data are processed through the fully connected layer of the discriminator to be trained, and the discrimination result between the historical load data and the generated load data is output through the output layer of the discriminator to be trained.
[0144] Furthermore, the parameters of the conditional generative adversarial network are updated based on the generator loss data of the generator to be trained and the discriminator loss data of the discriminator to be trained until the model training stop condition is met. Since the goal of the discriminator is to distinguish the real load data from the generated load data as accurately as possible, and consider the matching degree of the conditions, the loss of the discriminator can be the sum of the loss of the real data and the loss of the false data generated by the generator under given conditions. The goal of the generator is to generate load data that is sufficient to fool the discriminator under given conditions, so the loss of the generator can be to minimize the probability that the discriminator judges the generated data as false under given conditions. During model training, after calculating the loss data, a suitable optimizer can be selected to update the parameters of the model. The two models can be trained alternately, for example, the generative model is fixed first and the discriminative model is optimized; when the discriminative model has the best performance at this stage, the discriminative model is fixed and the generative model is optimized; this cycle is repeated until the two networks finally reach a dynamic balance.
[0145] It should be noted that the trained conditional generative adversarial network includes a target generator and a target discriminator. Since the discriminator to be trained is used to evaluate the authenticity of the generated load data generated by the generator to be trained during the training process, the target discriminator function is no longer required during the deployment phase. If the trained target discriminator is deployed, the computational overhead will increase. Therefore, given that the main task of the discriminator is to identify whether the generated data is real data, rather than generating new data, in this embodiment, only the target generator in the trained conditional generative adversarial network is deployed as a load data enhancement model.
[0146] In some embodiments, the discriminator loss data is determined using the following formula:
[0147]
[0148] Among them, L D Represents the discriminator loss data, y real represents the label of the real data, D(x real ) represents the output of the discriminator for the real data, y fake is the label of the generated data, D(G(z, y label )) is the output of the discriminator for the generated data;
[0149] The generator loss data is determined using the following formula:
[0150] L G =L(y real , D(G(z,y label )))
[0151] Among them, L G is the loss of the generator, y real is the label of the real data, D(G(z, y label )) is the output of the discriminator for the generated data.
[0152] In this embodiment, It can be a binary cross entropy loss function (BCELoss), which is used to evaluate the difference between the model output and the target value. The formula is as follows:
[0153]
[0154] In this embodiment, the Adam optimizer used to update the parameters of the generator and the discriminator is as follows:
[0155]
[0156] m t =β1m t-1 +(1-β1)g t
[0157]
[0158]
[0159]
[0160] Among them, g t is the gradient of step t, J(θ t ) is the gradient of the loss function with respect to the parameter θ, m tis the first-order moment estimate of step t, β1 is the decay rate of the first-order moment estimate, v t is the second-order moment estimate at step t, β2 is the decay rate of the second-order moment estimate, and is the first-order and second-order moment estimates after bias correction, α is the learning rate, and ε is a small constant used to prevent the denominator from being zero.
[0161] In some embodiments, the discriminator to be trained includes a second input layer, a fifth fully connected layer, a sixth fully connected layer, a seventh fully connected layer, an eighth fully connected layer, and a second output layer connected in sequence.
[0162] In another example, see Figure 6 , inputting the historical load data and the generated load data and the response period label into the discriminator to be trained respectively, and obtaining the discrimination result between the historical load data and the generated load data, including the following steps:
[0163] S610: Input the real data and the label data into the second input layer to obtain intermediate representation data.
[0164] Among them, the label data of the specified response period can be recorded as the conditional label y, and the real data (i.e., historical load data) can be recorded as the real data vector x. Specifically, the real data vector x and the conditional label y constitute the input. The input of the second input layer is the noisy real data vector x and the conditional label y, and the input obtains the intermediate representation data after passing through the second input layer. For example:
[0165] input = [x, y]
[0166] input∈R input -dim+label_ dim
[0167] Among them, input_dim and label_dim are the input dimension and label dimension respectively.
[0168] S620 , input the intermediate representation data into a fifth fully connected layer to obtain fifth representation data.
[0169] The fifth fully connected layer can be understood as the first fully connected layer of the discriminator. Specifically, the second input layer outputs the intermediate representation data, the fifth fully connected layer is connected to the second input layer, the intermediate representation data input is input into the fifth fully connected layer, and the intermediate representation data input is processed by the activation function in the fifth fully connected layer to obtain the fifth representation data h5.
[0170] Exemplarily, the input dimension of the fifth fully connected layer is input_dim+label_dim, the output dimension of the fifth fully connected layer is 2048, and the fifth fully connected layer adopts the activation function Leaky ReLU.
[0171] h5=LeakyReLU(W6input+b6)
[0172] W6∈R 2048×(input_din+label_dim) , b6∈R 2048
[0173] Where input_dim and label_dim are the input dimension and label dimension respectively. W6 and b6 are the weight coefficient and bias of the fifth fully connected layer respectively.
[0174] S630 , input the fifth representation data into a sixth fully connected layer to obtain sixth representation data.
[0175] The sixth fully connected layer can be understood as the second fully connected layer of the discriminator. Specifically, the sixth fully connected layer is connected to the fifth fully connected layer, the fifth fully connected layer outputs the fifth representation data to the sixth fully connected layer, and the fifth representation data is processed by the sixth fully connected layer to obtain the sixth representation data h2.
[0176] Exemplarily, the input dimension of the sixth fully connected layer is 2048, the output dimension of the sixth fully connected layer is 1024, and the sixth fully connected layer adopts the activation function Leaky ReLU.
[0177] h6=LeakyReLU(W7h5+b7)
[0178] W7∈R 1024×2048 , b7∈R 1024
[0179] Among them, W7 and b7 are the weight coefficient and bias of the sixth fully connected layer respectively.
[0180] S640: Input the sixth representation data into a seventh fully connected layer to obtain seventh representation data.
[0181] The seventh fully connected layer can be understood as the third fully connected layer of the discriminator. Specifically, the seventh fully connected layer is connected to the sixth fully connected layer, the sixth fully connected layer outputs the sixth representation data to the seventh fully connected layer, and the sixth representation data is processed by the seventh fully connected layer to obtain the seventh representation data h7.
[0182] Exemplarily, the input dimension of the seventh fully connected layer is 1024, the output dimension of the seventh fully connected layer is 512, and the seventh fully connected layer adopts the activation function Leaky ReLU.
[0183] h7=LeakyReLU(W8h6+b8)
[0184] W8∈R 512×1024 , b8∈R 512
[0185] Among them, W8 and b8 are the weight coefficient and bias of the seventh fully connected layer respectively.
[0186] S650, input the seventh representation data into the eighth fully connected layer (that is, the fourth fully connected layer of the discriminator) to obtain eighth representation data.
[0187] Specifically, the eighth fully connected layer is connected to the seventh fully connected layer, the seventh fully connected layer outputs the seventh representation data to the eighth fully connected layer, and the seventh representation data is processed by the eighth fully connected layer to obtain the eighth representation data h8.
[0188] Exemplarily, the input dimension of the eighth fully connected layer is 512, the output dimension of the eighth fully connected layer is 256, and the eighth fully connected layer adopts the activation function Leaky ReLU.
[0189] h8=LeakyReLU(W9h7+b9)
[0190] W9∈R 256×512 , B9∈R 256
[0191] Among them, w9 and b9 are the weight coefficient and bias of the eighth fully connected layer respectively.
[0192] S660: Input the eighth representation data into the second output layer to obtain a discrimination result of the input data.
[0193] Specifically, the second output layer is connected to the eighth fully connected layer, the eighth fully connected layer outputs the eighth representation data to the second output layer, and the eighth representation data is processed by the second output layer to obtain the discrimination result data output.
[0194] Exemplarily, the input dimension of the second output layer is 256, the output dimension of the second output layer is 1, and the second output layer uses the activation function Sigmoid.
[0195] output=Sigmoid(W 10 h4+b 10 )
[0196] W 10 ∈R 1×256 , b 10 ∈R 1
[0197] Among them, W 10 and b10 are the weight coefficient and bias of the second output layer respectively.
[0198] It can be understood that label_dim and input_dim are the label dimension and input dimension respectively, W k and b k are the weight coefficients and biases of the corresponding fully connected layers in the discriminator, respectively.
[0199] In yet another example, a residual layer is added to the fully connected layer of the discriminator to be trained to add the input and output of the fully connected layer.
[0200] In this embodiment, a residual layer is added to the fifth fully connected layer, the input dimension of the fifth fully connected layer is input_dim+label_dim, the output dimension of the fifth fully connected layer is 2048, and the activation function is Leaky ReLU. Specifically, as shown in the following formula:
[0201] h5=LeakyReLU(W6input+b6)
[0202] W6∈R 2048×(Input-din+label_dim) , b6∈R 2048
[0203] In this embodiment, a residual layer is added to the sixth fully connected layer, the input dimension of the sixth fully connected layer is 2048, the output dimension of the sixth fully connected layer is 1024, and the activation function is Leaky ReLU. Specifically, as shown in the following formula:
[0204] h6=LeakyReLU(W7h5+b7)
[0205] W7∈R 1024×2048 , b7∈R 1024
[0206] output Layer6 =LeakyReLU(FC Layer6 (LeakyReLU
[0207] (FC Layer5 (input))+input))
[0208] In this embodiment, a residual layer is added to the seventh fully connected layer, the input dimension of the seventh fully connected layer is 1024, the output dimension of the seventh fully connected layer is 512, and the activation function Leaky ReLU is specifically as shown in the following formula:
[0209] h7=LeakyReLU(W8h6+b8)
[0210] W8∈R 512×1024 , b8∈R 512
[0211] output Layer7 =LeakyReLU(FC Layer7 (LeakyReLU
[0212] (FC Layer6 (LeakyReLU(FC Layer5 (input))+
[0213] input))+LeakyReLU(FC Layer5 (input))))
[0214] In this embodiment, a residual layer is added to the eighth fully connected layer, the input dimension of the eighth fully connected layer is 512, the output dimension of the eighth fully connected layer is 256, and the activation function Leaky ReLU is specifically as shown in the following formula:
[0215] h7=LeakyReLU(W8h6+b8)
[0216] W8∈R 256×512 , b8∈R 256
[0217] output Layer8 =Sigmoid(FC Layer8 (LeakyReLU(FC Layer7 (LeakyReLU(FC Layer6 (LeakyReLU(FC Layer5 (input))+input))+LeakyReLU(FC Layer5 9input)))+LeakyReLU(FC Layer6 (LeakyReLU(FC Layer5 (input))
[0218] +input))+LeakyReLU(FC Layer5 (input))))
[0219] In the above embodiment, FC Layeri is the corresponding fully connected layer, output Layeri It is the output of the corresponding layer, the result after being processed by the fully connected layer and the activation function.
[0220] In this embodiment, a regularization technique is added after the fully connected layer of the discriminator model to be trained.
[0221] After the activation function of each layer, Dropout regularization is performed, and the calculation formula is as follows:
[0222] h(l) =LeakyReLU(W (l) h (l-1) +b (l) )
[0223] h (l) = Dropout(h (l) , p)
[0224] Here h (l) represents the output of layer l, W (l) 、b (l) are the weight and bias of the lth layer respectively, and p is the probability of retaining the activation value.
[0225] In the above embodiment, by adding a residual layer to the hidden layer of the discriminator neural network, that is, adding the input and output of each layer, the original input information can be retained during the forward propagation process, thereby reducing the gradient disappearance and speeding up the training speed. Through the regularization technology, a certain proportion of neurons are randomly discarded, which has the effect of preventing data overfitting.
[0226] In some embodiments, the load granularity includes minutes, hours, and days, and the response characteristics include response time, response amount, and power transfer amount; constructing a data set based on the user load response characteristics, including: dividing different training sets according to the response amount; in the training set of the same response amount, using the response time as an input condition, and appending a response period label before the data.
[0227] In this embodiment, load granularity refers to the time interval for observing or recording user loads, and the units can be minutes, hours, days, etc. For example, if the data granularity is 15 minutes, there are 96 data points in a day. The response time can be the time period in which the user responds to power dispatch, such as 12:00-14:00, 14:00-16:00, 16:00-18:00, etc. The response amount can be the amount by which the user load adjusts its consumption when responding to the dispatch instruction, or it can be expressed as a percentage of load change, such as 2%, 4%, 50%, etc. The amount of electricity transferred can be the amount of electric energy transmitted from one location to another, and can be expressed in electric power (in MW or GW) or electric energy (in MWh or GWh).
[0228] Exemplarily, after obtaining the power load response data of some users, they can be divided into different training sets according to the response amount, for example, data with a response amount of 5% is divided into training set A, data with a response amount of 10% is divided into training set B, and data with a response amount of 20% is divided into training set C... In the training set with the same response amount, the response time can be used as an input condition, and a response time period label is added before the data. For example, in the above-mentioned training sets A, B or C, labels 1, 2, 3, 4, and 5 are used to represent the response time periods 12:00-14:00, 13:00-15:00, 14:00-16:00, 15:00-17:00, and 16:00-18:00, respectively, and labels are added in front of the data. Of course, other labels, such as 6, 7, 8, 9, and 10 can also be used to represent these time periods and add response labels to the data.
[0229] In some embodiments, see Figure 7 Before constructing the data set according to the user load response characteristics, the method may further include:
[0230] S710: Obtain an initial load data set.
[0231] For example, the usage data for a mechanical processing user in Jiangsu includes the user's electricity consumption data from July 1, 2023 to July 31, 2023. The data time interval is 15 minutes, and there are 96 records a day, that is, the baseline load is 96 data points. In addition, since the user participates in demand response, the response time is 2 hours, and there is electricity transfer in the response, 7 data points will be reduced within 2 hours, so 7 response data points and 7 transfer data points need to be added after the baseline load, totaling 96+7+7=110 data points.
[0232] S720 , using the Z-scores method to detect and remove outliers in the initial load data set to obtain a historical load data set.
[0233] For example, continuing with the data in S710, we get:
[0234] Z-scores of the first group of data:
[0235]
[0236]
[0237] Data with Z-scores greater than 3 will be considered abnormal data.
[0238] S730. Divide the historical load data set into feature data and label data.
[0239] Feature data: X = {x1, x2, ..., x n}
[0240] Label data: y = {y1, y2, ..., y n}
[0241] Among them, x i Represents the i-th feature data, y i Represents the label of the i-th group of data.
[0242] When processing training data, the conditional response time periods are represented by labels. The five response time periods 12:00-14:00, 13:00-15:00, 14:00-16:00, 15:00-17:00, and 16:00-18:00 are represented by five digital labels 1, 2, 3, 4, and 5 respectively.
[0243] S740 : For each label data, scale it using the minimum-maximum normalization method to obtain normalized label data.
[0244] The formula is as follows:
[0245]
[0246] Among them, X l represents a data set with label l, x l,ij Represents the jth feature of the i-th group of data in the l-th label.
[0247] Furthermore, the normalized data format is converted into the Pytorch tensor format:
[0248] X tensor = torch.tensor(X normalized )
[0249] Where X narmalized It is a collection of normalized feature data.
[0250] S750: Save the normalized label data in a corresponding scaler for data enhancement.
[0251] Among them, for each label l, save its corresponding scaler:
[0252] scalers[l]={nin(X l ), max(X l )}
[0253] The present application also provides a power load data enhancement device 800, see Figure 8The enhancement device 800 includes an enhancement data generation module 810, a mean value determination module 820, a linear relationship calculation module 830 and a load data evaluation module 840.
[0254] The enhanced data generation module 810 is used to input the noise data and the label data for representing the specified response period into the load data enhancement model for data enhancement, so as to obtain the enhanced load data within the specified response period; wherein the load data enhancement model adopts the target generator in the conditional generative adversarial network that has completed the training;
[0255] A mean value determination module 820, configured to determine an enhanced mean value of the enhanced load data and an actual mean value of the actual load data;
[0256] A linear relationship calculation module 830 is used to perform a linear correlation calculation based on the enhanced load data, the enhanced mean, the actual load data and the actual mean to obtain a Pearson correlation coefficient between the enhanced load data and the actual load data; wherein the Pearson correlation coefficient is used to characterize the linear relationship between the enhanced load data and the actual load data;
[0257] The load data evaluation module 840 is used to evaluate the enhanced load data within the specified response period according to the Pearson correlation coefficient.
[0258] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0259] The power load data enhancement device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0260] An embodiment of the present application provides a computer device, including: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method in any of the above embodiments by executing the computer instructions.
[0261] See also Fig. 9 , Fig. 9 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application, such as Fig. 9As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig. 9 A processor 10 is taken as an example.
[0262] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0263] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0264] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0265] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0266] Please continue reading Fig. 9The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Fig. 9 The example of connecting through bus is taken in the following.
[0267] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0268] The embodiment of the present application also provides a computer-readable storage medium. The above method according to the embodiment of the present application can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0269] The embodiment of the present application provides a computer program product, which includes computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method of any embodiment of the present application.
[0270] Although the embodiments of the present application are described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present application, and such modifications and variations are all within the scope defined by the appended claims.
[0271] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0272] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0273] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0274] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
[0275] Although the embodiments of the present application have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present application, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for enhancing power load data, characterized in that: The method comprises: Inputting the noise data and the label data for representing the specified response period into the load data enhancement model for data enhancement, and obtaining the enhanced load data within the specified response period; wherein the load data enhancement model adopts the target generator in the conditional generative adversarial network that has completed the training; determining an enhanced mean of the enhanced load data and an actual mean of the actual load data; A linear correlation calculation is performed according to the enhanced load data, the enhanced mean, the actual load data and the actual mean to obtain a Pearson correlation coefficient between the enhanced load data and the actual load data; wherein the Pearson correlation coefficient is used to characterize the linear relationship between the enhanced load data and the actual load data; The augmentation load data within the specified response period were evaluated based on the Pearson correlation coefficient.
2. The method according to claim 1, characterized in that The load data enhancement model includes a first input layer, a first fully connected layer, a second fully connected layer, a third fully connected layer, a fourth fully connected layer and a first output layer connected in sequence; the noise data and the label data used to represent the specified response period are input into the load data enhancement model for data enhancement to obtain the enhanced load data within the specified response period, including: Inputting the noise data and the label data into the first input layer to obtain intermediate representation data; Inputting the intermediate representation data into the first fully connected layer to obtain first representation data; Inputting the first representation data into the second fully connected layer to obtain second representation data; Inputting the second representation data into the third fully connected layer to obtain third representation data; Inputting the third representation data into the fourth fully connected layer to obtain fourth representation data; The fourth representation data is input into the first output layer to obtain enhanced load data within the specified response time period.
3. The method according to claim 1 or 2, characterized in that: Adding a residual layer to the fully connected layer of the load data enhancement model to add the input and output of the fully connected layer; The regularization technique is added after the fully connected layer of the load data augmentation model.
4. The method according to claim 1, characterized in that: The load data enhancement model is obtained by the following method: Building a conditional generative adversarial network, wherein the conditional generative adversarial network includes a generator to be trained and a discriminator to be trained; Construct a data set according to the user load response characteristics, and obtain historical load data and response period labels from the constructed data set; Inputting random noise and the response period label into the generator to be trained to obtain generated load data; Inputting the historical load data and the generated load data and the response period label into the to-be-trained discriminator to obtain a discrimination result between the historical load data and the generated load data; Performing parameter updates on the conditional generative adversarial network based on the generator loss data of the generator to be trained and the discriminator loss data of the discriminator to be trained; The load data enhancement model is constructed based on the target generator in the conditional generative adversarial network that has completed training.
5. The method according to claim 4, characterized in that Adopting Adam optimizer to update the parameters of the generator to be trained and the discriminator to be trained; The discriminator loss data is determined using the following formula: Among them, L D Represents the discriminator loss data, y real represents the label of the real data, D(x real ) represents the output of the discriminator for the real data, y fake is the label of the generated data, D(G(z,y label )) is the output of the discriminator for the generated data; The generator loss data is determined using the following formula: L G =L(y real ,D(G(z,y label ))) Among them, L G is the loss of the generator, y real is the label of the real data, D(G(z,y label )) is the output of the discriminator for the generated data.
6. The method according to claim 4, characterized in that The discriminator to be trained includes a second input layer, a fifth fully connected layer, a sixth fully connected layer, a seventh fully connected layer, an eighth fully connected layer and a second output layer which are connected in sequence.
7. The method according to claim 4, characterized in that The load granularity includes minutes, hours, and days, and the response characteristics include response time, response amount, and power transfer amount; the data set constructed according to the user load response characteristics includes: Divide different training sets according to the amount of response; In the training set of the same response quantity, the response time is used as an input condition, and the response period label is added before the data.
8. The method according to claim 4, characterized in that Before constructing the data set according to the user load response characteristics, the method further includes: Obtain the initial load data set; Using Z-score s The method detects and removes outliers in the initial load data set to obtain a historical load data set; Dividing the historical load data set into feature data and label data; For each label data, the minimum-maximum normalization method is used to scale it to obtain the normalized label data; The normalized label data is stored in a corresponding scaler for data enhancement.
9. A device for enhancing power load data, characterized in that: The device comprises: An enhanced data generation module, used to input noise data and label data for representing a specified response period into a load data enhancement model for data enhancement, so as to obtain enhanced load data within the specified response period; wherein the load data enhancement model adopts a target generator in a conditional generative adversarial network that has completed training; a mean value determination module, configured to determine an enhanced mean value of the enhanced load data and an actual mean value of the actual load data; a linear relationship calculation module, configured to perform a linear correlation calculation based on the enhanced load data, the enhanced mean, the actual load data and the actual mean, to obtain a Pearson correlation coefficient between the enhanced load data and the actual load data; wherein the Pearson correlation coefficient is used to characterize the linear relationship between the enhanced load data and the actual load data; The load data evaluation module is used to evaluate the enhanced load data within the specified response time period according to the Pearson correlation coefficient.
10. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 8 by executing the computer instructions.
