Daily electric quantity prediction method considering business expansion influence
By introducing model agnostic meta-learning and efficient channel attention mechanisms in power load prediction, the shortcomings of traditional models in dealing with dynamic external factors and non-stationary data are solved, and higher prediction accuracy and robustness are achieved.
Patent Information
- Application Number
- CN202510232902.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-06-13
AI Technical Summary
Traditional static power load prediction models fail to fully consider the dynamic changes of external factors and non-stationary data characteristics, especially in large-scale capacity expansion or special events, making it difficult to provide accurate prediction results.
A regional daily electricity consumption prediction method based on model agnostic meta-learning (MAML) and efficient channel attention mechanism (ECA) is proposed. By optimizing initial parameters and improving the model's attention to key features, the prediction accuracy and robustness are improved.
It significantly improves the feature recognition capability that is sensitive to fluctuations in power demand, improves prediction accuracy and stability, and provides more accurate power load prediction especially when facing complex capacity expansion and external factors.
Smart Images

Figure CN120145007A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly to a daily power consumption prediction method considering the impact of business expansion Background Art
[0002] With the acceleration of the urbanization process, the deep integration of industrialization and informatization, the power demand has been growing steadily, and more complex changes have also occurred in terms of regional distribution, time pattern and load characteristics. The power load fluctuation is more obvious, which poses a huge challenge to the traditional static prediction model
[0003] The traditional static prediction models are mainly divided into two categories. The first category is the time series model, such as the regional photovoltaic power stationary short-term prediction method based on dual direct long short-term memory BiLSTM and convolutional neural network CNN, the net load prediction integrated empirical mode decomposition EEMD technology, etc. The second category is the deep learning model, such as the inverse ranking item load prediction method based on spatio-temporal convolutional graph neural network, the new short-term net load prediction model based on TransformGraph, etc. These traditional static prediction models often assume that the power load fluctuation is stationary and do not fully consider sudden changes, increasing capacity expansion and external influencing factors, such as climate, holiday impact, policy changes, etc. Especially under large-scale capacity expansion or special events, the static model cannot effectively predict the dynamic changes of these influencing factors, so accurate prediction results cannot be provided
[0004] The traditional static prediction models mainly have the following defects
[0005] (1) The dynamic changes of external factors are not fully considered. The traditional static prediction models often assume that the power load fluctuation is stationary and make predictions based on historical data. In fact, the power load is affected by various external factors, and the changes of many factors are sudden. It is difficult for the static model to accurately capture such dynamic changes, resulting in a decrease in prediction accuracy
[0006] (2) The ability to process non-stationary data is insufficient. The non-stationary characteristics of the power load are becoming increasingly prominent. The traditional static prediction models have limitations in dealing with non-stationary load sequences, especially when dealing with large-scale capacity expansion or special events
[0007] Therefore, establishing a prediction model that can adapt to the stable fluctuation characteristics of power demand and dynamically adjust is a key problem that urgently needs to be solved in the current power load prediction field Summary of the Invention
[0008] The present invention aims to improve the prediction accuracy of daily electricity consumption. For this purpose, a regional daily electricity consumption prediction method based on model-agnostic meta-learning MAML and efficient channel attention mechanism ECA is proposed. By optimizing the initial parameters and improving the model's attention to key features, the prediction accuracy and robustness are improved.
[0009] Explanation of related terms:
[0010] Model-agnostic meta-learning MAML: Model-agnostic meta-learning is an optimization-driven meta-learning method that trains the initial parameters to enable the model to quickly adapt when encountering new tasks. MAML consists of two main components: an inner loop and an outer loop. The inner loop is responsible for globally adjusting the model parameters for each task to meet the requirement that the model can quickly adapt to the task. The outer loop is responsible for updating the initial parameters of the model so that these initial parameters can be quickly adjusted when facing different tasks, thereby improving the generalization ability of the model.
[0011] Efficient channel attention mechanism ECA: The efficient channel attention mechanism is a lightweight attention mechanism that enhances the model's ability to focus on forming key features by effectively capturing the relationships between channels. The core idea of the ECA mechanism is to use global average pooling GAP to compress each channel and obtain global information from the input feature map. By adaptively assigning different weights to each channel, the weights of each channel are normalized, and the attention weights of each channel are calculated. These weights are used to enhance the attention to important channels. In this way, ECA adaptively assigns different weights to each channel, improving the model's performance in different input modes in multi-task or multi-data source scenarios.
[0012] The specific technical solution is as follows:
[0013] A daily electricity consumption prediction method considering the impact of business expansion includes the following processes:
[0014] Step S100: Obtain the electricity consumption record data, corresponding meteorological data, and records of business expansion installation events in the area to be predicted before the time point to be predicted; the electricity consumption record data includes: daily total electricity consumption, timestamp; the meteorological data includes: temperature, humidity, and wind speed.
[0015] Step S200: Model training; specifically including:
[0016] Step S210: Build a prediction model training framework based on meta-learning, use the model-agnostic meta-learning MAML method to optimize the initialization parameters, obtain prior representation knowledge, and then refine the small-sample model after capacity expansion.
[0017] Step S220: Establish a joint electricity consumption neural network prediction model based on a convolutional neural network and the efficient channel attention mechanism ECA, which can deeply extract the overall features of external influencing factors on multiple time scales and provide effective electricity consumption predictions.
[0018] Step S230: Compare the prediction performance of the model under various different configurations, achieve model evaluation, and finally confirm the configuration plan with the best prediction performance.
[0019] Step S300: Use the model for prediction; specifically, include: input the meteorological data corresponding to the area to be predicted and the business expansion installation events to obtain the daily electricity consumption at the time point to be predicted.
[0020] Preferably, between step S210 and step S220, the following process is included:
[0021] Perform data preprocessing, relocate outliers and input missing values; incorporate holiday, working, and non - working day features, as well as the intensity of regional economic activities.
[0022] Preferably, in step S210:
[0023] The learning rate in the meta - learning stage is set to 0.005. After 50 training cycles, select the best - performing model for fine - tuning. In the fine - tuning stage, use the initial parameters obtained in the meta - learning stage to fine - tune the model on a small - sample data set in the target area. The learning rate in the fine - tuning stage is set to 0.001 and continues for 30 training cycles, and an early stopping strategy is implemented to prevent overfitting.
[0024] Advantages of the present invention over the prior art:
[0025] (1) Utilize the MAML algorithm to optimize the initial parameters of the model, so as to be able to quickly adapt to new prediction tasks.
[0026] (2) By combining the ECA mechanism and the deep - learning model, significantly improve the recognition ability of features sensitive to power demand fluctuations, thereby improving the prediction accuracy.
[0027] (3) In the embodiment, experimental research is carried out using the daily electricity consumption data of a city in northern China. The results show that the method proposed by the present invention shows lower and more stable loss values and higher prediction accuracy. Brief Description of the Drawings
[0028] Figure 1 is the overall structural schematic diagram of the model of the present invention.
[0029] Figure 2 is the ECA structural schematic diagram of the present invention.
[0030] Figure 3It is a comparison chart of the loss values between the method of the present invention and the traditional method.
[0031] Figure 4 It is a schematic diagram for comparing the prediction results between different neural network models under the MAML framework of the present invention.
[0032] Figure 5 It is a schematic diagram for comparing the prediction results between the present invention and the traditional method.
[0033] Figure 6 It is a schematic diagram for comparing the prediction results between MAML of the present invention and the traditional transfer learning method.
[0034] Figure 7 It is the MAPE(%) reduced by the method of the present invention compared with different methods.
[0035] Figure 8 It is the NRMSE(%) reduced by the method of the present invention compared with different methods. Detailed implementation manners
[0036] The present invention combines the fast adaptability of meta-learning and the feature extraction ability of the ECA mechanism to solve the complex spatio-temporal changes and external influencing factors in power load forecasting. The method first establishes a prediction model training framework based on memory learning and designs a data set based on memory tasks. Using model-agnostic meta-learning, the initial parameters of the model are optimized to obtain prior representation knowledge. This knowledge, together with a small number of samples after capacity expansion, is then used to fine-tune the model to enhance its ability to quickly adapt to new tasks. For the model structure, we design an electricity consumption prediction neural network that combines the convolutional neural network CNN and the efficient channel attention mechanism ECA mechanism.
[0037] This model can deeply extract the features of the external influencing factor sequence on multiple time scales and improve the sensitivity of the model to the formation of key channels through the ECA mechanism, thereby improving the accuracy and stability of the prediction. Through this integrated framework, the model can provide accurate regional daily electricity consumption predictions when facing complex capacity expansion affecting various external factors, thus providing strong support for power system scheduling and electricity consumption prediction. The model structure is as Figure 1 shown.
[0038] A daily electricity consumption prediction method considering the impact of business expansion includes the following processes:
[0039] Step S100: Obtain the electricity consumption record data, corresponding meteorological data, and records of business expansion installation events of a certain city in northern China from 2020 to 2022; the electricity consumption record data includes: daily total electricity consumption, time stamp; the meteorological data includes: temperature, humidity, and wind speed;
[0040] Construct an initial meta-task dataset, which consists of multiple small regions. The data in each small region is relatively limited and suitable for rapid learning. Divide the data into training, validation, and test sets. The data from 2020 to 2021 is used for model training and validation, and the data from 2022 is used for external testing to determine the generalization ability of the model.
[0041] Perform data preprocessing, which involves feature selection and data cleaning, with particular emphasis on removing outliers and imputing missing values. In addition to basic time and meteorological conditions, other socioeconomic factors are incorporated, such as holiday, work and non-working day indicators, and estimates of the intensity of regional economic activities.
[0042] Step S200: Model training; specifically including:
[0043] Step S210: Construct a training framework for a meta-learning-based prediction model. Use model-agnostic meta-learning method to optimize the initial parameters, obtain prior representation knowledge, and then refine the small-sample model after capacity expansion. Among them, the learning rate in the meta-learning stage is set to 0.005. After 50 training epochs, select the best-performing model for fine-tuning. In the fine-tuning stage, use the initial parameters obtained in the meta-learning stage to fine-tune the model on the small-sample dataset of the target region. The learning rate in the fine-tuning stage is set to 0.001 and lasts for 30 training epochs, and an early stopping strategy is implemented to prevent overfitting.
[0044] Step S220: Establish a joint electricity consumption neural network prediction model based on convolutional neural network and efficient channel attention mechanism, which can deeply extract the overall features of external influencing factors on multiple time scales and provide effective electricity consumption predictions.
[0045] Step S230: Compare the prediction performance of the model under various different configurations, implement model evaluation, and finally confirm the configuration scheme with the best prediction performance.
[0046] Step S300: Use the model for prediction; specifically including: input the meteorological data corresponding to the region to be predicted and the business expansion installation events to obtain the daily electricity consumption at the time point to be predicted.
[0047] Further explain model-agnostic meta-learning:
[0048] Model-agnostic meta-learning is a technique aimed at enhancing the ability of a model to quickly adapt to new tasks with limited data. Traditional machine learning methods focus on learning specific tasks from given data, while meta-learning trains models across multiple tasks to learn how to effectively solve new tasks.
[0049] The core idea of meta - learning is to utilize the commonalities among different tasks to extract effective prior knowledge, allowing the model to quickly adapt to new tasks with only a small amount of data. In the field of electricity consumption prediction, meta - learning has important application value. The electricity consumption data of power systems usually exhibits complex spatio - temporal characteristics. With the increase in capacity expansion, the volatility and uncertainty of electricity demand become more obvious. Traditional prediction methods often rely on a large amount of historical data for training, but when new electricity demand patterns or emergencies occur, traditional models are difficult to quickly adapt. By introducing meta - learning, electricity prediction models can quickly adjust and optimize their predictions when facing a small amount of new data.
[0050] MAML is an optimization - driven meta - learning method aimed at enabling the model to quickly adapt when encountering new tasks by training its initial parameters. MAML consists of two main components: an inner loop and an outer loop. The inner loop is responsible for globally adjusting the model parameters for each task, and the outer loop is responsible for updating the initial parameters of the model so that it can quickly adjust when facing different tasks, thereby improving the generalization ability of the model. Its form is as follows:
[0051]
[0052] In the formula, α is the learning rate, is the training data, is the loss function, β is the outer - loop learning rate, is the loss of the parameters θ′ calculated based on the validation data for each task
[0053] Further explanation of the efficient channel attention mechanism:
[0054] The efficient channel attention mechanism is a lightweight attention mechanism aimed at enhancing the model's ability to focus on key information by effectively capturing the relationships between channels. In traditional convolutional neural networks, the relationships between channels are often not fully considered. The ECA mechanism solves this problem by adaptively assigning different weights to each channel, thereby improving the network's sensitivity to important features. Its main advantage lies in calculating the importance of each channel in a simple and effective way, improving the performance of the model while maintaining a low computational cost.
[0055] The core idea of ECA is to compress each channel using global average pooling and obtain global information from the input feature map. Let the dimension of the input feature map be H×W×C, where H and W represent the height and width of the feature, and C is the number of channels. The global average pooling operation averages the spatial dimension of each channel to generate a global description for each channel, as shown in the following formula:
[0056]
[0057] In the formula, x i,j,c represents the value at position i, j and channel c in the input feature map, and y c is the global average value for each channel.
[0058] To capture the dependencies between channels, ECA uses one-dimensional convolution to obtain a global description for each channel for modeling, which is achieved by learning a one-dimensional convolution operation with a kernel size of K. If the kernel size is K, the weight value vector w of ECA can be obtained through successive operations described in the following formula c ,
[0059] w c = Conv1D(y c , K).
[0060] Finally, by normalizing the weights of each channel, the attention weights of each channel are calculated. These weights enable the model to enhance its attention to important channels while suppressing irrelevant channel information, and the calculation formula is as follows:
[0061]
[0062] where σ(w c ) represents the normalization of the channel weight w c , and usually an s-shaped function is used for normalization. The weighted feature map is obtained by element-wise multiplication with the original input.
[0063] Compared with traditional attention mechanisms, ECA avoids additional complex structures such as fully connected layers, making the calculation more efficient and easier to implement. Through this method, ECA adaptively assigns different weights to each channel, improving the performance of the model in different input patterns in multi-task or multi-data source scenarios. The model structure is as Figure 2 shown.
[0064] Evaluation metrics:
[0065] To comprehensively evaluate the performance of the proposed regional daily electricity consumption prediction model that combines meta - learning and the efficient channel attention mechanism, the present invention employs two key statistical metrics: the mean absolute percentage error MAPE and the normalized root mean square error NRMSE. These metrics are widely used in the performance evaluation of prediction models, especially in the context of power system prediction, because they effectively reflect the accuracy and reliability of the model in practical applications. MAPE is a measure of the deviation between the prediction result and the actual value, representing the average ratio of the absolute prediction error to the actual value, usually expressed as a percentage. A major advantage of this metric is its intuitiveness, providing immediate information about the accuracy of the predicted value. The lower the MAPE value, the higher the accuracy of the model. NRMSE is a standardized metric used to quantify the magnitude of the prediction error. It is the ratio of the root mean square error RMSE to the range of the observed data, allowing for comparability between different datasets. The lower the NRMSE value, the smaller the prediction error and the better the prediction performance.
[0066] Impact of different initial parameters on prediction performance:
[0067] Figure 3 Illustrates the performance comparison between the traditional method - random initialization of parameters and the model - agnostic meta - learning method. The horizontal axis represents the number of epochs, and the vertical axis represents the prediction error. The results show that the traditional method exhibits a higher prediction error in the initial stage, especially in the first few epochs where the error reaches its peak. This may be due to the model's inability to effectively adapt to new or extreme data conditions. Although the error decreases as training progresses, the overall fluctuations of the traditional method remain significant. In contrast, the model using the MAML method shows lower and more stable loss values. This advantage stems from MAML's optimization of the initial model parameters during the training process, enabling the model to adapt to new prediction tasks more quickly and demonstrating greater robustness and adaptability in the face of real - data fluctuations. Especially at the beginning of the prediction period, the MAML method significantly reduces the error, highlighting the importance of optimizing the initial parameters to improve prediction performance.
[0068] Effectiveness test of MAML - ECA:
[0069] Through a series of experiments, verify the effectiveness of the meta - learning method combined with the efficient channel attention mechanism in daily electricity consumption prediction. The detailed analysis of the results is as follows:
[0070] As Figure 4As shown in the figure, under the MAML framework, the prediction results of different neural network models, namely CNN-ECA, CNN-DNN, and BiLSTM, were compared. The results showed that the CNN model MAML-CNN-ECA combined with ECA demonstrated the best adaptability and accuracy in tracking the actual electricity consumption trend, followed by CNN-DNN. Although the BiLSTM model showed robust performance, it was slightly insufficient in capturing peak signals.
[0071] Figure 5 The comparison between the MAML method and the traditional non-MAML method 0-Shot is shown. It is obvious that the MAML method is significantly superior to the traditional method in all network architectures, especially in managing the peaks and fluctuations of electricity demand, highlighting the advantages of MAML in parameter initialization and rapid adaptation to new tasks.
[0072] Figure 6 The effects of the MAML method were compared with those of the traditional transfer learning TL method. Although the transfer learning method performed better than the 0-Shot method, the MAML method still showed the best performance in all metrics, especially in the CNN-ECA configuration. This verified the ability of MAML to optimize the feature extraction efficiency of cross-task sharing in a mixed task learning environment.
[0073] Table 1: Evaluation Metrics for Prediction Results of Different Methods
[0074]
[0075] The M configuration showed higher MAPE and NRMSE values without optimization, indicating instability under dynamic and complex load changes and a reduction in prediction accuracy. Although the transfer learning method was better than 0-Shot, it failed to achieve the effectiveness of the MAML method in all performance metrics. Overall, these data not only verified the effectiveness of the combination of MAML and ECA but also highlighted its special adaptability to complex fluctuation patterns in practical applications.
[0076] Figure 7 and Figure 8 illustrate the improvement in the mean absolute percentage error MAPE and the normalized root mean square error NRMSE achieved by this method compared to other methods. In Figure 5 , the reduction in MAPE was significant, exceeding 2% compared to the improvement of the transfer learning method, and exceeding 2.5% and 3% respectively compared to the traditional CNN-ECA and CNN-DNN methods, with an average reduction of 2.31%. Figure 6The results show that, compared with the traditional CNN-DNN and BiLSTM methods, the MAML-CNN-BiLSTM method significantly reduces the NRMSE, by nearly 3.0% and 3.5% respectively. Compared with the transfer learning TL method, the learning effect is improved by 1.5% to 2%.
[0077] In summary, this method uses the MAML algorithm to optimize the initial parameters of the model, achieving fast adaptation to update prediction tasks, which is the first time in traditional power demand prediction models. In addition, by combining the ECA mechanism with the deep learning model, the recognition ability of features sensitive to power demand fluctuations is significantly improved, thus improving the prediction accuracy. Experiments prove that the MAML-CNN-ECA configuration is superior to traditional CNN-DNN, BiLSTM and transfer learning methods in key performance indicators such as MAPE and NRMSE, especially in dealing with high volatility and peak power demand, which has important theoretical and practical significance for the demand response management, secure grid operation and sustainable development planning of power systems.
Claims
1. A daily electricity consumption prediction method considering the impact of business expansion, characterized in that: The process includes the following: Step S100: obtaining the electricity consumption record data, corresponding meteorological data and records of business expansion and installation events of the area to be predicted before the time point to be predicted; The electricity consumption record data includes: daily total electricity consumption and timestamp; the meteorological data includes: temperature, humidity and wind speed; Step S200: Model training; specifically including: Step S210: construct a prediction model training framework based on meta-learning, use the model agnostic meta-learning (MAML) method to optimize the initialization parameters, obtain prior representation knowledge, and then refine the model of small samples after capacity expansion; Step S220: establishing a joint power consumption neural network prediction model based on a convolutional neural network and an efficient channel attention mechanism (ECA), which can deeply extract the overall characteristics of external influencing factors at multiple time scales and provide effective power consumption prediction; Step S230: Compare the prediction performance of the model under various configurations, implement model evaluation, and finally determine the configuration scheme with the best prediction performance; Step S300: using the model to make predictions; specifically including: inputting meteorological data corresponding to the area to be predicted and business expansion installation events to obtain the daily electricity consumption at the time point to be predicted.
2. According to claim 1, a daily electricity consumption prediction method considering the impact of business expansion is characterized in that: The following process is included between step S210 and step S220: Data preprocessing was performed to re-move outliers and input missing values; holiday, working and non-working day characteristics, as well as regional economic activity intensity were incorporated.
3. A daily electricity consumption prediction method considering the impact of business expansion according to claim 1 or 2, characterized in that: In step S210: The learning rate in the meta-learning phase is set to 0.
005. After 50 training cycles, the best performing model is selected for fine-tuning. In the fine-tuning phase, the initial parameters obtained in the meta-learning phase are used to fine-tune the model on a small sample dataset of the target area. The learning rate in the fine-tuning phase is set to 0.001 and lasts for 30 training cycles. An early stopping strategy is implemented to prevent overfitting.
Citation Information
Cited By
Regional weather forecast optimization method and system based on weather model
CN121257245A
A method and system for optimizing regional weather forecasts based on a weather model
CN121257245B