A residential electricity load prediction method based on IHPC data
Patent Information
- Application Number
- CN202410275210.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-12
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2044-03-12
AI Technical Summary
[0005]为解决现有技术在居民电力负荷预测任务上存在的数据不平衡、数据噪声、模型过拟合和参数选择问题,本发明的目的在于提供一种能够获取更为精确和可靠的预测效果,在保证预测效果的同时也能结合具体应用任务实现多步预测,从而提高执行效率的基于IHPC数据的居民用电负载预测方法
[0050] As can be seen from the above technical solution, the beneficial effects of the present invention are as follows: First, the present invention uses variational mode decomposition to decompose the predicted sequence, thereby reducing the complexity of the original sequence pattern and improving the prediction accuracy. Through reconstruction operations, the data dimensionality is reduced, and model convergence is accelerated, resulting in a shorter prediction time while obtaining a more accurate pattern. Second, the embedding operation of the present invention gives the sequence better temporal properties, making model learning more accurate and improving model prediction accuracy. Third, the present invention fully considers the properties and advantages of various deep learning networks and proposes convolutional recurrent attention blocks by combining and connecting them, which can better achieve data learning and improve accuracy. Fourth, the introduction of the mature multi-head self-attention mechanism in the current deep learning field effectively solves the long-term dependency problem in power load prediction.
Smart Images

Figure CN118013202B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power load forecasting technology, and in particular to a method for forecasting residential power load based on IHPC data. Background Technology
[0002] Electricity is a vital energy source in modern society, impacting almost everyone's life and work. It is not only a crucial infrastructure for driving economic development but also a vital support for ensuring quality of life and safety.
[0003] In the field of load forecasting, there are currently various methods for predicting system load, including time series analysis, machine learning algorithms, cluster analysis, and hybrid methods. Time series analysis is a classic load forecasting method that predicts future load by analyzing patterns and trends in historical load data. However, time series methods perform poorly with nonlinear, non-stationary, or seasonal data. Machine learning algorithms, including linear regression, support vector machines, and neural network machine learning algorithms, are widely used in load forecasting. These algorithms can better capture the complex relationships between data, but they require a large amount of data for training and are sensitive to hyperparameters, requiring careful tuning. Cluster analysis methods can group similar load patterns into one category and make load forecasts based on categories, but they are difficult to handle high-dimensional data or are sensitive to noisy data. Hybrid methods combine multiple techniques, such as combining time series analysis with machine learning algorithms, using ensemble learning methods to improve the accuracy and robustness of load forecasting.
[0004] While the above methods have some effectiveness in load forecasting, they still have some potential drawbacks: Data imbalance: Load data can be imbalanced, meaning that some categories have less data or smaller load fluctuations, leading to biases in model training; Data noise: Load data is often affected by various factors, including outliers, missing values, and noisy data, which can impact model performance; Model overfitting: Some complex models perform well on training data but poorly on new data, resulting in overfitting; Difficult parameter selection: Some methods require extensive parameter setting and tuning, and improper parameter selection can affect the accuracy of load forecasting. Summary of the Invention
[0005] To address the issues of data imbalance, data noise, model overfitting, and parameter selection in existing technologies for residential electricity load forecasting, the present invention aims to provide a residential electricity load forecasting method based on IHPC data that can achieve more accurate and reliable forecasting results, while also enabling multi-step forecasting in conjunction with specific application tasks to improve execution efficiency.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a residential electricity load forecasting method based on IHPC data, the method comprising the following sequential steps:
[0007] (1) Obtain the original data to form a residential user electricity consumption dataset, perform statistical feature analysis, process missing values and correct outliers in the original data to obtain preprocessed residential user electricity consumption data;
[0008] (2) Based on the preprocessed residential user electricity consumption data, the variational mode decomposition method is used to decompose the load to be predicted into multiple intrinsic mode functions. All intrinsic mode functions are reconstructed according to different frequencies. The reconstructed modes are incorporated into the preprocessed residential user electricity consumption data for feature enhancement to obtain enhanced residential user electricity consumption data.
[0009] (3) Divide the enhanced residential user electricity consumption data into training set, test set and validation set in a ratio of 4:4:2;
[0010] (4) Embedding processing is performed on the training set, test set and validation set to obtain the embedded data; the embedding processing includes location embedding processing and date embedding processing.
[0011] (5) Construct a residential electricity load prediction model, input the embedded data into the residential electricity load prediction model, train the residential electricity load prediction model, adjust and optimize the model parameters to obtain the final residential electricity load prediction model, evaluate the final residential electricity load prediction model, input the data to be predicted into the final residential electricity load prediction model, and output the prediction results.
[0012] Step (1) specifically includes the following steps:
[0013] (1a) Download residential user electricity consumption data as raw data and form a residential user electricity consumption dataset;
[0014] (1b) Perform statistical feature analysis on the original data, the statistical features including median, maximum value, minimum value, peak value and interquartile range, process the missing values of the original data, fill the missing values according to the method of filling the missing values at the same time of the previous day, and find outliers according to the 3sigma principle and correct them to obtain the preprocessed residential user electricity consumption data.
[0015] Step (2) specifically includes the following steps:
[0016] (2a) Use the active power in the original data as the input of the variational mode decomposition method;
[0017] (2b) Set the number of iterations and regularization parameters for the variational mode decomposition method;
[0018] (2c) Create an initial random noise mode and generate a random noise sequence of the same length as the original data;
[0019] (2d) Iterative optimization is performed, including:
[0020] (2d1) Establish the Hilbert transform of the data: Perform the Hilbert transform on the original data and random noise modes to obtain the analytic signal in complex form;
[0021] (2d2) Calculate the frequency boundary: Determine the frequency boundary based on the center frequency and bandwidth of each mode;
[0022] (2d3) Modal component update: The noisy modes are updated by minimizing the cost function of the constraints to make them approximate the original data;
[0023] (2d4) Regularization term update: Use regularization parameters to update the noisy modes and balance the energy distribution between modes;
[0024] (2d5) Update center frequency and bandwidth: Recalculate the center frequency and bandwidth of each mode based on the updated noise modes;
[0025] (2d6) Determine the termination condition: If the set number of iterations is reached or the change in the noise mode is lower than the set threshold, then stop the iteration;
[0026] (2e) Obtain multiple intrinsic mode functions of the load to be predicted after processing by the variational mode decomposition method. Reconstruct the decomposed intrinsic mode functions and incorporate them into the preprocessed residential user electricity consumption data for feature enhancement to obtain the enhanced residential user electricity consumption data.
[0027] Step (3) specifically includes the following steps:
[0028] (3a) The enhanced residential electricity consumption data will be resampled in hours as the basic unit;
[0029] (3b) Divide the resampled data into training set, validation set and test set in a ratio of 4:4:2.
[0030] Step (4) specifically includes the following steps:
[0031] (4a) Perform position embedding processing:
[0032] Create a location encoding matrix: For each location i and each dimension j, compute a location encoding value PE(i,j);
[0033] For positional encoding in even-dimensional dimensions, where j is even, the sine function is used for calculation:
[0034] PE(i,j)=sin(i / 10000^(2j / dmodel))
[0035] For positional encoding in odd-dimensional dimensions, where j is odd, the cosine function is used for calculation:
[0036] PE(i,j)=cos(i / 10000^(2j / dmodel))
[0037] In the formula, dmodel represents the model complexity;
[0038] Merge the positional encoding, training set, test set, and validation set: Add the positional encoding value to the training set, test set, and validation set to obtain the positional embedding vector;
[0039] (4b) Date embedding processing: Extract the time series features of the training set, test set and validation set, including the month of the year, the day of the month, the hour of the day, and whether it is a holiday. Add the extracted time series features to the training set, test set and validation set to obtain the date embedding vector.
[0040] The location embedding vector and the date embedding vector together form the embedded data.
[0041] Step (5) specifically includes the following steps:
[0042] (5a) Constructing a convolutional recurrent attention block: Stacking a one-dimensional convolutional neural network, a two-dimensional convolutional neural network, a long short-term memory neural network, and a multi-head self-attention mechanism layer to form a convolutional recurrent attention block;
[0043] One-dimensional convolutional neural networks are used to extract different information implied by a single feature, mapping the dimension from low dimension to high dimension to capture more information.
[0044] Two-dimensional convolutional neural networks are used to extract spatiotemporal information from different dimensions and times of input, and to extract the mutual influence relationships between different variables.
[0045] Long Short-Term Memory (LSTM) neural networks are used to extract the dependencies between input sequences.
[0046] Multi-head attention layer is used to extract long-term dependencies in the input sequence;
[0047] (5b) Construct an end-to-end framework network, which includes an encoder and a decoder, both of which are composed of multiple convolutional recurrent attention blocks stacked together.
[0048] (5c) Use a fully connected layer to connect the output of the decoder to reduce the dimensionality to fit the output dimension; the convolutional recurrent attention block, the end-to-end framework network and the fully connected layer together form the residential electricity load prediction model.
[0049] (5d) Input the embedded data into the residential electricity load prediction model, train the neural network model, continuously adjust the model parameters using the gradient descent algorithm and Adam optimizer, continuously optimize the model according to the loss function, and obtain the final residential electricity load prediction model. Evaluate the final residential electricity load prediction model by comparing the prediction results with those of random forest, gradient ascending tree, convolutional neural network and long short-term memory network. Input the data to be predicted into the final residential electricity load prediction model and output the prediction results.
[0050] As can be seen from the above technical solution, the beneficial effects of the present invention are as follows: First, the present invention uses variational mode decomposition to decompose the predicted sequence, thereby reducing the complexity of the original sequence pattern and improving the prediction accuracy. Through reconstruction operations, the data dimensionality is reduced, and model convergence is accelerated, resulting in a shorter prediction time while obtaining a more accurate pattern. Second, the embedding operation of the present invention gives the sequence better temporal properties, making model learning more accurate and improving model prediction accuracy. Third, the present invention fully considers the properties and advantages of various deep learning networks and proposes convolutional recurrent attention blocks by combining and connecting them, which can better achieve data learning and improve accuracy. Fourth, the introduction of the mature multi-head self-attention mechanism in the current deep learning field effectively solves the long-term dependency problem in power load prediction. Attached Figure Description
[0051] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0052] like Figure 1 As shown, a residential electricity load forecasting method based on IHPC data includes the following sequential steps:
[0053] (1) Obtain the original data to form a residential user electricity consumption dataset, perform statistical feature analysis, process missing values and correct outliers in the original data to obtain preprocessed residential user electricity consumption data;
[0054] (2) Based on the preprocessed residential user electricity consumption data, the variational mode decomposition method is used to decompose the load to be predicted into multiple intrinsic mode functions. All intrinsic mode functions are reconstructed according to different frequencies. The reconstructed modes are incorporated into the preprocessed residential user electricity consumption data for feature enhancement to obtain enhanced residential user electricity consumption data.
[0055] (3) Divide the enhanced residential user electricity consumption data into training set, test set and validation set in a ratio of 4:4:2;
[0056] (4) Embedding processing is performed on the training set, test set and validation set to obtain the embedded data; the embedding processing includes location embedding processing and date embedding processing.
[0057] (5) Construct a residential electricity load prediction model, input the embedded data into the residential electricity load prediction model, train the residential electricity load prediction model, adjust and optimize the model parameters to obtain the final residential electricity load prediction model, evaluate the final residential electricity load prediction model, input the data to be predicted into the final residential electricity load prediction model, and output the prediction results. Here, IHPC data refers to residential user electricity consumption data.
[0058] Step (1) specifically includes the following steps:
[0059] (1a) Download residential electricity consumption data from the University of California, Irvine Machine Learning Repository as raw data and assemble it into a residential electricity consumption dataset.
[0060] (1b) Perform statistical feature analysis on the raw data, including median, maximum, minimum, peak, and interquartile range. Handle missing values by imputing them using the same method as the previous day at the same time. Then, identify and correct outliers using the 3 Sigma principle to obtain preprocessed residential electricity consumption data. Calculate the mean and standard deviation of the data. The mean represents the average level of the data, and the standard deviation represents the degree of variation. Define outliers as data points located outside the mean plus or minus three times the standard deviation. If a data point's value exceeds the range of the mean ± three times the standard deviation, it is considered an outlier. Compare the data sample with the calculated threshold, identify data points exceeding the threshold (i.e., outliers), correct them, and replace the original data with the threshold.
[0061] Step (2) specifically includes the following steps:
[0062] (2a) Use the active power in the original data as the input of the variational mode decomposition method;
[0063] (2b) Set the number of iterations and regularization parameters for the variational mode decomposition method; set the number of iterations for the variational mode decomposition method to 50, the number of decomposed modes to 6, the regularization parameter to 0.5, and use the iterative threshold algorithm as the optimization algorithm for decomposition;
[0064] (2c) Create an initial random noise mode and generate a random noise sequence of the same length as the original data;
[0065] (2d) Iterative optimization is performed, optimizing the mode decomposition results through multiple iterations to better fit the original data. Iterative optimization includes:
[0066] (2d1) Establish the Hilbert transform of the data: Perform the Hilbert transform on the original data and random noise modes to obtain the analytic signal in complex form;
[0067] (2d2) Calculate the frequency boundary: Determine the frequency boundary based on the center frequency and bandwidth of each mode;
[0068] (2d3) Modal component update: The noisy modes are updated by minimizing the cost function of the constraints to make them approximate the original data;
[0069] (2d4) Regularization term update: Use regularization parameters to update the noisy modes and balance the energy distribution between modes;
[0070] (2d5) Update center frequency and bandwidth: Recalculate the center frequency and bandwidth of each mode based on the updated noise modes;
[0071] (2d6) Determine the termination condition: If the set number of iterations is reached or the change in the noise mode is lower than the set threshold, then stop the iteration;
[0072] (2e) Obtain multiple intrinsic mode functions of the load to be predicted after processing by the variational mode decomposition method. Reconstruct the decomposed intrinsic mode functions and incorporate them into the preprocessed residential user electricity consumption data for feature enhancement to obtain the enhanced residential user electricity consumption data.
[0073] Step (3) specifically includes the following steps:
[0074] (3a) The enhanced residential electricity consumption data is resampled in hours as the basic unit, and the original data is resampled from minutes to hours using a resampling function;
[0075] (3b) Divide the resampled data into training set, validation set and test set in a ratio of 4:4:2.
[0076] Step (4) specifically includes the following steps:
[0077] (4a) Perform position embedding processing:
[0078] Create a location encoding matrix: For each location i and each dimension j, compute a location encoding value PE(i,j);
[0079] For positional encoding in even-dimensional dimensions, where j is even, the sine function is used for calculation:
[0080] PE(i,j)=sin(i / 10000^(2j / dmodel))
[0081] For positional encoding in odd-dimensional dimensions, where j is odd, the cosine function is used for calculation:
[0082] PE(i,j)=cos(i / 10000^(2j / dmodel))
[0083] In the formula, dmodel represents the model complexity;
[0084] Merge the positional encoding, training set, test set, and validation set: Add the positional encoding value to the training set, test set, and validation set to obtain the positional embedding vector;
[0085] (4b) Perform date embedding processing. The goal of date embedding is to extract useful features from date information to help the model better understand the periodicity and trends in time series data.
[0086] The time-series features of the training, test, and validation sets are extracted, including the month of the year, the day of the month, the hour of the day, and whether it is a holiday. The extracted time-series features are then added to the training, test, and validation sets to obtain the date embedding vector. This allows date information to be integrated with the original input features, enabling the model to more comprehensively consider the impact of time and better predict the future trend of time series data.
[0087] The location embedding vector and the date embedding vector together form the embedded data.
[0088] Step (5) specifically includes the following steps:
[0089] (5a) Constructing a convolutional recurrent attention block: Stacking a one-dimensional convolutional neural network, a two-dimensional convolutional neural network, a long short-term memory neural network, and a multi-head self-attention mechanism layer to form a convolutional recurrent attention block;
[0090] One-dimensional convolutional neural networks are used to extract different information implied by a single feature, mapping the dimension from low dimension to high dimension to capture more information.
[0091] Two-dimensional convolutional neural networks are used to extract spatiotemporal information from different dimensions and times of input, and to extract the mutual influence relationships between different variables.
[0092] Long Short-Term Memory (LSTM) neural networks are used to extract the dependencies between input sequences.
[0093] Multi-head attention layer is used to extract long-term dependencies in the input sequence;
[0094] (5b) Construct an end-to-end framework network, which includes an encoder and a decoder, both of which are composed of multiple convolutional recurrent attention blocks stacked together.
[0095] (5c) Use a fully connected layer to connect the output of the decoder to reduce the dimensionality to fit the output dimension; the convolutional recurrent attention block, the end-to-end framework network and the fully connected layer together form the residential electricity load prediction model.
[0096] (5d) Input the embedded data into the residential electricity load prediction model, train the neural network model, continuously adjust the model parameters using the gradient descent algorithm and Adam optimizer, continuously optimize the model according to the loss function, and obtain the final residential electricity load prediction model. Evaluate the final residential electricity load prediction model by comparing the prediction results with those of random forest, gradient ascending tree, convolutional neural network and long short-term memory network. Input the data to be predicted into the final residential electricity load prediction model and output the prediction results.
[0097] Set the hyperparameters for the training process as follows: batch size 256, model complexity 512, fully connected network complexity 1024, learning rate of Adam optimizer 0.001, training iterations 10; and loss function MSE.
[0098] The effects of the present invention will be further explained below with reference to simulation experiments.
[0099] The computer hardware environment used in the experiments of this invention was Google Labs. To verify the effectiveness of this invention, random forest, gradient ascending tree, LSTM network, end-to-end frame network, and variational mode decomposition-end-to-end network were introduced for comparison. This invention used four popular metrics—mean absolute error, mean squared error, root mean square error, and correlation coefficient—to evaluate the performance of the proposed model.
[0100] Simulation experiment content and result analysis:
[0101] The final residential electricity load prediction model, VCALS2S, is a deep learning model that combines variational mode decomposition, convolutional neural networks, long short-term memory networks, and attention mechanisms. Compared to traditional machine learning models such as random forests and gradient boosting trees, as well as single deep learning models such as LSTM, the VCALS2S model has the following advantages:
[0102] The VCALS2S model combines variational mode decomposition, convolutional neural networks (CNNs), and LSTMs to extract richer and more abstract features from time-series data. Variational mode decomposition effectively breaks down the original signal into multiple intrinsic mode functions, CNNs capture local features, and LSTMs capture long-term dependencies in the time series. This combination of feature extraction techniques enables the model to better understand the complex structure of time-series data.
[0103] The attention mechanism in the VCALS2S model adaptively adjusts the model's focus on different time steps, thus more effectively utilizing historical information for prediction. In contrast, traditional machine learning models such as random forests and gradient ascending trees often fail to adaptively learn dynamic features in time series data. The VCALS2S model is an end-to-end deep learning model that can directly learn features and the model from the raw data. In contrast, traditional machine learning models such as random forests and gradient ascending trees require manual feature selection and engineering, while single deep learning models such as LSTM may not fully utilize local features in time series data.
[0104] The VCALS2S model possesses greater expressive power and is better able to adapt to complex time series patterns and structures. In contrast, traditional machine learning models such as random forests and gradient ascending trees are often limited by their fixed function forms, while single deep learning models such as long short-term memory networks may not be able to capture the nonlinearity and non-stationarity in time series data well. In summary, the VCALS2S model, compared to traditional machine learning models and single deep learning models, has stronger feature extraction capabilities, adaptive learning capabilities, end-to-end learning capabilities, and model expressive power, thus enabling it to better address time series prediction problems.
[0105] By observing the results of four network tests, the network prediction results of the VCALS2S model are quite close to the real data.
[0106] In summary, this invention can more accurately predict residential electricity load. By decomposing complex electricity load models and capturing long-term and spatial-temporal dependencies, it achieves better results in terms of accuracy and efficiency. This invention addresses the current challenges of deep learning in electricity load prediction and innovates by effectively combining convolutional neural networks, recurrent neural networks, embedding operations, domain knowledge of signal decomposition, and attention mechanisms. It proposes a convolutional recurrent attention block module, which has good scalability and high intensity of complex pattern extraction. After integration into an end-to-end framework network, it forms the VCALS2S model. Verification shows that the residential electricity load prediction results obtained by this invention are superior to the compared prediction algorithms in terms of evaluation metrics.
[0107] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.
Claims
1. A method for predicting residential electricity load based on IHPC data, characterized in that: The method includes the following steps in sequence: (1) Obtain the original data to form a residential user electricity consumption dataset, perform statistical feature analysis, process missing values and correct outliers in the original data to obtain preprocessed residential user electricity consumption data; (2) Based on the preprocessed residential user electricity consumption data, the variational mode decomposition method is used to decompose the load to be predicted into multiple intrinsic mode functions. All intrinsic mode functions are reconstructed according to different frequencies. The reconstructed modes are incorporated into the preprocessed residential user electricity consumption data for feature enhancement to obtain enhanced residential user electricity consumption data. (3) Divide the enhanced residential user electricity consumption data into training set, test set and validation set in a ratio of 4:4:2; (4) Embedding processing is performed on the training set, test set and validation set to obtain the embedded data; the embedding processing includes location embedding processing and date embedding processing. (5) Construct a residential electricity load prediction model, input the embedded data into the residential electricity load prediction model, train the residential electricity load prediction model, adjust and optimize the model parameters to obtain the final residential electricity load prediction model, evaluate the final residential electricity load prediction model, input the data to be predicted into the final residential electricity load prediction model, and output the prediction results.
2. The residential electricity load forecasting method based on IHPC data according to claim 1, characterized in that: Step (1) specifically includes the following steps: (1a) Download residential user electricity consumption data as raw data and form a residential user electricity consumption dataset; (1b) Perform statistical feature analysis on the original data, the statistical features including median, maximum value, minimum value, peak value and interquartile range, process the missing values of the original data, fill the missing values according to the method of filling the missing values at the same time of the previous day, and find outliers according to the 3sigma principle and correct them to obtain the preprocessed residential user electricity consumption data.
3. The residential electricity load forecasting method based on IHPC data according to claim 1, characterized in that: Step (2) specifically includes the following steps: (2a) Use the active power in the original data as the input of the variational mode decomposition method; (2b) Set the number of iterations and regularization parameters for the variational mode decomposition method; (2c) Create an initial random noise mode and generate a random noise sequence of the same length as the original data; (2d) Iterative optimization is performed, including: (2d1) Establish the Hilbert transform of the data: Perform the Hilbert transform on the original data and random noise modes to obtain the analytic signal in complex form; (2d2) Calculate the frequency boundary: Determine the frequency boundary based on the center frequency and bandwidth of each mode; (2d3) Modal component update: The noisy modes are updated by minimizing the cost function of the constraints to make them approximate the original data; (2d4) Regularization term update: Use regularization parameters to update the noisy modes and balance the energy distribution between modes; (2d5) Update center frequency and bandwidth: Recalculate the center frequency and bandwidth of each mode based on the updated noise modes; (2d6) Determine the termination condition: If the set number of iterations is reached or the change in the noise mode is lower than the set threshold, then stop the iteration; (2e) Obtain multiple intrinsic mode functions of the load to be predicted after processing by the variational mode decomposition method. Reconstruct the decomposed intrinsic mode functions and incorporate them into the preprocessed residential user electricity consumption data for feature enhancement to obtain the enhanced residential user electricity consumption data.
4. The residential electricity load forecasting method based on IHPC data according to claim 1, characterized in that: Step (3) specifically includes the following steps: (3a) The enhanced residential electricity consumption data will be resampled in hours as the basic unit; (3b) Divide the resampled data into training set, validation set and test set in a ratio of 4:4:
2.
5. The residential electricity load forecasting method based on IHPC data according to claim 1, characterized in that: Step (4) specifically includes the following steps: (4a) Perform position embedding processing: Create a location encoding matrix: For each location i and each dimension j, compute a location encoding value PE(i,j); For positional encoding in even-dimensional dimensions, where j is even, the sine function is used for calculation: PE(i,j)=sin(i / 10000^(2j / dmodel)) For positional encoding in odd-dimensional dimensions, where j is odd, the cosine function is used for calculation: PE(i,j)=cos(i / 10000^(2j / dmodel)) In the formula, dmodel represents the model complexity; Merge the positional encoding, training set, test set, and validation set: Add the positional encoding value to the training set, test set, and validation set to obtain the positional embedding vector; (4b) Date embedding processing: Extract the time series features of the training set, test set and validation set, including the month of the year, the day of the month, the hour of the day, and whether it is a holiday. Add the extracted time series features to the training set, test set and validation set to obtain the date embedding vector. The location embedding vector and the date embedding vector together form the embedded data.
6. The residential electricity load forecasting method based on IHPC data according to claim 1, characterized in that: Step (5) specifically includes the following steps: (5a) Constructing a convolutional recurrent attention block: Stacking a one-dimensional convolutional neural network, a two-dimensional convolutional neural network, a long short-term memory neural network, and a multi-head self-attention mechanism layer to form a convolutional recurrent attention block; One-dimensional convolutional neural networks are used to extract different information implied by a single feature, mapping the dimension from low dimension to high dimension to capture more information. Two-dimensional convolutional neural networks are used to extract spatiotemporal information from different dimensions and times of input, and to extract the mutual influence relationships between different variables. Long Short-Term Memory (LSTM) neural networks are used to extract the dependencies between input sequences. Multi-head attention layer is used to extract long-term dependencies in the input sequence; (5b) Construct an end-to-end framework network, which includes an encoder and a decoder, both of which are composed of multiple convolutional recurrent attention blocks stacked together. (5c) Use a fully connected layer to connect the output of the decoder to reduce the dimensionality to fit the output dimension; the convolutional recurrent attention block, the end-to-end framework network and the fully connected layer together form the residential electricity load prediction model. (5d) Input the embedded data into the residential electricity load prediction model, train the neural network model, continuously adjust the model parameters using the gradient descent algorithm and Adam optimizer, continuously optimize the model according to the loss function, and obtain the final residential electricity load prediction model. Evaluate the final residential electricity load prediction model by comparing the prediction results with those of random forest, gradient ascending tree, convolutional neural network and long short-term memory network. Input the data to be predicted into the final residential electricity load prediction model and output the prediction results.
Citation Information
Patent Citations
Self-adaptive residential user load prediction method
CN113869616A
Long-term power load prediction method based on automatic variational mode decomposition and time-frequency domain feedforward neural network
CN117410985A