A method, device and medium for predicting power load
Through InfoGAN, graph convolutional neural network and improved DBO algorithm combined with periodic decoupling neural network model, the problem of insufficient accuracy in power load forecasting is solved, more efficient power load forecasting is achieved, and the stability of the power system is enhanced. and energy planning support.
Patent Information
- Application Number
- CN202410489544.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-23
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-04-23
AI Technical Summary
Existing power load forecasting methods have insufficient accuracy and robustness when dealing with complex load change patterns, and are difficult to effectively capture nonlinear relationships and time series characteristics.
InfoGAN is used to generate adversarial networks for data reconstruction, graph convolutional neural networks are used to extract features, the DBO algorithm is improved to the IDBO algorithm, and the periodic decoupling neural network model is used for power load forecasting, combining stochastic adversarial learning, hunger search and quasi-reverse Learning strategies optimize model parameters.
It improves data integrity and prediction accuracy, can more accurately capture the time series characteristics and complex relationships of power loads, enhances the accuracy and reliability of prediction, and ensures the stable operation of the power system and the matching of energy supply and demand.
Smart Images

Figure CN118199054B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power load forecasting, and specifically relates to a power load forecasting method, device and medium. Background Art
[0002] In power system management, power load forecasting plays a very important role. It predicts power demand in the future by analyzing historical load data and related influencing factors. This task plays a key role in the planning, operation and market transactions of power systems. Effective load forecasting can help power companies make reasonable resource scheduling, energy procurement and equipment operation decisions, thereby ensuring the stable operation of the power grid and the quality of power supply.
[0003] Power load forecasting covers a variety of methods and models, including traditional time series analysis, regression analysis, as well as modern machine learning and deep learning techniques.
[0004] First of all, time series analysis is one of the basic methods for power load forecasting. It analyzes the historical trend, periodicity and seasonal changes of load data and establishes a mathematical model to predict future loads. Common time series models include autoregressive moving average model (ARIMA), seasonal autoregressive moving average model (SARIMA), exponential smoothing (ETS), etc. These models can effectively capture the trend and periodicity characteristics in load data, but have limited ability to fit nonlinear relationships.
[0005] Secondly, regression analysis is another commonly used load forecasting method. It builds a regression model based on the relationship between historical load data and influencing factors (such as weather, time, holidays, etc.) to make predictions. By fitting historical data, the regression model can infer the relationship between future load and influencing factors and make corresponding predictions. However, traditional regression methods often require manual selection of features and model structures, and have limited modeling capabilities for nonlinear relationships.
[0006] In addition to traditional methods, in recent years, machine learning and deep learning technologies have been widely used in power load forecasting. Machine learning algorithms such as decision trees, random forests, support vector machines, etc., as well as deep learning models such as recurrent neural networks (RNN), long short-term memory networks (LSTM), convolutional neural networks (CNN), etc., have powerful nonlinear modeling capabilities and can automatically learn complex relationships in data. These models can handle a large number of data features, including time, weather, holidays, etc., thereby improving the accuracy and robustness of predictions. With the development of machine learning and deep learning technologies, more and more power companies have begun to try to apply these new technologies to load forecasting to improve the accuracy and efficiency of predictions. Of course, power load forecasting is a complex task involving the application of multiple methods and technologies. With the continuous advancement of data acquisition technology, algorithms and computing power, the accuracy and reliability of power load forecasting will continue to improve, providing better support for the stable operation of power systems and energy planning. How to solve the specific problems that arise in the process of power load forecasting and make it suitable for processing complex load change patterns is what the present invention is trying to overcome and solve. Summary of the invention
[0007] Purpose of the invention: The present invention provides a method, device and medium for predicting power load, which can predict power load more quickly and accurately.
[0008] Technical solution: A method for predicting power load according to the present invention comprises the following steps:
[0009] (1) Obtaining raw data of power loads in multiple regions in advance and preprocessing the raw data;
[0010] (2) Using InfoGAN generative adversarial network to reconstruct the missing data in the power load and reflect the real state of the power load system;
[0011] (3) Using graph convolutional neural network algorithm to extract features from power load data, the extracted effective power load data is used to form an adjacency matrix;
[0012] (4) The random adversarial learning strategy, hungry search strategy and quasi-reverse learning strategy are used to improve the DBO algorithm to obtain the IDBO algorithm;
[0013] (5) The adjacency matrix is input into the constructed periodic decoupling neural network model for training. At the same time, the IDBO algorithm is used to optimize the parameters of the periodic decoupling neural network model. The trained and optimized periodic decoupling neural network model is used to predict the power load.
[0014] Furthermore, the original data of the power load described in step (1) includes historical load data, weather data, and holiday information.
[0015] Furthermore, the preprocessing of the raw data in step (1) includes: cleaning the data, detecting and processing outliers; interpolating and smoothing the power load data to remove noise and make it easier to analyze; and dividing the processed data into a training set and a test set.
[0016] Furthermore, the implementation process of step (2) is as follows:
[0017] For the preprocessed data, the implicit code b is extracted from the random variable a, and the two parts of data a and b are transferred to the generator to generate samples G(a,b). Then the classifier C classifies the generated samples through the Softmax function, and the discriminator determines the authenticity of the generated samples. Finally, the output of each network is used to construct the error function, and the parameters of each network are updated by feedback error to achieve continuous optimization of the model.
[0018] Establish the objective function of InfoGAN:
[0019] min G max D V(D,G)=V(D,G)-λI(b;G(a,b))
[0020] Among them, V(D,G) represents the difference between the generator and the discriminator; I(b; G(a,b)) represents the mutual information;
[0021] For the edge probability that is difficult to calculate in the mutual information of I(b; G(a,b)), variational inference is used to construct an approximate distribution H(G,P) to replace it; the sleep-sleep algorithm is used to optimize H(G,P) to obtain the final InfoGAN loss function, as shown below:
[0022] min G,P max D V(D,G,P)=V(D,G)-λH(G,P)
[0023] Through the optimization of data by the internal generator G, discriminator D and classifier C of InfoGAN, the missing data in the power load can be reconstructed.
[0024] Furthermore, the implementation process of step (3) is as follows:
[0025] Use s-layer GCN to map the regional spatiotemporal correlation graph G T The processing process is:
[0026]
[0027] In the formula, A T =A T'+E, A T ' is the adjacency matrix between nodes, E is the identity matrix, D T A T The degree matrix of is the feature matrix of the s-1th layer, W s is the weight matrix to be trained in the sth layer, ReLU is the activation function, which adds nonlinear features; use To represent the output matrix generated by the GCN model, that is, the output matrix is the adjacency matrix composed of the extracted effective power load data.
[0028] Furthermore, the implementation process of step (4) is as follows:
[0029] The random adversarial learning strategy is used to initialize the population position of the dung beetle optimization algorithm to improve the algorithm's solution performance. The initialization formula is as follows:
[0030] X i,new =(lb+ub)-kX i
[0031] Among them, X i,new Backward solution generated for random adversarial learning; X i is the original solution; k is a random number between [0,1]; lb and ub represent the lower bound and upper bound respectively; after the random adversarial learning strategy, N reverse solutions are generated. If the fitness of the reverse solution is better than the original solution, the reverse solution is used to replace the original solution, otherwise the original solution is retained, thereby improving the convergence speed and accuracy;
[0032] In the algorithm optimization process, when the dung beetle shows low energy and poor fitness, the dung beetle is in a hungry state. By changing the optimization path of the dung beetle, the search ability is enhanced to avoid the algorithm from falling into the local optimum. When the dung beetle population iteration exceeds 1 / 2, the hungry search strategy is introduced to change the original dung beetle optimization path. The expression of the hungry search strategy is as follows:
[0033] x new =x prey ×ω+F1×α×d m ×r1×exp(x worse -x m )
[0034] Among them, x new represents the new position of the individual; x prey represents the optimal position of the prey in the environment; ω represents the adaptive weight factor; F1 represents the sign of the continuous change of the search direction; α represents the nonlinear density factor; d m represents the distance between the prey and the mth dung beetle; r1 represents a random number between 0 and 1; x worse represents the global worst position; xm is the position of the current population individual;
[0035] An adaptive quasi-reverse learning strategy is introduced, and the formula is as follows:
[0036]
[0037] Among them, t represents the current iteration number, represents the position of the mth dung beetle at the tth iteration, and pop represents the finite number of dung beetles;
[0038] As the iteration proceeds, the population linear decrease strategy is used to gradually reduce the number of individuals using the quasi-reverse learning strategy. The specific calculation formula is as follows:
[0039]
[0040] Among them, pop' represents the population size using the quasi-reverse learning strategy, pop min and pop max Represent the maximum and minimum numbers respectively, t represents the current number of iterations, and M represents the maximum number of iterations.
[0041] Furthermore, the implementation process of step (5) is as follows:
[0042] The adjacency matrix is input into the periodic decoupling neural network model for training. The data input into the periodic decoupling neural network model needs to go through three modules, first the multi-period decoupling block, then the dual variable building module, and finally the change aggregation block, and then the final power load forecasting result is obtained;
[0043] The IDBO algorithm is used to find the optimal hyperparameters of the periodic decoupled neural network model, that is, to adjust the two parameters of the patch length and stride in the model. With continuous iterations, individuals with high fitness values appear in the IDBO algorithm, which are the optimal values of the hyperparameters.
[0044] For the multi-period decoupling block, the periodic extractor and the period-based reshaper are used to convert the one-dimensional time series into a two-dimensional space; then the time-varying decoupler is used to decouple the long-term and short-term information through "period patches" and "frequency slices"; the periodic extractor and the period-based reshaper emphasize that the original one-dimensional structure of the time series cannot fully represent the changes of adjacent time points, and the fast Fourier transform is used to analyze the time series in the frequency domain as follows:
[0045] A=Avg(Amp(FFT(X I )))
[0046] Wherein, FFT and Amp represent Fourier transform and amplitude extraction respectively; X Irepresents the historical input power load data; the channel average operation Avg on d channels produces represents the amplitude of t frequencies;
[0047] The bivariate modeling module consists of two parts: a long-term change extractor and a short-term change extractor. It uses a dual-branch parallel architecture to model long-term and short-term changes in time series. The long-term change extractor is a given complement with long-term information. They are projected into the latent space via linear projection:
[0048]
[0049] Where D is the dimension of the latent space; N is the number of patches; Linear is a linear projection; It will pass through several Transformer encoder layers; the specific process of each layer is as follows:
[0050]
[0051] Among them, BatchNorm represents batch normalization; MLP is a multi-layer linear feedforward neural network; MSA represents the multi-head self-attention mechanism to enhance the representation ability by using multiple independent self-attention heads; each head captures different types of long-term dependencies between different patches, and is combined in the following way to obtain a more comprehensive dependency:
[0052]
[0053] The short-term variation extractor in the bivariate building block contains a series of convolutional blocks, each of which consists of a convolutional layer and a nonlinear activation function; these blocks are arranged in sequence to gradually expand the receptive field and adapt to periods of different lengths; for each local slice The process for each block is:
[0054]
[0055] Among them, SELU stands for scaled exponential linear unit; in order to get the final prediction of the convolution part, concatenation and truncation operations are used:
[0056]
[0057] Among them, Truncate represents the truncation function, and Concat represents the concatenation function;
[0058] The final output of the dual-transformation module is and The sum of:
[0059]
[0060] For the variation aggregation block, the variation aggregation block integrates these k results and then maps them to the univariate prediction X through a parameter-sharing linear layer. O :
[0061]
[0062] The final multivariate prediction result is the result of multiple single variable predictions X O Obtained by superposition.
[0063] A device according to the present invention includes a memory and a processor, wherein:
[0064] A memory for storing computer programs that can be run on the processor;
[0065] The processor is used to execute the steps of the power load forecasting method as described above when running the computer program.
[0066] A storage medium described in the present invention stores a computer program, and when the computer program is executed by at least one processor, the steps of the power load forecasting method described above are implemented.
[0067] Beneficial effects: Compared with the prior art, the present invention has the following beneficial effects:
[0068] In terms of data preprocessing and reconstruction, by preprocessing and reconstructing missing data using the InfoGAN method, the integrity and quality of the data can be improved, laying a solid foundation for subsequent analysis;
[0069] In terms of feature extraction, the graph convolutional neural network algorithm is used to extract features from power load data, which can capture the complex relationships and patterns in the data and help improve the accuracy of prediction;
[0070] In terms of the improved DBO algorithm, the DBO algorithm is improved through random adversarial learning strategy, hungry search strategy and quasi-reverse learning strategy, which improves the performance and adaptability of the algorithm.
[0071] In terms of model training and parameter optimization, the use of trained and optimized periodic decoupling neural network model to predict power load can better capture the time series characteristics of power load and improve the accuracy of prediction. The use of IDBO algorithm to optimize the parameters of the periodic decoupling neural network model further improves the prediction performance of the model.
[0072] The present invention makes power load forecasting more accurate and reliable, and plays a key role in ensuring stable operation, efficient planning and matching of energy supply and demand of power systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 is a flow chart of the power load forecasting method;
[0074] Figure 2 Generate a schematic diagram of the adversarial network structure for InfoGAN;
[0075] Figure 3 Schematic diagram of the structure of the periodic decoupled neural network model. DETAILED DESCRIPTION
[0076] The present invention will be further described in detail below in conjunction with the accompanying drawings.
[0077] like Figure 1 As shown, the present invention proposes a method for predicting power load, comprising the following steps:
[0078] Step 1: Obtain raw data of power loads in multiple regions in advance and preprocess the acquired data.
[0079] Get the original power load data, which may include historical load data, weather data, holiday information, etc., clean the data, detect and process outliers, and perform interpolation and smoothing on the load data to remove noise and make it easier to analyze; divide the processed data into two parts, namely 70% training set and 30% test set, where the training set is used for model construction and the test set is used for model verification.
[0080] Step 2: In view of the possibility that power load data may contain missing values, the InfoGAN generative adversarial network method is used to reconstruct the missing data in the power load, thereby more accurately reflecting the true state of the power load system.
[0081] For the data preprocessed in the previous step, the implicit code b is extracted from the random variable a, and the two parts of data a and b are transferred to the generator to generate samples G(a,b). Then the classifier C classifies the generated samples through the Softmax function, and the discriminator determines the true or false of the generated samples. Finally, the output of each network is used to construct the error function, and the parameters of each network are updated by feedback error to achieve continuous optimization of the model.
[0082] like Figure 2 As shown in the figure, InfoGAN is based on traditional GAN, by adding mutual information control terms, and then establishing the objective function of InfoGAN. The objective function is as follows:
[0083] min G max D V(D,G)=V(D,G)-λI(b;G(a,b))
[0084] In the above formula, V(D,G) represents the difference between the generator and the discriminator; I(b; G(a,b)) represents the mutual information;
[0085] There are difficult-to-calculate edge probabilities in the mutual information of I(b; G(a,b)), so variational inference is used to construct an approximate distribution H(G,P) to replace it. During specific training, the sleep-sleep algorithm can be used to optimize H(G,P) to obtain the final InfoGAN loss function, as shown below:
[0086] min G,P max D V(D,G,P)=V(D,G)-λH(G,P)
[0087] By optimizing the data through the internal generator G, discriminator D and classifier C of InfoGAN, the missing data in the power load can be reconstructed.
[0088] Step 3: Use the graph convolutional neural network algorithm to extract features from the power load data, and construct an adjacency matrix from the extracted effective power load data.
[0089] For the extraction of multi-region spatial features, the regional spatiotemporal correlation graph consists of regions and links that represent the spatiotemporal correlation between regions. These nodes and edges have unique features and connection order. They are non-Euclidean data that are not translation invariant and cannot be directly processed by CNN that processes Euclidean data. GCN is a model in GNN that uses spectral methods to process graphs. It mainly uses the graph convolution theorem to define graph convolution from the spectral domain. The corresponding feature extraction process is mainly achieved by aggregating the feature information of all neighboring nodes of the target node. Use s-layer GCN to extract the regional spatiotemporal correlation graph G. T The processing process is:
[0090]
[0091] Where: A T =A T '+E, A T ' is the adjacency matrix between nodes, E is the identity matrix, D T A T The degree matrix of is the feature matrix of the s-1th layer, Ws is the weight matrix to be trained in the sth layer, ReLU is the activation function, which adds nonlinear features; finally, for the convenience of representation, use To represent the output matrix generated by the GCN model. That is, the output matrix is the adjacency matrix composed of the extracted effective power load data.
[0092] Step 4: Use random adversarial learning strategy, hungry search strategy and quasi-reverse learning strategy to improve the DBO algorithm and obtain the IDBO algorithm.
[0093] First, the random adversarial learning strategy is used to initialize the population position of the dung beetle optimization algorithm to improve the algorithm's solution performance. The initialization formula is as follows:
[0094] X i , new =(lb+ub)-kX i
[0095] Among them, X i , new Backward solution generated for random adversarial learning; X i is the original solution; k is a random number between [0,1]; lb and ub represent the lower bound and upper bound respectively; after the random adversarial learning strategy, N reverse solutions are generated. If the fitness of the reverse solution is better than the original solution, the reverse solution is used to replace the original solution, otherwise the original solution is retained. This improves the convergence speed and accuracy.
[0096] In the algorithm optimization process, when the dung beetle shows low energy and poor fitness, the dung beetle is in a hungry state. By changing the optimization path of the dung beetle, the search ability is enhanced to avoid the algorithm from falling into the local optimum. When the dung beetle population iteration exceeds 1 / 2, the starvation search strategy is introduced to change the original dung beetle optimization path. The starvation search strategy expression is as follows:
[0097] x new =p rey ×ω+F1×α×d m ×r1×exp(x wose –x m )
[0098] Among them, x new represents the new position of the individual; x prey represents the optimal position of the prey in the environment; ω represents the adaptive weight factor; F1 represents the sign of the continuous change of the search direction; α represents the nonlinear density factor; d m represents the distance between the prey and the mth dung beetle; r1 represents a random number between 0 and 1; x worse represents the global worst position; x m is the position of the current population individual.
[0099] The hungry search strategy improves the original search path based on the global worst position. When the dung beetle is in a hungry state, it can achieve a wider search based on the original search path and enhance the ability to jump out of the local optimum. The addition of this strategy can balance the algorithm's global optimization and local development capabilities.
[0100] In the dung beetle optimization algorithm, the position update process is too dependent on the dominant individual, which will lead to premature population. To solve this problem, an adaptive quasi-reverse learning strategy is proposed. The quasi-reverse learning strategy is a variant of the reverse learning strategy. It can avoid the problem of low accuracy caused by excessive position conversion in traditional reverse learning. At the same time, it can relatively expand the search space and accelerate population convergence. The formula is as follows:
[0101]
[0102] In the above formula, t represents the current number of iterations, represents the position of the mth dung beetle at the tth iteration, and pop represents the finite number of dung beetles.
[0103] In addition, as the iteration proceeds, using the quasi-reverse learning strategy for all individuals will result in a lot of useless searches, increase the computational cost, and be detrimental to the convergence of the algorithm. Therefore, the present invention proposes to use a population linear decrease strategy. As the iteration proceeds, the number of individuals using the quasi-reverse learning strategy is gradually reduced. The specific calculation formula is as follows:
[0104]
[0105] In the above formula, pop' represents the population size using the quasi-reverse learning strategy, pop min and pop max Represent the maximum and minimum numbers respectively, t represents the current number of iterations, and M represents the maximum number of iterations.
[0106] Step 5: Input the adjacency matrix into Figure 3 The periodic decoupling neural network model shown in the figure is trained. The data input into the periodic decoupling neural network model needs to go through three modules, first the multi-period decoupling block, then the dual variable building module, and finally the change aggregation block, so as to obtain the final power load forecasting result.
[0107] Here, the IDBO algorithm is also used to find the optimal hyperparameters of the periodic decoupling neural network model. With continuous iterations, individuals with very high fitness values appear in the IDBO algorithm, which are the optimal values of the hyperparameters. The power load adjacency matrix extracted by the graph convolutional neural network algorithm is input into the periodic decoupling neural network model, and then the optimal hyperparameters found by the IDBO algorithm are used to optimize the model, thereby improving the prediction accuracy of the power load.
[0108] The IDBO algorithm optimizes the periodic decoupled neural network model by adjusting the patch length and stride in the model; enhancing the semantic information and stride within the patch can improve the prediction. Each patch is longer and contains more semantic information. Of course, simply expanding the semantic information within the patch is not enough to enhance the prediction. The key is to ensure that each patch captures more long-term information. The periodic patch method after adjusting the IDBO algorithm parameters can effectively solve this problem.
[0109] For the multi-period decoupling block, the one-dimensional time series is converted into a two-dimensional space using a periodic extractor and a period-based reshaper. Then the time-varying decoupler is used to decouple long-term and short-term information through "period patches" and "frequency slices". The periodic extractor and the period-based reshaper emphasize that the original one-dimensional structure of the time series cannot fully represent the changes in adjacent time points, so the fast Fourier transform is used to analyze the time series in the frequency domain as follows:
[0110] A=Avg(Amp(FFT(X I )))
[0111] Wherein, FFT and Amp represent Fourier transform and amplitude extraction respectively; X I represents the historical input power load data; the channel average operation Avg on d channels produces represents the amplitude of t frequencies. The selected frequencies not only focus on high amplitudes, but also include those with significant values and amplitudes. Frequencies with high amplitudes better represent the main components, while those with large values help to distinguish long-term and short-term relationships more clearly. A multi-period decoupling block is used to learn the period of the frequency-domain input sequence and convert the one-dimensional time series into short-term and long-term series, which are then reshaped into a two-dimensional tensor.
[0112] For the dual-variable modeling module, the dual-variation modeling module consists of two parts: a long-term variation extractor and a short-term variation extractor. It uses a dual-branch parallel architecture to model the long-term and short-term variations in the time series. This parallel structure can better preserve the high-frequency information of short-term variations and improve computational efficiency. The long-term variation extractor is a given complement with long-term information. They are projected into the latent space via linear projection:
[0113]
[0114] Where D is the dimension of the latent space; N is the number of patches; Linear is the linear projection; Here It will pass through several Transformer encoder layers. The specific process of each layer is as follows:
[0115]
[0116] Here, BatchNorm means batch normalization; MLP is a multi-layer linear feedforward neural network; MSA means multi-head self-attention mechanism to enhance the representation ability by using multiple independent self-attention heads. Each head captures different types of long-term dependencies between different patches. All these heads are combined in the following way to obtain more comprehensive dependencies:
[0117]
[0118] The short-term variation extractor in the bivariate building block contains a series of convolutional blocks, each of which consists of a convolutional layer and a nonlinear activation function. These blocks are arranged in sequence to gradually expand the receptive field and adapt to periods of different lengths. For each local slice The process for each block is:
[0119]
[0120] Among them, SELU represents the scaled exponential linear unit; in order to get the final prediction of the convolution part, the connection and truncation operations are used here:
[0121]
[0122] Among them, Truncate represents the truncation function, and Concat represents the concatenation function.
[0123] The final output of the dual-transformation module is and The sum of:
[0124]
[0125] For the variation aggregation block, the variation aggregation block integrates these k results and then maps them to the univariate prediction X through a parameter-sharing linear layer. O :
[0126]
[0127] The final multivariate prediction result is the result of multiple single variable predictions X O Obtained by superposition.
[0128] In the power load forecasting problem based on the periodic decoupling neural network model, with the continuous iteration and evolution of the population, the global optimal solution is finally found in a shorter time, thereby improving the accuracy of power load forecasting.
[0129] The present invention also provides an apparatus including a memory and a processor, wherein the memory is used to store a computer program that can be run on the processor; and the processor is used to execute the steps of an electric load forecasting method as described above when running the computer program.
[0130] The present invention also provides a storage medium having a computer program stored thereon, and when the computer program is executed by at least one processor, the steps of the power load forecasting method described above are implemented.
[0131] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent transformation or modification made according to the spirit of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for predicting power load, characterized in that: The following steps are involved: (1) Obtaining raw data of power loads in multiple regions in advance and preprocessing the raw data; (2) Using InfoGAN generative adversarial network to reconstruct the missing data in the power load and reflect the real state of the power load system; (3) Using graph convolutional neural network algorithm to extract features from power load data, the extracted effective power load data is used to form an adjacency matrix; (4) The random adversarial learning strategy, hungry search strategy and quasi-reverse learning strategy are used to improve the DBO algorithm to obtain the IDBO algorithm; (5) Input the adjacency matrix into the constructed periodic decoupling neural network model for training, and use the IDBO algorithm to optimize the parameters of the periodic decoupling neural network model, and use the trained and optimized periodic decoupling neural network model to predict the power load; The implementation process of step (4) is as follows: The random adversarial learning strategy is used to initialize the population position of the dung beetle optimization algorithm to improve the algorithm's solution performance. The initialization formula is as follows: X i , new =(lb+ub)-kX i Among them, X i , new Backward solution generated for random adversarial learning; X i is the original solution; k is a random number between [0,1]; lb and ub represent the lower bound and upper bound respectively; after the random adversarial learning strategy, N reverse solutions are generated. If the fitness of the reverse solution is better than the original solution, the reverse solution is used to replace the original solution, otherwise the original solution is retained, thereby improving the convergence speed and accuracy; In the algorithm optimization process, when the dung beetle shows low energy and poor fitness, the dung beetle is in a hungry state. By changing the optimization path of the dung beetle, the search ability is enhanced to avoid the algorithm from falling into the local optimum. When the dung beetle population iteration exceeds 1 / 2, the hungry search strategy is introduced to change the original dung beetle optimization path. The expression of the hungry search strategy is as follows: x new =x prey ×ω+F1×α×d m ×r1×exp(x worse –x m ) Among them, x new represents the new position of the individual; x prey represents the optimal position of the prey in the environment; ω represents the adaptive weight factor; F1 represents the sign of the continuous change of the search direction; α represents the nonlinear density factor; d m represents the distance between the prey and the mth dung beetle; r1 represents a random number between 0 and 1; x worse represents the global worst position; x m is the position of the current population individual; An adaptive quasi-reverse learning strategy is introduced, and the formula is as follows: Among them, t represents the current iteration number, represents the position of the mth dung beetle at the tth iteration, and pop represents the finite number of dung beetles; As the iteration proceeds, the population linear decrease strategy is used to gradually reduce the number of individuals using the quasi-reverse learning strategy. The specific calculation formula is as follows: Among them, pop' represents the population size using the quasi-reverse learning strategy, pop min and pop max Represent the minimum and maximum numbers respectively, t represents the current number of iterations, and M represents the maximum number of iterations.
2. A method for predicting power load according to claim 1, characterized in that: The original data of the power load described in step (1) includes historical load data, weather data, and holiday information.
3. A method for predicting power load according to claim 1, characterized in that: The preprocessing of the raw data in step (1) includes: cleaning the data, detecting and processing outliers; interpolating and smoothing the power load data to remove noise and make it easier to analyze; and dividing the processed data into a training set and a test set.
4. A method for predicting power load according to claim 1, characterized in that: The implementation process of step (2) is as follows: For the preprocessed data, the implicit code b is extracted from the random variable a, and the two parts of data a and b are transferred to the generator to generate samples G(a,b). Then the classifier C classifies the generated samples through the Softmax function, and the discriminator determines the authenticity of the generated samples. Finally, the output of each network is used to construct the error function, and the parameters of each network are updated by feedback error to achieve continuous optimization of the model. Establish the objective function of InfoGAN: min G max D V(D,G)=V(D,G)-λI(b;G(a,b)) Among them, V(D,G) represents the difference between the generator and the discriminator; I(b; G(a,b)) represents the mutual information; For the edge probability that is difficult to calculate in the mutual information of I(b; G(a,b)), variational inference is used to construct an approximate distribution H(G,P) to replace it; the sleep-sleep algorithm is used to optimize H(G,P) to obtain the final InfoGAN loss function, as shown below: min G,P max D V(D,G,P)=V(D,G)-λH(G,P) Through the optimization of data by the internal generator G, discriminator D and classifier C of InfoGAN, the missing data in the power load can be reconstructed.
5. A method for predicting power load according to claim 1, characterized in that: The implementation process of step (3) is as follows: Use s-layer GCN to map the regional spatiotemporal correlation graph G T The processing process is: In the formula, A T =A T '+E, A T ' is the adjacency matrix between nodes, E is the identity matrix, D T A T The degree matrix of is the feature matrix of the s-1th layer, W s is the weight matrix to be trained in the sth layer, ReLU is the activation function, which adds nonlinear features; use To represent the output matrix generated by the GCN model, that is, the output matrix is the adjacency matrix composed of the extracted effective power load data.
6. A method for predicting power load according to claim 1, characterized in that: The implementation process of step (5) is as follows: The adjacency matrix is input into the periodic decoupling neural network model for training. The data input into the periodic decoupling neural network model needs to go through three modules, first the multi-period decoupling block, then the dual variable building module, and finally the change aggregation block, and then the final power load forecasting result is obtained; The IDBO algorithm is used to find the optimal hyperparameters of the periodic decoupled neural network model, that is, to adjust the two parameters of the patch length and stride in the model. With continuous iterations, individuals with high fitness values appear in the IDBO algorithm, which are the optimal values of the hyperparameters. For the multi-period decoupling block, the one-dimensional time series is converted into a two-dimensional space using a periodic extractor and a period-based reshaper. Then, the time-varying decoupler is used to decouple long-term and short-term information through "period patches" and "frequency slices". The periodic extractor and the period-based reshaper emphasize that the original one-dimensional structure of the time series cannot fully represent the changes of adjacent time points. Fast Fourier transform is used to analyze the time series in the frequency domain as follows: A=Avg(Amp(FFT(X I ))) Wherein, FFT and Amp represent Fourier transform and amplitude extraction respectively; X I represents the historical input power load data; the channel average operation Avg on d channels produces represents the amplitude of t frequencies; The bivariate modeling module consists of two parts: a long-term change extractor and a short-term change extractor. It uses a dual-branch parallel architecture to model long-term and short-term changes in time series. The long-term change extractor is a given complement with long-term information. They are projected into the latent space via linear projection: Where D is the dimension of the latent space; N is the number of patches; Linear is a linear projection; It will pass through several Transformer encoder layers; the specific process of each layer is as follows: Among them, BatchNorm represents batch normalization; MLP is a multi-layer linear feedforward neural network; MSA represents the multi-head self-attention mechanism to enhance the representation ability by using multiple independent self-attention heads; each head captures different types of long-term dependencies between different patches, and is combined in the following way to obtain a more comprehensive dependency: The short-term variation extractor in the bivariate building block contains a series of convolutional blocks, each of which consists of a convolutional layer and a nonlinear activation function; these blocks are arranged in sequence to gradually expand the receptive field and adapt to periods of different lengths; for each local slice The process for each block is: Among them, SELU stands for scaled exponential linear unit; in order to get the final prediction of the convolution part, concatenation and truncation operations are used: Among them, Truncate represents the truncation function, and Concat represents the concatenation function; The final output of the dual-transformation module is and The sum of: For the variation aggregation block, the variation aggregation block integrates these k results and then maps them to the univariate prediction X through a parameter-sharing linear layer. O : The final multivariate prediction result is the result of multiple single variable predictions X O Obtained by superposition.
7. A device, characterized in that: comprising a memory and a processor, wherein: A memory for storing computer programs that can be run on the processor; A processor, configured to execute the steps of a method for predicting electric load as claimed in any one of claims 1 to 6 when running the computer program.
8. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by at least one processor, implements the steps of a power load forecasting method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Distributed charging load prediction method and system based on GCN-Crossform model
CN117081063A
Intelligent building energy consumption prediction method based on improved DBO-LSTM
CN117313795A
