Power load forecasting method based on CNN network and AdaRNN model

By extracting the spatiotemporal correlation features of power load data using a CNN network and combining it with an AdaRNN model for prediction, the problem of the influence of meteorological and electricity price factors in power load forecasting is solved, achieving higher prediction accuracy and model generalization ability.

CN115330072BActive Publication Date: 2026-05-01JIANGSU FRONTIER ELECTRIC TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JIANGSU FRONTIER ELECTRIC TECH
Filing Date
2022-08-24
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing technologies fail to effectively consider influencing factors such as weather and electricity prices in power load forecasting, resulting in insufficient forecast accuracy. Furthermore, the AdaRNN model fails to effectively extract power load characteristics.

Method used

A CNN network is used to extract the spatiotemporal correlation features of power load data, and the AdaRNN model is combined for prediction. By adaptively learning the temporal distribution drift of non-stationary time series, a Conv-AdaRNN model is constructed to improve the prediction accuracy.

Benefits of technology

It improves the prediction accuracy of power load data, reduces mean square error and mean absolute percentage error, and enhances the generalization ability of the prediction model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115330072B_ABST
    Figure CN115330072B_ABST
Patent Text Reader

Abstract

The application discloses the technical field of power load prediction, and discloses a power load prediction method based on a CNN network and an AdaRNN model, and comprises the following steps: acquiring an externally input power load data set; dividing the power load data set into a plurality of most dissimilar data periods according to a time distribution rule; extracting the space-time correlation between various features in the plurality of most dissimilar data periods by using a CNN network to obtain corresponding features of the power load; and inputting the corresponding features of the power load into a pre-trained Conv-AdaRNN model to perform power load prediction. The application improves the generalization of power load data prediction and effectively extracts feature points related to the power load.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a power load forecasting method based on CNN networks and AdaRNN models, belonging to the field of power load forecasting technology. Background Technology

[0002] As the power grid continues to expand and operating conditions become increasingly complex, there is a need to utilize deeper models and multi-source information to further improve the accuracy of load forecasting. In power load forecasting, forecasting methods are mainly divided into two categories: the first category is traditional forecasting methods, which mainly include regression analysis, time series analysis, and grey forecasting models; the second category is artificial intelligence forecasting methods, which mainly include expert system methods, artificial neural networks, and support vector machines.

[0003] In recent years, deep learning has made some progress in load forecasting. Among these, Recurrent Neural Networks (RNNs) are the main network framework for solving time series forecasting problems, and they have become quite mature in semantic recognition, image understanding, and natural language processing. Load forecasting also requires mining and analyzing large amounts of time series data; therefore, RNNs are an effective load forecasting method. LSTM (Long Short-Term Memory) and GRU (Gated Recurrent Unit) models, as optimized versions of RNNs, have solved the gradient vanishing problem, thus gaining wider application in load forecasting. However, in electricity load forecasting, many factors influence the predicted load to varying degrees. Some factors are naturally variable, such as weather. Some vary depending on regional conditions, such as the rate of industrial and agricultural development. Some factors are unpredictable major events, such as severe disasters. Furthermore, the impact of each factor on the load may differ, and different levels of the same factor also have different effects on the load. Therefore, how to reasonably mine the characteristics affecting the load has become a crucial factor affecting forecast accuracy. Existing techniques have studied the temporal distribution drift (TCS) problem of non-stationary time series for various types of time series data, and proposed the AdaRNN (Adaptive Learning and Forecasting of Time Series) framework to enable RNN models to generalize better. However, since the AdaRNN model is a model framework for various types of time series, it does not consider how to extract features from influencing factors such as weather and electricity prices in power load forecasting. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide a power load prediction method based on CNN network and AdaRNN model, which improves the generalization of power load data prediction and effectively extracts power load-related feature points.

[0005] To achieve the above objectives, the present invention is implemented using the following technical solution:

[0006] In a first aspect, the present invention provides a power load forecasting method based on CNN networks and AdaRNN models, comprising:

[0007] Obtain the externally input power load dataset;

[0008] The power load dataset is divided into multiple least dissimilar data periods based on the time distribution pattern.

[0009] By using a CNN network to extract the spatiotemporal correlations between various features in multiple least dissimilar data periods, the features corresponding to the power load are obtained.

[0010] The features corresponding to the power load are input into a pre-trained Conv-AdaRNN model to predict the power load.

[0011] Furthermore, the externally input power load dataset is processed into data sequences of various features for each half hour of a day and the average power load for each day within a certain period of time. These features include temperature, humidity, and electricity price.

[0012] Furthermore, based on the time distribution pattern, the dataset is divided into multiple least dissimilar data periods, and the objective function is:

[0013]

[0014]

[0015] Where D is the similarity measurement function, Δ1, Δ2, and K0 are predefined parameters, and P... i P j Let N be the i-th and j-th time series, and N be the total length of the time series. i Let be the length of the i-th time series segment.

[0016] Furthermore, the CNN network includes one-dimensional convolutions, a ReLU activation function, and a max-pooling layer, wherein the ReLU activation function is:

[0017] f(x) = max(0,x)

[0018] Where x is a real number; the operation rule of the max pooling layer is: for a matrix of size P×Q, find the maximum value in the kernel size M×N region of each max pooling layer, and output the maximum value in each region as the most effective information of each region.

[0019] Furthermore, the pre-trained Conv-AdaRNN model is obtained by retraining the pre-trained RNN model by adjusting the loss function with the goal of capturing the distributional importance between RNN units corresponding to two periods of data.

[0020] Furthermore, the pre-trained RNN model uses a loss function L pred(θ) Minimize the loss function L as the pre-training objective. pred(θ) for:

[0021]

[0022] in, Representing sequence P respectively j Characteristics and average power load of day i, θ is the loss function, M represents the RNN model, and θ represents the learnable model parameters in the RNN model.

[0023] Furthermore, the objective function of the pre-trained Conv-AdaRNN model is:

[0024]

[0025] Among them, P i P j Let λ represent the i-th and j-th time series segments, where λ is a hyperparameter used to adjust the weights of the two segments, and θ is the weights of the two segments. * α * To represent the learnable model parameters in the model, L tdm (P i ,P j ; α,θ) represents the distribution difference between any two segments in the K-segment sequence.

[0026] Secondly, this invention provides a power load forecasting system based on CNN networks and AdaRNN models, comprising:

[0027] Data acquisition module: used to acquire externally input power load datasets;

[0028] Data partitioning module: used to partition the power load dataset into multiple least dissimilar data periods based on the time distribution pattern;

[0029] Feature extraction module: used to extract the spatiotemporal correlation between various features in multiple least dissimilar data periods using a CNN network, and obtain the features corresponding to the power load;

[0030] Power load prediction module: This module is used to input the features corresponding to the power load into a pre-trained Conv-AdaRNN model to predict the power load.

[0031] Thirdly, the present invention provides an electrical load forecasting device based on CNN network and AdaRNN model, including a processor and a storage medium;

[0032] The storage medium is used to store instructions;

[0033] The processor is configured to operate according to the instructions to perform the steps of the method according to any of the foregoing.

[0034] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.

[0035] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:

[0036] This invention combines the advantages of CNN and AdaRNN models, effectively extracting features from power load data and thus improving the accuracy of power load data prediction. Compared with the AdaRNN model, the prediction model in this solution has lower mean squared error (MSE) and mean absolute percentage error (MAPE), which can effectively improve prediction accuracy. Attached Figure Description

[0037] Figure 1 This is a flowchart of the Conv-AdaRNN model construction and training provided in Embodiment 1 of the present invention;

[0038] Figure 2 This is a CNN network structure diagram provided in Embodiment 1 of the present invention. Detailed Implementation

[0039] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.

[0040] Example 1:

[0041] A power load forecasting method based on CNN network and AdaRNN model

[0042] This invention primarily utilizes Convolutional Neural Networks (CNNs) for feature extraction of various data affecting power load, and employs Adaptive Learning and Forecasting of Time Series (AdaRNN) to learn the temporal distribution drift patterns of non-stationary time series, thereby improving the accuracy of power load data. Specific steps are as follows: Figure 1 As shown:

[0043] (1) Process the data of each day within a certain period into a data sequence of various characteristics such as temperature, humidity, and electricity price for half an hour of the day, as well as the average power load of each day.

[0044] (2) According to the definition of Temporal Covariate Shift (TCS), given a time series P = {P1,...,P2} consisting of K segments, K}, each of which The total length of the time series is And it is stipulated that N0 = 0. When When this happens, temporal distribution drift occurs. To address temporal distribution drift, temporal similarity quantification (TDC) is first performed. That is, to make the model have the strongest generalization ability, the dataset is divided into K least related sequence data. If the model can reduce the distribution difference of these K least dissimilar sequence data, then the model has a strong generalization ability. The dataset is divided into K least dissimilar sequence data. The objective function is shown in equation (1):

[0045]

[0046]

[0047] Where D is the similarity measurement function, and Δ1, Δ2, and K0 are predefined parameters to avoid meaningless solutions.

[0048] (3) Using a CNN network, the spatiotemporal correlations between various features such as temperature, humidity, and electricity price are extracted to obtain the features corresponding to the power load; the CNN network is as follows: Figure 2 As shown, it consists of a one-dimensional convolutional layer, a ReLU activation function, and a maxpooling layer. The calculation of the ReLU activation function is shown in equation (2):

[0049] f(x)=max(0,x) (2)

[0050] Here, x is a real number. The operation rule of the Maxpooling layer is as follows: assuming the kernel size of the Maxpooling layer is M×N, then for a matrix of size P×Q, the maximum value is found in each M×N region, and the maximum value in each region is output as the most effective information of each region.

[0051] (4) To enable the model to converge quickly, the model is pre-trained with the goal of best matching the K pre-divided sequences. The resulting loss function is shown in the following formula:

[0052]

[0053] in Representing sequence P respectively j The characteristics (temperature, humidity, etc.) and average electricity load of day i. Here, θ represents the loss function (e.g., squared loss), M represents the model, and θ represents the learnable model parameters. To enable the model to make accurate predictions, the goal of pre-training is to make L... pred(θ) As small as possible.

[0054] (5) The features extracted by the CNN are input into the RNN model. To further address the TCS problem and make more accurate predictions, Temporal Distribution Matching (TDM) is performed. A transfer learning model is built for the separated K-segment sequence data to learn a model with time invariance, dynamically measuring the importance of each time state in the RNN unit. An important vector α∈R is introduced. V The values ​​correspond to the relative weights of the V hidden states in the RNN model. Since each sequence of data needs to be matched, for each pair of sequences (P... i ,P j For each pair of time series (P), there will be an α describing the weights of the V hidden states. Therefore, reducing the distribution gap between each pair of sequence data allows the model to better fit all K time series. i ,P j The TDM calculation scheme is as follows:

[0055]

[0056] in, P represents i and P j The weights of the distribution at state t. Representing P respectively i and P j At time t, in the hidden state, each hidden state in the RNN model can be calculated using the following formula:

[0057]

[0058] Where δ(·) represents a calculation method (such as multiplying the weight matrix and the input vector), It is the hidden state at time t-1. It is the hidden state at time t. It is the sequence data input at time t.

[0059] Finally, the objective function of the model should be expressed as follows:

[0060]

[0061] Among them, L pred(θ) The model represents the difference in predictions across all K sequence data, where λ is a hyperparameter used to adjust the weights of the two parts, and L... tdm (P i ,P j ) represents the distribution difference between any two segments in the K-segment sequence.

[0062] (6) Obtain the model and predict the power load data.

[0063] The experimental data used was electricity load, meteorological data, and electricity prices for a region in Australia from 2016 to 2020. The dataset contains information on dry-bulb temperature, dew point temperature, wet-bulb temperature, humidity, electricity price, and electricity load every half hour from 00:30 on January 1, 2016 to 24:00 on December 31, 2020. The specific steps are as follows:

[0064] 1) This dataset contains 1827 days, with 48 time points per day and 5 features. The feature data format is processed as follows:

[0065]

[0066] In this dataset, m = 87,696, representing a total of 48 * 1827 times; n = 5, representing 5 features; 1 ≤ i ≤ m, representing the i-th time of day; 1 ≤ j ≤ n, representing the j-th feature; x ij This represents the value of the j-th feature at time i.

[0067] To enable the model to converge as quickly as possible, the data was normalized using the following formula.

[0068]

[0069] Where, x ij(归一) It is x ij The result after normalization, x max It is the maximum value in the dataset X, x minIt is the minimum value in dataset X. The processed feature data is as follows:

[0070]

[0071]

[0072] The average daily load over 1827 days is processed using equation (7) as Y = {y1, y2, y3, ..., y...} i, .,y 1827}

[0073] The two datasets X and Y are divided into training, validation, and test sets in a ratio of 7:2:1.

[0074] 2) Use equation (1) to process the training set data into two unrelated data segments.

[0075] 3) Each data segment is input into the CNN network for feature extraction. Due to the large amount of data, batch training is used during network training, with each batch containing 36 days of feature data and electricity load data. The CNN network structure is as follows: Figure 2 As shown, there are 48 moments in a day, and each moment contains 5 feature values. Therefore, the input is processed into a three-dimensional array with the shape [36, 48, 5], where 36 represents 36 days, 48 ​​represents 48 moments, and 5 represents 5 feature values.

[0076] 4) Input the extracted feature values ​​into the model to pre-train the model parameters. Use equation (3) to pre-train the model parameters of CNN and RNN.

[0077] 5) Using equation (6), train the parameters of the CNN and AdaRNN models based on the error of the training set, and use the error of the verification machine to tune the hyperparameter λ.

[0078] 6) Compare the results on the test set using two metrics: mean squared error (MSE) and mean absolute percentage error (MAPE). The comparison is as follows:

[0079]

[0080] Example 2:

[0081] The power load forecasting system based on CNN networks and AdaRNN models can implement the power load forecasting method based on CNN networks and AdaRNN models described in Example 1, including:

[0082] Data acquisition module: used to acquire externally input power load datasets;

[0083] Data partitioning module: used to partition the power load dataset into multiple least dissimilar data periods based on the time distribution pattern;

[0084] Feature extraction module: used to extract the spatiotemporal correlation between various features in multiple least dissimilar data periods using a CNN network, and obtain the features corresponding to the power load;

[0085] Power load prediction module: This module is used to input the features corresponding to the power load into a pre-trained Conv-AdaRNN model to predict the power load.

[0086] Example 3:

[0087] This invention also provides an electrical load forecasting device based on CNN network and AdaRNN model, which can realize the electrical load forecasting method based on CNN network and AdaRNN model described in Embodiment 1, including a processor and a storage medium;

[0088] The storage medium is used to store instructions;

[0089] The processor is configured to operate according to the instructions to perform the steps of the following method:

[0090] Obtain the externally input power load dataset;

[0091] The power load dataset is divided into multiple least dissimilar data periods based on the time distribution pattern.

[0092] By using a CNN network to extract the spatiotemporal correlations between various features in multiple least dissimilar data periods, the features corresponding to the power load are obtained.

[0093] The features corresponding to the power load are input into a pre-trained Conv-AdaRNN model to predict the power load.

[0094] Example 4:

[0095] This invention also provides a computer-readable storage medium that implements the power load forecasting method based on CNN network and AdaRNN model described in Embodiment 1. The medium stores a computer program that, when executed by a processor, performs the steps of the following method:

[0096] Obtain the externally input power load dataset;

[0097] The power load dataset is divided into multiple least dissimilar data periods based on the time distribution pattern.

[0098] By using a CNN network to extract the spatiotemporal correlations between various features in multiple least dissimilar data periods, the features corresponding to the power load are obtained.

[0099] The features corresponding to the power load are input into a pre-trained Conv-AdaRNN model to predict the power load.

[0100] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0101] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0102] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0103] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0104] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A power load forecasting method based on CNN network and AdaRNN model, characterized by: include: Obtain the externally input power load dataset; The power load dataset is divided into multiple least dissimilar data periods based on the time distribution pattern. By using a CNN network to extract the spatiotemporal correlations between various features in multiple least dissimilar data periods, the features corresponding to the power load are obtained. The features corresponding to the power load are input into a pre-trained Conv-AdaRNN model to predict the power load. Based on the time distribution pattern, the dataset is divided into multiple least dissimilar data periods, and the objective function is: ; ; in, It is a similarity measurement function. , , These are predefined parameters. , Let N be the i-th and j-th time series, and N be the total length of the time series. Let be the length of the i-th time series segment, and K be the total number of the least similar time series; The objective function of the pre-trained Conv-AdaRNN model is: ; in, , Represents the time series of segment i and segment j. These are hyperparameters used to adjust the weights of the two parts. , To represent the learnable model parameters in the model, Let K be the difference in distribution between any two segments in the K-segment sequence. The loss function for the RNN model is... express RNN Learnable model parameters in the model; ; in, express , The distribution weights at time t, Indicates respectively , The hidden state at time t Let V represent any distance function between two vectors, where V is the weight of the output layer, and the hidden states can be calculated using the following formula: ; In the formula, It is the sigmoid function. , These are the weights of the input layer and the hidden layer, respectively. It is the offset vector, and ht-1 is the hidden state at time t-1.

2. The power load forecasting method based on CNN network and AdaRNN model according to claim 1, characterized in that, The externally input power load dataset is data processed for each day within a certain period of time into a data sequence of various features for each half hour of the day and the average power load for each day. These features include temperature, humidity, and electricity price.

3. The power load forecasting method based on CNN network and AdaRNN model according to claim 1, characterized in that, The CNN network includes one-dimensional convolutions, a ReLU activation function, and a max-pooling layer. The ReLU activation function is: ; Where x is a real number; the operation rule of the max pooling layer is: for a The size of the matrix, and the kernel size in each max pooling layer. Find the maximum value in each region and output the maximum value in each region as the most effective information for that region.

4. The power load forecasting method based on CNN network and AdaRNN model according to claim 1, characterized in that, The pre-trained Conv-AdaRNN model is obtained by retraining the pre-trained RNN model by adjusting the loss function with the goal of capturing the distributional importance between RNN units corresponding to two periods of data.

5. The power load forecasting method based on CNN network and AdaRNN model according to claim 4, characterized in that, The pre-trained RNN model uses a loss function Minimize the loss function as the pre-trained objective. for: ; in, , Representing sequences respectively Characteristics and average power load of day i, It is a loss function. Represents the RNN model. This represents the learnable model parameters in an RNN model.

6. A power load forecasting system based on CNN network and AdaRNN model, characterized by: include: Data acquisition module: used to acquire externally input power load datasets; Data partitioning module: used to partition the power load dataset into multiple least dissimilar data periods based on the time distribution pattern; Feature extraction module: used to extract the spatiotemporal correlation between various features in multiple least dissimilar data periods using a CNN network, and obtain the features corresponding to the power load; Power load prediction module: used to input the features corresponding to the power load into the pre-trained Conv-AdaRNN model to predict the power load; Based on the time distribution pattern, the dataset is divided into multiple least dissimilar data periods, and the objective function is: ; ; in, It is a similarity measurement function. , , These are predefined parameters. , Let N be the i-th and j-th time series, and N be the total length of the time series. Let be the length of the i-th time series segment, and K be the total number of the least similar time series; The objective function of the pre-trained Conv-AdaRNN model is: ; in, , Represents the time series of segment i and segment j. These are hyperparameters used to adjust the weights of the two parts. , To represent the learnable model parameters in the model, Let K be the difference in distribution between any two segments in the K-segment sequence. The loss function for the RNN model is... express RNN Learnable model parameters in the model; ; in, express , The distribution weights at time t, Indicates respectively , The hidden state at time t Let V represent any distance function between two vectors, where V is the weight of the output layer, and the hidden states can be calculated using the following formula: ; In the formula, It is the sigmoid function. , These are the weights of the input layer and the hidden layer, respectively. It is the offset vector, and ht-1 is the hidden state at time t-1.

7. A power load forecasting device based on CNN network and AdaRNN model, characterized in that, Including processor and storage media; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method according to any one of claims 1 to 5.