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

By using an improved SAC weighted load multi-model forecasting method based on similar day extraction, combining the LightGBM, CA-PatchTST and LSSVM models, and dynamically configuring weights, the limitations of existing models in forecasting complex power load data are solved, and load forecasting with higher accuracy and flexibility is achieved.

CN120725232AActive Publication Date: 2025-09-30SHANDONG UNIV

Patent Information

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

AI Technical Summary

Technical Problem

Existing short-term load forecasting models have limitations when processing complex power load data. The fitting effect of a single model is poor, the prediction accuracy is low, and the fixed weight distribution mechanism cannot adapt to the real-time changes of load data. The flexibility and adaptability of the model combination are limited.

Method used

An improved SAC weighted load multi-model forecasting method based on similar day extraction is adopted. Similar days are screened by the MIC-GRA algorithm. The LightGBM, CA-PatchTST and LSSVM models are combined, and the weights are dynamically configured using the SAC algorithm to make predictions based on the advantages of each model.

Benefits of technology

The accuracy and reliability of load forecasting are improved, and the dynamic weight adjustment mechanism enhances the adaptability and flexibility of the model in rapidly changing scenarios, providing more reliable short-term load forecasting support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120725232A_ABST
    Figure CN120725232A_ABST
Patent Text Reader

Abstract

The invention relates to an improved SAC weighted load multi-model power prediction method and system based on similar day extraction, and belongs to the technical field of power prediction. Firstly, based on an MIC-GRA algorithm, five similar days related to the height of a day to be measured are screened from massive historical data, and the five similar days are input into a state space of SAC deep learning. Secondly, three different types of basic models with complementary advantages are selected as components of a load prediction combination model, and a to-be-predicted daily load prediction result is obtained; and finally, the environment configured with the similar day data interacts with the intelligent agent, weights are configured for the sub-models respectively, a combined model prediction result is obtained, and the overall prediction performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an improved SAC weighted load multi-model power forecasting method and system based on similar day extraction, belonging to the technical field of power forecasting. Background Art

[0002] As a key component of power system operation, short-term load forecasting provides an indispensable basis for power generation planning, power dispatching, and market trading decisions. Accurate short-term load forecasting can help power companies optimize their generator mix and reduce operating costs, while also improving the power system's ability to respond to emergencies and ensuring the safe and stable operation of the power grid. In recent years, with the rapid development of technologies such as big data and artificial intelligence, short-term load forecasting methods have undergone a transition from traditional statistical models to modern machine learning and deep learning models. Currently, researchers have extensively explored a variety of advanced models, including long short-term memory networks (LSTMs), convolutional neural networks (CNNs), and Transformers. These models, combined with data preprocessing and feature engineering, are continuously improving forecast accuracy to adapt to increasingly complex power load variations.

[0003] However, considering the complex volatility of loads in actual scenarios, the limitations of a single model in processing power load data are becoming increasingly prominent, with poor model fitting and low prediction accuracy. Although the traditional BP neural network model can capture the nonlinear characteristics of load data to a certain extent, it is prone to falling into local optimality during the training process, resulting in slow model convergence and insufficient generalization ability, making it difficult to stably provide high-precision prediction results in practical applications. Time series models such as ARIMA can simplify mathematical expressions when processing load data with obvious trends and seasonal characteristics, but they are not effective for random fluctuations and complex nonlinear relationships in the data. In existing models, although the load forecasting accuracy can be improved to a certain extent by improving a single model, it only performs well on specific data sets and lacks universality for load change patterns in different scenarios.

[0004] Therefore, to overcome the limitations of a single model, multi-model combination forecasting methods are gradually becoming a new trend in load forecasting. Multi-model ensemble forecasting can reduce the load forecast's reliance on a single model. By leveraging the complementarity and correction of multiple models, it reduces the risk of a single model failure significantly impacting the overall forecast. For example, [1] proposed a multi-model short-term load forecasting method based on digital twins and multi-model fusion. This method uses a kernel extreme learning machine and a bidirectional long short-term memory (BiLSTM) network to predict high- and low-frequency load components, and then fuses and reconstructs the short-term load forecast. Compared with a single BiLSTM prediction model, this method effectively handles load fluctuations and nonlinearity, improving model prediction accuracy. However, existing multi-model combination methods still have some shortcomings. First, the fixed weight distribution mechanism cannot dynamically adjust the contribution of each model based on real-time changes in load data, limiting the flexibility and adaptability of the model combination in rapidly changing load scenarios. Second, some combination strategies are relatively simple in terms of model selection and integration, failing to fully utilize the advantages of each model at different time scales and feature dimensions, thus limiting the improvement of overall forecasting performance. To this end, the present invention is proposed. Summary of the Invention

[0005] To address the shortcomings of existing technologies, the present invention provides an improved SAC weighted load multi-model power forecasting method and system based on similar day extraction. First, based on the MIC-GRA algorithm, five similar days with high correlation to the test day are screened 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 forecasting combination model to obtain the load forecast result for the test day. Finally, the environment configured with similar day data interacts with the intelligent agent, and weights are assigned to the sub-models to obtain the combined model prediction result.

[0006] The technical solutions of the present invention are as follows: The improved SAC weighted load multi-model power forecasting method based on similar day extraction has the following steps: (1) Data preprocessing: perform data preprocessing on historical load data and multivariate meteorological data, remove duplicate and abnormal data, supplement missing data, and normalize the data; (2) Load similar day extraction: Use the weighted grey correlation similarity extraction algorithm based on MIC to screen historical dates similar to the test day. First, calculate the MIC coefficient of multivariate meteorological and load power, and rank and weight the meteorological factors that affect the load power level. Then, based on the MIC results, screen historical dates similar to the test day. (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 the tree model class, the CA-PatchTST model of the neural network class, and the least squares support vector machine model (LSSVM) of the support vector machine class are selected as the three sub-models of the combined model. The three models are used to predict the load series of the same test day, with a sampling interval of 15 minutes, and three prediction series are obtained; The tree model can provide a stable baseline prediction, the neural network model can capture complex time dynamics, and the support vector machine model can play a robustness advantage when there is less data and more data features. Therefore, the present invention comprehensively considers the advantages of various models and selects three models as sub-models from each model 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 a more reliable short-term load forecast for the power system.

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

[0008] According to the preferred embodiment of the present invention, in step (2), the specific steps are: (21) Correlation analysis based on MIC coefficient: First, the MIC coefficient between meteorological factors and load data is calculated as a weight factor to quantify the correlation between each meteorological factor and load; then it is integrated into the grey correlation analysis process, and the weighted grey correlation is obtained by introducing the correlation weights of multiple meteorological factors and load; The MIC coefficient is a statistic used to measure the strength of the relationship between two variables. It defines D(X, Y) as the coefficient containing the characteristics to be analyzed. and load power The two-dimensional plane, data points (x i ,y i ) are distributed on the XY plane and divided into plane grids , calculate the maximum mutual information value in each grid: (1) in, is the maximum mutual information matrix, is the mutual information, For Grid Maximum possible mutual information of distributions; The MIC coefficient calculation formula is: (2) Where, is the grid division number limit variable, which is taken as 0.6 power of the total number of samples based on experience. The value range of MIC is between [-1,1]; (22) Based on the MIC results, select historical dates similar to the test date, specifically; (221) Data preprocessing: In order to eliminate the influence of different dimensions and magnitudes of the original data on the analysis results, the meteorological data and load data are dimensionlessly processed; (222) Construct reference sequence and comparison sequence: define reference sequence X L is the matrix composed of the meteorological data sequence of the day to be predicted, ; Compare sequence X pre is the historical date meteorological data sequence matrix, , where m is the mth dimension feature. The features used for similar day screening include multivariate weather and week types, and the structure is a historical vector set consisting of meteorological data of k historical dates; (223) Calculate the weights and the weight ratios of various meteorological factors, week types and other multidimensional features in the selection of similar days. Based on the MIC coefficient calculation results, the ratio of each MIC coefficient to the total MIC coefficient is used as the weight coefficient of the feature. The calculation formula is as follows: (3) in, is the weight of the i-th component, represents the coefficient matrix containing the weights, ; (224) Calculate the weighted grey correlation coefficient. Based on the grey correlation analysis method, calculate the similarity between the weather and week categories of the test day and the historical date. The formula is: (4) Among them, a is the minimum difference between the two poles, b is the maximum difference between the two poles, ρ is the resolution coefficient (usually 0.5), X prej (k) is the data sequence of the jth indicator within the kth day of the historical date; γ is the grey correlation coefficient, is the grey correlation coefficient between the day to be tested and the jth indicator in the kth historical day; Based on the weight coefficient, the final weighted grey relational coefficient δ is obtained as follows: (5) Among them, n is the length of the time series. According to the formula, the similarity ranking between each historical day and the day to be measured is obtained. The larger δ is, the higher the similarity between the two is. The top five dates in similarity ranking are selected as similar days to the day to be measured.

[0009] Preferably, 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 data set. Compared with other GBMs such as XG-Boost, LightGBM continuously improves the learner performance through multiple iterations; LightGBM combines multiple weak learners (decision trees) into a strong model, and based on the gradient boosting framework, iteratively optimizes the residual of the model to gradually improve the prediction performance of the model. Assuming that the training set is , the data set is n, where x i is the first 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: (6) Among them, f t (x) minimizes the loss; C is the loss function, which measures the difference between the model's predicted value and the actual value; arg represents the parameter value that minimizes the loss function C; Calculate the negative gradient of the loss function as the approximate residual of the current iteration, defined as g t , which is expressed as follows: (7) By minimizing the square error to fit the weak learner, we get (8) After one round of iteration, the updated strong learner is: (9) in, is the learning rate, used to display the control step size; After T rounds of iterations, the load forecast output expression is: (10) in, is the output of the LightGBM model, The final load forecast result.

[0010] According to the 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 square error. , the least squares support vector machine model optimization problem is expressed as: (11) (12) in, It is a nonlinear mapping from input space to high-dimensional feature space. is the weight vector, representing the complexity of the model, is the error vector, is the bias term, is the regularization parameter; In order to solve the constrained optimization problem, Lagrange function and dual optimization are introduced, and the Lagrange multiplier is set as , from the optimization conditions, we know that the Lagrangian function is 、 、 and The partial derivative is zero, and the simplified kernel function expression is: (13) in, It is a kernel function that can effectively reduce the computational complexity of high-dimensional space and plays a core role in the LSSVM model. In summary, the load forecast output expression based on the least squares support vector machine model is: (14) According to the 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, and then the cross-attention mechanism is used for fusion, and finally the prediction result is output; The input similar day historical power data is defined as , meteorological characteristic data ,in L, T They are load, weather, and sequence length. They are power and meteorological characteristic dimensions respectively.

[0011] When processing time series data, the CA-PatchTST model uses a unique preprocessing method. It first splits the input time series into multiple patches, then position-encodes these patches, and finally feeds the encoded data into the Transformer encoder for further processing. The specific steps are as follows: (31) Weather-power coding: First, the historical power data is divided into M Patches: (15) in, P is the size of the patch, , and then map and position encode it; After encoding is completed, the result is input into the Transformer encoder (multi-head self-attention mechanism) for encoding, and the output power is encoded as ; Similarly, the multi-dimensional meteorological features are mapped and encoded to obtain the meteorological code ; (32) Feature fusion of multi-source heterogeneous data based on cross-attention mechanism: Define Query-Value: Let power encode (Target sequence) is Query, meteorological code For Value, the formula for calculating cross attention is as follows: (16) Among them, CA is the abbreviation of Cross Attention, Softmax is the function name, are learnable parameters used to map queries, keys, and values ​​to new spaces respectively; is the model dimension, i.e. the size of the hidden layer; After processing the original power through the cross-attention mechanism and fusing the meteorological features, we get: (17) in, is the feature representation after fusion; It is the abbreviation of LayerNorm for layer normalization. FFN (Feed-Forward Network) is a feed-forward neural network, which is usually a simple network consisting of two fully connected layers, used to further process the output of the cross-attention mechanism. (33) Output load forecast results: The result after feature fusion Perform global average pooling to obtain the feature vector , the fused feature vector is mapped to the prediction space of 96 moments on the test day, and the load forecast result is finally obtained as follows: (18) in, is the weight of the linear layer, is the bias term.

[0012] According to the 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: (41) Input the extracted top 5 similar day historical data into the state space of SAC; (42) Use the sub-models to perform load forecasting respectively, and input the sub-model prediction results into the state space of SAC; (43) A reward function based on the weight of the sub-model ranking and the weighted performance score of similar days is used. With a sampling interval of 15 minutes, 96 power values ​​are predicted every day. That is, the SAC makes a decision once and outputs the load forecast values ​​of 96 points on the test day. (44) Weighted integration: SAC assigns weights to the sub-models at each moment through the interaction between the environment and the agent, and performs weighted averaging of the prediction results of the sub-models according to the assigned weights to obtain the final prediction result.

[0013] According to the preferred embodiment of the present invention, in step (43), the weight configuration is: ① SAC state set: (19) in, It is the top five similar day historical data, They are the prediction results of the LightGBM model, the least squares support vector machine model and the CA-PatchTST model, are the prediction errors of the past k time steps; ② Action set A: (20) in, are the weights of the three sub-models, which are dynamically changing values; ③Reward function formula: (twenty one) in, These are SAC learnable parameters that control the weight of the historical ranking factor and the weight of the similar day performance score. Their initial values ​​are set to 0.5 and 0.5, respectively, and are subsequently dynamically adjusted through SAC algorithm modeling. Historical ranking factor weight: is the normalized average ranking predicted by the kth sub-model on similar days, and its calculation formula is: = average ranking of predictions of model k on 5 similar days / 5; 1- Convert the original ranking into a positive contribution value. The higher the sub-model ranking, the The smaller, 1- The closer it is to 1, the higher the weight contribution of the sub-model; conversely, the lower the ranking of the sub-model, The larger the The closer it is to 0, the lower the weight contribution of the sub-model; Similar day performance score weight: The calculation formula is as follows: (twenty two) Among them, sim d is the similarity between the dth similar day and the day to be tested, that is, the result of weighted grey correlation calculation, is the normalized RMSE of model k on the dth similar day. This formula is used to calculate the weighted performance score of the kth model on the similar day. ④The final load forecast result of weighted integration is: (twenty three) The improved SAC weighted load multi-model power forecasting system based on similar day extraction includes: 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; The load similar day extraction module uses the MIC-based weighted grey correlation similar day extraction algorithm to screen historical dates similar to the test day. First, the MIC coefficients of multiple meteorological factors and load power are calculated, and the meteorological factors that affect the load power level are ranked and weighted. Then, based on the MIC results, historical dates similar to the test day are screened. The multi-model load forecasting module selects the LightGBM model of the tree model class, the CA-PatchTST model of the neural network class, and the least squares support vector machine model (LSSVM) of the support vector machine class as the three sub-models of the combined model. The three models are used to predict the load series of the same test day, with a sampling interval of 15 minutes, and three prediction series are obtained; The SAC weight configuration module is used to integrate the extracted similar day data into the state space of SAC, combine the prediction error and performance ranking of the sub-model, configure the weight coefficient for the prediction result of each sub-model, and dynamically adjust the weight according to the state changes perceived from the environment. The weighted result is output to obtain the final load combination prediction result based on dynamic weights.

[0014] The beneficial effects of the present invention are: 1. This paper has designed a new reward function formula based on the SAC of similar days. By comprehensively considering the historical performance of the model and the adaptability of the current similar day data, the integration weight of each model is dynamically allocated.

[0015] 2. This invention independently designs a similar day calculation method. First, the MIC coefficient of multivariate meteorological and load power is calculated, and the meteorological factors that affect the load power level are ranked and weighted. Then, based on the MIC results, historical dates similar to the test day are screened, and the contribution of each feature to load forecasting is comprehensively measured and utilized to improve the quality of similarity analysis and the reliability of prediction.

[0016] 3. Among the three sub-models of the present invention, CA-PatchTST is a Transformer-based variant. The LSSVM (least squares support vector machine) algorithm is an improvement on the support vector machine algorithm and is a machine learning algorithm used in supervised learning. LSSVM optimizes the decision tree through the gradient boosting model, making it particularly suitable for processing large-scale data, such as load forecasting. It optimizes model parameters by minimizing the sum of squared errors, which gives it good stability and prediction accuracy when dealing with regression problems. Combining the three sub-models helps to combine the advantages of different models, improve the accuracy of load forecasting, and provide assistance for optimized power system scheduling. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a schematic diagram of the process of the present invention; Figure 2 Schematic diagram of the histogram algorithm principle of the present invention; Figure 3 This is a schematic diagram of the least squares support vector machine model algorithm of the present invention; Figure 4 This is a diagram of the CA-PatchTST model architecture of the present invention; Figure 5 Schematic diagram of the independent channels of PatchTST of the present invention; Figure 6 This is a diagram showing the principle of reinforcement learning of the present invention; Figure 7 It is the principle diagram of the SAC algorithm of the present invention; Figure 8 This is the ranking result graph of similar days; Figure 9 Assign graphs to sub-model weights; Figure 10 The prediction results of the present invention and the comparison model based on the prediction of the test day are shown in FIG. Figure 11 The power prediction results of the present invention and the comparison model for different load power consumption behaviors are shown in the figure; Figure 12A comparison chart of the predicted effects of the similar extraction method of the present invention and other extraction methods; Figure 13 The radar chart of error indicators based on the model of the present invention is as follows; Figure 14 This is a radar chart of error indicators based on the similar day algorithm in the example of the present invention. DETAILED DESCRIPTION

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

[0019] Example 1: like Figure 1 As shown, this embodiment provides an improved SAC weighted load multi-model power forecasting method based on similar day extraction, and the steps are as follows: (1) Data preprocessing: perform data preprocessing on historical load data and multivariate meteorological data, remove duplicate and abnormal data, supplement missing data, and normalize the data; (2) Load similar day extraction: Use the weighted grey correlation similarity extraction algorithm based on MIC to screen historical dates similar to the test day. First, calculate the MIC coefficient of multivariate meteorological and load power, and rank and weight the meteorological factors that affect the load power level. Then, based on the MIC results, screen historical dates similar to the test day. The specific steps are as follows: (21) Correlation analysis based on MIC coefficient: Common similarity analysis methods include Euclidean distance, Pearson correlation coefficient, grey relation analysis (GRA), etc. Considering that the influence of each feature involved in the similarity calculation on the load power varies, if only the method based on the sum of average distances is used to extract similar samples, it may affect the accuracy of similar day extraction. Therefore, a more sophisticated method is needed to comprehensively measure and utilize the contribution of each feature to load forecasting in order to improve the quality of similarity analysis and the reliability of forecasting. 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 weight factor to quantify the correlation between each meteorological factor and load; then it is integrated into the grey relation analysis process, and then the weighted grey relation is obtained by introducing the correlation weights of multivariate meteorological and load factors;

[0020] The MIC coefficient is a statistic used to measure the strength of the relationship between two variables. It defines D(X, Y) as the coefficient containing the characteristics to be analyzed. and load power The two-dimensional plane, data points (xi ,y i ) are distributed on the XY plane and divided into plane grids , calculate the maximum mutual information value in each grid: (1) in, is the maximum mutual information matrix, is the mutual information, For Grid Maximum possible mutual information of distributions; The MIC coefficient calculation formula is: (2) Where, is the grid division number limit variable, which is taken as 0.6 power of the total number of samples based on experience. The value range of MIC is between [-1,1]; (22) Based on the MIC results, select historical dates similar to the test date, specifically; Grey correlation analysis is a multi-factor statistical analysis method. Its essence is to judge the degree of correlation between the comparison objects by comparing the similarity of the geometric shapes of the data sequence curves. The similarity between each historical reference date and the test date is determined based on the grey correlation coefficient. (221) Data preprocessing: In order to eliminate the influence of different dimensions and magnitudes of the original data on the analysis results, the meteorological data and load data are dimensionlessly processed; (222) Construct reference sequence and comparison sequence: define reference sequence X L is the matrix composed of the meteorological data sequence of the day to be predicted, ; Compare sequence X pre is the historical date meteorological data sequence matrix, , where m is the mth dimension feature. The features used for similar day screening include multivariate weather and week types, and the structure is a historical vector set consisting of meteorological data of k historical dates; (223) Calculate the weights and the weight ratios of various meteorological factors, week types and other multidimensional features in the selection of similar days. Based on the MIC coefficient calculation results, the ratio of each MIC coefficient to the total MIC coefficient is used as the weight coefficient of the feature. The calculation formula is as follows: (3) in, is the weight of the i-th component, represents the coefficient matrix containing the weights, ; (224) Calculate the weighted grey correlation coefficient. Based on the grey correlation analysis method, calculate the similarity between the weather and week categories of the test day and the historical date. The formula is: (4) Among them, a is the minimum difference between the two poles, b is the maximum difference between the two poles, ρ is the resolution coefficient (usually 0.5), X prej (k) is the data sequence of the jth indicator within the kth day of the historical date; γ is the grey correlation coefficient, is the grey correlation coefficient between the day to be tested and the jth indicator in the kth historical day; Based on the weight coefficient, the final weighted grey relational coefficient δ is obtained as follows: (5) Where n is the length of the time series. According to the formula, the similarity ranking between each historical day and the day to be measured is obtained. The larger the δ, 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 forecast input of the sub-model and input into the state space of the SAC to act on the model weight allocation process and the configuration of the reward function, which helps to improve the load forecast accuracy.

[0021] (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 the tree model class, the CA-PatchTST model of the neural network class, and the least squares support vector machine model of the support vector machine class are selected as the 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, and three prediction sequences are obtained; 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 massive data sets. Compared with other GBMs such as XG-Boost, LightGBM continuously improves the learner performance through multiple iterations; LightGBM combines multiple weak learners (decision trees) into a strong model, and based on the gradient boosting framework, iteratively optimizes the residual of the model to gradually improve the prediction performance of the model. Assuming that the training set is , the data set is n, where x i is the first 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: (6) Among them, f t (x) minimizes the loss; C is the loss function, which measures the difference between the model's predicted value and the actual value; arg represents the parameter value that minimizes the loss function C; Calculate the negative gradient of the loss function as the approximate residual of the current iteration, defined as g t , which is expressed as follows: (7) By minimizing the square error to fit the weak learner, we get (8) After one round of iteration, the updated strong learner is: (9) in, is the learning rate, used to display the control step size; After T rounds of iterations, the load forecast output expression is: (10) in, is the output of the LightGBM model, The final load forecast result.

[0022] 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 a problem of solving a system of linear equations. This reduces the number of variables, reduces the algorithm complexity, and improves the model training speed. The core idea of ​​the least squares support vector machine model is to optimize the model parameters by minimizing the square error. , the least squares support vector machine model optimization problem is expressed as: (11) (12) in, It is a nonlinear mapping from input space to high-dimensional feature space. is the weight vector, representing the complexity of the model, is the error vector, is the bias term, is the regularization parameter; In order to solve the constrained optimization problem, Lagrange function and dual optimization are introduced, and the Lagrange multiplier is set as , from the optimization conditions, we know that the Lagrangian function is 、 、 and The partial derivative is zero, and the simplified kernel function expression is: (13) in, It is a kernel function that can effectively reduce the computational complexity of high-dimensional space and plays a core role in the LSSVM model. In summary, the load forecast output expression based on the least squares support vector machine model is: (14) The CA-PatchTST model (Patch-based Time Series Transformer) is a time series prediction model based on the Transformer architecture. It is designed for long-term time series prediction tasks. It effectively captures local and global features in time series by splitting the time series into small blocks and leveraging the powerful modeling capabilities of the Transformer. This paper proposes a load forecasting process for the CA-PatchTST model based on a cross-attention mechanism for heterogeneous fusion of multivariate data. Taking into account the differences between power time series curves and multivariate meteorological factor sequences, the historical data of similar days are first input into the CA-PatchTST model for encoding. At the same time, the multivariate meteorological data of the day to be measured is input into the multi-head attention mechanism for encoding. The cross-attention mechanism is then used to fuse the data, and finally the prediction result is output.

[0023] The input similar day historical power data is defined as , meteorological characteristic data ,in L, T They are load, weather, and sequence length. They are power and meteorological characteristic dimensions respectively.

[0024] When processing time series data, the CA-PatchTST model uses a unique preprocessing method. It first splits the input time series into multiple patches, then position-encodes these patches, and finally feeds the encoded data into the Transformer encoder for further processing. The specific steps are as follows: (31) Weather-power coding: First, the historical power data is divided into M Patches: (15) in, P is the size of the patch, , then maps and positionally encodes it. Compared to traditional Transformer models, the CA-PatchTST model introduces this "block-encoding" process at 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.

[0025] After encoding is completed, the result is input into the Transformer encoder (multi-head self-attention mechanism) for encoding, and the output power is encoded as ; Similarly, the multi-dimensional meteorological features are mapped and encoded to obtain the meteorological code ; (32) Feature fusion of multi-source heterogeneous data based on cross-attention mechanism: Define Query-Value: Let power encode (Target sequence) is Query, meteorological code For Value, the formula for calculating cross attention is as follows: (16) Among them, CA is the abbreviation of Cross Attention, Softmax is the function name, are learnable parameters used to map queries, keys, and values ​​to new spaces respectively; is the model dimension, i.e. the size of the hidden layer; After processing the original power through the cross-attention mechanism and fusing the meteorological features, we get: (17) in, is the feature representation after fusion; It is the abbreviation of LayerNorm for layer normalization. FFN (Feed-Forward Network) is a feed-forward neural network, which is usually a simple network consisting of two fully connected layers, used to further process the output of the cross-attention mechanism. (33) Output load forecast results: The result after feature fusion Perform global average pooling to obtain the feature vector , the fused feature vector is mapped to the prediction space of 96 moments on the test day, and the load forecast result is finally obtained as follows: (18) in, is the weight of the linear layer, is the bias term.

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

[0027] Deep reinforcement learning: Deep reinforcement learning (DRL) is a combination of deep learning and reinforcement learning. It combines the powerful representation capabilities of deep neural networks with the decision-making capabilities of reinforcement learning to enable intelligent decision-making in complex environments. DRL enables an agent to learn optimal strategies through its interaction with the environment to maximize cumulative rewards. In deep reinforcement learning, the agent observes the state s of the environment and takes an action a. The environment then returns a new state s′ and a reward r based on the agent's action.

[0028] SAC Algorithm: The Soft Actor-Critic (SAC) algorithm is an advanced DRL variant of the traditional Actor-Critic algorithm, suitable for continuous action spaces (SAC). The core of the SAC algorithm is the introduction of the concept of maximum entropy reinforcement learning. "Entropy" is an important indicator for measuring the randomness of the probability distribution of the action output by a policy, reflecting the degree of policy uncertainty. The higher the entropy value, the greater the randomness of the policy. SAC's entropy mechanism abandons traditional deterministic strategies in favor of stochastic strategies. The introduction of "entropy" improves the SAC algorithm's ability to better balance determinism and randomness during state space exploration, providing key support for SAC's efficient learning in complex and changing power load environments.

[0029] Maximum Entropy Reinforcement Learning Objective: The goal of traditional DRL is to maximize the expected cumulative reward formula: (twenty four) in, Represents all possible next states and rewards The expected value is calculated based on the state transition probability and reward distribution. Indicates the next state Next, all possible actions The maximum value function value in the above equation is also called the Bellman equation; After the SAC algorithm adds the entropy term, the strategy randomness weight is added to the reward. The expected cumulative reward equation is as follows: (25) in, Indicates that the status Take action The soft value function of It’s an instant reward. is the entropy weight, which controls the balance between entropy and reward; Is in state Next Strategy SAC adds an entropy term to the original Bellman equation and uses the entropy term as part of the reward function, thereby encouraging the randomness of the strategy and improving the exploration ability.

[0030] In the SAC algorithm, the environment refers to the system that the agent interacts with to learn strategies. 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: (41) Input the extracted top 5 similar day historical data into the state space of SAC; (42) Use the sub-models to perform load forecasting respectively, and input the sub-model prediction results into the state space of SAC; (43) A reward function based on the weight of the sub-model ranking and the weighted performance score of similar days is used. With a sampling interval of 15 minutes, 96 power values ​​are predicted every day. That is, the SAC makes a decision once and outputs the load forecast values ​​of 96 points on the test day. (44) Weighted integration: SAC assigns weights to the sub-models at each moment through the interaction between the environment and the agent, and performs weighted averaging of the prediction results of the sub-models according to the assigned weights to obtain the final prediction result.

[0031] In step (43), the weight configuration is: ① SAC state set: (19) in, It is the top five similar day historical data, They are the prediction results of the LightGBM model, the least squares support vector machine model and the CA-PatchTST model, are the prediction errors of the past k time steps; ② Action set A: (20) in, are the weights of the three sub-models, which are dynamically changing values; ③Reward function formula: (twenty one) in, These are SAC learnable parameters that control the weight of the historical ranking factor and the weight of the similar day performance score. Their initial values ​​are set to 0.5 and 0.5, respectively, and are subsequently dynamically adjusted through SAC algorithm modeling. Historical ranking factor weight: is the normalized average ranking predicted by the kth sub-model on similar days, and its calculation formula is: = average ranking of predictions of model k on 5 similar days / 5; For example, the error rankings of the prediction results of the Lightgbm model on 5 similar days are [2, 3, 3, 2, 1], and the average ranking is 2.2. =0.44,1- Convert the original ranking into a positive contribution value. The higher the sub-model ranking, the The smaller, 1- The closer it is to 1, the higher the weight contribution of the sub-model; conversely, the lower the ranking of the sub-model, The larger the The closer it is to 0, the lower the weight contribution of the sub-model; Similar day performance score weight: The calculation formula is as follows: (twenty two) Among them, sim d is the similarity between the dth similar day and the day to be tested, that is, the result of weighted grey correlation calculation, is the normalized RMSE of model k on the dth similar day. This formula is used to calculate the weighted performance score of the kth model on the similar day. The reward function formula comprehensively considers the historical performance of the model and the adaptability of the current similar day data. The core idea is to balance the long-term stability of the model with the short-term prediction ability. It contains two key parts: one is the stability evaluation based on the ranking performance of the model in the historical similar days, and the other is the actual prediction accuracy of the model on the similar day data set. Specifically, the formula Parameters adjust the importance of historical ranking factors, The parameters adjust the influence of similar day performance scores. The two are dynamically optimized through the SAC algorithm to achieve the best balance. The numerator calculates the weighted sum of each model's historical ranking and current performance, while the denominator sums the weighted results of all models to achieve normalization, ultimately ensuring that the sum of all weights is 1.

[0032] ④The final load forecast result of weighted integration is: (twenty three) Case analysis: The calculation example is from a certain city, spanning 36 months from 2019 to 2021. Data was collected using a high-frequency sampling method with 15-minute intervals, generating 96 data values ​​per day, resulting in 105,216 sets of data containing load and meteorological information. The model training, validation, and test sets were divided appropriately. November 8, 2021, was used as the test date for verification, and all dates prior to that were considered historical dates.

[0033] Ⅰ. Data preprocessing and error evaluation indicators: Data preprocessing: Due to the huge amount of data, we first cleaned the massive load, meteorological and other data to remove outliers and fill in missing values ​​to maintain the continuity and integrity of the data in the time dimension. In order to improve the efficiency and stability of model training, the data was further normalized. The normalization formula is as follows: (26) in, is the original data, Normalized data Error evaluation indicators: The prediction performance of different models is quantified by three indicators: Mean Absolute Error (MAE), Root Mean Square Error (RMSE) and Coefficient of Determination. , the calculation formula is as follows: (27) (28) (29) in, is the true value of the load, is the load forecast value, is the average load value; Ⅱ. Similar day screening results: In this example, the MIC coefficient and its weight of the multivariate factor load are calculated based on the formula to quantify the degree of correlation between meteorological factors, week types, and load. The calculation results of the MIC coefficient and weight are shown in Table 1.

[0034] Table 1: Calculation results of multiple factors and load MIC coefficients

[0035] 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 considered as a key factor in similar day extraction. Irradiance has a MIC coefficient of 0.652 and a weight of 0.232, indicating that irradiance also has a significant impact on load. This is due to the impact of the large-scale grid access of distributed photovoltaics on load output. The MIC coefficient for weekday and load is 0.402, which is above average, indicating that load behavior in this region is significantly affected by weekday. The MIC coefficients and weights for cloud cover and 10m wind speed are intermediate, indicating that they have some impact on load, but not significant. Humidity and precipitation have low MIC coefficients and are assigned small weights, resulting in weak correlation with load and a very limited role in selecting similar days.

[0036] Based on the MIC weights calculated above, a similar day extraction model based on grey correlation is constructed to calculate the comprehensive matching similarity of historical days. After calculation, the similarity calculation results of November 8, 2021 with all historical days in the dataset are in the range of [0.4784, 0.7421]. Historical days are selected as similar days according to the similarity from high to low. The top ten results of the comprehensive matching similarity ranking are shown in Table 2. Figure 8 The top 10 similar days and their similarities are intuitively displayed.

[0037] Table 2: Similar day screening for November 8, 2021, descending ranking

[0038] The top five similarity days, November 7, November 4, November 1, October 31 and October 18, were selected as similar days.

[0039] III. Multi-model dynamic weighting based on SAC: SAC environment configuration: Environment configuration transforms the actual multi-model load forecasting problem into a decision-making process within the SAC. In load forecasting, the environment serves 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, date, and other information related to load power, as well as the load forecasting performance of different sub-models. To better predict the load power on the day to be tested, the top five historical data points for similar days are selected and input into the state space of the SAC agent. Subsequently, sub-model weights are dynamically assigned 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.

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

[0041] Sub-model weight configuration results: Figure 9 The dynamic changes in the weights of the three sub-models at each moment of a single day after SAC strategy optimization are demonstrated. As sampling time progresses, the weight of the CA-PatchTST model fluctuates around 0.5, the LSSVM model stabilizes around 0.3, and the Lightgbm model weight drops to around 0.2. Based on the SAC algorithm, the weighted combination of the sub-model prediction results at each sampling moment is used as the load forecast result of the model.

[0042] To further analyze the contribution of different sub-models to the combined model, this embodiment calculated the sub-model weight performance indicators as shown in Table 4. The weight performance of the three sub-models was compared and analyzed. The average weight reflects the overall contribution of each model to the combined prediction result. The CA-PatchTST model had an average weight of 0.4589 across all tests, the highest among all models and correspondingly the greatest contribution. The LSSVM model ranked second, and the Lightgbm model ranked last. The Lightgbm model's worst performance was close to that of the LSSVM model, but the CA-PatchTST model still had the lowest value of 0.2772, indicating its greater stability and better adaptability to extreme situations and fluctuations.

[0043] Table 4: Sub-model weight performance indicators

[0044] IV. Multi-model load forecasting results: Multi-model load forecasting results: In order to verify the advantages of multi-model combination over a single prediction model, this example compares and verifies the prediction effects of the three sub-models Lightgbm, CA-PatchTST, and LSSVM in the prediction scenario; at the same time, in order to verify the advantages of the SAC dynamic weight configuration after introducing similar days, this example uses the prediction results of the fixed weight (three sub-models are fixedly assigned equal weights) model as a control, and a total of 5 prediction curves based on the prediction of the test day are obtained, such as Figure 10 shown.

[0045] Analysis shows that the load forecast results of the proposed model are generally consistent with the true value curve trend, can more sensitively capture load fluctuations, and to a certain extent reflect the actual load power consumption behavior. As can be seen from the figure, compared with the combined model of a single sub-model and an evenly distributed weight, the proposed model is more consistent with the true value curve, has the highest prediction accuracy, and is the best model effect.

[0046] Table 5 shows the error evaluation indicators (MAE, RMSPE) and calculation results for each model. The model of the present invention achieved the lowest MAE and RMSPE, with a coefficient of determination of 96.327, resulting in the highest overall prediction accuracy. The combined model, which evenly distributes weights among the submodels, achieved higher prediction accuracy than any single submodel. This demonstrates that the combined model helps leverage the predictive strengths of different model types, overcomes the shortcomings of individual models to a certain extent, and improves prediction accuracy. Among the three submodels, the CA-PatchTST model achieved higher prediction accuracy, while the LSSVM and Lightgbm models performed relatively poorly.

[0047] Table 5: Evaluation indicators of prediction error of each model

[0048] Compared with the fixed weight combination model, CA-PatchTST, LSSVM and Lightgbm models, the MAE and RMSPE levels of the model of the present invention are significantly reduced, among which MAE is reduced by 10.914%, 36.158%, 46.532% and 50.611% respectively; RMSPE is reduced by 12.337%, 28.849%, 38.925% and 48.152% respectively. The calculation results of the error indicators fully verify that the combined forecasting model with dynamic weight allocation after introducing the SAC dynamic weight configuration can effectively improve the accuracy of short-term load forecasting.

[0049] In order to avoid the randomness of the prediction experiment and further fully verify the universality of the model proposed in the present invention in improving the accuracy of different load power consumption behaviors, the present invention comprehensively considers the possible impact of different load curve shapes and power consumption level differences on the prediction accuracy. By selecting multiple dates in different seasons and months as test days, model comparison experiments are carried out on the test days respectively. The experimental results show that compared with the single model and the fixed weight model, the prediction performance of the model of the present invention for different seasons and different load behaviors remains the best. The typical power prediction results of different load power consumption behaviors are as follows Figure 11 shown.

[0050] Comparison of load forecasting results using similar day algorithms: The present invention adopts the improved MIC weight-grey correlation algorithm as the method for similar day extraction. In order to verify the influence of the similar day extraction algorithm on the load forecast results, the present invention compares the basic GRA and the traditional Euclidean distance, and compares the load forecast results without extracting similar days. In order to ensure the reliability of the comparative experiment, in addition to the differences in the similar day extraction algorithm, the models used in the comparative experiment of the present invention uniformly adopt the dynamic weighted multi-model prediction algorithm. The same test set is used for each model and multiple experiments are carried out to take the average. The prediction results are as follows: Figure 12 shown.

[0051] Observation shows that the load forecast results without similar days deviate significantly from the actual results, resulting in the worst model prediction performance. Compared to the prediction curve without similar days, the prediction results using GRA and Euclidean distance for similar day extraction are significantly closer to the true values. While both the traditional Euclidean distance and basic GRA algorithms can improve load forecast accuracy to a certain extent, the proposed model has a better fit to the true values, indicating that the similar day extraction algorithm, after improving the grey correlation, can more accurately identify and extract dates highly correlated with the day to be measured as similar days.

[0052] Error evaluation indicators of each model MAE, RMSPE and The calculation results are shown in Table 6.

[0053] Table 6: Evaluation indicators of prediction error of each model

[0054] Compared with the traditional grey correlation model, Euclidean distance model and the prediction model without similar days extraction, the MAE and RMSPE levels of the model of the present invention are at the lowest level. Among them, MAE is reduced by 25.338%, 32.655% and 54.450% respectively; RMSPE is reduced by 22.860%, 41.431% and 50.703% respectively. The highest, reaching 96.327%; the prediction model without similar day extraction It is only 86.991%, and the model fitting effect is poor. The accuracy of the prediction model using the basic similar day extraction algorithm is significantly improved compared to the model without similar days extraction, indicating that the extraction of similar days is crucial to improving the accuracy of short-term load forecasting. The model of the present invention further illustrates that the similar day extraction algorithm after the improvement and optimization of the traditional GRA has better performance, and can more comprehensively grasp the correlation between different influencing factors and the load, thereby 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 the present invention can provide higher quality similar day historical data for the load forecasting model and improve the fitting accuracy of the model.

[0055] 5.4.3 Visual analysis of prediction errors: In order to more intuitively observe the difference in prediction accuracy of different prediction models, this paper uses MAE, MAPE, RMSE, RMSPE and Calculation results are plotted for Figure 10 、 Figure 12 The error radar chart of Figure 13-14 shown.

[0056] From the calculation formula of error evaluation index, we can see that the larger the four error evaluation indexes of MAE, MAPE, RMSE and RMSPE are, the lower the model prediction accuracy is; The closer it is to 100%, the higher the model prediction accuracy. Figure 13 From the error distribution of each model shown, it can be seen that the prediction error of the model of the present invention is significantly lower than that of other models, which further verifies that the prediction effect of the model of the present invention is the best. Figure 14 By comparing the error distribution levels when using different similar day extraction algorithms, it can be intuitively seen that the present invention improves the model accuracy based on the improved similar day algorithm.

[0057] Example 2: This embodiment provides an improved SAC weighted load multi-model power forecasting system based on similar day extraction, including: 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; The multi-model load forecasting module selects the LightGBM model of the tree model class, the CA-PatchTST model of the neural network class, and the least squares support vector machine model (LSSVM) of the support vector machine class as the three sub-models of the combined model. The three models are used to predict the load series of the same test day, with a sampling interval of 15 minutes, and three prediction series are obtained; The SAC weight configuration module is used to integrate the extracted similar day data into the state space of SAC, combine the prediction error and performance ranking of the sub-model, configure the weight coefficient for the prediction result of each sub-model, and dynamically adjust the weight according to the state changes perceived from the environment. The weighted result is output to obtain the final load combination prediction result based on dynamic weights.

Claims

1. An improved SAC weighted load multi-model power forecasting method based on similar day extraction is characterized by: Here are the steps: (1) Data preprocessing: perform data preprocessing on historical load data and multivariate meteorological data, remove duplicate and abnormal data, supplement missing data, and normalize the data; (2) Load similarity day extraction: using the weighted grey correlation similarity day extraction algorithm based on MIC, the similarity between the historical date and the test day is calculated, and the top five historical days with the similarity to the test day are selected as similar days to the test day; (3) Based on the load forecasting of multi-model advantage fusion, the LightGBM model of the tree model class, the CA-PatchTST model of the neural network class, and the least squares support vector machine model of the support vector machine class are selected as the three sub-models of the combined model. The three models are used to predict the load series of the same test day, with a sampling interval of 15 minutes, and three prediction sequences are obtained; (4) SAC weight configuration: set the state set, action set, and reward set of the SAC, integrate the extracted similar day data into the state space of the SAC, combine the prediction error of the sub-model with the similar day performance ranking, configure the weight coefficient for the prediction result of each sub-model, and dynamically adjust the weight according to the state changes perceived from the environment. Output the weighted result to obtain the final result of the load combination prediction based on the dynamic weight.

2. The improved SAC weighted load multi-model power forecasting method based on similar day extraction according to claim 1 is characterized in that: In step (2), the specific steps are: (21) Correlation analysis based on MIC coefficient: First, the MIC coefficient between meteorological factors and load data is calculated as a weight factor to quantify the correlation between each meteorological factor and load; Then it is integrated into the grey relational analysis process, and the weighted grey relational degree is obtained by introducing the correlation weights of multivariate meteorological factors and loads. The MIC coefficient is a statistic used to measure the strength of the relationship between two variables. It defines D(X, Y) as the coefficient containing the characteristics to be analyzed. and load power The two-dimensional plane, data points (x i ,y i ) are distributed on the XY plane and divided into plane grids , calculate the maximum mutual information value in each grid: (1) in, is the maximum mutual information matrix, is the mutual information, For Grid Maximum possible mutual information of distributions; The MIC coefficient calculation formula is: (2) Where, Limit variables for the number of grid divisions; (22) Based on the MIC results, select historical dates similar to the test date, specifically; (221) Data preprocessing: dimensionless processing of meteorological data and load data; (222) Construct reference sequence and comparison sequence: define reference sequence X L is the matrix composed of the meteorological data sequence of the day to be predicted, ; Compare sequence X pre is the historical date meteorological data sequence matrix, , where m is the mth dimension feature. The features used for similar day screening include multivariate weather and week types, and the structure is a historical vector set consisting of meteorological data of k historical dates; (223) Calculate the weights and the weight ratio of the multidimensional features in the selection of similar days. Based on the MIC coefficient calculation results, the ratio of each MIC coefficient in the total MIC coefficient is used as the weight coefficient of the feature. The calculation formula is as follows: (3) in, is the weight of the i-th component, represents the coefficient matrix containing the weights, ; (224) Calculate the weighted grey correlation coefficient. Based on the grey correlation analysis method, calculate the similarity between the test day and each factor. The formula is: (4) Among them, a is the minimum difference between the two poles, b is the maximum difference between the two poles, ρ is the resolution coefficient, X prej (k) is the data sequence of the jth indicator within the kth day of the historical date; γ is the grey correlation coefficient, is the grey correlation coefficient between the day to be tested and the jth indicator in the kth historical day; Based on the weight coefficient, the final weighted grey relational coefficient δ is obtained as follows: (5) Among them, n is the length of the time series. According to the formula, the similarity ranking between each historical day and the day to be measured is obtained. The larger δ is, the higher the similarity between the two is. The top five dates in similarity ranking are selected as similar days to the day to be measured.

3. The improved SAC weighted load multi-model power forecasting method based on similar day extraction according to claim 2 is characterized in that: In step (3), the LightGBM model is a gradient boosting machine algorithm used to solve classification and regression problems. It combines multiple weak learners into a strong model and gradually improves the prediction performance of the model by iteratively optimizing the residual of the model based on the gradient boosting framework. Assuming that the training set is , the data set is n, where x i is the first 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: (6) Among them, f t (x) minimizes the loss; C is the loss function, which measures the difference between the model's predicted value and the actual value; arg represents the parameter value that minimizes the loss function C; Calculate the negative gradient of the loss function as the approximate residual of the current iteration, defined as g t , which is expressed as follows: (7) By minimizing the square error to fit the weak learner, we get (8) After one round of iteration, the updated strong learner is: (9) in, is the learning rate, used to display the control step size; After T rounds of iterations, the load forecast output expression is: (10) in, is the output of the LightGBM model, The final load forecast result.

4. The improved SAC weighted load multi-model power forecasting method based on similar day extraction according to claim 3 is characterized in that: In step (3), the least squares support vector machine model optimizes the model parameters by minimizing the square error. For a given training data , the least squares support vector machine model optimization problem is expressed as: (11) (12) in, It is a nonlinear mapping from input space to high-dimensional feature space. is the weight vector, representing the complexity of the model, is the error vector, is the bias term, is the regularization parameter; In order to solve the constrained optimization problem, Lagrange function and dual optimization are introduced, and the Lagrange multiplier is set as , from the optimization conditions, we know that the Lagrangian function is 、 、 and The partial derivative is zero, and the simplified kernel function expression is: (13) in, It is a kernel function that can effectively reduce the computational complexity of high-dimensional space and plays a core role in the LSSVM model. In summary, the load forecast output expression based on the least squares support vector machine model is: (14)。 5. The improved SAC weighted load multi-model power forecasting method based on similar day extraction according to claim 4 is characterized in that: 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 test day are input into the multi-head attention mechanism for encoding, and then the cross-attention mechanism is used for fusion, and finally the prediction result is output; The input similar day historical power data is defined as , meteorological characteristic data ,in L, T are load and weather sequence length, They are power and meteorological characteristic dimensions; When processing time series data, the CA-PatchTST model first divides the input time series into multiple patches, then position-encodes these patches, and finally feeds the encoded data into the Transformer encoder for further processing.

6. The improved SAC weighted load multi-model power forecasting method based on similar day extraction according to claim 5 is characterized in that: The specific steps for processing time series data are as follows: (31) Weather-power coding: First, the historical power data is divided into M Patches: (15) in, P is the size of the patch, , and then map and position encode it; After the encoding is completed, the result is input into the Transformer encoder for encoding, and the output power is encoded as ; Similarly, the multi-dimensional meteorological features are mapped and encoded to obtain the meteorological code ; (32) Feature fusion of multi-source heterogeneous data based on cross-attention mechanism: Definition query-key value: let power encoding Query, weather code For Value, the formula for calculating cross attention is as follows: (16) Among them, CA is the abbreviation of Cross Attention, Softmax is the function name, are learnable parameters used to map queries, keys, and values ​​to new spaces respectively; is the model dimension, i.e. the size of the hidden layer; After processing the original power through the cross-attention mechanism and fusing the meteorological features, we get: (17) in, is the feature representation after fusion; FFN is the abbreviation of LayerNorm; FFN is a feedforward neural network, which is usually a simple network consisting of two fully connected layers, used to further process the output of the cross-attention mechanism; (33) Output load forecast results: The result after feature fusion Perform global average pooling to obtain the feature vector , the fused feature vector is mapped to the prediction space of 96 moments on the test day, and the load forecast result is finally obtained as follows: (18) in, is the weight of the linear layer, is the bias term.

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

8. The improved SAC weighted load multi-model power forecasting method based on similar day extraction according to claim 7 is characterized in that: In step (4), the specific steps of environment configuration and weight adjustment are: (41) Input the extracted top 5 similar day historical data into the state space of SAC; (42) Use the sub-models to perform load forecasting respectively, and input the sub-model prediction results into the state space of SAC; (43) A reward function based on the weight of the sub-model ranking and the weighted performance score of similar days is used. With a sampling interval of 15 minutes, 96 power values ​​are predicted every day. That is, the SAC makes a decision once and outputs the load forecast values ​​of 96 points on the test day. (44) Weighted integration: SAC assigns weights to the sub-models at each moment through the interaction between the environment and the agent, and performs weighted averaging of the prediction results of the sub-models according to the assigned weights to obtain the final prediction result.

9. The improved SAC weighted load multi-model power forecasting method based on similar day extraction according to claim 8, characterized in that: In step (43), the weight configuration is: ① SAC state set: (19) in, It is the top five similar day historical data, They are the prediction results of the LightGBM model, the least squares support vector machine model and the CA-PatchTST model, are the prediction errors of the past k time steps; ② Action set A: (20) in, are the weights of the three sub-models, which are dynamically changing values; ③Reward function formula: (21) in, These are SAC learnable parameters that control the weight of the historical ranking factor and the weight of the similar day performance score. Their initial values ​​are set to 0.5 and 0.5, respectively, and are subsequently dynamically adjusted through SAC algorithm modeling. Historical ranking factor weight: is the normalized average ranking predicted by the kth sub-model on similar days, and its calculation formula is: = average ranking of predictions of model k on 5 similar days / 5; 1- Convert the original ranking into a positive contribution value. The higher the sub-model ranking, the The smaller, 1- The closer it is to 1, the higher the weight contribution of the sub-model; conversely, the lower the ranking of the sub-model, The larger the The closer it is to 0, the lower the weight contribution of the sub-model; Similar day performance score weight: The calculation formula is as follows: (22) Among them, sim d is the similarity between the dth similar day and the day to be tested, that is, the result of weighted grey correlation calculation, is the normalized RMSE of model k on the dth similar day. This formula is used to calculate the weighted performance score of the kth model on the similar day. ④The final load forecast result of weighted integration is: (23) 。 10. An improved SAC weighted load multi-model power forecasting system based on similar day extraction, characterized in that: include: 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; The load similar day extraction module uses the MIC-based weighted grey correlation similar day extraction algorithm to screen historical dates similar to the test day. First, the MIC coefficients of multiple meteorological factors and load power are calculated, and the meteorological factors that affect the load power level are ranked and weighted. Then, based on the MIC results, historical dates similar to the test day are screened. The multi-model load forecasting module selects the LightGBM model of the tree model class, the CA-PatchTST model of the neural network class, and the least squares support vector machine model (LSSVM) of the support vector machine class as the three sub-models of the combined model. The three models are used to predict the load series of the same test day, with a sampling interval of 15 minutes, and three prediction series are obtained; The SAC weight configuration module is used to integrate the extracted similar day data into the state space of SAC, combine the prediction error of the sub-model with the similar day performance ranking, configure the weight coefficient for the prediction result of each sub-model, and dynamically adjust the weight according to the state changes perceived from the environment. The weighted result is output to obtain the final load combination prediction result based on dynamic weights.

Citation Information

Patent Citations

  • Short-term load prediction method based on similar day segmentation and LM-BP network

    CN108229754A

  • Power consumer load interval prediction method based on deep learning

    CN110263866A

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

    CN110309988A

  • Short-term load prediction method based on TCN and IPSO-LSSVM combined model

    CN111860979A

  • Flexible load prediction method based on ensemble learning-beetle antennae optimization algorithm

    CN116432510A

Cited By

  • Intelligent assessment method for fire risk of high-altitude tunnel

    CN121544042A