Time-phased electricity consumption curve prediction method based on CNN + LSTM + AM depth model

By using the CNN+LSTM+AM depth model in power load prediction, the characteristics of electricity consumption data are extracted, time series dependencies are captured, and attention mechanisms are introduced, the problem of insufficient accuracy of existing power load prediction technology is solved, and the accurate prediction of the time-division power consumption curve is achieved, and efficient decision-making of power grid enterprises is supported.

CN119807654APending Publication Date: 2025-04-11国家电网有限公司客户服务中心
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411856600.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The existing power load prediction technology is difficult to cope with the complex and changeable demands of the power market, and the time-sector power consumption decomposition method is insufficient to meet the efficient decision-making needs of power grid companies in the power market.

Method used

The deep model based on CNN+LSTM+AM is adopted to extract the characteristics of electricity consumption data through convolutional neural networks, and the bidirectional long-term short-term memory network captures the long-term dependence relationship of time series data, and introduces an attention mechanism to improve the model's attention to key information, thereby achieving accurate prediction of the time-dividing power consumption curve.

Benefits of technology

It significantly improves the accuracy and robustness of the time-division power consumption curve prediction, provides solid data support for power grid companies, helping them make efficient decisions in the power market, optimize resource allocation, and reduce operating costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807654A_ABST
    Figure CN119807654A_ABST
Patent Text Reader

Abstract

The invention relates to a time-phased electricity consumption curve prediction method based on a CNN + LSTM + AM depth model. The prediction method comprises the following steps: data collection and arrangement; extracting features; model training; inputting new data into the trained model, and predicting the electricity consumption in the future time range; according to the method, the convolutional neural network CNN in deep learning is used for feature extraction, the long-term and short-term memory network LSTM is used for capturing the long-term dependency relationship of time sequence data, and the attention mechanism AM is used for enhancing the attention of the model to key information, so that the accurate prediction of the electricity consumption curve is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to digital data processing technology in the electric power field, and in particular to a method for predicting electricity consumption curves by time period based on a CNN+LSTM+AM deep model. Background Art

[0002] With the continuous deepening of electricity market reform, my country has initially established a medium- and long-term, day-ahead and intraday real-time spot trading market system covering regional and provincial levels. Grid companies, as agents of general industrial and commercial users, participate in electricity market transactions and face high standards for real-time electricity settlement and regular monthly electricity purchase forecasts according to market clearing rules.

[0003] In order to expand the spot market construction in an orderly manner and optimize the inter-provincial trading mechanism, the demand for high-precision power load forecasting in power spot market transactions is becoming more and more urgent. However, the traditional load forecasting method is based on statistical analysis of historical data and is difficult to cope with the complexity and variability of power market demand.

[0004] Power load forecasting technology can be divided into two categories: traditional statistical methods and machine learning technology. Traditional statistical methods mainly rely on time series analysis, including multiple linear regression MLR, autoregression AR, autoregression moving average ARMA and other technologies. These methods usually require that the power load data is stable, but in fact, the power load data often shows strong randomness and does not meet the requirements of stability. In order to enhance the accuracy of the prediction, many studies have begun to apply machine learning technology to power load forecasting.

[0005] For example, Lin Fang et al. used the K-nearest neighbor (KNN) algorithm to predict short-term power load, effectively improving the accuracy and speed of prediction; Shi Tian et al. built a bus load prediction model based on a deep belief network. Guo Weilin et al. proposed an improved artificial neural network method for short-term load prediction. Wu Xiaoyu et al. applied the random forest regression algorithm to short-term power load prediction. Zhao Pei et al. used support vector machine (SVM) and combined it with the key factor of real-time electricity price to improve the accuracy of prediction. Shi Jiaqi et al. proposed a stacking ensemble learning method based on multi-model fusion for load prediction.

[0006] Machine learning methods can mine potential patterns from historical load data and have strong nonlinear modeling capabilities, which makes them perform well in dealing with complex, nonlinear problems such as power load.

[0007] Existing load forecasting technologies, such as searching for the same type of day method, similar time series clustering method and deep neural network model method, have their own advantages, but they also have limitations such as strong data dependence, high computational complexity or large training data and resource requirements. At the same time, the time-based electricity consumption decomposition methods, such as simple average distribution or electricity consumption proportion conversion based on typical load curve definite integral, also need to be further optimized to improve the decomposition accuracy.

[0008] In summary, the existing shortcomings of load forecasting and time-based electricity consumption decomposition technology in electricity spot market transactions require a system that integrates multiple forecasting methods and improves forecasting accuracy to meet the urgent needs of electricity market development. Summary of the invention

[0009] The present invention aims to provide an accurate method for predicting the time-based electricity consumption curve in the electricity market; the core goal is to significantly improve the accuracy of the time-based electricity consumption curve prediction in the proxy electricity purchasing process, thereby providing solid data support for the efficient decision-making of power grid companies in the electricity market.

[0010] Model architecture and principles

[0011] Feature extraction: This method first uses the powerful feature extraction capability of convolutional neural network (CNN) to deeply mine the massive historical electricity consumption data of proxy electricity purchasing users. In the convolutional neural network (CNN) structure, the convolution layer applies multiple filters or kernels to the input data, and each filter is responsible for detecting different features of the input data. The convolution operation can be formally expressed as:

[0012] Conv(X,W)=Y

[0013] Among them, X is the input data, W is the filter parameter matrix, and Y is the output feature map. By stacking multiple convolutional layers, the model can extract hierarchical abstract features from the original data. In addition, the pooling layer is used to reduce the spatial size of the feature map, helping to reduce the model complexity and overfitting risk.

[0014] Time series modeling: The extracted feature data is input into the bidirectional long short-term memory network BiLSTM network; the bidirectional long short-term memory network BiLSTM consists of two LSTM networks, one processes the sequence data in chronological order and the other processes it in reverse order, so that the context information of the sequence data can be captured from two directions. The state update equation of the LSTM unit can be expressed as:

[0015] f t =σ(W f ·[h t-1 ,x t ]+b f ),

[0016] i t=σ(W i ·[h t-1 ,x t ]+b i ),

[0017]

[0018] o t =σ(W o ·[h t-1 ,x t ]+b o ),

[0019] h t =o t *tanh(C t ),

[0020] Here, f t ,i t , o t Represent the forget gate, input gate and output gate respectively; and With C t are candidate cell states and cell states respectively; * represents element multiplication; the bidirectional long short-term memory network BiLSTM can more comprehensively understand the dynamic changes of time series data by combining the outputs of forward and reverse LSTM.

[0021] In order to further improve the prediction accuracy, the present invention introduces the attention mechanism AM; the attention mechanism AM allows the model to pay more attention to those parts that have an important impact on the results when predicting. Specifically, the attention weight a ij It can be calculated by the following formula:

[0022] e ij = score(H i ,H j ),

[0023]

[0024] Among them, H i represents the hidden state at the i-th time step, e ij is the unnormalized score, a ij is the normalized attention weight, and c i is the weighted context vector. In this way, the model can focus on the most critical information when making predictions, effectively improving the accuracy and robustness of the predictions.

[0025] The present invention cleverly combines the three technologies and algorithm principles of CNN, BiLSTM and AM to construct an efficient and accurate time-based electricity consumption curve prediction method, which provides strong technical support for agent power purchasers to participate in spot transactions, and also provides strong data guarantee for the scientific decision-making of power grid companies.

[0026] The specific technical solutions are as follows:

[0027] A time-based electricity consumption curve prediction method based on CNN+LSTM+AM deep model includes the following process:

[0028] S100: Data collection and collation; specifically including: collecting electricity consumption history data and historical weather conditions of electricity purchasers; integrating and arranging them according to the required time granularity time series; forming a training data set;

[0029] S200: Feature extraction; specifically including: using a convolutional neural network (CNN) to preprocess and extract features from data, extracting feature information that has an important impact on power consumption prediction from the original data;

[0030] S300: Model training; input the feature data extracted from the training data set in S100 into the bidirectional long short-term memory network BiLSTM for learning; BiLSTM processes data in both forward and backward directions, and can effectively capture the long-term dependencies in time series data; introduces the attention mechanism (AM), which calculates the importance of feature states at different time points and assigns appropriate weights to the feature states at each time point; this method enables the model to pay more attention to those time points that have a greater impact on the change in electricity consumption during the prediction process, thereby reducing noise interference and improving the accuracy and robustness of the prediction;

[0031] S400: Input new data into the trained model to predict the power consumption in the future time range; specific process: the model obtains the future time-divided power consumption curve through forward propagation calculation based on the input feature data.

[0032] Preferably, the electricity consumption history data in S100 includes: daily or hourly electricity consumption and electricity consumption time records; the historical weather conditions include: temperature, humidity, wind speed, and rainfall.

[0033] Preferably, the S100 also includes the following data: holiday information, special event records.

[0034] Preferably, the S100 includes the following specific processes:

[0035] S110: Collecting electricity consumption history data of power purchasing agents from power grid companies or third-party data providers; the data includes: daily or hourly electricity consumption, electricity consumption time records, historical weather conditions, holiday information, and special event records; historical weather conditions include temperature, humidity, wind speed, and rainfall;

[0036] S120: Data information confirmation; Specific process: Ensure that the collected data covers all relevant time periods without omissions; verify the authenticity of data records and exclude erroneous records; ensure the uniformity of data formats and measurement units;

[0037] S130: For missing data, use interpolation, regression analysis or expert estimation to fill in; identify and process abnormal data, and eliminate or replace them;

[0038] S140: judging the day of the year, the day of the week, and whether it is a weekend according to the time column of the data, and converting it into a virtual variable one-hot encoding; using sine / cosine transformation for cyclic encoding to encode the periodic time features; thereby better expressing the continuity of time;

[0039] S150: Calculate the average temperature and humidity for each month or year; use seasonal decomposition to extract trend, seasonality and residual components; calculate the mean, variance, skewness, and kurtosis statistical characteristics of temperature, humidity, wind speed, etc.; process the scale and time series shift changes of weather data to facilitate better model learning;

[0040] S160: Integrate and arrange the time series according to the required time granularity.

[0041] Preferably, S160 is followed by the following process:

[0042] S170: The data set is divided into a training set, a validation set, and a test set; the training set is used for model training, the validation set is used for model tuning and verification, and the test set is used for the final evaluation of the model. Further, the data set is divided into 70% training set, 15% validation set, and 15% test set.

[0043] Preferably, in S200, a convolutional neural network (CNN) is used to preprocess and extract features from the sorted data; feature information that has an important impact on electricity consumption prediction is extracted from the original data through the convolution layer and pooling layer operations of the CNN; the feature information includes: changing trends in electricity consumption, periodic laws, and weather influences; the extracted feature data is normalized; and the data is ensured to be within an appropriate range to facilitate subsequent model training and learning.

[0044] Preferably, the S300 includes the following specific processes:

[0045] S310: Input the features extracted from the historical electricity consumption data into the BiLSTM layer;

[0046] S320: The BiLSTM layer processes these feature data in both forward and backward directions, ensuring that the model can understand the temporal dependencies of the data from multiple perspectives. This bidirectional processing helps the model better capture the complex patterns of electricity consumption changes, especially in the presence of seasonal and cyclical changes.

[0047] S330: In order to further improve the prediction performance of the model, the attention mechanism AM is introduced; the attention mechanism calculates the importance of feature states at different time points and assigns appropriate weights to the feature states at each time point.

[0048] Preferably, the prediction results output in S400 include daily or hourly power consumption prediction values, as well as possible power consumption trends and change patterns.

[0049] Preferably, S400 is followed by the following process:

[0050] S500: Use the test set data to verify and evaluate the prediction results of the model; specifically, the following process is included:

[0051] S510: Evaluate the prediction performance of the model by calculating the single-day 96-point load accuracy and cumulative load prediction accuracy indicators;

[0052] S510: Compare the prediction results based on searching for the same type of days, clustering of similar time series, and deep neural network models, and analyze the advantages, disadvantages, and applicability of each method;

[0053] S520: Based on the evaluation results, the model is tuned and improved to improve the accuracy and reliability of the prediction.

[0054] The advantages of this method over the prior art are as follows: The present invention provides an efficient and accurate solution for predicting electricity consumption curves by time period for power purchasing agencies. This technology combines the convolutional neural network CNN in deep learning for feature extraction, the long short-term memory network LSTM to capture the long-term dependencies of time series data, and the attention mechanism AM to enhance the model's attention to key information, thereby achieving accurate prediction of electricity consumption curves. This method is not only suitable for complex electricity market environments, but also can help power purchasing agencies to more accurately grasp future electricity consumption trends, formulate reasonable electricity purchasing strategies, optimize resource allocation, reduce operating costs, and improve economic benefits. This innovative electricity forecasting technology provides strong support for the stable operation and efficient dispatch of the power system, and has important practical application value and promotion prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 This is a model network structure diagram of the present invention.

[0056] Figure 2 It is a flow chart of the steps of the present invention. DETAILED DESCRIPTION

[0057] A time-based electricity consumption curve prediction method based on CNN+LSTM+AM deep model includes the following process:

[0058] S100: Data collection and collation; specifically including: collecting electricity consumption history data and historical weather conditions of electricity purchasers; integrating and arranging them according to the required time granularity time series; forming a training data set; including the following specific processes:

[0059] S110: Collecting electricity consumption history data of power purchasing agents from power grid companies or third-party data providers; the data includes: daily or hourly electricity consumption, electricity consumption time records, historical weather conditions, holiday information, and special event records; historical weather conditions include temperature, humidity, wind speed, and rainfall;

[0060] S120: Data information confirmation; Specific process: Ensure that the collected data covers all relevant time periods without omissions; verify the authenticity of data records and exclude erroneous records; ensure the uniformity of data formats and measurement units;

[0061] S130: For missing data, use interpolation, regression analysis or expert estimation to fill in; identify and process abnormal data, and eliminate or replace them;

[0062] S140: judging the day of the year, the day of the week, and whether it is a weekend according to the time column of the data, and converting it into a virtual variable one-hot encoding; using sine / cosine transformation for cyclic encoding to encode the periodic time features; thereby better expressing the continuity of time;

[0063] S150: Calculate the average temperature and humidity for each month or year; use seasonal decomposition to extract trend, seasonality and residual components; calculate the mean, variance, skewness, and kurtosis statistical characteristics of temperature, humidity, wind speed, etc.; process the scale and time series shift changes of weather data to facilitate better model learning;

[0064] S160: Integrate and arrange the time series according to the required time granularity;

[0065] S170: The data set is divided into 70% training set, 15% validation set, and 15% test set; the training set is used for model training, the validation set is used for model tuning and verification, and the test set is used for the final evaluation of the model;

[0066] S200: Feature extraction; specifically including: using convolutional neural network (CNN) to preprocess and extract features from the sorted data; extracting feature information that has an important impact on power consumption prediction from the original data through the convolution layer and pooling layer operations of CNN; the feature information includes: the change trend of power consumption, periodicity, and weather influence; normalizing the extracted feature data; ensuring that the data is within a suitable range to facilitate the training and learning of subsequent models;

[0067] S300: Model training; specifically includes:

[0068] S310: inputting the characteristic data such as power consumption, temperature, humidity, holidays, etc. extracted from the training data set in S100 into the bidirectional long short-term memory network BiLSTM for learning;

[0069] S320: The BiLSTM layer processes these feature data in both forward and backward directions, ensuring that the model can understand the temporal dependencies of the data from multiple perspectives. This bidirectional processing helps the model better capture the complex patterns of electricity consumption changes, especially in the presence of seasonal and cyclical changes.

[0070] S330: In order to further improve the prediction performance of the model, the attention mechanism AM is introduced; the attention mechanism calculates the importance of feature states at different time points and assigns appropriate weights to the feature states at each time point.

[0071] This method enables the model to pay more attention to those time points that have a greater impact on the change in electricity consumption during the prediction process, thereby reducing noise interference and improving the accuracy and robustness of the prediction. In the specific implementation process, AM will dynamically adjust the weight of the feature state at each time point based on the performance of the feature data at different time points. In this way, the model can more flexibly respond to the uncertainty of electricity consumption changes, especially when facing sudden events or abnormal data, and can maintain a high prediction accuracy.

[0072] By combining BiLSTM and AM, the model of the present invention can not only effectively capture the long-term dependencies in time series data, but also dynamically adjust the feature weights through the attention mechanism, thereby significantly improving the prediction accuracy of the time-divided electricity consumption curve. This provides reliable data support for proxy power purchases to participate in spot transactions, helps optimize power resource allocation, and reduces transaction risks.

[0073] S400: Input new data into the trained model to predict the power consumption in the future time range; Specific process: The model obtains the future time-divided power consumption curve through forward propagation calculation based on the input feature data;

[0074] S500: Use the test set data to verify and evaluate the prediction results of the model; specifically, the following process is included:

[0075] S510: Evaluate the prediction performance of the model by calculating the single-day 96-point load accuracy and cumulative load prediction accuracy indicators;

[0076] S510: Compare the prediction results based on searching for the same type of days, clustering of similar time series, and deep neural network models, and analyze the advantages, disadvantages, and applicability of each method;

[0077] S520: Based on the evaluation results, the model is tuned and improved to improve the accuracy and reliability of the prediction.

[0078] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A time-based electricity consumption curve prediction method based on CNN+LSTM+AM deep model, characterized in that: The process includes the following: S100: Data collection and collation; specifically including: collecting electricity consumption history data and historical weather conditions of electricity purchasers; integrating and arranging them according to the required time granularity time series; forming a training data set; S200: Feature extraction; specifically including: using a convolutional neural network (CNN) to preprocess and extract features from data, extracting feature information that has an important impact on power consumption prediction from the original data; S300: Model training; input the feature data extracted from the training data set in S100 into the bidirectional long short-term memory network BiLSTM for learning; BiLSTM processes data in both forward and backward directions, and can effectively capture the long-term dependencies in time series data; introduces the attention mechanism (AM), which calculates the importance of feature states at different time points and assigns appropriate weights to the feature states at each time point; S400: Input new data into the trained model to predict the power consumption in the future time range; specific process: the model obtains the future time-divided power consumption curve through forward propagation calculation based on the input feature data.

2. According to claim 1, a method for predicting power consumption curve by time period based on CNN+LSTM+AM deep model is characterized in that: The electricity consumption history data in S100 includes: daily or hourly electricity consumption and electricity consumption time records; the historical weather conditions include: temperature, humidity, wind speed, and rainfall.

3. According to claim 2, a method for predicting power consumption curve by time period based on CNN+LSTM+AM deep model is characterized in that: The S100 also includes the following data: holiday information, special event records.

4. According to claim 1, a method for predicting electricity consumption curve by time period based on CNN+LSTM+AM deep model is characterized in that: The S100 includes the following specific processes: S110: Collecting electricity consumption history data of power purchasing agents from power grid companies or third-party data providers; the data includes: daily or hourly electricity consumption, electricity consumption time records, historical weather conditions, holiday information, and special event records; historical weather conditions include temperature, humidity, wind speed, and rainfall; S120: Data information confirmation; Specific process: Ensure that the collected data covers all relevant time periods without omissions; verify the authenticity of data records and exclude erroneous records; ensure the uniformity of data formats and measurement units; S130: For missing data, use interpolation, regression analysis or expert estimation to fill in; identify and process abnormal data, and eliminate or replace them; S140: Determine the day of the year, the day of the week, and whether it is a weekend based on the time column of the data, and convert it into a virtual variable one-hot encoding; use sine / cosine transform for cyclic encoding to encode periodic time features; S150: Calculate the average temperature and humidity for each month or year; use seasonal decomposition to extract trend, seasonality and residual components; calculate the mean, variance, skewness and kurtosis statistical characteristics of temperature, humidity and wind speed; process the scale and time series shift changes of weather data; S160: Integrate and arrange the time series according to the required time granularity.

5. According to claim 4, a method for predicting power consumption curve by time period based on CNN+LSTM+AM deep model is characterized in that: The following process follows after S160: S170: The data set is divided into a training set, a validation set, and a test set; the training set is used for model training, the validation set is used for model tuning and verification, and the test set is used for the final evaluation of the model.

6. According to claim 5, a method for predicting power consumption curve by time period based on CNN+LSTM+AM deep model is characterized in that: The dataset is divided into 70% training set, 15% validation set and 15% test set.

7. According to claim 1, a method for predicting power consumption curve by time period based on CNN+LSTM+AM deep model, characterized in that: In S200, a convolutional neural network (CNN) is used to preprocess and extract features from the sorted data; feature information having an important impact on power consumption prediction is extracted from the original data through the convolution layer and pooling layer operations of the CNN; The characteristic information includes: the changing trend of electricity consumption, periodic laws, and weather influence; the extracted characteristic data is normalized.

8. According to claim 1, a method for predicting power consumption curve by time period based on CNN+LSTM+AM deep model, characterized in that: The S300 includes the following specific processes: S310: Input the features extracted from the historical electricity consumption data into the BiLSTM layer; S320: The BiLSTM layer processes these feature data in both forward and backward directions, ensuring that the model can understand the temporal dependency of the data from multiple perspectives; S330: Introduced the Attention Mechanism (AM); AM calculates the importance of feature states at different time points and assigns appropriate weights to the feature states at each time point.

9. According to claim 1, a method for predicting power consumption curve by time period based on CNN+LSTM+AM deep model, characterized in that: The prediction results are output in S400, including daily or hourly power consumption prediction values, as well as possible power consumption trends and change patterns.

10. According to claim 5, a method for predicting power consumption curve by time period based on CNN+LSTM+AM deep model is characterized in that: The S400 is followed by the following process: S500: Use the test set data to verify and evaluate the prediction results of the model; specifically, the following process is included: S510: Evaluate the prediction performance of the model by calculating the single-day 96-point load accuracy and cumulative load prediction accuracy indicators; S510: Compare the prediction results based on searching for the same type of days, clustering of similar time series, and deep neural network models, and analyze the advantages, disadvantages, and applicability of each method; S520: Tune and improve the model based on the evaluation results.

Citation Information

Cited By

  • Power supply scheduling method and system for self-service car washer

    CN120410043A

  • A power supply scheduling method and system for a self-service car washing machine

    CN120410043B

  • Enterprise-oriented multi-user electric quantity prediction method

    CN120851942A