A power demand load quantity prediction method based on multi-feature fusion coding

By combining multi-feature fusion encoding and attention modules, the problem of neglecting the correlation between date and weather in existing technologies is solved, enabling high-precision prediction of enterprise electricity consumption and improving the accuracy and stability of prediction.

CN116308487BActive Publication Date: 2025-11-21LIAONING ELECTRIC POWER DEV GRP CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310259547.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-17
Publication Date
2025-11-21
Estimated Expiration
2043-03-17

AI Technical Summary

Technical Problem

Existing electricity demand load forecasting methods neglect the inherent relationships between influencing factors when dealing with enterprise electricity consumption, especially the correlation between date and weather, resulting in insufficient forecast accuracy and robustness.

Method used

A multi-feature fusion coding method is adopted. The important time parameters of weekday and month that affect the electricity consumption of enterprises are processed by embedding encoding. Attention modules for month and weather are added to the neural network. LSTM is used to extract time series information and multilayer perceptron is combined for decoding to generate accurate electricity consumption prediction.

Benefits of technology

It improves the accuracy and robustness of daily electricity consumption forecasts for enterprises, fully explores the inherent relationship between date and weather, and enhances forecast precision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116308487B_ABST
    Figure CN116308487B_ABST
Patent Text Reader

Abstract

The application provides a power demand load quantity prediction method based on multi-feature fusion coding, and relates to the technical field of enterprise power consumption.The application improves the defect that the previous power consumption prediction method often ignores the strong correlation between date and weather, uses three different structure sub-coders to fuse and code multiple features, embeds the important time parameters week and month which affect enterprise power consumption, uses an LSTM module to extract time sequence information from the past power load demand sequence, simultaneously uses a month information to adaptively extract month-related features from weather parameters by using an attention module, fully excavates the correlation between different factors, and realizes accurate prediction of enterprise daily power consumption by a deep learning regression model.The application has higher accuracy and robustness in predicting enterprise daily power consumption compared with the previous method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of enterprise electricity technology, and in particular to a method for predicting electricity demand load based on multi-feature fusion coding. Background Technology

[0002] In recent years, electricity demand in residential and industrial areas has grown rapidly. However, due to the inherent characteristics of electricity, it cannot be stored on a large scale. Oversupply leads to waste, while undersupply affects social production and people's lives. Early understanding of electricity demand behavior is crucial for the planning, analysis, and operation of energy systems, as well as ensuring an uninterrupted, reliable, safe, and economical power supply. Accurate energy consumption forecasting can guide modern power systems, which is of great significance for promoting sustainable economic development.

[0003] With the continuous accumulation of electrical data in the power sector, data-driven methods are receiving increasing attention. These methods utilize historical observations to learn patterns and relationships hidden within the data to provide future predictions, and mainly fall into two categories: traditional statistical methods and deep learning methods.

[0004] Traditional statistical methods typically have explicit mathematical forms and certain data requirements or assumptions. When using Bayesian methods to predict electricity consumption probabilistically, the results may differ due to the uncertainty of certain prior information in the real world. The literature (Chang, Jian-Fang, Dong, Na, Ip, Wai Hung, Yung, Kai Leung, 2019. An ensemble learning model based on Bayesian model combination for solar energy prediction. J. Renew. Sustain. Energy 11(4), 043702.) proposes an ensemble learning model with multiple base learners, and then uses a Bayesian model combination strategy based on each base learner for prediction. This method is more accurate than a model using a single base, but requires a lot of maintenance work.

[0005] Deep learning methods are frequently used in energy consumption prediction due to their strong ability to handle large datasets. The paper (Cao, Zhengnan, Han, Xiaoqing, Lyons, William, O'Rourke, Fergal, 2021. Energy management optimization using a combined long short-term memory recurrent neural network-particle swarm optimization model. J. Cleaner Prod. 326, 129246.) uses a Long Short-Term Memory (LSTM) network to calculate periodic energy load consumption. An LSTM network is a variant of a Recurrent Neural Network (RNN) that performs the same task for each element of a sequence, with the output depending on previous computations. Furthermore, by introducing gating control, it can effectively handle time series data, addressing the gradient explosion and vanishing problems of RNNs.

[0006] Traditional statistical methods perform worse than deep learning methods and require significant maintenance; therefore, current electricity consumption prediction is largely based on LSTM deep learning methods. While LSTM can address the dependence on long-range information during RNN training, it still faces other challenges in predicting energy consumption. First, energy consumption time series typically follow periodic patterns (usually annually), varying over time and differing geographically. Second, the factors (features) influencing energy consumption are diverse. For example, there are continuous numerical features such as temperature, air pressure, and wind speed, as well as categorical features such as weather type, wind direction, and day of the week. In energy consumption prediction, these categorical attributes are often directly covered in a single step of the LSTM model, enumerated as integers or codes. However, these factors are not entirely independent. For instance, a region's weather and month are strongly correlated, and month is a crucial factor influencing electricity consumption, a point often overlooked in current electricity consumption prediction methods. Summary of the Invention

[0007] The technical problem to be solved by the present invention is to address the shortcomings of the prior art by providing a power demand load prediction method based on multi-feature fusion coding for enterprise power consumption prediction. Different sub-encoder structures are designed to encode and fuse multiple features for various factors affecting energy consumption, including temperature, air pressure, wind speed, wind direction, weather type, month, and weekday.

[0008] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:

[0009] A method for predicting electricity demand load based on multi-feature fusion encoding is proposed. In the encoding stage, the inherent relationships between multiple factors affecting enterprise electricity consumption are considered. To reduce the dimensionality of features, the important time parameters affecting enterprise electricity consumption, such as weekdays and months, are embedded and encoded. A Long Short-Term Memory (LSTM) module is used to encode past electricity demand load sequences to obtain temporal information. An attention module for months and weather is added to the neural network. This module adaptively extracts month-related features from weather parameters using month information, obtains weather weights through the attention mechanism, and adjusts the weather information using these weights, fully utilizing the strong correlation between months and weather. After fusing and encoding multiple features using the aforementioned three different sub-encoder structures, a Multilayer Perceptron (MLP) is used to decode the hidden features and generate prediction results, achieving accurate prediction of enterprise electricity consumption.

[0010] The steps to achieve the prediction include data preprocessing, dataset construction, network training, and daily electricity consumption prediction.

[0011] Furthermore, the data to be processed in the data preprocessing includes the enterprise's daily electricity consumption data, as well as the date type and related weather parameters; wherein the date type corresponding to the enterprise's daily electricity consumption includes weekday and month, and the weather parameters include temperature, air pressure, wind speed, wind direction and weather type;

[0012] When preprocessing the data, the autoregressive interpolation method is first used to complete the missing values ​​in the daily electricity consumption data of enterprises. Then, the temperature, air pressure and wind speed data are normalized. Finally, the discrete values ​​such as weather type, wind direction, month and week are one-hot encoded.

[0013] Furthermore, the autoregressive interpolation method uses Lagrange interpolation to complete the default values ​​in the daily electricity consumption of enterprises. The expressions for Lagrange interpolation are shown in formulas (1) and (2).

[0014]

[0015]

[0016] Where (x0,y0),(x1,y1),(x2,y2),...,(x n ,y n This represents the date and electricity consumption for the n+1 days before and after the date of the default value.

[0017] Furthermore, the normalization process is performed according to formula (3);

[0018]

[0019] Where 'a' represents the unnormalized raw data; min This represents the minimum value in the original data; a max This represents the maximum value in the original data; This indicates that the data has been normalized, and its value ranges from 0 to 1.

[0020] Furthermore, in the dataset construction, the preprocessed data is divided into training set, validation set and test set; to ensure that the model is applicable to any day of the year, the preprocessed data is divided into three parts according to the year, with the data from the first year used as the training set, the data from the second year used as the validation set, and the data from the third year used as the test set.

[0021] Furthermore, in the network training, date and weather parameters are used as feature vectors, and daily electricity consumption is used as labels. These are then imported into a deep learning regression model that includes an ebedding encoding layer and an attention module for date and weather for training.

[0022] The network first re-encodes the month and weekday using an embedding encoding layer, and then uses an attention module to enhance the weather parameters based on the month. The embedded weekday and month parameters, the attention-enhanced weather parameters, and the hidden features encoded by the LSTM layer are concatenated to obtain a feature vector containing multiple information. Finally, the obtained feature vector is input into multiple fully connected layers, and the daily electricity consumption of the enterprise is output after passing through multiple fully connected layers.

[0023] Furthermore, in the attention module of network training, the weather parameters, including temperature, air pressure, wind speed, wind direction and weather type, are first passed through a fully connected layer to obtain the Key value and Value value in the attention mechanism. Then, the month vector is passed through a fully connected layer to obtain the Query value in the attention mechanism. The Query value is transposed according to formula (4) and then multiplied with the Key value. The result of the multiplication is input through a Softmax layer to obtain the attention weight Attention.

[0024] Attention = Softmax(Q) T ·K) (4)

[0025] According to formula (5), the Value is multiplied by the transpose of Attention to obtain the final output of the attention module;

[0026] Output = V·Attention T (5)

[0027] The network uses the root mean square error as its loss function to update the model parameters, as defined in equation (6):

[0028]

[0029] Where Y is the predicted daily electricity consumption, Y is the actual daily electricity consumption, and N is the predicted daily electricity consumption. b The batch size;

[0030] In the LSTM module, information in the sequence is first extracted through a two-layer LSTM, and then the last step output, the Hidden State, is obtained through another LSTM and used as the encoded hidden features. Finally, the final output of the LSTM module is calculated through a Linear layer.

[0031] Furthermore, in the daily electricity consumption prediction, the date and weather parameters of the day to be predicted are input into the trained network to obtain the predicted value of the electricity load for that date.

[0032] The beneficial effects of adopting the above technical solution are as follows: The power demand load prediction method based on multi-feature fusion encoding provided by this invention uses three sub-encoders with different structures to fuse and encode multiple features, thus improving upon the shortcomings of previous power consumption prediction methods that often ignore the strong correlation between date and weather. It performs embedding encoding on the weekday and month, important parameters affecting enterprise power consumption; uses an LSTM module to extract time-series information from past power load demand sequences; and simultaneously uses an attention module to adaptively extract month-related features from weather parameters, fully exploring the relationship between different factors. Through a deep learning regression model, it achieves accurate prediction of enterprise daily power consumption. This invention can fully explore the relationship between date and weather by utilizing the embedding encoding layer and the attention module. Because enterprise power consumption and weather have a strong intrinsic relationship, and previous power consumption prediction methods often ignore this strong correlation, this invention has higher accuracy and robustness in predicting enterprise daily power consumption compared to previous methods. Attached Figure Description

[0033] Figure 1 The overall flowchart provided for embodiments of the present invention;

[0034] Figure 2 A flowchart of a network provided in an embodiment of the present invention;

[0035] Figure 3 This is a schematic diagram of the attention module structure provided in an embodiment of the present invention;

[0036] Figure 4This is a schematic diagram of the LSTM module structure provided in an embodiment of the present invention. Detailed Implementation

[0037] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.

[0038] This embodiment proposes a power demand load forecasting method based on multi-feature fusion encoding. It designs different sub-encoder structures to encode and fuse multiple features, including temperature, air pressure, wind speed, wind direction, weather type, month, and day of the week, for various factors affecting energy consumption. On one hand, a long short-term memory neural network is used to extract temporal information from past load sequences. On the other hand, a unique attention module is designed to adaptively extract month-related features from weather parameters using monthly information, fully exploring the connections between different factors. Through a deep learning regression model, accurate prediction of enterprise electricity consumption is achieved.

[0039] During the encoding phase, considering the inherent relationships between multiple factors affecting enterprise electricity consumption (such as month and weather), and to reduce feature dimensionality, embedding encoding is performed on important time parameters (weekday and month) affecting enterprise electricity consumption. To fully utilize past electricity consumption information, a Long Short-Term Memory (LSTM) module is used to encode past electricity demand load sequences to obtain time-series information. Weather conditions have a significant impact on enterprise electricity consumption, and weather conditions in the same month of each year in a specific region show high similarity. To fully utilize the inherent relationship between month and weather, an attention module for month and weather is added to the neural network. This module can adaptively extract month-related features from weather parameters using month information, obtain weather weights through an attention mechanism, and adjust the weather information using these weights, fully utilizing the strong correlation between month and weather. After fusing and encoding multiple features using these three different sub-encoders, a Multilayer Perceptron (MLP) is used to decode the hidden features and generate prediction results, achieving accurate prediction of enterprise electricity consumption. Figure 1 As shown, the specific steps are as follows:

[0040] Step 1: Data preprocessing.

[0041] The data to be processed includes the company's daily electricity consumption data, as well as the date type and relevant weather parameters for that day; the date type corresponding to the company's daily electricity consumption includes weekday and month, and the weather parameters include temperature, air pressure, wind speed, wind direction, and weather type.

[0042] First, the autoregressive interpolation method is used to complete the default values ​​in the daily electricity consumption data of enterprises. The autoregressive interpolation method uses the Lagrange interpolation method to complete the default values ​​in the daily electricity consumption data of enterprises. The expressions of the Lagrange interpolation are shown in formulas (1) and (2).

[0043]

[0044]

[0045] Where (x0,y0),(x1,y1),(x2,y2),...,(x n ,y n This represents the date and electricity consumption for the n+1 days before and after the date of the default value.

[0046] Then, the temperature, air pressure, and wind speed data are normalized according to formula (3).

[0047]

[0048] Where 'a' represents the unnormalized raw data; min This represents the minimum value in the original data; a max This represents the maximum value in the original data; This indicates that the data has been normalized, and its value ranges from 0 to 1.

[0049] Finally, one-hot encoding is performed on discrete values ​​such as weather type, wind direction, month, and day of the week.

[0050] Step 2: Dataset Construction.

[0051] The preprocessed data from step 1 is divided into training, validation, and test sets. To ensure the model can be applied to any day of the year, the data is divided into three parts according to the year: data from 2012 is used as the training set, data from 2013 is used as the validation set, and data from 2014 is used as the test set. The final ratio of the training, test, and validation sets is 366:365:365.

[0052] Step 3: Network training.

[0053] Date and weather parameters are used as feature vectors, and daily electricity consumption is used as labels. These are then fed into a deep learning regression model that includes an ebedding encoding layer and an attention module for date and weather.

[0054] Network flowchart as follows Figure 2As shown, the network first re-encodes the month and day of the week using an embedding encoding layer, and then uses an attention module to enhance the weather parameters based on the month. The embedded week and month parameters, the attention-enhanced weather parameters, and the hidden features encoded by the LSTM layer are concatenated to obtain a feature vector containing multiple information. Finally, the obtained feature vector is input into multiple fully connected layers, and the output is the company's daily electricity consumption.

[0055] like Figure 3 As shown, in the attention module, the weather parameters (temperature, air pressure, wind speed, wind direction, and weather type) are first passed through a fully connected layer to obtain the Key and Value values ​​in the attention mechanism. Then, the Month Vector is passed through a fully connected layer to obtain the Query value in the attention mechanism. The Query value is transposed according to formula (4) and multiplied with the Key value. The result of the multiplication is input through a Softmax layer to obtain the attention weights.

[0056] Attention = Softmax(Q) T ·K) (10)

[0057] According to formula (5), the Value is multiplied by the transpose of Attention to obtain the final output of the attention module.

[0058] Output = V·Attention T (11)

[0059] The network uses the root mean square error as its loss function to update the model parameters, as defined in equation (6):

[0060]

[0061] Where Y is the predicted daily electricity consumption, Y is the actual daily electricity consumption, and N is the predicted daily electricity consumption. b This refers to the batch size.

[0062] like Figure 4 As shown, in the LSTM module, information in the sequence is first extracted through a two-layer LSTM, and then the last step output is obtained through another LSTM, namely the hidden state, which is used as the encoded hidden feature. Finally, the final output of the LSTM module is calculated through a linear layer.

[0063] Step 4: Daily electricity consumption forecast.

[0064] By inputting the date and weather parameters of the day to be predicted into the trained network, the predicted value of the electricity load on that date can be obtained.

[0065] This invention is a power demand load forecasting method based on multi-feature fusion encoding. It uses three sub-encoders with different structures to fuse and encode multiple features, addressing the shortcoming of previous power consumption forecasting methods that often overlooked the strong correlation between date and weather. Specifically, it uses embedding encoding for weekdays and months, key parameters affecting enterprise power consumption; it uses an LSTM module to extract time-series information from historical power load demand sequences; and it employs an attention module to adaptively extract month-related features from weather parameters using month information, fully exploring the connections between different factors. Finally, it achieves accurate forecasting of enterprise electricity consumption through a deep learning regression model.

[0066] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope defined by the claims of the present invention.

Claims

1. A method for predicting electricity demand and load based on multi-feature fusion coding, characterized in that: During the encoding stage, considering the inherent relationships among multiple factors affecting enterprise electricity consumption, and to reduce feature dimensionality, embedding encoding is performed on the important time parameters of weekdays and months that affect enterprise electricity consumption. A Long Short-Term Memory (LSTM) module is used to encode past electricity demand load sequences to obtain temporal information from these sequences. An attention module for months and weather is added to the neural network. This module can adaptively extract month-related features from weather parameters using month information, obtain weather weights through an attention mechanism, and adjust the weather information using these weights, fully utilizing the strong correlation between months and weather. After embedding encoding of the important time parameters of weekdays and months affecting enterprise electricity consumption, encoding past electricity demand load sequences using the LSTM module, and adaptively extracting month-related features from weather parameters using the attention module—that is, after fusing and encoding multiple features—a Multilayer Perceptron (MLP) is used to decode the hidden features and generate prediction results, achieving accurate prediction of enterprise electricity consumption. The steps to achieve the prediction include data preprocessing, dataset construction, network training, and daily electricity consumption prediction.

2. The power demand load forecasting method based on multi-feature fusion coding according to claim 1, characterized in that: The data preprocessing process requires processing data including the company's daily electricity consumption data, as well as the date type and related weather parameters; the date type corresponding to the company's daily electricity consumption includes weekday and month, and the weather parameters include temperature, air pressure, wind speed, wind direction, and weather type. When preprocessing the data, the autoregressive interpolation method is first used to complete the missing values ​​in the daily electricity consumption data of enterprises. Then, the temperature, air pressure and wind speed data are normalized. Finally, the discrete values ​​such as weather type, wind direction, month and week are one-hot encoded.

3. The electricity demand load forecasting method based on multi-feature fusion coding according to claim 2, characterized in that: The autoregressive interpolation method uses Lagrange interpolation to complete the default values ​​in the daily electricity consumption of enterprises. The expressions for Lagrange interpolation are shown in formulas (1) and (2). ; ; Where L(x) is the interpolation function, i.e., the interpolated daily electricity consumption; x is the independent variable, i.e., the x-coordinate of the point to be interpolated, i.e., the date on which interpolation is needed; l i (x) is a basis function and is an intermediate variable; This indicates the date and electricity consumption for the day n+1 days before and after the date of the default value.

4. The electricity demand load forecasting method based on multi-feature fusion coding according to claim 2, characterized in that: The normalization process is performed according to formula (3); ; in, This represents the raw, unnormalized data. This represents the minimum value in the original data; This represents the maximum value in the original data; This indicates that the data has been normalized, and its values ​​range from 0 to 1. Between 1 and 2.

5. The electricity demand load forecasting method based on multi-feature fusion coding according to claim 1, characterized in that: In the dataset construction, the preprocessed data is divided into training set, validation set and test set; The preprocessed data was divided into three parts according to the year: the data from the first year was used as the training set, the data from the second year was used as the validation set, and the data from the third year was used as the test set.

6. The electricity demand load forecasting method based on multi-feature fusion coding according to claim 1, characterized in that: In the network training, date and weather parameters are used as feature vectors, and daily electricity consumption is used as labels. These are then imported into a deep learning regression model that includes an ebedding encoding layer and an attention module for date and weather. The network first re-encodes the month and weekday using an embedding encoding layer, and then uses an attention module to enhance the weather parameters based on the month. The embedded weekday and month parameters, the attention-enhanced weather parameters, and the hidden features encoded by the LSTM layer are concatenated to obtain a feature vector containing multiple information. Finally, the obtained feature vector is input into multiple fully connected layers, and the daily electricity consumption of the enterprise is output after passing through multiple fully connected layers.

7. The power demand load forecasting method based on multi-feature fusion coding according to claim 6, characterized in that: In the attention module of network training, the weather parameters, including temperature, air pressure, wind speed, wind direction and weather type, are first passed through a fully connected layer to obtain the Key value and Value value in the attention mechanism. Then, the month vector is passed through a fully connected layer to obtain the Query value in the attention mechanism. The Query value is transposed according to formula (4) and then multiplied with the Key value. The result of the multiplication is input through a Softmax layer to obtain the attention weight Attention. ; According to formula (5), the value is multiplied by the transpose of the attention to obtain the final output of the attention module; ; Where Q, K, and V represent the Query value, Key value, and Value value, respectively; The network uses the root mean square error as its loss function to update the model parameters, as defined in equation (6): ; Where Y is the predicted daily electricity consumption. This represents the actual electricity consumption. The batch size; In the LSTM module, information in the sequence is first extracted through a two-layer LSTM, and then the last step output, the Hidden State, is obtained through another LSTM and used as the encoded hidden features. Finally, the final output of the LSTM module is calculated through a Linear layer.

8. The power demand load forecasting method based on multi-feature fusion coding according to claim 1, characterized in that: In the daily electricity consumption forecast, the date and weather parameters of the day to be forecasted are input into the trained network to obtain the predicted value of the electricity load for that date.

Citation Information

Patent Citations

  • Thermal power plant short-term thermal load predicting method based on gated self-coding

    CN108921341A

  • Transformer-based power load prediction method

    CN113592185A