Improved sac weighted load multi-model power prediction method and system based on similar day extraction

By improving the SAC weighted load multi-model forecasting method based on similar day extraction, and combining LightGBM, CA-PatchTST and LSSVM models, the weights are dynamically adjusted to solve the limitations and adaptability problems of existing models in complex load changes, and achieve higher accuracy load forecasting.

CN120725232BActive Publication Date: 2025-12-30SHANDONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511163987.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-20
Publication Date
2025-12-30
Estimated Expiration
2045-08-20

AI Technical Summary

Technical Problem

Existing load forecasting models suffer from limitations of single models, inflexible weight allocation, and insufficient model combination strategies when faced with complex power load changes, resulting in low forecast accuracy and poor adaptability.

Method used

An improved SAC-weighted load multi-model prediction method based on similar day extraction is adopted. Similar days are selected by the MIC-GRA algorithm, and LightGBM, CA-PatchTST and LSSVM models are combined. The SAC algorithm is used to dynamically adjust the weights and make full use of the advantages of each model for prediction.

Benefits of technology

It improves the accuracy and adaptability of load forecasting, provides more reliable short-term load forecasting results, and helps power system optimize dispatching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120725232B_ABST
    Figure CN120725232B_ABST
Patent Text Reader

Abstract

The present application relates to an improved SAC weighted load multi-model power prediction method and system based on similar day extraction, belonging to the technical field of power prediction. First, based on the MIC-GRA algorithm, 5 similar days highly correlated with the to-be-tested day are screened from the massive historical data and input into the state space of SAC deep learning. Second, 3 different types of basic models with complementary advantages are selected as the constituent elements of the load prediction combination model, and the load prediction result of the to-be-tested day is obtained. Finally, the environment configured with similar day data is interacted with the agent, and the sub-models are configured with weights respectively to obtain the combination model prediction result and improve the overall prediction performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an improved SAC weighted load multi-model power prediction method and system based on similar day extraction, belonging to the field of power prediction technology. Background Technology

[0002] Short-term load forecasting, a crucial component of power system operation, provides indispensable data for power generation planning, dispatching, and market trading decisions. Accurate short-term load forecasting helps power companies optimize generator unit combinations, reduce operating costs, and improve the power system's ability to respond to emergencies, ensuring the safe and stable operation of the power grid. In recent years, with the rapid development of big data and artificial intelligence technologies, short-term load forecasting methods have evolved from traditional statistical models to modern machine learning and deep learning models. Currently, researchers have extensively explored various advanced models, including Long Short-Term Memory (LSTM), Convolutional Neural Networks (CNN), and Transformers, and combined them with data preprocessing and feature engineering techniques to continuously improve forecast accuracy and adapt to increasingly complex power load variation patterns.

[0003] However, considering the complex fluctuations in load in real-world scenarios, the limitations of single models in processing power load data are becoming increasingly apparent, resulting in poor model fitting and low prediction accuracy. While traditional BP neural network models can capture the nonlinear characteristics of load data to some extent, they are prone to getting trapped in local optima during training, leading to slow convergence and insufficient generalization ability, making it difficult to consistently provide high-accuracy predictions in practical applications. Time series models such as ARIMA, while simplifying mathematical expressions when dealing with load data exhibiting clear trends and seasonal characteristics, perform poorly on random fluctuations and complex nonlinear relationships within the data. Existing models, although improving a single model can enhance load prediction accuracy to some extent, only demonstrate good performance on specific datasets and lack universality for understanding load variation patterns across different scenarios.

[0004] Therefore, to overcome the limitations of single models, multi-model ensemble forecasting methods are gradually becoming a new trend in load forecasting. Multi-model ensemble forecasting can reduce the dependence of load forecasting on a single model. Through the complementarity and correction of multiple models, the risk of a single model failure significantly impacting the overall forecast result is reduced. For example, a paper on multivariate short-term load forecasting based on digital twins and multi-model fusion proposes a method that uses kernel extreme learning machines and bidirectional long short-term memory networks (BiLSTM) to predict high-frequency and low-frequency load components, fusing and reconstructing the short-term load forecast result. Compared with a single BiLSTM forecasting model, it can effectively cope with load fluctuations and nonlinearities, improving the model's forecast accuracy. However, existing multi-model ensemble methods still have some shortcomings. On the one hand, the use of fixed weight allocation mechanisms makes it impossible to dynamically adjust the contribution of each model according to real-time changes in load data, thus limiting the flexibility and adaptability of model ensembles when facing rapidly changing load scenarios. On the other hand, some ensemble strategies are relatively simple in model selection and integration methods, failing to fully utilize the advantages of each model at different time scales and feature dimensions, thereby limiting the improvement of overall forecast performance. Therefore, this invention is proposed. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides an improved SAC weighted load multi-model power prediction method and system based on similar day extraction. First, using the MIC-GRA algorithm, five similar days related to the height of the day to be predicted are selected from massive historical data and input into the SAC deep learning environment. Second, five different types of basic models with complementary advantages are selected as components of the load prediction combined model to obtain the load prediction result for the day to be predicted. Finally, the environment configuring the similar day data interacts with the agent to assign weights to the sub-models, obtaining the combined model prediction result.

[0006] The technical solution of the present invention is as follows:

[0007] An improved SAC-weighted load multi-model power prediction method based on similar day extraction is described below:

[0008] (1) Data preprocessing: historical load data and multivariate meteorological data are preprocessed to remove duplicate and abnormal data, supplement missing data, and normalize the data.

[0009] (2) Load similarity day extraction: Using the weighted grey relational similarity day extraction algorithm based on MIC, historical dates similar to the day to be measured are screened. First, the MIC coefficients of multivariate meteorology and load power are calculated, and the meteorological factors affecting the load power level are sorted and weighted. Then, historical dates similar to the day to be measured are screened based on the MIC results.

[0010] (3) Multi-model load forecasting: In order to overcome the problem of poor accuracy of short-term power forecasting of single model load, the LightGBM model of tree model, the CA-PatchTST model of neural network and the least squares support vector machine model (LSSVM) of support vector machine are selected as three sub-models of the combined model. The three models are used to predict the load sequence of the same day to be measured, with a sampling interval of 15 min, to obtain 3 prediction sequences.

[0011] Tree models can provide stable baseline predictions, neural network models can capture complex temporal dynamics, and support vector machine models can leverage their robustness when data is scarce but features are abundant. Therefore, this invention comprehensively considers the advantages of various models and selects three models as sub-models from each category to reduce the overfitting and underfitting problems that may exist in a single model, better adapt to the variability and uncertainty of load data, and thus provide more reliable short-term load forecasts for the power system.

[0012] (4) SAC weight configuration: The extracted similar day data is integrated into the state space of SAC. The prediction error and performance ranking of the sub-model are combined to configure the weight coefficients for the prediction results of each sub-model. The weights are dynamically adjusted according to the state changes perceived from the environment. The weighted results are output to obtain the final result of load combination prediction based on dynamic weights.

[0013] According to a preferred embodiment of the present invention, step (2) specifically includes the following steps:

[0014] (21) Correlation analysis based on MIC coefficient:

[0015] First, the MIC coefficient between meteorological factors and load data is calculated as a weighting factor to quantify the correlation between each meteorological element and the load. Then, it is incorporated into the grey relational analysis process, and then the weighted grey relational degree is obtained by introducing the correlation weights between multiple meteorological factors and load.

[0016] The MIC coefficient is a statistic used to measure the strength of the relationship between two variables. It is defined as D(X, Y) containing the features to be analyzed. and load power A two-dimensional plane, data points (x i y i Distributed on the XY plane, divided into planar meshes. Calculate the maximum mutual information value within each grid cell:

[0017] (1)

[0018] in, For the maximum mutual information matrix, For mutual information content, For grid The maximum possible mutual information of the distribution;

[0019] The formula for calculating the MIC coefficient is:

[0020] (2)

[0021] In the formula, The number of grid divisions is used as a constraint variable, and based on experience, it is taken as 0.6 times the total number of samples. The value of MIC is in the range of [-1, 1].

[0022] (22) Based on the MIC results, filter historical dates similar to the date to be tested, specifically;

[0023] (221) Data preprocessing: In order to eliminate the influence of differences in the dimensions and orders of magnitude of the original data on the analysis results, the meteorological data and load data were dimensionless.

[0024] (222) Constructing the reference sequence and comparison sequence: Define the reference sequence X L A matrix consisting of meteorological data sequences for the date to be predicted. ;

[0025] Compare sequence X pre This is a historical date meteorological data sequence matrix. Where m is the m-th feature, the features used for similar day screening include multivariate weather and weekday types, and the construction... A historical vector set consisting of meteorological data from k historical dates;

[0026] (223) Calculate the weights. Calculate the weight ratio of each meteorological factor and weekday type, and other multidimensional features in the selection of similar days. Based on the MIC coefficient calculation results, the weight coefficient of each MIC coefficient in the total MIC coefficient is used as the weight coefficient of that feature. The calculation formula is as follows:

[0027] (3)

[0028] in, Let be the weight of the i-th component. This represents the coefficient matrix containing the weights. ;

[0029] (224) Calculate the weighted grey relational coefficient. Based on the grey relational analysis method, calculate the similarity between the date to be measured and historical dates, including weather, weekday category, and other factors. The formula is:

[0030] (4)

[0031] Where a is the minimum difference between the two poles, b is the maximum difference between the two poles, ρ is the resolution coefficient (usually taken as 0.5), and X prej (k) represents the data sequence of the j-th indicator within the historical date k days; γ is the grey relational coefficient. The grey relational coefficient between the j-th indicator and the k-th historical day is denoted as .

[0032] Based on the weighting coefficients, the final weighted grey relational coefficient δ is obtained as follows:

[0033] (5)

[0034] Where n is the length of the time series, the similarity ranking between each historical day and the day to be tested is obtained according to the formula. The larger the δ is, the higher the similarity between the two. The top five dates with the highest similarity are selected as the similar days of the day to be tested.

[0035] According to a preferred embodiment of the present invention, in step (3), the LightGBM model (Light Gradient Boosting Machine, LightGBM) is a gradient boosting machine algorithm used to solve classification and regression problems. The load data is usually a massive dataset. Compared with other GBMs such as XG-Boost, LightGBM continuously improves the learner performance through multiple iterations.

[0036] LightGBM combines multiple weak learners (decision trees) into a strong model. Based on the gradient boosting framework, it iteratively optimizes the model's residuals to gradually improve the model's predictive performance. Assuming the training set is... The dataset is n, where x i For the first in the input space A dimensional vector, if the learner obtained in the previous iteration is F t-1 (x), the loss function is L(y, F) t-1 (x)), then the current iteration target f t (x) is:

[0037] (6)

[0038] Among them, f t (x) minimizes the loss; C is the loss function that measures the difference between the model's predicted value and the actual value, and arg represents the parameter value that minimizes the loss function C;

[0039] The negative gradient of the loss function is calculated as the approximate residual for the current iteration, defined as g. t Its expression is as follows:

[0040] (7)

[0041] By minimizing the squared error to fit the weak learner, we obtain

[0042] (8)

[0043] After one round of iteration, the updated strong learner is:

[0044] (9)

[0045] in, The learning rate is used to display the control step size.

[0046] After T iterations, the load forecast output expression is:

[0047] (10)

[0048] in, This is the output of the LightGBM model. This is the final load forecast result.

[0049] According to a preferred embodiment of the present invention, in step (3), the core idea of ​​the least squares support vector machine model is to optimize the model parameters by minimizing the squared error, for a given training data The least squares support vector machine model optimization problem is expressed as:

[0050] (11)

[0051] (12)

[0052] in, It is a nonlinear mapping from the input space to a high-dimensional feature space. It is a weight vector, representing the model complexity. It is the error vector. It is a bias term. It is a regularization parameter;

[0053] To solve constrained optimization problems, we introduce the Lagrange function and dual optimization, assuming the Lagrange multipliers are... As can be seen from the optimization conditions, let the Lagrange function be set to... , , and The partial derivatives are zero, and the simplified expression for the kernel function is:

[0054] (13)

[0055] in, It is a kernel function, which can effectively reduce the computational complexity of high-dimensional spaces and plays a core role in the LSSVM model. In summary, the load prediction output expression based on the least squares support vector machine model is:

[0056] (14)

[0057] According to a preferred embodiment of the present invention, in step (3), considering the differences between the power time series curve and the multivariate meteorological factor sequence, the historical data of similar days are first input into the CA-PatchTST model for encoding, and the multivariate meteorological data of the day to be measured are input into the multi-head attention mechanism for encoding. Then, the cross-attention mechanism is used for fusion, and finally the prediction result is output.

[0058] Define the input similar day historical power data as Meteorological characteristic data ,in L, T These are load and meteorological data, which represent the sequence length. These are power and meteorological characteristics, respectively.

[0059] When processing time series data, the CA-PatchTST model adopts a unique preprocessing method. First, the input time series is divided into multiple patches. Then, these patches are position-encoded. Finally, the encoded data is sent to the Transformer encoder for further processing. The specific steps are as follows:

[0060] (31) Meteorological-Power Coding:

[0061] First, the historical power data is divided into... M One patch block:

[0062] (15)

[0063] in, P For the size of the patch, Then it is mapped and positionally encoded;

[0064] After encoding, the result is input into a Transformer encoder (multi-head self-attention mechanism) for further encoding, and the output power is encoded as follows: ;

[0065] Similarly, by mapping and encoding multidimensional meteorological features, meteorological codes are obtained. ;

[0066] (32) Feature fusion of multi-source heterogeneous data based on cross-attention mechanism:

[0067] Define Query-Value: Power Encoding (Target sequence) is Query, meteorological code. For Value, the formula for calculating cross-attention is as follows:

[0068] (16)

[0069] Where CA stands for Cross Attention, and Softmax is the function name. These are learnable parameters used to map queries, keys, and values ​​to a new space, respectively. This refers to the model dimension, i.e., the size of the hidden layer;

[0070] After processing the raw power using a cross-attention mechanism and fusing it with meteorological features, we obtain:

[0071] (17)

[0072] in, This represents the fused features. LayerNorm is short for Layer Normalization Processing; FFN (Feed-Forward Network) is a feedforward neural network, which is usually a simple network consisting of two fully connected layers, used to further process the output after the cross-attention mechanism;

[0073] (33) Output load forecast results:

[0074] The result after feature fusion Perform global average pooling to obtain the feature vector. The fused feature vectors are mapped onto the prediction space of 96 times for the predicted day, and the final load prediction result is as follows:

[0075] (18)

[0076] in, For the weights of the linear layer, This is a bias term.

[0077] According to a preferred embodiment of the present invention, in step (4), in the SAC algorithm, the environment refers to the system with which the agent interacts to learn the strategy; in load forecasting or time series forecasting, the environment is the generator of time series data. The specific environment configuration and weight adjustment steps are as follows:

[0078] (41) Input the extracted top 5 similar day historical data into the state space of SAC;

[0079] (42) Use sub-models to perform load forecasting respectively, and input the sub-model forecasting results into the state space of SAC;

[0080] (43) A reward function based on sub-model ranking weight and similar day performance score weight is adopted. With a sampling interval of 15 minutes, 96 power values ​​are predicted every day. That is, SAC makes a decision once and outputs the load prediction values ​​of 96 points on the day to be tested.

[0081] (44) Weighted integration: SAC assigns weights to the sub-models at each time step through the interaction between the environment and the agent, and performs a weighted average of the prediction results of the sub-models according to the assigned weights to obtain the final prediction result.

[0082] According to a preferred embodiment of the present invention, in step (43), the weights are configured as follows:

[0083] ① SAC state set:

[0084] (19)

[0085] in, These are the top five similar historical data. These are the prediction results from the LightGBM model, the least squares support vector machine model, and the CA-PatchTST model, respectively. These are the prediction errors over the past k time steps;

[0086] ② Action set A:

[0087] (20)

[0088] in, These are the weights of the three sub-models, and they are dynamically changing values;

[0089] ③ Reward function formula:

[0090] (twenty one)

[0091] in, The SAC learnable parameters control the weights of historical ranking factors and similar daily performance scores, with initial values ​​set to 0.5 and 0.5 respectively, and dynamically adjusted through SAC algorithm modeling.

[0092] Historical ranking factor weights:

[0093] Let be the normalized average rank predicted by the k-th sub-model among similar days, calculated using the following formula:

[0094] =Average ranking of model k's predictions across 5 similar days / 5;

[0095] 1- The original rankings are converted into positive contribution values; the higher the sub-model ranking, the better. The smaller, 1- The closer a value is to 1, the higher the weight contribution of the sub-model; conversely, the lower the sub-model's ranking, the lower its weight contribution. The larger, 1- The closer it is to 0, the lower the weight contribution of the sub-model;

[0096] Weighting of similar day performance scores:

[0097] The calculation formula is as follows:

[0098] (twenty two)

[0099] Where, sim d The similarity between the d-th similar day and the day to be tested is the result calculated using weighted grey relational analysis. This formula represents the normalized RMSE of model k on the d-th similar day. Its function is to calculate the weighted performance score of the k-th model on the similar day.

[0100] ④ The final load forecast result of the weighted integration is:

[0101] (twenty three)

[0102] An improved SAC-weighted load multi-model power prediction system based on similar day extraction includes:

[0103] The data preprocessing module is used to preprocess historical load data and multivariate meteorological data, remove duplicate and abnormal data, supplement missing data, and normalize the data.

[0104] The load similarity day extraction module uses a weighted grey relational similarity day extraction algorithm based on MIC to filter historical dates similar to the day to be measured. First, the MIC coefficients of multivariate meteorological and load power are calculated, and the meteorological factors affecting the load power level are ranked and weighted. Then, historical dates similar to the day to be measured are filtered based on the MIC results.

[0105] The multi-model load forecasting module selects the LightGBM model (tree model), the CA-PatchTST model (neural network model), and the Least Squares Support Vector Machine (LSSVM) model (support vector machine model) as three sub-models of the combined model. The three models are used to forecast the load sequence of the same day to be measured, with a sampling interval of 15 minutes, to obtain three forecast sequences.

[0106] The SAC weight configuration module is used to integrate extracted similar day data into the SAC state space, combine the prediction error and performance ranking of the sub-models, configure weight coefficients for the prediction results of each sub-model, and dynamically adjust the weights according to the state changes perceived from the environment. The weighted results are then output to obtain the final result of load combination prediction based on dynamic weights.

[0107] The beneficial effects of this invention are as follows:

[0108] 1. This invention has designed a new reward function formula for SAC based on similar days. By comprehensively considering the historical performance of the model and the adaptability of the current similar day data, the integrated weights of each model are dynamically allocated.

[0109] 2. This invention has designed a separate method for calculating similar days. First, the MIC coefficient of multivariate meteorological and load power is calculated, and the meteorological factors affecting the load power level are ranked and weighted. Then, based on the MIC results, historical dates similar to the day to be predicted are screened. The contribution of each feature to load prediction is comprehensively measured and utilized to improve the quality of similarity analysis and the reliability of prediction.

[0110] 3. Among the three sub-models of this invention, CA-PatchTST is a variant based on Transformer. LSSVM (Least Squares Support Vector Machine) is an improvement on the Support Vector Machine algorithm and belongs to the machine learning algorithms within supervised learning. LSSVM optimizes the decision tree model through gradient boosting, making it particularly suitable for handling large-scale data, such as load forecasting. It optimizes model parameters by minimizing the sum of squared errors, resulting in good stability and prediction accuracy when dealing with regression problems. Combining the three sub-models helps to leverage the advantages of different models, improve the accuracy of load forecasting, and provide assistance for optimized power system scheduling. Attached Figure Description

[0111] Figure 1 This is a schematic diagram of the process of the present invention;

[0112] Figure 2 This is a schematic diagram illustrating the principle of the histogram algorithm of the present invention;

[0113] Figure 3 This is a schematic diagram of the least squares support vector machine model algorithm of the present invention;

[0114] Figure 4 This is a diagram of the CA-PatchTST model architecture of the present invention;

[0115] Figure 5 This is a schematic diagram of the independent PatchTST channel of the present invention;

[0116] Figure 6This is a schematic diagram illustrating the reinforcement learning principle of the present invention.

[0117] Figure 7 This is a schematic diagram of the SAC algorithm of the present invention;

[0118] Figure 8 This is a chart showing the ranking results for similar days;

[0119] Figure 9 Weight allocation diagram for sub-models;

[0120] Figure 10 This is a graph showing the prediction results of the present invention and the comparison model based on the predicted date.

[0121] Figure 11 The graph shows the power prediction results of the present invention and the comparative model for different load electricity consumption behaviors;

[0122] Figure 12 This is a comparison chart of the prediction effects of the similarity extraction method of the present invention with other extraction methods;

[0123] Figure 13 This is a radar chart of the model-based error index for the examples of this invention.

[0124] Figure 14 This is a radar chart showing the error index based on the similarity day algorithm in the example of this invention. Detailed Implementation

[0125] The present invention will be further described below with reference to the embodiments and accompanying drawings, but is not limited thereto.

[0126] Example 1:

[0127] like Figure 1 As shown, this embodiment provides an improved SAC-weighted load multi-model power prediction method based on similar day extraction, and the steps are as follows:

[0128] (1) Data preprocessing: historical load data and multivariate meteorological data are preprocessed to remove duplicate and abnormal data, supplement missing data, and normalize the data.

[0129] (2) Load similarity day extraction: Using the weighted grey relational similarity day extraction algorithm based on MIC, historical dates similar to the day to be measured are screened. First, the MIC coefficients of multivariate meteorological and load power are calculated, and the meteorological factors affecting the load power level are ranked and weighted. Then, historical dates similar to the day to be measured are screened based on the MIC results. The specific steps are as follows:

[0130] (21) Correlation analysis based on MIC coefficient:

[0131] Existing common similarity analysis methods include Euclidean distance, Pearson correlation coefficient, and grey relational analysis (GRA). Considering the varying degrees of influence of each feature involved in the similarity calculation on load power, using only a method based on summing average distances to extract similar samples may affect the accuracy of similar day extraction. Therefore, a more refined method is needed to comprehensively measure and utilize the contribution of each feature to load forecasting, thereby improving the quality of similarity analysis and the reliability of forecasts. Based on this, a similar day extraction algorithm based on the maximum information coefficient (MIC) and GRA is proposed: First, the MIC coefficient between meteorological factors and load data is calculated as a weighting factor to quantify the correlation between each meteorological element and the load; then, it is integrated into the grey relational analysis process, and finally, by introducing the correlation weights between multivariate meteorological data and load, a weighted grey relational degree is obtained.

[0132] The MIC coefficient is a statistic used to measure the strength of the relationship between two variables. It is defined as D(X, Y) containing the features to be analyzed. and load power A two-dimensional plane, data points (x i y i Distributed on the XY plane, divided into planar meshes. Calculate the maximum mutual information value within each grid cell:

[0133] (1)

[0134] in, For the maximum mutual information matrix, For mutual information content, For grid The maximum possible mutual information of the distribution;

[0135] The formula for calculating the MIC coefficient is:

[0136] (2)

[0137] In the formula, The number of grid divisions is used as a constraint variable, and based on experience, it is taken as 0.6 times the total number of samples. The value of MIC is in the range of [-1, 1].

[0138] (22) Based on the MIC results, filter historical dates similar to the date to be tested, specifically;

[0139] Grey relational analysis is a multi-factor statistical analysis method. Its essence is to compare the similarity of the geometric shapes of data sequence curves to determine the degree of correlation between the compared objects, and to determine the similarity between each historical reference day and the day to be measured based on the grey relational coefficient.

[0140] (221) Data preprocessing: In order to eliminate the influence of differences in the dimensions and orders of magnitude of the original data on the analysis results, the meteorological data and load data were dimensionless.

[0141] (222) Constructing the reference sequence and comparison sequence: Define the reference sequence X L A matrix consisting of meteorological data sequences for the date to be predicted. ;

[0142] Compare sequence X pre This is a historical date meteorological data sequence matrix. Where m is the m-th feature, the features used for similar day screening include multivariate weather and weekday types, and the construction... A historical vector set consisting of meteorological data from k historical dates;

[0143] (223) Calculate the weights. Calculate the weight ratio of each meteorological factor and weekday type, and other multidimensional features in the selection of similar days. Based on the MIC coefficient calculation results, the weight coefficient of each MIC coefficient in the total MIC coefficient is used as the weight coefficient of that feature. The calculation formula is as follows:

[0144] (3)

[0145] in, Let be the weight of the i-th component. This represents the coefficient matrix containing the weights. ;

[0146] (224) Calculate the weighted grey relational coefficient. Based on the grey relational analysis method, calculate the similarity between the date to be measured and historical dates, including weather, weekday category, and other factors. The formula is:

[0147] (4)

[0148] Where a is the minimum difference between the two poles, b is the maximum difference between the two poles, ρ is the resolution coefficient (usually taken as 0.5), and X prej (k) represents the data sequence of the j-th indicator within the historical date k days; γ is the grey relational coefficient. The grey relational coefficient between the j-th indicator and the k-th historical day is denoted as .

[0149] Based on the weighting coefficients, the final weighted grey relational coefficient δ is obtained as follows:

[0150] (5)

[0151] Where n is the length of the time series, the similarity ranking between each historical day and the day to be measured is obtained according to the formula. The larger the δ is, the higher the similarity between the two. The top five similarity ranking dates are selected as similar days to the day to be measured. The meteorological data of similar days are used as part of the load prediction input of the sub-model and input into the state space of SAC to configure the model weight allocation process and reward function, which helps to improve the accuracy of load prediction.

[0152] (3) Multi-model load forecasting: In order to overcome the problem of poor accuracy of short-term power forecasting of single model load, the LightGBM model of tree model, the CA-PatchTST model of neural network and the least squares support vector machine model of support vector machine are selected as three sub-models of the combined model. The three models are used to predict the load sequence of the same day to be measured, with a sampling interval of 15 minutes, to obtain 3 prediction sequences.

[0153] LightGBM (Light Gradient Boosting Machine) is a gradient boosting machine algorithm used to solve classification and regression problems. The payload data is usually a massive dataset. Compared with other GBMs such as XG-Boost, LightGBM continuously improves the learner performance through multiple iterations.

[0154] LightGBM combines multiple weak learners (decision trees) into a strong model. Based on the gradient boosting framework, it iteratively optimizes the model's residuals to gradually improve the model's predictive performance. Assuming the training set is... The dataset is n, where x i For the first in the input space A dimensional vector, if the learner obtained in the previous iteration is F t-1 (x), the loss function is L(y, F) t-1 (x)), then the current iteration target f t (x) is:

[0155] (6)

[0156] Among them, f t (x) minimizes the loss; C is the loss function that measures the difference between the model's predicted value and the actual value, and arg represents the parameter value that minimizes the loss function C;

[0157] The negative gradient of the loss function is calculated as the approximate residual for the current iteration, defined as g. t Its expression is as follows:

[0158] (7)

[0159] By minimizing the squared error to fit the weak learner, we obtain

[0160] (8)

[0161] After one round of iteration, the updated strong learner is:

[0162] (9)

[0163] in, The learning rate is used to display the control step size.

[0164] After T iterations, the load forecast output expression is:

[0165] (10)

[0166] in, This is the output of the LightGBM model. This is the final load forecast result.

[0167] The Least Squares Support Vector Machine (LSSVM) model is a variant of the traditional SVM (least squares). By introducing the least squares method to simplify the optimization process, it transforms the quadratic optimization problem into solving a system of linear equations, reducing the number of variables, lowering the algorithm complexity, and improving the training speed of the model.

[0168] The core idea of ​​the least squares support vector machine model is to optimize the model parameters by minimizing the squared error, given the training data. The least squares support vector machine model optimization problem is expressed as:

[0169] (11)

[0170] (12)

[0171] in, It is a nonlinear mapping from the input space to a high-dimensional feature space. It is a weight vector, representing the model complexity. It is the error vector. It is a bias term. It is a regularization parameter;

[0172] To solve constrained optimization problems, we introduce the Lagrange function and dual optimization, assuming the Lagrange multipliers are... As can be seen from the optimization conditions, let the Lagrange function be set to... , , and The partial derivatives are zero, and the simplified expression for the kernel function is:

[0173] (13)

[0174] in, It is a kernel function, which can effectively reduce the computational complexity of high-dimensional spaces and plays a core role in the LSSVM model. In summary, the load prediction output expression based on the least squares support vector machine model is:

[0175] (14)

[0176] The CA-PatchTST model (Patch-based Time Series Transformer) is a time series forecasting model based on the Transformer architecture, designed specifically for long-term time series forecasting tasks. It effectively captures local and global features in time series by dividing the time series into small blocks and utilizing the powerful modeling capabilities of the Transformer.

[0177] This invention proposes a load forecasting process for the CA-PatchTST model based on cross-attention mechanism for heterogeneous fusion of multivariate data. Considering the differences between power time series curves and multivariate meteorological factor sequences, historical data from similar days are first input into the CA-PatchTST model for encoding, while multivariate meteorological data from the day to be predicted are input into a multi-head attention mechanism for encoding. Then, the cross-attention mechanism is used for fusion, and finally, the forecast result is output.

[0178] Define the input similar day historical power data as Meteorological characteristic data ,in L, T These are load and meteorological data, which represent the sequence length. These are power and meteorological characteristics, respectively.

[0179] When processing time series data, the CA-PatchTST model adopts a unique preprocessing method. First, the input time series is divided into multiple patches. Then, these patches are position-encoded. Finally, the encoded data is sent to the Transformer encoder for further processing. The specific steps are as follows:

[0180] (31) Meteorological-Power Coding:

[0181] First, the historical power data is divided into... M One patch block:

[0182] (15)

[0183] in, P For the size of the patch, Then, the data is mapped and positionally encoded. Compared to the traditional Transformer model, the CA-PatchTST model introduces this "block-encoding" processing flow in the data input stage, reducing attention memory and computational complexity, thereby achieving more efficient processing of time-series data. By independently inputting different data into the Transformer encoder, noise interference can be effectively prevented.

[0184] After encoding, the result is input into a Transformer encoder (multi-head self-attention mechanism) for further encoding, and the output power is encoded as follows: ;

[0185] Similarly, by mapping and encoding multidimensional meteorological features, meteorological codes are obtained. ;

[0186] (32) Feature fusion of multi-source heterogeneous data based on cross-attention mechanism:

[0187] Define Query-Value: Power Encoding (Target sequence) is Query, meteorological code. For Value, the formula for calculating cross-attention is as follows:

[0188] (16)

[0189] Where CA stands for Cross Attention, and Softmax is the function name. These are learnable parameters used to map queries, keys, and values ​​to a new space, respectively. This refers to the model dimension, i.e., the size of the hidden layer;

[0190] After processing the raw power using a cross-attention mechanism and fusing it with meteorological features, we obtain:

[0191] (17)

[0192] in, This represents the fused features. LayerNorm is short for Layer Normalization Processing; FFN (Feed-Forward Network) is a feedforward neural network, which is usually a simple network consisting of two fully connected layers, used to further process the output after the cross-attention mechanism;

[0193] (33) Output load forecast results:

[0194] The result after feature fusion Perform global average pooling to obtain the feature vector. The fused feature vectors are mapped onto the prediction space of 96 times for the predicted day, and the final load prediction result is as follows:

[0195] (18)

[0196] in, For the weights of the linear layer, This is a bias term.

[0197] (4) SAC weight configuration: The extracted similar day data is integrated into the state space of SAC. The prediction error and performance ranking of the sub-model are combined to configure the weight coefficients for the prediction results of each sub-model. The weights are dynamically adjusted according to the state changes perceived from the environment. The weighted results are output to obtain the final result of load combination prediction based on dynamic weights.

[0198] Deep Reinforcement Learning (DRL) is a product of combining deep learning and reinforcement learning. It combines the powerful representational capabilities of deep neural networks with the decision-making abilities of reinforcement learning to achieve intelligent decision-making in complex environments. DRL enables an agent to learn optimal policies through interaction with the environment, maximizing cumulative rewards. In DRL, the agent observes the state s of the environment and takes action a. The environment then returns a new state s′ and a reward r based on the agent's action.

[0199] The SAC algorithm, or Soft Actor-Critic (SAC) algorithm, is an advanced DRL (Depth Reinforcement Learning) algorithm, a variant of the traditional Actor-Critic algorithm, applicable to continuous action spaces (SAC). The core of the SAC algorithm lies in introducing the idea of ​​maximum entropy reinforcement learning. "Entropy" is an important indicator of the randomness of the probability distribution of policy output actions, reflecting the degree of policy uncertainty; the higher the entropy value, the stronger the randomness of the policy. SAC's entropy mechanism abandons the traditional deterministic policy and instead adopts a stochastic policy. The introduction of "entropy" improves the SAC algorithm's ability to better balance determinism and randomness during state space exploration, providing crucial support for efficient learning in complex and variable power load environments.

[0200] Maximum entropy reinforcement learning objective:

[0201] The goal of traditional DRL is to maximize the expected cumulative reward formula:

[0202] (twenty four)

[0203] in, This represents all possible next states. and rewards The expected value is calculated based on the state transition probability and the reward distribution. Indicates the next state Below, all possible actions The maximum value of the value function in the equation is known as the Bellman equation.

[0204] After adding an entropy term to the SAC algorithm, a policy randomness weight is incorporated into the reward. The expected cumulative reward equation is as follows:

[0205] (25)

[0206] in, Indicates the state Take action below The soft value function, It's an instant reward. It is the weight of entropy, which controls the balance between entropy and reward; It is in state Next strategy The entropy. SAC adds an entropy term to the original Bellman equation, incorporating it as part of the reward function, thereby encouraging policy randomness and improving exploration capabilities.

[0207] In the SAC algorithm, the environment refers to the system with which the agent interacts to learn the strategy. In load forecasting or time series forecasting, the environment is the generator of time series data. The specific steps for environment configuration and weight adjustment are as follows:

[0208] (41) Input the extracted top 5 similar day historical data into the state space of SAC;

[0209] (42) Use sub-models to perform load forecasting respectively, and input the sub-model forecasting results into the state space of SAC;

[0210] (43) A reward function based on sub-model ranking weight and similar day performance score weight is adopted. With a sampling interval of 15 minutes, 96 power values ​​are predicted every day. That is, SAC makes a decision once and outputs the load prediction values ​​of 96 points on the day to be tested.

[0211] (44) Weighted integration: SAC assigns weights to the sub-models at each time step through the interaction between the environment and the agent, and performs a weighted average of the prediction results of the sub-models according to the assigned weights to obtain the final prediction result.

[0212] In step (43), the weights are configured as follows:

[0213] ① SAC state set:

[0214] (19)

[0215] in, These are the top five similar historical data. These are the prediction results from the LightGBM model, the least squares support vector machine model, and the CA-PatchTST model, respectively. These are the prediction errors over the past k time steps;

[0216] ② Action set A:

[0217] (20)

[0218] in, These are the weights of the three sub-models, and they are dynamically changing values;

[0219] ③ Reward function formula:

[0220] (twenty one)

[0221] in, The SAC learnable parameters control the weights of historical ranking factors and similar daily performance scores, with initial values ​​set to 0.5 and 0.5 respectively, and dynamically adjusted through SAC algorithm modeling.

[0222] Historical ranking factor weights:

[0223] Let be the normalized average rank predicted by the k-th sub-model among similar days, calculated using the following formula:

[0224] =Average ranking of model k's predictions across 5 similar days / 5;

[0225] For example, if the LightGBM model's prediction errors rank [2, 3, 3, 2, 1] over five similar days, then the calculated average rank is 2.2. =0.44, 1- The original rankings are converted into positive contribution values; the higher the sub-model ranking, the better. The smaller, 1- The closer a value is to 1, the higher the weight contribution of the sub-model; conversely, the lower the sub-model's ranking, the lower its weight contribution. The larger, 1- The closer it is to 0, the lower the weight contribution of the sub-model;

[0226] Weighting of similar day performance scores:

[0227] The calculation formula is as follows:

[0228] (twenty two)

[0229] Where, sim d The similarity between the d-th similar day and the day to be tested is the result calculated using weighted grey relational analysis. This formula represents the normalized RMSE of model k on the d-th similar day. Its function is to calculate the weighted performance score of the k-th model on the similar day.

[0230] This reward function formula comprehensively considers the model's historical performance and its suitability for current similar day data. Its core idea is to balance the model's long-term stability with its short-term predictive ability. It includes two key components: first, a stability assessment based on the model's ranking performance on historical similar days; and second, the model's actual predictive accuracy on the similar day dataset. Specifically, the formula... The importance of adjusting historical ranking factors in parameter tuning. The influence of parameter adjustment on the performance score of similar days is achieved by dynamically optimizing the two through the SAC algorithm to achieve the best balance. The numerator calculates the weighted sum of the historical ranking and current performance of each model, while the denominator sums the weighted results of all models to achieve normalization, ultimately ensuring that the sum of all weights is 1.

[0231] ④ The final load forecast result of the weighted integration is:

[0232] (twenty three)

[0233] Example Analysis:

[0234] The example data comes from a city in China, spanning 36 months from 2019 to 2021. Data was collected using a high-frequency sampling method at 15-minute intervals, with 96 data points per day, resulting in 105,216 sets of data including load and meteorological information. Regarding data partitioning, the model training set, validation set, and test set were appropriately divided. November 8, 2021, was used as the test date for validation, and all dates prior to that date were considered historical dates.

[0235] I. Data Preprocessing and Error Evaluation Indicators:

[0236] Data preprocessing:

[0237] Due to the massive amount of data, the first step is to clean the massive load and meteorological data, removing outliers and filling in missing values ​​to maintain the continuity and integrity of the data over time. To improve the efficiency and stability of model training, the data is further normalized. The normalization formula is as follows:

[0238] (26)

[0239] in, This is the original data. Normalized data

[0240] Error evaluation indicators:

[0241] The predictive performance of different models is quantified using three metrics: Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and Coefficient of Determination. The calculation formula is as follows:

[0242] (27)

[0243] (28)

[0244] (29)

[0245] in, This represents the actual load value. This is the load forecast value. This represents the average load value.

[0246] II. Similar Date Screening Results:

[0247] In this example, the MIC coefficient and its weights of the multivariate factor-load are calculated based on the formula to quantify the correlation between meteorological factors, week type and load. The calculation results of the MIC coefficient and weights are shown in Table 1.

[0248] Table 1: Calculation Results of MIC Coefficients for Multivariate Factors and Loads

[0249]

[0250] Table 1 shows that temperature has the highest MIC coefficient, reaching 0.814, with a corresponding weight of 0.289. This indicates that temperature has the most significant impact on load, and should be a primary consideration in similarity day selection. Irradiance has a MIC coefficient of 0.652 and a weight of 0.232, indicating that irradiance also has a significant impact on load, due to the influence of the large-scale grid connection of distributed photovoltaic systems on load output. The MIC coefficient for weekday type and load is 0.402, which is at a medium-to-high level, indicating that load consumption behavior in this region is significantly affected by weekday type. Cloud cover and 10m wind speed have MIC coefficients and weights at a medium level, indicating that they have some impact on load, but it is not significant. Humidity and precipitation have low MIC coefficients and small weights, showing weak correlation with load and limited role in selecting similarity days.

[0251] Based on the calculated MIC weights, a similarity day extraction model based on grey relational analysis was constructed. The comprehensive matching similarity of historical days was calculated. The similarity between November 8, 2021, and all historical days in the dataset was within the range of [0.4784, 0.7421]. Historical days were selected as similar days according to their similarity from highest to lowest. The top ten results in terms of comprehensive matching similarity are shown in Table 2. Figure 8 This visually displays the top 10 similar days and their similarity.

[0252] Table 2: Descending ranking of similar days for November 8, 2021

[0253]

[0254] The top five most similar dates were November 7th, November 4th, November 1st, October 31st, and October 18th, totaling five days.

[0255] III. Dynamic weighting of multiple models based on SAC:

[0256] SAC environment configuration:

[0257] Environment configuration transforms the actual multi-model load forecasting problem into a decision-making process within the SAC (System-Agent Computational) framework. In load forecasting, the environment acts as a generator of time-series data. First, the SAC state space and action space are configured. The state space should include historical load, weather, and date information related to load power, as well as the performance of different sub-models in load forecasting. To better predict the load power of the target day, the top 5 similar historical days are selected and input into the SAC agent's state space. Subsequently, sub-model weights are dynamically allocated based on the interaction between the SAC environment and the agent, and policy learning and optimization are performed based on the designed SAC reward function formula. The adaptively weighted SAC parameter configuration is shown in the table below.

[0258] Table 3: Key parameters for multi-model parameter configuration based on SAC algorithm

[0259]

[0260] Sub-model weight configuration results:

[0261] Figure 9 The results show the dynamic changes in the weights of the three sub-models at each time point of the day after optimization using the SAC strategy. As the sampling time progresses, the weights of the CA-PatchTST model fluctuate around 0.5, the LSSVM model stabilizes around 0.3, and the Lightgbm model's weights decrease to around 0.2. The weighted combination of the sub-model prediction results at each sampling time based on the SAC algorithm is used as the model's load prediction result.

[0262] To further analyze the contribution of different sub-models to the combined model, the sub-model weight performance index was calculated in this embodiment, as shown in Table 4. A comparative analysis of the weight performance of the three sub-models reveals that the average weight reflects the overall contribution of different models to the combined prediction results. The CA-PatchTST model has the highest average weight (0.4589) across all tests, indicating the largest contribution; the LSSVM model is second, and the LightGBM model is the lowest. While the worst performance of the LightGBM model is close to that of the LSSVM model, the CA-PatchTST model still achieves a minimum value of 0.2772, indicating stronger stability and better adaptability to extreme and fluctuating conditions.

[0263] Table 4: Sub-model Weight Performance Indicators

[0264]

[0265] IV. Multi-model load forecast results:

[0266] Multi-model load forecast results:

[0267] To verify the advantages of multi-model combinations compared to a single prediction model, this embodiment compares and verifies the prediction performance of three sub-models: LightGBM, CA-PatchTST, and LSSVM, in different prediction scenarios. Simultaneously, to verify the advantages of the SAC dynamic weight configuration incorporating similar days, this embodiment uses the prediction results of a fixed-weight model (with equal weights assigned to each of the three sub-models) as a control, obtaining a total of five prediction curves based on the predicted date, as shown below. Figure 10 As shown.

[0268] Analysis shows that the load prediction results of the model proposed in this invention are basically consistent with the trend of the actual value curve, and can capture load fluctuations relatively accurately, reflecting the actual load electricity consumption behavior to a certain extent. As can be seen from the figure, compared with the combined model of a single sub-model and an average weight distribution model, the model of this invention fits the actual value curve better, has the highest prediction accuracy, and exhibits the best model performance.

[0269] The error evaluation indices MAE and RMSPE of each model and their calculation results are shown in Table 5. Among them, the model of this invention has the lowest MAE and RMSPE, with a determination coefficient of 96.327, indicating the highest overall prediction accuracy. The combined model, which assigns weights evenly to the sub-models, has higher prediction accuracy than any single sub-model, verifying that the combined model helps to leverage the predictive advantages of different model types and can, to some extent, overcome the shortcomings of single-model prediction, thus improving prediction accuracy. Among the three sub-models, the CA-PatchTST model has higher prediction accuracy, while the LSSVM and LightGBM models have relatively poor prediction performance.

[0270] Table 5: Evaluation Indicators of Prediction Error for Each Model

[0271]

[0272] Compared to the fixed-weight combination model, CA-PatchTST, LSSVM, and LightGBM models, the MAE and RMSPE levels of the model in this invention are significantly reduced. Specifically, the MAE is reduced by 10.914%, 36.158%, 46.532%, and 50.611%, respectively; and the RMSPE is reduced by 12.337%, 28.849%, 38.925%, and 48.152%, respectively. Regarding the model fit analysis, the model of this invention… The results improved by 1.249%, 4.444%, 7.665%, and 12.609%, respectively. The calculation results of the error index fully verify that the combined prediction model with dynamically allocated weights after introducing SAC dynamic weight configuration can effectively improve the accuracy of short-term load forecasting.

[0273] To avoid the randomness of prediction experiments and to further verify the universality of the proposed model in improving the accuracy of electricity consumption under different load behaviors, this invention comprehensively considers the potential impact of different load curve shapes and electricity consumption level differences on prediction accuracy. By selecting dates from multiple different seasons and months as test days, model comparison experiments were conducted on each test day. Experimental results show that, compared to single models and fixed-weight models, the model of this invention maintains the best prediction performance for different seasons and load behaviors. Typical power prediction results for different load electricity consumption behaviors are shown below. Figure 11 As shown.

[0274] Comparison of load forecasting results using similar day algorithms:

[0275] This invention employs an improved MIC weighted grey relational algorithm as a method for similar day extraction. To verify the impact of the similar day extraction algorithm on load forecasting results, this invention compares the basic GRA and traditional Euclidean distance, and also compares the load forecasting results without similar day extraction. To ensure the reliability of the comparative experiments, apart from differences in the similar day extraction algorithm, all models used in the comparative experiments of this invention uniformly adopt a dynamically weighted multi-model prediction algorithm. Multiple experiments were conducted on the same test set for each model, and the average was taken. The resulting prediction results are as follows: Figure 12 As shown.

[0276] Observations show that the load forecast results without similar days deviate significantly from the actual results, indicating the worst model prediction performance. Compared to the forecast curve without similar days, the prediction results based on GRA and Euclidean distance for similar day extraction are clearly closer to the true values. Although traditional Euclidean distance and basic GRA algorithms can improve the accuracy of load forecasting to some extent, the model of this invention fits the true values ​​better, indicating that the similar day extraction algorithm after improving grey relational analysis can more accurately identify and extract dates related to the height of the day to be measured as similar days.

[0277] Error evaluation metrics for each model: MAE, RMSPE, and The calculation results are shown in Table 6.

[0278] Table 6: Evaluation Indicators of Prediction Error for Each Model

[0279]

[0280] Compared to traditional grey relational models, Euclidean distance models, and prediction models that do not extract similar days, the model of this invention exhibits the lowest MAE and RMSPE levels. Specifically, MAE is reduced by 25.338%, 32.655%, and 54.450%, respectively; and RMSPE is reduced by 22.860%, 41.431%, and 50.703%, respectively. Regarding model fit analysis, the model of this invention... The highest accuracy was achieved at 96.327%; the prediction model without similar day extraction... The accuracy was only 86.991%, indicating a poor model fit. The prediction model using the basic similar day extraction algorithm showed a significant improvement in accuracy compared to the model without similar day extraction, demonstrating that similar day extraction is crucial for improving the accuracy of short-term load forecasting. The model in this invention further illustrates that the improved and optimized similar day extraction algorithm of the traditional GRA performs better, more comprehensively grasping the correlation between different influencing factors and load, thus making the similar day extraction results more accurate. The calculation results of the above error evaluation indicators fully demonstrate that the similar day extraction algorithm used in this invention can provide higher-quality historical similar day data for the load forecasting model, improving the model's fitting accuracy.

[0281] 5.4.3 Visual Analysis of Prediction Errors:

[0282] To more intuitively observe the differences in prediction accuracy among different prediction models, this invention is based on MAE, MAPE, RMSE, RMSPE, and The calculation results are plotted separately for each target. Figure 10 , Figure 12 Error radar chart, such as Figures 13-14 As shown.

[0283] As can be seen from the calculation formula of the error evaluation index, the larger the four error evaluation indexes MAE, MAPE, RMSE, and RMSPE are, the lower the model prediction accuracy. The closer the value is to 100%, the higher the model's prediction accuracy. Figure 13 As can be seen from the error distribution of each model, the prediction error of the model of this invention is significantly lower than that of other models, further verifying that the prediction effect of the model of this invention is the best. Figure 14 By comparing the error distribution levels when using different similar day extraction algorithms, it is also intuitive to see the improvement in model accuracy brought about by the improved similar day algorithm of this invention.

[0284] Example 2:

[0285] This embodiment provides an improved SAC-weighted load multi-model power prediction system based on similar day extraction, including:

[0286] The data preprocessing module is used to preprocess historical load data and multivariate meteorological data, remove duplicate and abnormal data, supplement missing data, and normalize the data.

[0287] The multi-model load forecasting module selects the LightGBM model (tree model), the CA-PatchTST model (neural network model), and the Least Squares Support Vector Machine (LSSVM) model (support vector machine model) as three sub-models of the combined model. The three models are used to forecast the load sequence of the same day to be measured, with a sampling interval of 15 minutes, to obtain three forecast sequences.

[0288] The SAC weight configuration module is used to integrate extracted similar day data into the SAC state space, combine the prediction error and performance ranking of the sub-models, configure weight coefficients for the prediction results of each sub-model, and dynamically adjust the weights according to the state changes perceived from the environment. The weighted results are then output to obtain the final result of load combination prediction based on dynamic weights.

Claims

1. An improved SAC weighted load multi-model power forecasting method based on similar day extraction, characterized in that, The steps are as follows: (1) Data preprocessing, historical load data and multiple meteorological data are preprocessed, repeated and abnormal data are removed, missing data are supplemented, and data are normalized; (2) Similar day extraction, using the weighted grey correlation degree similar day extraction algorithm based on MIC, the similarity between historical dates and the test day is calculated, and the top 5 historical days with similar degree are selected as the similar days of the test day; (3) Load prediction based on multi-model advantage fusion, select LightGBM model of tree model class, CA-PatchTST model of neural network class and least squares support vector machine model of support vector machine class as three submodels of the combined model, and use the three models to predict the same load sequence of the test day, with 15min as the sampling interval, and obtain three prediction sequences; (4) SAC weight configuration, set the state set, action set and reward set of SAC, integrate the similar day data extracted into the state space of SAC, combine the prediction error of the submodel with the performance ranking of the similar day, configure the weight coefficient for the prediction result of each submodel, and dynamically adjust the weight according to the state change perceived from the environment, output the weighted result, and obtain the final result of the combined load prediction based on dynamic weight; The specific environmental configuration and weight adjustment steps are as follows: (41) The top 5 similar day historical data are input into the state space of SAC; (42) Use the submodel to predict the load respectively, and input the submodel prediction result into the state space of SAC; (43) Use the reward function based on the ranking weight of the submodel and the performance score of the similar day, with 15min as the sampling interval, and obtain 96 power values per day, that is, SAC makes a decision once, and outputs the load prediction value of 96 points of the test day; The weight configuration is as follows: ① SAC state set: S state = {s1,s2,s3,s4,s5,y1,y2,y3,e t-k ,…,e t-1}(19) Wherein s1, s2, s3, s4, s5 are the top five similar day historical data, y1, y2, y3 are the prediction results of the LightGBM model, the least square support vector machine model and the CAPatchTST model respectively, e t-k ,…,e t-1 are the prediction errors of the past k time steps respectively; ② Action set A: A={ω1,ω2,ω3}(20) Wherein, ω1, ω2, ω3 are the weights of the three submodels, which are dynamic values; ③ Reward function formula: Wherein, τ1, τ2 are SAC learnable parameters, which control the historical ranking factor weight and the similar day performance score weight respectively, the initial values are set to 0.5 and 0.5 respectively, and the subsequent dynamic adjustment is carried out through SAC algorithm modeling; Historical ranking factor weight: rank(y k ) is the normalized average rank of the kth sub-model in similar days, which is calculated as follows: rank(y k ) = Model k's average rank of predictions over 5 similar days / 5; 1-rank(y k ) transforms the original ranking into a positive contribution value, the earlier the sub-model ranking, the smaller the rank(y k ), the closer the 1-rank(y k ) to 1, the higher the weight contribution of the sub-model; on the contrary, the later the sub-model ranking, the larger the rank(y k ), the closer the 1-rank(y k ) to 0, the lower the weight contribution of the sub-model; Similar day performance score weight: sim(score k ) = 1 - exp(-score) wherein simd is the similarity of the dth similar day to the day to be tested, i.e. the result of the weighted grey correlation degree calculation, NRMSE k,d is the normalized RMSE of the model k at the dth similar day, and the function of this formula is to calculate the weighted performance score of the kth model in the similar days; ④ The final load prediction result of weighted integration is: y=ω1y1+ω2y2+ω3y3 (23); (44) Weighted integration: SAC interacts with the environment and the agent to assign weights to each time submodel, and the prediction results of the submodels are weighted and averaged according to the assigned weights to obtain the final prediction result.

2. The improved SAC weighted load multi-model power forecasting method based on similar day extraction of claim 1, wherein, In step (2), the specific steps are as follows: (21) Correlation analysis based on MIC coefficient: First, calculate the MIC coefficient between meteorological factors and load data as weight factor, and quantify the correlation between each meteorological factor and load; Then, it is integrated into the grey correlation degree analysis process, and then the weighted grey correlation degree is obtained by introducing the correlation weight of multiple meteorological and load; The MIC coefficient is a statistical measure used to measure the strength of the relationship between two variables, defined as D(X, Y) as a two-dimensional plane containing the features X and the load power Y to be analyzed, the data points (x i , y i ) are distributed on the X-Y plane, a grid P(x x y) is divided on the plane, and the maximum mutual information value in each grid is calculated: Wherein, M(D) is the maximum mutual information matrix, I(D|P) is the mutual information, and logmin{x,y} is the maximum possible mutual information of the grid P(x*y) distribution; The MIC coefficient calculation formula is: In the formula, B is a grid division number limit variable; (22) Screening of historical dates similar to the to-be-tested date based on the MIC result, specifically; (221) Data preprocessing, dimensionless processing of meteorological data and load data; (222) Constructing reference sequence and comparison sequence: defining the reference sequence X L is the matrix of the weather data sequences for the day to be predicted, X L = [x L1 , x L2 ,..., x Lm ]; Comparative sequence X pre is a matrix of historical date weather data sequences, X pre = [x pre1 , x pre2 , …, x prem ], where m is the mth dimension feature, the features used for similar day filtering include multivariate weather and day of week type, and constructing Γ = {X pre1 , X pre2 , …, X prek} is a historical vector set consisting of k historical date weather data; (223) Calculation of weight, calculation of weight proportion of multi-dimensional features in similar day selection, based on MIC coefficient calculation result, taking the proportion of each MIC coefficient in the total MIC coefficient as the weight coefficient of the feature, and the calculation formula is as follows: where σ i is the weight of the i-th component, χ represents a coefficient matrix containing each weight, χ = [σ1, σ2, …, σ m ]. (224) Calculation of weighted grey correlation coefficient, based on grey correlation degree analysis method, calculation of the similarity between the to-be-tested date and each factor, and the formula is: wherein a is the minimum difference between the two poles, b is the maximum difference between the two poles, p is the resolution coefficient, X prej (k) is the data sequence of the jth index within the kth historical date; γ is the grey correlation coefficient, γ(X L , prej (k)) is the grey correlation coefficient between the jth index between the test date and the kth historical date. Based on the weight coefficient, the final weighted grey correlation coefficient δ is obtained as follows: Wherein, n is the length of the time series, and according to the formula, the similarity ranking of each historical date and the to-be-tested date is obtained, and the greater δ is, the higher the similarity between the two is, and the top five dates with the highest similarity are selected as the similar dates of the to-be-tested date.

3. The improved SAC weighted load multi-model power forecasting method based on similar day extraction of claim 2, wherein, In step (3), the LightGBM model is a gradient boosting machine algorithm for solving classification and regression problems, which combines multiple weak learners into a strong model, is based on a gradient boosting framework, iteratively optimizes the residual error of the model, and gradually improves the prediction performance of the model. Assuming that the training set is {x1,…,x n}, the data set is n, where x i is the i-th dimensional vector in the input space, if the last iteration of the learner is F t-1 (x), and the loss function is L(y,F t-1 (x)), then the current iteration target f t (x) is: f t (x) = arg f∈F C(y, F t-1 (x) + f t (x)) (6) where f t (x) minimizes the amount of loss; C is a loss function that measures the difference between the model's predictions and the actual values, and arg denotes the parameter values that minimize the loss function C; The negative gradient of the loss function is computed as an approximation of the residual for the current iteration, defined as g t with the expression as follows: Through square error minimization fitting of weak learners, the following is obtained After one round of iteration, the updated strong learner is: F t (x) = F t-1 (x) + η · f t (x) (9) Wherein, η is the learning rate, which is used to display the control step length; After T rounds of iteration, the load prediction output expression is: y1 = F T (x) = F T-1 (x) + η · f T (x) (10) wherein y1 is the output of the LightGBM model, F T (x) is the final load prediction result.

4. The improved SAC weighted load multi-model power forecasting method based on similar day extraction of claim 3, wherein, In step (3), the least squares support vector machine model optimizes the model parameters by minimizing the squared error for the given training data The least squares support vector machine model optimization problem is represented as: y i = ξ T φ(x i )+ b + e i i = 1,..., n (12) Wherein, φ(x) i ) is a nonlinear mapping from the input space to the high-dimensional feature space, ξ is a weight vector representing the model complexity, and e i =[e1,…,e n ] T Here, b is the error vector, and γ∈R is the bias term. + It is a regularization parameter; To solve the constrained optimization problem, the Lagrange function and dual optimization are introduced, and the Lagrange multiplier is denoted as α i According to the optimization condition, the partial derivatives of the Lagrange function with respect to w, b, e i and α i are set to zero, respectively, and the kernel function expression is obtained by simplifying K(x i ,x j ) i ) T φ(x j ),i,j=1,2,…,n (13) where K(x i ,x j ) is a kernel function, which can effectively reduce the high-dimensional space calculation complexity and plays a key role in the LSSVM model. Based on the LSSVM model, the load prediction output expression is as follows:

5. The improved SAC weighted load multi-model power forecasting method based on similar day extraction of claim 4, wherein, In step (3), considering the difference between the power time sequence curve and the multi-element meteorological factor sequence, first, the similar day historical data is input into the CA-PatchTST model for coding, and at the same time, the multi-element meteorological data of the to-be-tested date is input into the multi-head attention mechanism for coding, then the cross-attention mechanism is used for fusion, and finally the output prediction result is obtained. The input similar day historical power data is defined as Meteorological feature data where L, T are the length of load, meteorological sequence respectively, d p ,d w are the dimension of power, meteorological feature respectively; When processing time sequence data, the CA-PatchTST model first divides the input time sequence into multiple patches, then encodes the positions of the patches, and finally sends the encoded data to the Transformer encoder for further processing.

6. The improved SAC weighted load multi-model power forecasting method based on similar day extraction of claim 5, wherein, The specific steps for processing time sequence data are as follows: (31) Meteorological-power coding: First, the historical power data is divided into M patches: Wherein, P is the size of the patch, M=L / P, then the mapping and position encoding are performed; After the encoding is completed, the result is input to the Transformer encoder for encoding, and the output power encoding is H power ; Similarly, after mapping and encoding the multi-dimensional meteorological features, meteorological encoding H is obtained weather ; (32) Multi-source heterogeneous data feature fusion based on cross-attention mechanism: Define Query - Key Value: Let power encode H power For Query, weather encode H weather For Value, compute cross attention formula as follows: where CA is Cross Attention, Softmax is a function name, W Q ,W K ,W V are learnable parameters for mapping queries, keys and values to a new space, respectively; d model is the model dimension, i.e., the size of the hidden layer. After the original power is processed through the cross-attention mechanism and the meteorological features are fused, the following is obtained: H' = LN(H power + FFN(CA)) (17) Wherein, H' is the fused feature representation; LN is the abbreviation of LayerNorm; FFN is a feedforward neural network, which is usually a simple network composed of two fully connected layers, used for further processing of the output of the cross-attention mechanism; (33) Output of load prediction result: The result H' after feature fusion is globally averaged pooled to obtain a feature vector H' pre The fused feature vector is mapped to a prediction space of 96 time points of the to-be-tested day, and finally a load prediction result is obtained. y3 = W3H' pre + b3 (18) Wherein, W3 is the weight of the linear layer, and b3 is the bias term.

7. The improved SAC weighted load multi-model power forecasting method based on similar day extraction of claim 6, wherein, In step (4), in the SAC algorithm, the environment refers to the system with which the agent interacts to learn the strategy, and in load prediction or time series prediction, the environment is the generator of time series data.

8. An improved SAC weighted load multi-model power forecasting system based on similar day extraction, applied to the improved SAC weighted load multi-model power forecasting method based on similar day extraction of claim 1, characterized in that, Including: The data preprocessing module is configured to preprocess historical load data and multi-element meteorological data, eliminate repeated and abnormal data, supplement missing data, and normalize the data; The load similar day extraction module is configured to filter similar historical dates to the to-be-tested day by using a weighted grey correlation degree similar day extraction algorithm based on MIC. First, the MIC coefficient of multi-element meteorological data and load power is calculated to sort and weight the meteorological factors affecting the load power level. Then, the similar historical dates to the to-be-tested day are filtered based on the MIC result. The multi-model load prediction module is configured to select a LightGBM model of a tree model type, a CA-PatchTST model of a neural network type, and a least squares support vector machine model (LSSVM) of a support vector machine type as three sub-models of a combined model. The three models are used to predict the same to-be-tested load sequence with a sampling interval of 15 minutes to obtain three predicted sequences. The SAC weight configuration module is configured to integrate the extracted similar day data into the state space of SAC, combine the prediction error of the sub-models with the performance ranking of the similar days, configure weight coefficients for the prediction results of the sub-models, dynamically adjust the weights according to the perceived state changes in the environment, output the weighted results, and obtain the final result of the combined load prediction based on the dynamic weights.

Citation Information

Patent Citations

  • Power load prediction method based on grey correlation degree and support vector machine

    CN110309988A

  • Special day power load prediction method and system based on weather similar day

    CN118446385A