A power load dynamic prediction method fusing user electricity elasticity and multi-source space-time characteristics
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TAIYUAN UNIVERSITY OF TECHNOLOGY
- Filing Date
- 2026-05-15
- Publication Date
- 2026-08-07
AI Technical Summary
用户电量弹性刻画不足:未充分考虑用户电量波动对用户用电行为的动态影响;
提升了负荷敏感型负荷的预测精度:创新性地引入动态用户电量弹性系数作为核心特征,能够准确捕捉电力市场环境下用户电量波动对用户行为的引导作用。
Smart Images

Figure CN122532891A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system load forecasting technology, and in particular to a dynamic power load forecasting method that integrates user power consumption elasticity and multi-source spatiotemporal characteristics. Background Technology
[0002] With the advancement of new power system construction and power market reform, the implementation of market mechanisms such as high-proportion grid connection of new energy sources and time-of-use and spot market electricity consumption has led to a shift in load characteristics from traditional rigid demand to demand-sensitive demand. Traditional load forecasting methods (such as ARIMA and simple neural networks) are mostly based on single time-series modeling of historical load data, which has the following limitations: Insufficient characterization of user power consumption elasticity: The dynamic impact of user power consumption fluctuations on user power consumption behavior is not fully considered; Multi-source data fusion is difficult: there is a lack of effective mechanisms for fusing heterogeneous data (meteorological, economic, user electricity consumption, social factors), and feature extraction is highly subjective; Lack of source-load synergy: The prediction model operates in isolation and does not consider the constraints of new energy output and the game relationship between source and load interaction. Summary of the Invention
[0003] The purpose of this invention is to provide a dynamic power load prediction method that integrates user power elasticity and multi-source spatiotemporal features to solve the problems existing in the prior art. This invention achieves high-precision, adaptive, and interpretable load prediction by constructing a user power elasticity feature extraction module, a multi-source spatiotemporal feature fusion module, and a dynamic collaborative prediction model.
[0004] To achieve the above objectives, the present invention provides the following solution: A dynamic power load forecasting method that integrates user power consumption elasticity and multi-source spatiotemporal characteristics includes: Based on historical load values and historical user electricity consumption values, extract user electricity consumption elasticity features; The multi-source features are standardized and fused features are calculated using an attention mechanism; wherein the multi-source features include: load time-series features, user electricity consumption features, meteorological features, and economic features; The fused features are input into the LSTM-Attention prediction model to obtain the basic load prediction value; A reinforcement learning agent is introduced to fine-tune the basic load prediction value, and the systematic deviation is continuously corrected through error momentum memory to obtain the final load prediction value; wherein, the state of the reinforcement learning agent includes: the user power elasticity characteristics and the basic load prediction value.
[0005] Optionally, extracting the user's power elasticity feature includes: The short-term elasticity coefficient is calculated by calculating the ratio of the load change rate to the user electricity consumption change rate, and the user-specific elasticity matrix is obtained through regression estimation; where the user-specific components include: residential, industrial and commercial.
[0006] Optionally, computing fused features via an attention mechanism includes: For the multi-source features, calculate the attention score for each type of feature and obtain the attention weight; Based on the calculated attention weights, feature weighted fusion is performed.
[0007] Optionally, inputting the fused features into the LSTM-Attention prediction model includes: The fused features are input into the LSTM network, and the cell state and hidden state at each time step are updated by sequentially calculating the forget gate, input gate, candidate cell state, cell state update and output gate to obtain the hidden state sequence. Based on the hidden state sequence, a temporal attention mechanism is introduced to dynamically calculate the contribution weight of each historical moment to the current prediction and obtain a context vector carrying key historical information. The context vector is input into the fully connected layer to obtain the base load forecast value.
[0008] Optionally, obtaining the context vector carrying key historical information includes: Calculate the inner product of the current time step and the hidden state at each historical time step to obtain the original similarity score; The original similarity scores for all historical moments are exponentially calculated and summed to form the normalized denominator. Divide the exponential score at each historical moment by the normalized denominator to obtain the attention weight; The hidden state at each historical moment is multiplied by the corresponding attention weight, and the results of multiplication at all moments are summed to obtain a context vector carrying key historical information.
[0009] Optionally, introducing a reinforcement learning agent to fine-tune the predicted base load value and continuously correcting systematic biases through error momentum memory includes: Based on the user's power elasticity characteristics, historical error information, basic load prediction value and external environment, the state vector of the reinforcement learning agent is defined. With minimizing prediction error and promoting source-load synergy as the learning objectives of the agent, a policy gradient is defined to guide parameter updates; In reinforcement learning agents, an error momentum memory mechanism is introduced to capture systematic long-term biases; A lightweight online dynamic compensation module is constructed; the static predicted value integrates the characteristics of long historical sequences with fixed action compensation, and meets the physical lower limit constraints of power grid operation by setting a minimum load threshold. By taking into account both reinforcement learning compensation and momentum correction, the final load forecast is obtained.
[0010] Optionally, defining policy gradient-guided parameter updates includes: Calculate the compensated predicted value ,in, Based on the basic load forecast, Let t be the load compensation action value output by the reinforcement learning agent. Calculate the difference between the compensated predicted value and the actual load. and the difference between the output of new energy sources Then multiply these two differences by their respective weights and sum them to obtain the policy gradient. The policy gradient is used to indicate the direction of the agent's adjustment action: if the gradient is positive, it means that the compensation value needs to be increased; if it is negative, the compensation value needs to be decreased.
[0011] Optionally, an error momentum memory mechanism can be introduced to capture systematic long-term deviations, including: Calculate the instantaneous error at the current moment; Based on the instantaneous error at the current moment, the error momentum memory is updated using the exponential moving average method.
[0012] Optionally, in the online dynamic compensation module: Extract the standardized feature vector at the current moment, and introduce a set of dynamically updated feature weight vectors and dynamic bias terms. Based on the inner product of the standardized feature vector and the dynamic feature weight vector plus the bias terms, obtain the online compensation amount. The online compensation is superimposed on the static prediction value to obtain the final streaming online prediction result; After the actual load observation value arrives at each time step, the prediction residual at the current time is calculated immediately; After obtaining the prediction residual, the compensation parameters for the next time step are quickly fine-tuned using the online gradient descent rule.
[0013] The beneficial effects of this invention are as follows: It improves the forecasting accuracy of load-sensitive loads: It innovatively introduces the dynamic user electricity elasticity coefficient as a core feature, which can accurately capture the guiding effect of user electricity fluctuations on user behavior in the electricity market environment.
[0014] It achieves deep fusion of multi-source data: by using an attention mechanism to automatically learn the impact weights of different external features (such as extreme weather and economic fluctuations) on the load, it effectively solves the feature selection problem of multi-source heterogeneous data.
[0015] Enhanced adaptability of source-load interaction: By introducing new energy output as a constraint through reinforcement learning module, the load forecast results are more conducive to the source-load balance scheduling of the power grid while ensuring accuracy.
[0016] It has online self-learning capabilities: the streaming learning mechanism supports real-time updates of model parameters, adapts to the continuous evolution of the power system's operating state, and reduces the cost of model retraining. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of a dynamic power load prediction method that integrates user power consumption elasticity and multi-source spatiotemporal characteristics according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the load forecasting results according to an embodiment of the present invention; Figure 3 This is an example diagram of real-time prediction in an embodiment of the present invention; Figure 4 This is a schematic diagram comparing the accuracy of various models in an embodiment of the present invention; Figure 5 This is a schematic diagram comparing the elastic introduction of user electricity consumption in an embodiment of the present invention; wherein, (a) is the 72 hours before the comparison of the elastic introduction of user electricity consumption, (b) is the prediction error, and (c) is the error index; Figure 6 This is a schematic diagram of the fusion and comparison of external meteorological / economic characteristics according to an embodiment of the present invention; wherein, (a) is the fusion and comparison of external meteorological / economic characteristics, (b) is the prediction error, and (c) is the comparison of error indicators; Figure 7 This is a schematic diagram of the collaborative comparison of reinforcement learning source and load in an embodiment of the present invention; wherein, (a) is the collaborative comparison of reinforcement learning source and load, (b) is the prediction error, and (c) is the comparison of error indices; Figure 8 This is a schematic diagram illustrating the streaming learning and online update effects of an embodiment of the present invention; Figure 9 This is a schematic diagram comparing the accuracy of streaming learning in an embodiment of the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0021] like Figure 1 As shown in the figure, this embodiment proposes a dynamic power load prediction method that integrates user power consumption elasticity and multi-source spatiotemporal characteristics, including: Based on historical load values and historical user electricity consumption values, extract user electricity consumption elasticity features; The multi-source features are standardized and fused features are calculated using an attention mechanism; wherein the multi-source features include: load time-series features, user electricity consumption features, meteorological features, and economic features; The fused features are input into the LSTM-Attention prediction model to obtain the basic load prediction value; A reinforcement learning agent is introduced to fine-tune the basic load prediction value, and the systematic deviation is continuously corrected through error momentum memory to obtain the final load prediction value; wherein, the state of the reinforcement learning agent includes: the user power elasticity characteristics and the basic load prediction value.
[0022] Further, extracting the user's power elasticity features includes: The short-term elasticity coefficient is calculated by calculating the ratio of the load change rate to the user electricity consumption change rate, and the user-specific elasticity matrix is obtained through regression estimation; where the user-specific components include: residential, industrial and commercial.
[0023] In this embodiment, 1. Extraction of user power elasticity features: To quantify the impact of user electricity consumption fluctuations on power load, this invention first constructs a user electricity consumption elasticity characteristic. This characteristic is obtained by calculating the ratio of the load change rate to the user electricity consumption change rate, thus yielding an elasticity coefficient that reflects the sensitivity of user electricity consumption behavior to user electricity consumption.
[0024] 1.1 Short-term user electricity elasticity coefficient calculate: set up for t Actual system load at any given time (unit: MW). for tMarket user electricity consumption at any given time (unit: kWh). First, calculate the load change between adjacent time periods. and changes in user battery level : in, They are respectively The load value and user power consumption value at any given time.
[0025] definition t Short-term user power elasticity coefficient at any given time This is the ratio of the relative rate of change of load to the relative rate of change of user electricity consumption. The calculation process for this ratio is as follows: First, the load change... In addition to the above-mentioned load at a given moment This yields the relative rate of change of load; and the change in user electricity consumption. In addition to the user's battery level at the above moment This yields the relative rate of change in user electricity consumption; dividing the two by the relative rate of change gives the elasticity coefficient. This coefficient reflects the percentage change in load caused by a 1% change in user electricity consumption. This reflects the intensity of the pull on instantaneous load caused by the expansion of user electricity consumption. When When it tends to stabilize, it indicates that the electricity consumption behavior has a linear expansion characteristic; when When drastic fluctuations occur, it indicates a structural change in the user's power consumption pattern (such as the start-up and shutdown of high-power equipment or adjustments to production shifts).
[0026] 1.2 Construction of User Type Elasticity Matrix: To further differentiate the varying responses of different user categories to electricity consumption, this invention categorizes users into three groups: residential, industrial, and commercial, and estimates their elasticity coefficients for each. Let... , , Representing the electricity consumption elasticity coefficients for residential, industrial, and commercial users respectively, an elasticity matrix is constructed. as follows: The estimation methods for each elasticity coefficient are as follows: load data for three types of users are extracted from historical data, and parameter estimation is performed using a log-linear regression model. Taking residential users as an example, the regression equation is established as follows: in Let t be the load of residential users. Let be the temperature at time t. This is a dummy variable for holidays (1 for holidays, 0 for non-holidays). This represents the random error term. The regression coefficients are estimated using the least squares method. This refers to the electricity elasticity coefficient for residential users. Similarly, we can obtain... and This matrix will be used as state input in subsequent reinforcement learning modules to guide the agent in generating differentiated compensatory actions.
[0027] Furthermore, the computation of fusion features through the attention mechanism includes: For the multi-source features, calculate the attention score for each type of feature and obtain the attention weight; Based on the calculated attention weights, feature weighted fusion is performed.
[0028] Specifically, in this embodiment, 2. Multi-source feature fusion model: Electricity load is influenced by a variety of factors, including historical load patterns, user electricity consumption signals, meteorological conditions, and economic activities. This invention designs a feature fusion layer based on an attention mechanism to achieve adaptive fusion of multi-source heterogeneous data.
[0029] 2.1 Definition of Multi-Source Feature Vector: Suppose that the input feature vectors include the following four categories: Load timing characteristics: It includes the load values and their statistical characteristics at T historical moments. For load characteristic dimensions User battery characteristics: This includes current user battery level, historical user battery level, and user battery level fluctuation rate. User power consumption characteristics dimension Meteorological characteristics: This includes temperature, humidity, light intensity, wind speed, etc. Meteorological characteristics dimension Economic characteristics: This includes GDP growth rate, industrial added value, holiday index, etc. For economic characteristics dimension 2.2 Feature standardization processing: Because the dimensions and numerical ranges of various features differ significantly, directly inputting them into the model can lead to unstable training. Therefore, the feature sequences are first processed... Standardization process: in These are the original eigenvalues. This is the mean of the feature on the training set. This represents the standard deviation of the feature on the training set. Standardized feature. The features follow a distribution with a mean of 0 and a variance of 1, thus eliminating the influence of dimensions. The four types of features are then standardized to obtain the standardized feature matrix. .
[0030] 2.3 Feature fusion using attention mechanisms: To dynamically evaluate the importance of different features at the current moment, this invention introduces an attention mechanism for feature fusion. First, the attention score for each feature class is calculated: in Let be the learnable weight matrix for the k-th class of features. For the corresponding bias term, (⋅) is an exponential function. The calculation process of this formula is as follows: First, for each type of feature... Its weight matrix Multiply and add bias The raw scores are obtained by first calculating the exponent of the raw scores for all four feature classes and then summing them to form the normalized denominator. Finally, the exponent score of each feature class is divided by the normalized denominator to obtain the attention weights. The weight satisfies This reflects the contribution of each type of feature at the current moment.
[0031] Based on the calculated attention weights, feature weighted fusion is performed: in The fused feature matrix, d The dimension of the fusion feature is (usually the maximum value of each feature dimension or a unified value through a fully connected layer). The calculation process is as follows: multiply each standardized feature by its corresponding attention weight, and then add the four parts together to obtain the fusion feature that comprehensively considers information from multiple sources.
[0032] Furthermore, inputting the fused features into the LSTM-Attention prediction model includes: The fused features are input into the LSTM network, and the cell state and hidden state at each time step are updated by sequentially calculating the forget gate, input gate, candidate cell state, cell state update and output gate to obtain the hidden state sequence. Based on the hidden state sequence, a temporal attention mechanism is introduced to dynamically calculate the contribution weight of each historical moment to the current prediction and obtain a context vector carrying key historical information. The context vector is input into the fully connected layer to obtain the base load forecast value.
[0033] Furthermore, obtaining the context vector carrying key historical information includes: Calculate the inner product of the current time step and the hidden state at each historical time step to obtain the original similarity score; The original similarity scores for all historical moments are exponentially calculated and summed to form the normalized denominator. Divide the exponential score at each historical moment by the normalized denominator to obtain the attention weight; The hidden state at each historical moment is multiplied by the corresponding attention weight, and the results of multiplication at all moments are summed to obtain a context vector carrying key historical information.
[0034] Specifically, in this embodiment, 3. LSTM-Attention prediction model: Features after fusion While it contains rich spatiotemporal information, the temporal dependence of the load sequence has not yet been considered. This invention employs a Long Short-Term Memory (LSTM) network to model the temporal dependencies and introduces an attention mechanism in the output layer to enhance the information representation of key time points.
[0035] 3.1 LSTM cell state update: LSTM controls the flow of information through gating mechanisms, primarily including the forget gate, input gate, output gate, and cell state. Let's assume at time... t The input to LSTM is the fused feature vector. (Right now The t-th row), the hidden state at the previous time step is The cell state at the previous moment was Where H is the hidden layer dimension. The calculation of each gate unit is as follows: The forget gate determines which information is discarded from the cell's previous state, and its calculation formula is as follows: in This means concatenating the hidden state with the input vector; Here is the weight matrix for the forget gate; This is the bias vector for the forget gate; σ (⋅) is the Sigmoid activation function, which compresses the output value to the (0,1) interval. The calculation process is as follows: multiply the concatenated vector by the weight matrix, add the bias, and then pass it through the Sigmoid function to obtain the forgetting gate output. Each element represents the degree to which historical information is retained in the corresponding dimension (1 means complete retention, 0 means complete forgetting).
[0036] The input gate determines which new information is written to the cell state; the calculation formula is as follows: in Here is the weight matrix of the input gate. This is the bias vector for the input gate. The calculation process is similar to that of the forget gate, yielding the input gate output. , which represents the weight of writing new information.
[0037] Candidate cell states are information to be written extracted from the current input, calculated using the following formula: in Here is the weight matrix for the candidate states. Let be the bias vector of the candidate state; tanh(⋅) is the hyperbolic tangent function, which compresses the output value to the interval (-1, 1). The candidate state is then calculated. .
[0038] Cell state updates combine forgetting and input gates to maintain long-term memory: Where ⊙ represents the Hadamard product (element-by-element multiplication). The calculation process is as follows: first, output the forget gate. Cell state at the previous moment Element-wise multiplication yields the retained historical information; then the input gate outputs... With candidate state Multiply each element to obtain the newly added current information; finally, add the two parts together to obtain the updated cell state. .
[0039] The output gate determines which information is output from the current cell state to the hidden state. The calculation formula is as follows: in Here is the weight matrix of the output gate. Given the bias vector of the output gate, we obtain the output of the output gate. The hidden state output is the output of the LSTM at the current time step, and also the input at the next time step: The calculation process is as follows: First, the current cell state is... application The function is compressed to (-1, 1) and then output by an output gate. Multiply each element to obtain the hidden state at the current time step. .
[0040] Time series Perform the above updates sequentially to obtain the hidden state sequence at all time points. .
[0041] 3.2 Temporal attention mechanism: The hidden state sequence of LSTM contains information from various time points, but the importance of different historical time points is not the same when predicting the load at the current time. This invention introduces a temporal attention mechanism to dynamically calculate the contribution weight of each historical time point to the current prediction.
[0042] Let the current time be t, for any historical time... Calculate attention weights : in This represents the inner product of the current hidden state and the hidden states at each historical time step, measuring their similarity; exp(⋅) is the exponential function. The calculation process is as follows: First, calculate the inner product of the current hidden state and the hidden states at each historical time step to obtain the original similarity score; then, take the exponent of the scores at all historical time steps and sum them, using this sum as the normalized denominator; finally, divide the exponential score at each historical time step by the normalized denominator to obtain the attention weight. The weight satisfies This indicates the level of attention that should be given to the historical time k when predicting the load at time t.
[0043] Based on attention weights, the hidden states at all historical moments are summed in a weighted manner to obtain the context vector. : The calculation process is as follows: The hidden state at each historical moment... Its corresponding attention weight Multiply the results and then sum the results at all times to obtain a context vector carrying key historical information. .
[0044] 3.3 Basic Load Forecasting: context vector Input the fully connected layer to obtain the base load forecast at time t. : in This is the output layer weight matrix. This is used to bias the output layer. The calculation process is as follows: [The weight matrix is then used in the original text.] With context vector Multiply to get a scalar value, then add the bias. To obtain the final load forecast value (Unit: MW).
[0045] Furthermore, the introduction of a reinforcement learning agent to fine-tune the predicted base load value, and the continuous correction of systematic biases through error momentum memory, includes: Based on the user's power elasticity characteristics, historical error information, basic load prediction value and external environment, the state vector of the reinforcement learning agent is defined. With the goal of minimizing prediction error and promoting source-load synergy, the following definitions are made for the learning objectives of the agent: the weight matrix and bias terms used to generate load compensation actions in the policy gradient-guided reinforcement learning agent policy network, as well as the dynamic feature weight vector and dynamic bias term parameter updates of the online dynamic compensation module. In reinforcement learning agents, an error momentum memory mechanism is introduced to capture systematic long-term biases; A lightweight online dynamic compensation module is constructed to calculate the online compensation amount based on real-time standardized features and superimpose it onto the static prediction value to obtain the streaming online prediction result. At the same time, based on the real-time prediction residual, the dynamic feature weights and bias term parameters are quickly fine-tuned through online gradient descent, enabling the model to quickly adapt to sudden disturbances and load anomalies, and continuously correct prediction bias without retraining a large model. The static prediction value integrates historical long-sequence features and fixed action compensation, and meets the physical lower limit constraints of power grid operation by setting a minimum load threshold. The static prediction value is not the base load prediction value. The static prediction value is based on the base load prediction value output by the LSTM-Attention model, integrating historical long-sequence features and fixed action compensation, and meets the physical lower limit constraints of power grid operation by setting a minimum load threshold. By taking into account both reinforcement learning compensation and momentum correction, the final load forecast is obtained.
[0046] Furthermore, the policy gradient-guided parameter update is defined as follows: Calculate the compensated predicted value ,in, Based on the basic load forecast, Let t be the load compensation action value output by the reinforcement learning agent. Calculate the difference between the compensated predicted value and the actual load. and the difference between the output of new energy sources Then multiply these two differences by their respective weights and sum them to obtain the policy gradient. The policy gradient is used to indicate the direction of the agent's adjustment action: if the gradient is positive, it means that the compensation value needs to be increased; if it is negative, the compensation value needs to be decreased.
[0047] Furthermore, an error momentum memory mechanism is introduced to capture systematic long-term deviations, including: Calculate the instantaneous error at the current moment; Based on the instantaneous error at the current moment, the error momentum memory is updated using the exponential moving average method.
[0048] Furthermore, in the online dynamic compensation module, Extract the standardized feature vector at the current moment, and introduce a set of dynamically updated feature weight vectors and dynamic bias terms. Based on the inner product of the standardized feature vector and the dynamic feature weight vector plus the bias terms, obtain the online compensation amount. The online compensation is superimposed on the static prediction value to obtain the final streaming online prediction result; After the actual load observation value arrives at each time step, the prediction residual at the current time is calculated immediately; After obtaining the prediction residual, the compensation parameters for the next time step are quickly fine-tuned using the online gradient descent rule.
[0049] Specifically, in this embodiment, 4. Reinforcement Learning Collaboration and Momentum Error Optimization Module: Baseline forecast Although multi-source characteristics and time-series dependencies are considered, the dynamic impact of user electricity elasticity on load is not fully reflected, nor is the synergistic relationship with renewable energy output considered. This invention introduces a reinforcement learning agent to fine-tune the prediction results online and achieves continuous correction of systematic biases through error momentum memory.
[0050] 4.1 Reinforcement Learning State Construction: The state of a reinforcement learning agent consists of key information at the current moment, including the user's battery ebb and flow matrix, historical error memory, and baseline predictions. A state vector is defined. for: in The user electricity elasticity matrix at time t (including elasticity coefficients for three types of users). This is the memory of the error momentum from the previous moment (definition follows); These are the base predictions obtained by the LSTM-Attention module; The user's battery level at time t; Let be the temperature at time t. This vector concatenates market factors, historical error information, basic predictions, and the external environment, providing a comprehensive basis for the agent's decision-making.
[0051] 4.2 Policy gradient calculation: The learning objective of the agent is to minimize prediction error and promote source-load synergy; for this purpose, the policy gradient is defined. Guide parameters updated: in This represents the actual load (true value) at time t. The output of new energy sources (such as wind power and photovoltaic power generation) at time t. For prediction accuracy weights, Source-load collaborative weights (usually set) + =1). The calculation process of this formula is as follows: First, calculate the compensated predicted value. Then calculate the difference between it and the actual load. and the difference between the output of new energy sources Then multiply these two differences by their respective weights and sum them to obtain the policy gradient. The gradient indicates which direction the agent should adjust its actions: a positive gradient means that the compensation value needs to be increased; a negative gradient means that the compensation value needs to be decreased.
[0052] 4.3 Error Momentum Memory Update: To capture systematic long-term deviations, this invention introduces an error momentum memory mechanism. First, the instantaneous error at the current moment is calculated. : Then, the error momentum memory is updated using the exponential moving average method. : in This is the momentum decay factor, which controls the decay rate of historical errors (usually taken as 0.8~0.95). The calculation process is as follows: the momentum memory of the previous moment... Multiply by the attenuation factor Retain historical error information; retain the instantaneous error at the current moment. Multiply Introduce new information; add the two parts together to obtain the updated momentum memory. This memory is actually an exponentially weighted average of historical errors, with more recent errors having a larger weight.
[0053] 4.4 Streaming learning and online update mechanism: To enable the model to rapidly adapt to sudden disturbances, a lightweight online dynamic compensation module is constructed based on static prediction. This static prediction integrates long-term historical data with fixed action compensation, and a minimum load threshold (e.g., ...) is set. (MW) to meet the physical lower limit constraints of power grid operation. In the specific calculation process, the system extracts the standardized feature vector at the current moment. And introduce a set of dynamically updated feature weight vectors in real time. With dynamic bias terms Online compensation amount The calculation logic is the inner product of the feature vector and the weight, plus a bias term: The dynamic weights here Dynamic bias is used to sensitively capture the impact of a specific characteristic (such as sudden abnormal temperature or user power fluctuations) on current load anomalies. This is equivalent to an adaptive "water level" used to correct the baseline offset of the overall load. Subsequently, this online compensation is superimposed on the static prediction value to calculate the final online flow cytometry prediction result. The core advantage of this module lies in its "real-time self-healing" parameter update mechanism, which eliminates the need to retrain large models. This is achieved by updating the actual load observations at each time step. Upon arrival, the system will immediately calculate the prediction residual for the current moment: After obtaining the residuals, the algorithm uses the online gradient descent rule to quickly fine-tune the compensation parameters for the next time step: in, The preset online learning rate controls the system's sensitivity to new errors. Physically speaking, when the predicted value is lower than the actual load (i.e., the residual), the system becomes more sensitive to new errors. When the value is positive, the above formula will automatically amplify the corresponding feature weights and raise the bias benchmark according to the positive or negative state of each feature value. This pure vector-level multiplication and addition operation runs at extremely low computing power cost, enabling the system to quickly digest step errors within a few time steps, allowing the prediction curve to quickly catch up with and re-fit the actual load trend.
[0054] 4.5 Final Prediction Output: Taking into account both reinforcement learning compensation and momentum correction, the final load forecast at time t is obtained. : in The momentum compensation coefficient controls the degree of influence of error memory on the final prediction. The calculation process is as follows: First, take the base prediction value from the LSTM-Attention module. In addition to the compensatory actions generated by the reinforcement learning agent In addition to momentum memory Multiply by the compensation coefficient This yields the final load forecast. This value integrates information from time-series patterns, market response, and system bias, achieving high-precision dynamic forecasting.
[0055] In summary, the complete calculation process of the method of the present invention is as follows: (1) Input data preparation: Obtain historical load sequences User power sequence Meteorological data Economic data, etc.
[0056] (2) Calculation of user power consumption flexibility: according to the formula Calculate the short-term elasticity coefficients and obtain the user-specific elasticity matrix E through regression estimation.
[0057] (3) Feature fusion: Standardize the multi-source features and calculate the fused features through an attention mechanism. .
[0058] (4) LSTM temporal modeling: The fused features are input into the LSTM network, and the cell state is updated according to the gating mechanism. and hidden state Obtain the hidden state sequence.
[0059] (5) Attention weighting: Calculate the temporal attention weights , to obtain the context vector .
[0060] (6) Basic prediction: The basic prediction value is obtained through the fully connected layer. .
[0061] (7) Reinforcement learning fine-tuning: constructing states According to the policy gradient Optimize actions.
[0062] (8) Momentum memory update: Calculate instantaneous error Update momentum memory .
[0063] (9) Final output: Obtain the final predicted value .
[0064] (10) Online update: The newly generated actual load data is included in the training set, and the model parameters are fine-tuned online to achieve continuous evolution of the model.
[0065] Through the above steps, the present invention achieves dynamic, accurate, and adaptive prediction of power load, and can effectively cope with the complex changes in load characteristics under the power market environment. Figure 2 The load forecast results are displayed; Figure 3 An example of real-time prediction is shown.
[0066] The technical solution of this embodiment: It improves the forecasting accuracy of load-sensitive loads: It innovatively introduces the dynamic user electricity elasticity coefficient as a core feature, which can accurately capture the guiding effect of user electricity fluctuations on user behavior in the electricity market environment.
[0067] Deep fusion of multi-source data has been achieved: The attention mechanism is used to automatically learn the impact weights of different external features (such as extreme weather and economic fluctuations) on the load, effectively solving the feature selection problem of multi-source heterogeneous data.
[0068] Enhanced adaptability of source-load interaction: By introducing new energy output as a constraint through reinforcement learning module, the load forecast results are more conducive to the source-load balance scheduling of the power grid while ensuring accuracy.
[0069] It has online self-learning capabilities: the streaming learning mechanism supports real-time updates of model parameters, adapts to the continuous evolution of the power system's operating state, and reduces the cost of model retraining.
[0070] The following is a comparative analysis of this embodiment: from Figure 4 It can be seen that different prediction models exhibit significant differences in prediction accuracy on the same dataset. The MAPE of the traditional linear model is 6.97%, the MAPE of the decision tree model is 7.24%, while the MAPE of the ensemble model proposed in this embodiment, which integrates user power consumption elasticity, multi-source features, and collaborative optimization mechanisms, decreases to 6.55%.
[0071] The improvement is due to the fact that the model in this embodiment not only utilizes historical load sequences but also incorporates multi-source information such as user electricity consumption, weather conditions, and time periods. Furthermore, it models complex nonlinear relationships using an attention mechanism and an LSTM network. Traditional linear models can only depict simple linear relationships, while decision trees, although capable of describing some nonlinear features, struggle to capture long-term temporal dependencies. Therefore, this invention, through multi-source information fusion and deep temporal modeling, enables the prediction model to more comprehensively reflect the load change mechanism, thereby significantly improving overall prediction accuracy.
[0072] Analysis of the effect of dynamic modeling of user power consumption elasticity in this embodiment: right side Figure 5 The load curve comparison chart on the left shows the prediction results with and without considering the user electricity elasticity model; among them, Figure 5 (a) introduces a comparison of the user's electricity consumption elasticity over the previous 72 hours. Figure 5 (b) represents the prediction error. Figure 5 (c) represents the error index. It can be seen that during peak and off-peak load periods, the predicted curve, which does not consider user electricity elasticity, deviates somewhat from the actual load. However, by incorporating user electricity elasticity, the predicted curve more closely matches the actual load trend.
[0073] The reason for this difference lies in the fact that fluctuations in user electricity consumption directly affect user electricity usage behavior. For example, when user electricity consumption increases during peak periods, some industrial or commercial users will proactively reduce their electricity load. Traditional models treat user electricity consumption only as a general feature input, failing to accurately depict the dynamic coupling relationship between "user electricity consumption change - load response". This embodiment calculates the user electricity consumption elasticity coefficient to explicitly model the relationship between the rate of change of user electricity consumption and the rate of change of load, enabling the model to identify load response patterns under different user electricity consumption changes.
[0074] The error distribution plot shows that the error distribution of the model without considering the user's power consumption elasticity is relatively dispersed, while the error distribution after introducing the user's power consumption elasticity is more concentrated near 0, and the extreme errors are significantly reduced, indicating that the model stability is significantly improved.
[0075] The comparison of error indicators shows that after introducing user power consumption elasticity, the MAPE, MAE, and RMSE indicators all decreased significantly, indicating that user power consumption elasticity modeling can significantly improve the overall prediction accuracy.
[0076] The multi-source spatiotemporal feature fusion mechanism in this embodiment: 1. Figure 6 The comparison of prediction curves before and after feature fusion is shown. It can be seen that the single-feature model deviates significantly in certain time periods, while the prediction curve after introducing multi-source feature fusion is smoother overall and closer to the actual load changes. Figure 6 (a) is a comparison of external meteorological / economic characteristics. Figure 6 (b) represents the prediction error. Figure 6 (c) represents the comparison of error indices.
[0077] This is because changes in electricity load are not only related to historical load but are also influenced by various factors such as temperature, time period, user electricity consumption, and socio-economic activities. If only a single data source is used, the model may easily overlook other important influencing factors. This embodiment constructs multi-source feature vectors and uses an attention mechanism to dynamically weight different features, enabling the model to automatically select the more important influencing factors at different time periods.
[0078] 2. The error distribution plot shows that after introducing multi-source feature fusion, the error distribution converges significantly to near zero, greatly reducing extreme errors, indicating that the prediction stability is significantly improved.
[0079] 3. From the perspective of error indicators, MAPE, MAE and RMSE all decreased after fusing multi-source features, indicating that multi-source information fusion can improve the model's ability to interpret load changes.
[0080] The source-load collaborative prediction architecture in this embodiment: 1. Figure 7 The results demonstrate the predictions from the basic forecasting model and the model after incorporating a source-load coordination mechanism. It can be seen that during periods of rapid load change, the traditional basic model exhibits a lag in prediction, while the addition of the coordination optimization module allows the prediction curve to follow actual load changes more quickly. Specifically, Figure 7 (a) is for reinforcement learning source load collaborative comparison. Figure 7 (b) represents the prediction error. Figure 7 (c) represents the comparison of error indices.
[0081] This improvement stems from the introduction of a reinforcement learning module. This module takes renewable energy output, user electricity elasticity, and historical errors as input states, and optimizes prediction compensation actions through policy gradient optimization. This allows the model to dynamically adjust prediction results during the prediction process, achieving coordinated matching between source and load.
[0082] 2. Error distribution shows that after the introduction of the collaborative mechanism, the error is more concentrated and the extreme error is significantly reduced.
[0083] 3. From the perspective of error indicators, after the introduction of the collaborative mechanism, MAPE further decreased and RMSE significantly decreased, indicating that the mechanism can significantly improve the prediction quality.
[0084] Analysis of the effectiveness of the streaming learning and online update mechanism in this embodiment: Figure 8 The study demonstrates the predictive performance of different models when concept drift occurs. The fixed-parameter model exhibits significant prediction deviations, while the online-updating model is able to rapidly adjust its prediction curves within several time steps, bringing them back into line with the actual load change trend.
[0085] This effect stems from the streaming learning mechanism proposed in this embodiment. The system calculates the prediction residual at each time step and updates the compensation parameters in real time using an online gradient descent method, enabling the model to continuously adapt to new data distributions. Streaming learning accuracy comparison: Figure 9 As shown.
[0086] In the case of sudden concept drift, the MAPE of the frozen parameter model reached 11.45%, while the MAPE dropped to 5.99% after adopting the online update mechanism, and the error was reduced by about 47.7%, indicating that the online update mechanism can significantly improve the model's adaptability in dynamic environments.
[0087] Based on the comprehensive experimental results, the load forecasting method proposed in this embodiment demonstrates three core innovative advantages in the simulation experiment: 1) User power consumption elastic dynamic modeling: It can characterize the impact of changes in user power consumption on user load behavior and improve the accuracy of load-sensitive load forecasting.
[0088] 2) Multi-source spatiotemporal feature fusion mechanism: Dynamically integrate user power consumption, weather, time and historical load information through attention mechanism to improve the model's ability to interpret complex load changes.
[0089] 3) Source-load coordination and online learning mechanism: By using reinforcement learning and streaming update technology, the prediction model can be adaptively adjusted in real time, enabling the system to respond quickly to load changes and new energy fluctuations.
[0090] Experimental results show that this method outperforms traditional methods in terms of prediction accuracy, stability, and environmental adaptability, providing an effective technical solution for load forecasting and source-load coordinated dispatch in new power systems.
[0091] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made to the technical solutions of the present invention by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.
Claims
1. A method for dynamic forecasting of power load that integrates user power consumption elasticity and multi-source spatiotemporal characteristics, characterized in that, include: Based on historical load values and historical user electricity consumption values, extract user electricity consumption elasticity features; The multi-source features are standardized and fused features are calculated using an attention mechanism; wherein the multi-source features include: load time-series features, user electricity consumption features, meteorological features, and economic features; The fused features are input into the LSTM-Attention prediction model to obtain the basic load prediction value; A reinforcement learning agent is introduced to fine-tune the basic load prediction value, and the systematic deviation is continuously corrected through error momentum memory to obtain the final load prediction value; wherein, the state of the reinforcement learning agent includes: the user power elasticity characteristics and the basic load prediction value.
2. The power load dynamic prediction method integrating user power consumption elasticity and multi-source spatiotemporal characteristics according to claim 1, characterized in that, Extracting the user's power elasticity features includes: The short-term elasticity coefficient is calculated by calculating the ratio of load change rate to user electricity consumption change rate, and the user-specific elasticity matrix is obtained through regression estimation; where user-specific elasticity matrix includes: residential, industrial and commercial.
3. The power load dynamic prediction method integrating user power consumption elasticity and multi-source spatiotemporal characteristics according to claim 1, characterized in that, The fusion features calculated using the attention mechanism include: For the multi-source features, calculate the attention score for each type of feature and obtain the attention weight; Based on the calculated attention weights, feature weighted fusion is performed.
4. The power load dynamic prediction method integrating user power consumption elasticity and multi-source spatiotemporal characteristics according to claim 1, characterized in that, Inputting the fused features into the LSTM-Attention prediction model includes: The fused features are input into the LSTM network, and the cell state and hidden state at each time step are updated by sequentially calculating the forget gate, input gate, candidate cell state, cell state update and output gate to obtain the hidden state sequence. Based on the hidden state sequence, a temporal attention mechanism is introduced to dynamically calculate the contribution weight of each historical moment to the current prediction and obtain a context vector carrying key historical information. The context vector is input into the fully connected layer to obtain the base load forecast value.
5. The power load dynamic prediction method integrating user power consumption elasticity and multi-source spatiotemporal characteristics according to claim 4, characterized in that, Obtaining a context vector carrying key historical information includes: Calculate the inner product of the current time step and the hidden state at each historical time step to obtain the original similarity score; The original similarity scores for all historical moments are exponentially calculated and summed to form the normalized denominator. Divide the exponential score at each historical moment by the normalized denominator to obtain the attention weight; The hidden state at each historical moment is multiplied by the corresponding attention weight, and the results of multiplication at all moments are summed to obtain a context vector carrying key historical information.
6. The power load dynamic prediction method integrating user power consumption elasticity and multi-source spatiotemporal characteristics according to claim 1, characterized in that, Introducing a reinforcement learning agent to fine-tune the predicted base load values and continuously correcting systematic biases through error momentum memory includes: Based on the user's power elasticity characteristics, historical error information, basic load prediction value and external environment, the state vector of the reinforcement learning agent is defined. With the goal of minimizing prediction error and promoting source-load synergy as the learning objective of the agent, we define the weight matrix and bias terms used to generate load compensation actions in the policy gradient-guided reinforcement learning agent policy network, as well as the dynamic feature weight vector and dynamic bias term parameter update of the online dynamic compensation module. In reinforcement learning agents, an error momentum memory mechanism is introduced to capture systematic long-term biases; A lightweight online dynamic compensation module is constructed to calculate the online compensation amount based on real-time standardized features and superimpose it onto the static prediction value to obtain the streaming online prediction result. At the same time, based on the real-time prediction residual, the dynamic feature weights and bias term parameters are quickly fine-tuned through online gradient descent, so as to realize the model's rapid adaptation to sudden disturbances and load changes, and to continuously correct prediction bias without retraining the large model. The static prediction value integrates historical long-sequence features and fixed action compensation, and meets the physical lower limit constraints of power grid operation by setting a minimum load threshold. By taking into account both reinforcement learning compensation and momentum correction, the final load forecast is obtained.
7. The power load dynamic prediction method integrating user power consumption elasticity and multi-source spatiotemporal characteristics according to claim 6, characterized in that, Defining policy gradient-guided parameter updates includes: Calculate the compensated predicted value ,in, Based on the basic load forecast, Let t be the load compensation action value output by the reinforcement learning agent. Calculate the difference between the compensated predicted value and the actual load. and the difference between the output of new energy sources Then multiply these two differences by their respective weights and sum them to obtain the policy gradient. The policy gradient is used to indicate the direction of the agent's adjustment action: if the gradient is positive, it means that the compensation value needs to be increased; if it is negative, the compensation value needs to be decreased.
8. The power load dynamic prediction method integrating user power consumption elasticity and multi-source spatiotemporal characteristics according to claim 6, characterized in that, Introducing an error momentum memory mechanism to capture systematic long-term deviations includes: Calculate the instantaneous error at the current moment; Based on the instantaneous error at the current moment, the error momentum memory is updated using the exponential moving average method.
9. The power load dynamic prediction method integrating user power consumption elasticity and multi-source spatiotemporal characteristics according to claim 6, characterized in that, In the online dynamic compensation module Extract the standardized feature vector at the current moment, and introduce a set of dynamically updated feature weight vectors and dynamic bias terms. Based on the inner product of the standardized feature vector and the dynamic feature weight vector plus the bias terms, obtain the online compensation amount. The online compensation is superimposed on the static prediction value to obtain the final streaming online prediction result; After the actual load observation value arrives at each time step, the prediction residual at the current time is calculated immediately; After obtaining the prediction residual, the compensation parameters for the next time step are quickly fine-tuned using the online gradient descent rule.