Power load online probability density prediction method considering influence of virtual drift and real drift
By taking into account virtual drift and real drift, the online probability density prediction method of power load is used to predict using variable attention mechanism and MQRLSTM network, the prediction accuracy problem under the influence of power load data drift in the prior art is solved, real-time and accurate prediction of power load and scientific management of power grid systems are realized.
Patent Information
- Application Number
- CN202411699746.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-11-26
AI Technical Summary
Existing power load prediction models are difficult to effectively handle conceptual drift, virtual drift and real drift in power load data, resulting in reduced prediction accuracy.
A method for online probability density prediction of power load considering the effects of virtual drift and real drift is proposed. By collecting historical load data and related factors, using variable attention mechanism and MQRLSTM network for prediction, and detecting drift through KL divergence and CRPS, tuning model parameters using Bayesian optimization.
Real-time and accurate prediction of power loads is realized, the model can be dynamically updated to adapt to data changes, and the accuracy and adaptability of predictions are improved, providing a scientific decision-making basis for the management and scheduling of the power grid system.
Smart Images

Figure CN119742754A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of short-term electric load forecasting, and in particular is an online probability density forecasting method for electric load taking into account the influence of virtual drift and real drift. Background Art
[0002] In the operation of modern power systems, accurate load forecasting is crucial for power generation planning, grid dispatching, power market transactions, etc. This requires not only accurate forecast values, but also an understanding of the degree of uncertainty in the forecast. For example, in the power market, accurate load forecasting and its uncertainty can help market participants reasonably arrange power generation and trading strategies, thereby reducing risks.
[0003] With the development of emerging technologies, some novel prediction methods have emerged in the field of power load, which can be mainly divided into statistical prediction methods and artificial intelligence methods. However, power load is affected by many factors, such as seasonal changes, weather conditions, economic activities, and emergencies (such as natural disasters, large-scale events, etc.). These factors cause load data to present complex nonlinear and non-stationary characteristics, and the data distribution changes over time, that is, there is a concept drift phenomenon. The information learned by traditional prediction models from historical data may be outdated, and there is a lack of targeted processing of virtual drift in load data, which reduces their adaptability to new data patterns. Therefore, processing concept drift in power load data and taking measures against virtual drift and real drift are the key to improving the prediction accuracy of the model.
[0004] In addition, traditional prediction methods usually use offline models, which improve the fitting ability by repeatedly inputting batch data for parameter training. However, these parameters cannot be changed once set, which makes offline models unsuitable for predicting dynamic and changing load data. Therefore, using online models for prediction and handling concept drift in load data are issues that need to be improved and solved urgently in existing models. Summary of the invention
[0005] The present invention aims to address the deficiencies of the above-mentioned prior art and proposes an online probability density prediction method for power load taking into account the influence of virtual drift and real drift, in order to achieve real-time prediction of power load. At the same time, different measures are adopted to process the virtual drift and real drift in the power data to achieve accurate prediction of power load, thereby providing more effective information for more scientific management, operation and scheduling of the power grid system.
[0006] In order to achieve the above-mentioned purpose, the present invention adopts the following technical scheme:
[0007] The characteristics of the method for predicting the online probability density of power load considering the influence of virtual drift and real drift of the present invention are as follows:
[0008] Step 1. Collect historical power load and related influencing factors and form load characteristic data, then normalize them to obtain the normalized power load characteristic data set. ,in, Represents the normalized The power load characteristic set at the time, and , Represents the normalized The i-th power load characteristic at time, A quantity representing the characteristics of the power load, Indicates duration;
[0009] Step 2. Calculate using formula (1) The power load characteristic set at the time and The power load characteristic set at the time The divergence between , thus obtaining the divergence set ;
[0010] (1)
[0011] In formula (1), Represents the normalized The i-th power load characteristics at time -1 The probability density function of express The probability density function of
[0012] Step 3. Calculate using equations (2) and (3) The mean of the time and standard deviation :
[0013] (2)
[0014] (3)
[0015] In formula (2) and formula (3), represents the divergence at time n, and ,
[0016] Use formula (4) to calculate the judgment threshold of virtual drift :
[0017] (4)
[0018] when When There is a virtual drift, Put it into the storage pool;
[0019] Step 4. Use variable attention mechanism to Weighted to obtain the weighted power load characteristic set ;
[0020] Step 4.1. Calculate using formula (5) Attention score ;
[0021] (5)
[0022] In formula (3), , , and There are 4 parameters to be learned. represents the activation function, express The transpose of
[0023] Step 4.2. Calculate using formula (6) Attention distribution :
[0024] (6)
[0025] In formula (4), represents the activation function;
[0026] Step 4.3. Use formula (7) to calculate the weighted power load characteristic set :
[0027] (7)
[0028] In formula (7), express The i-th power load characteristics after weighting at each moment;
[0029] Step 5. Construct the MQRLSTM network, including: LSTM hidden layer, monotonic layer and output layer, and Input into the MQRLSTM network for processing to obtain the predicted quantile of power load ;
[0030] Step 6. Use formula (13) to calculate the probability density function of the power load forecast distribution at time t: The actual value of power load The deviation between :
[0031] (13)
[0032] In formula (13), represents the probability density function of the power load forecast distribution at time t, represents the load value corresponding to the probability density function of the power load forecast distribution at time t, express The actual value of the power load at the moment season , otherwise, let ;
[0033] Step 7. Use equations (14) and (15) to calculate Probability density function of power load forecast distribution at time With the true value The mean deviation between and standard deviation :
[0034] (14)
[0035] (15)
[0036] In formula (14) and formula (15), The probability density function representing the distribution of power load forecast at time n and the actual value of power load at time n The deviation between ; The load value corresponding to the probability density function representing the power load forecast distribution at time n;
[0037] Step 8. Use formula (16) to calculate Warning threshold for moment-to-moment load forecast deviation and drift threshold :
[0038] (16)
[0039] Step 9. When ,Will Put it into the storage pool and execute step 10; otherwise, execute step 10 directly;
[0040] Step 10. When ,express Real drift occurs, and the MQRLSTM network is trained using the data in the storage pool to obtain the updated network weights Then follow step 5 to Re-predict and get Quantile Down The power load forecast quantile with no quantile crossing at the moment, and step 11 is executed; otherwise, until step 11 is executed;
[0041] Step 11. The predicted value with quantile 0.5 in is The power load forecast value at the moment ; Then, using formula (17), we can get Probability density function of power load forecast distribution at time , Represents the load value corresponding to the power load forecast distribution, and then and After denormalization, we get Denormalized power load forecast value at time and Probability density function of power load forecast distribution at time :
[0042] (17)
[0043] In formula (17), represents bandwidth, is a Gaussian function.
[0044] The method for predicting the online probability density of electric load considering the influence of virtual drift and real drift described in the present invention is characterized in that step 5 is performed as follows:
[0045] Step 5.1. Use formula (8) to get Quantile Down Conditional quantile of power load at the moment :
[0046] (8)
[0047] In formula (8), express The LSTM hidden layer neural network bias at time, express The LSTM hidden layer neural network weights at the moment; represents the LSTM hidden layer;
[0048] Step 5.2. Use equation (9) to construct the objective function of the MQRLSTM network :
[0049] (9)
[0050] In formula (9), express The actual value of the power load at the moment, R represents the total number of quantiles, Indicates Quantile The quantile loss under , and:
[0051] (10)
[0052] In formula (10), represents the independent variable;
[0053] Step 5.3. Use formula (11) to get Quantile The standardized power load forecast quantile ;
[0054] (11)
[0055] In formula (11), , represents the number of neural units in the LSTM hidden layer, , represents the number of neural units in the monotonic layer, Indicates Quantile The jth neural unit of the LSTM hidden layer to the kth neural unit of the monotonic layer Moment weight;
[0056] Step 5.4. Set the weight range of the K neural units in the monotonic layer to the R neural units in the output layer under R quantiles to , so that in the weight range The weights of the kth neural unit of the monotonic layer to the rth neural unit of the output layer under the rth quantile Perform random initialization;
[0057] Step 5.5. Use formula (12) to get Quantile Down Quantiles of power load forecasting without quantile crossing at any time :
[0058] (12).
[0059] An electronic device of the present invention includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the method for predicting the online probability density of electric loads, and the processor is configured to execute the program stored in the memory.
[0060] The present invention provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and the computer program executes the steps of the method for predicting the online probability density of electric load when the computer program is executed by a processor.
[0061] Compared with the prior art, the present invention has the following beneficial effects:
[0062] 1. The present invention can update the load forecasting model when virtual concept drift occurs. The historical load data and related influencing factors are read through a sliding window, and the variable attention mechanism is used to extract the effective information in the input, and it is input into the MQRLSTM model to predict the future load power and obtain the monotonic quantile. At the same time, the KL divergence of the window data and the historical data and the model prediction index CRPS are monitored to detect the virtual drift and real drift in the data stream, and the model parameters are tuned using Bayesian optimization. Combined with the kernel density estimation method KDE, it is converted into a load probability density curve, and finally the result is denormalized to achieve a comprehensive and detailed probabilistic description of future wind power, thereby providing a scientific decision-making basis for the operation, management and dispatch of the power system.
[0063] 2. The present invention uses an online mode to predict the probability density of power load, combines a sliding window to process continuous data streams, continuously merges the latest data, and discards outdated information, ensuring that the model remains updated and is highly sensitive to data streams, enabling the model to dynamically learn by continuously processing new data, and can effectively deal with concept drift occurring in power load data, thereby improving the accuracy of load forecasting.
[0064] 3. The present invention introduces a variable attention mechanism, which can allocate attention according to the changes in the importance of each time point in the sequence when processing time series data, and pay attention to the newly emerging key information instead of being limited to the fixed patterns learned in the past. This helps to avoid the problem of a sharp drop in model performance due to data changes, and enables the model to maintain relatively stable and accurate prediction performance, thereby providing a more reliable decision-making basis for power generation planning, power grid dispatching, and power market transactions in the power system.
[0065] 4. The present invention uses different measures to handle virtual drift and concept drift in data streams, which can effectively cope with potential changes in data streams. Virtual drift is identified using the KL divergence change between window data, and real drift is detected using the CRPS between the predicted value and the actual value of window data. By processing drift in different categories, new features appearing in the data stream can be better captured, which helps to improve prediction accuracy and further optimize power system resource allocation and operation decisions. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 The figure is an overall flow chart of the method of the present invention. DETAILED DESCRIPTION
[0067] In this embodiment, a method for predicting the online probability density of power load considering the influence of virtual drift and real drift is provided. Figure 1 As shown, the steps are as follows:
[0068] Step 1. Collect historical power loads and related influencing factors and form load characteristic data. In order to eliminate the influence of different dimensions on the prediction results, the data is normalized to obtain the normalized power load characteristic data set. ,in, Represents the normalized The power load characteristic set at the time, and , Represents the normalized The i-th power load characteristic at time, A quantity representing the characteristics of the power load, Indicates duration.
[0069] Step 2. KL divergence is a measure of the difference between two probability distributions. When the KL divergence of the input data changes significantly, it is determined that virtual drift has occurred in the data stream. Calculate using formula (1) The power load characteristic set at the time and The power load characteristic set at the time The divergence between , thus obtaining the divergence set ;
[0070] (1)
[0071] In formula (1), Represents the normalized The i-th power load characteristics at time -1 The probability density function of express The probability density function of .
[0072] Step 3. Calculate using equations (2) and (3) The divergence set of moments The mean and standard deviation ,
[0073] (2)
[0074] (3)
[0075] The threshold setting refers to the three standard deviation principle, that is, if the distance between the divergence value and the mean value exceeds the range of three standard deviations, that is, exceeds the range of the mean value ± 3 standard deviations, it can usually be regarded as an outlier. The judgment threshold of virtual drift is calculated using formula (4): :
[0076] (4)
[0077] when When There is a virtual drift, Put it into the storage pool.
[0078] Step 4. The core idea of the variable attention mechanism is to assign a weight to each element to indicate its importance when processing sequence data. This weight is calculated based on the input data and context information, which can help the model focus on the important parts and ignore irrelevant information when processing data. Weighted to obtain the weighted power load characteristic set .
[0079] Step 4.1. Calculate using formula (5) Attention score ;
[0080] (5)
[0081] In formula (3), , , and There are 4 parameters to be learned. represents the activation function, express The transpose of
[0082] Step 4.2. Calculate using formula (6) Attention distribution :
[0083] (6)
[0084] In formula (4), Represents the activation function.
[0085] Step 4.3. Use formula (7) to calculate the weighted power load characteristic set :
[0086] (7)
[0087] In formula (7), express The i-th power load characteristic after weighting at each moment.
[0088] Step 5. Construct the MQRLSTM network, which mainly includes: LSTM hidden layer, monotonic layer, and output layer. The monotonic layer is to eliminate quantile crossing and make the probability distribution of each output obey the monotonically increasing property. Input into the MQRLSTM network for processing to obtain the predicted quantile of power load ;
[0089] Step 5.1. Use formula (8) to get Quantile Down Conditional quantile of power load at the moment :
[0090] (8)
[0091] In formula (8), express The LSTM hidden layer neural network bias at time, express The LSTM hidden layer neural network weights at the moment; represents the LSTM hidden layer.
[0092] Step 5.2. Use equation (9) to construct the objective function of the MQRLSTM network :
[0093] (9)
[0094] In formula (9), express The actual value of the power load at the moment, R represents the total number of quantiles, Indicates Quantile The quantile loss under , and:
[0095] (10)
[0096] In formula (10), Represents the independent variable.
[0097] Step 5.3. Use formula (11) to get Quantile The standardized power load quantile forecast ;
[0098] (11)
[0099] In formula (11), , represents the number of neural units in the hidden layer of LSTM, , represents the number of neural units in the monotonic layer, Indicates Quantile The weight from the jth neuron in the lower LSTM hidden layer to the kth neuron in the monotonic layer;
[0100] Step 5.4. Set the weight range of the K neural units in the monotone layer under R quantiles to the R neural units in the output layer ; Thus, in the weight range The weights of the kth neural unit in the monotone layer under the rth quantile to the rth neural unit in the output layer Perform random initialization.
[0101] Step 5.5. Use formula (12) to get Quantile Down Prediction quantile of power load without quantile crossing at the moment :
[0102] (12)
[0103] In formula (12), Represents the normalized quantile forecast of electric load.
[0104] Step 6. Calculate the deviation between the predicted value and the actual value of the power load at time t using formula (13): .
[0105] (13)
[0106] In formula (13) Represents the predicted quantiles of the power load without quantile crossing The cumulative distribution of express The actual value of the power load at the moment hour, ,otherwise .
[0107] Step 7. Use equations (14) and (15) to calculate The deviation between the predicted value and the actual value of the power load at the moment The mean and standard deviation ,
[0108] (14)
[0109] (15)
[0110] Step 8. Also refer to the three standard deviation principle and use formula (16) to calculate the warning threshold of the load forecasting model prediction deviation and drift threshold :
[0111] (16)
[0112] when , which means that when the model prediction deviation exceeds the warning level, into the storage pool. After real drift occurs, the model is retrained with the data in the storage pool to obtain the updated network weights , return to step 5 and continue the power load forecast for the next moment.
[0113] Step 9. The predicted value with quantile 0.5 in is The power load forecast value at the moment ; Then, using formula (17), we can get Probability density function of load distribution at time , thus and After denormalization, we get Denormalized power load forecast value at time and The probability density distribution function of power load at the time :
[0114] (17)
[0115] In formula (17), represents bandwidth, is a Gaussian function.
[0116] In this embodiment, an electronic device includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the above method, and the processor is configured to execute the program stored in the memory.
[0117] In this embodiment, a computer-readable storage medium stores a computer program on the computer-readable storage medium, and the computer program executes the steps of the above method when executed by a processor.
Claims
1. A method for predicting the online probability density of power load considering the influence of virtual drift and real drift, characterized in that: Proceed as follows: Step 1. Collect historical power load and related influencing factors and form load characteristic data, then normalize them to obtain the normalized power load characteristic data set. ,in, Represents the normalized The power load characteristic set at the time, and , Represents the normalized The i-th power load characteristic at time, A quantity representing the characteristics of the power load, Indicates duration; Step 2. Calculate using formula (1) The power load characteristic set at the time and The power load characteristic set at the time The divergence between , thus obtaining the divergence set ; (1) In formula (1), Represents the normalized The i-th power load characteristics at time -1 The probability density function of express The probability density function of Step 3. Calculate using equations (2) and (3) The mean of the time and standard deviation : (2) (3) In formula (2) and formula (3), represents the divergence at time n, and , Use formula (4) to calculate the judgment threshold of virtual drift : (4) when When There is a virtual drift, Put it into the storage pool; Step 4. Use variable attention mechanism to Weighted to obtain the weighted power load characteristic set ; Step 4.
1. Calculate using formula (5) Attention score ; (5) In formula (3), , , and There are 4 parameters to be learned. represents the activation function, express The transpose of Step 4.
2. Calculate using formula (6) Attention distribution : (6) In formula (4), represents the activation function; Step 4.
3. Use formula (7) to calculate the weighted power load characteristic set : (7) In formula (7), express The i-th power load characteristics after weighting at each moment; Step 5. Construct the MQRLSTM network, including: LSTM hidden layer, monotonic layer and output layer, and Input into the MQRLSTM network for processing to obtain the predicted quantile of power load ; Step 6. Use formula (13) to calculate the probability density function of the power load forecast distribution at time t: The actual value of power load The deviation between : (13) In formula (13), represents the probability density function of the power load forecast distribution at time t, represents the load value corresponding to the probability density function of the power load forecast distribution at time t, express The actual value of the power load at the moment season , otherwise, let ; Step 7. Use equations (14) and (15) to calculate Probability density function of power load forecast distribution at time With the true value The mean deviation between and standard deviation : (14) (15) In formula (14) and formula (15), The probability density function representing the predicted distribution of power load at time n and the actual value of power load at time n The deviation between ; The load value corresponding to the probability density function representing the power load forecast distribution at time n; Step 8. Use formula (16) to calculate Warning threshold for moment-to-moment load forecast deviation and drift threshold : (16) Step 9. When ,Will Put it into the storage pool and execute step 10; otherwise, execute step 10 directly; Step 10. When ,express Real drift occurs, and the MQRLSTM network is trained using the data in the storage pool to obtain the updated network weights Then follow step 5 to Re-predict and get Quantile Down The power load forecast quantile with no quantile crossing at the moment, and step 11 is executed; otherwise, until step 11 is executed; Step 11. The predicted value with quantile 0.5 in is The power load forecast value at the moment ; Then, using formula (17), we can get Probability density function of power load forecast distribution at time , Represents the load value corresponding to the power load forecast distribution, and then and After denormalization, we get Denormalized power load forecast value at time and Probability density function of power load forecast distribution at time : (17) In formula (17), represents bandwidth, is a Gaussian function.
2. According to claim 1, a method for predicting the online probability density of power load considering the influence of virtual drift and real drift is characterized in that: Step 5 is performed as follows: Step 5.
1. Use formula (8) to get Quantile Down Conditional quantile of power load at the moment : (8) In formula (8), express The LSTM hidden layer neural network bias at time, express The LSTM hidden layer neural network weights at the moment; represents the LSTM hidden layer; Step 5.
2. Use equation (9) to construct the objective function of the MQRLSTM network : (9) In formula (9), express The actual value of the power load at the moment, R represents the total number of quantiles, Indicates Quantile The quantile loss under , and: (10) In formula (10), represents the independent variable; Step 5.
3. Use formula (11) to get Quantile The standardized power load forecast quantile ; (11) In formula (11), , represents the number of neural units in the LSTM hidden layer, , represents the number of neural units in the monotonic layer, Indicates Quantile The jth neural unit of the LSTM hidden layer to the kth neural unit of the monotonic layer Moment weight; Step 5.
4. Set the weight range of the K neural units in the monotonic layer to the R neural units in the output layer under R quantiles to , so that in the weight range The weights of the kth neural unit of the monotonic layer to the rth neural unit of the output layer under the rth quantile Perform random initialization; Step 5.
5. Use formula (12) to get Quantile Down Quantiles of power load forecasting without quantile crossing at any time : (12)。 3. An electronic device, comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the method for online probability density prediction of electric load as described in claim 1 or 2, and the processor is configured to execute the program stored in the memory.
4. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for predicting online probability density of electric load according to claim 1 or 2 are executed.
Citation Information
Patent Citations
Short-term load probability density prediction method, device and system based on quantile regression
CN113868938A
Power load prediction method and system based on concept drift detection
CN115513951A
Photovoltaic power online probability prediction method under complex concept drift
CN117236488A
Incremental photovoltaic power prediction method considering concept drift and privacy protection
CN117592578A
Systems and methods for concept drift learning with alternating learners
US20180150036A1
Cited By
Multi-starting-point drift position prediction method and model, electronic equipment and storage medium
CN121030245A
Data mining method applied to hardware product control system
CN121579853A