A load prediction method and device
By using the iTransformer-KAN network and the SHAP method, the problem of transparent analysis of load forecasting in power grid decision support systems is solved, enabling accurate forecasting and decision support for price-guided loads, and improving the robustness and interpretability of the model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHAANXI UNIV OF SCI & TECH
- Filing Date
- 2026-03-31
- Publication Date
- 2026-07-03
Smart Images

Figure CN122334582A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power system load forecasting technology, specifically relating to a load forecasting method and apparatus. Background Technology
[0002] Faced with the deep coupling between multi-source heterogeneous factors such as economics and meteorology and load, although the iTransformer model can effectively deconstruct the complex relationships between variables, it is limited by the output layer of the multilayer perceptron (MLP) and struggles to accurately fit the high-order nonlinear characteristics of the load. Existing techniques and methods have alleviated the blindness of decision-making to some extent, but they mostly focus on global statistical dependencies and still struggle to achieve accurate quantification and attribution of the contribution of individual samples or features, and to achieve transparent analysis of the entire process from feature source to prediction results. This hinders the in-depth application of this technology in power grid decision support systems.
[0003] Chinese patent publication number CN121602348A, entitled "A Time-of-Use Electricity Prediction Method Based on Logarithmic Load Density Growth Curve," describes a patent application that uses convergent cross-mapping and inter-information technology to perform causal detection and dynamic time-delay optimization on historical load and multivariate external data. This constructs a causal time-delay feature set, solving the problems of multivariate coupling and time-delay effect quantification. Secondly, it uses time-frequency decomposition combined with a piecewise logistic model to fit the load trend, extracting dynamic parameters characterizing the growth rate and saturation capacity, giving the model the ability to perceive load evolution stages. Subsequently, it deeply integrates causal features, growth parameters, and load components through cross-domain modulation and gating mechanisms, explicitly modeling the nonlinear modulation effect of the external environment on the load pattern. Finally, it combines quantile regression and residual correction to generate probability intervals. However, this patent application cannot solve the problem of statistical dependence on the global dimension and cannot accurately optimize the model. Summary of the Invention
[0004] To overcome the problems existing in the prior art, the present invention aims to provide a load forecasting method and apparatus. By using the SHAP method to achieve posterior quantitative analysis of the black-box forecasting process, it can achieve accurate forecasting of cost-driven industry loads guided by time-of-use pricing, and quantitatively analyze the contribution of each driving factor to load changes, providing decision support for refined power dispatching and industry energy cost optimization.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: In a first aspect, the present invention provides a load forecasting method, comprising the following steps: Data on time and historical load dimensions, environmental and meteorological dimensions, and economic dimensions were collected to construct an original feature vector that includes these dimensions. In the embedding layer of the iTransformer model, the original feature vectors are mapped to a high-dimensional feature space; the correlation weights between each variable and all other variables are calculated in the variable dimension; the features of the related variables are weighted and summed according to the weights; and the temporal features of each variable are extracted through a feedforward network. Using the KAN network as the output layer of the iTransformer model, the time characteristics of each variable are nonlinearly mapped through the B-spline activation function of the KAN network to obtain the load prediction results. The SHAP method is used to treat the load prediction results as the sum of the contributions of each input feature to the model. The Shapley value of each input feature is calculated, and features whose absolute value is less than a preset value are removed, and the prediction is performed again.
[0006] Optionally, the economic dimension features include time-of-use electricity pricing features; the environmental and meteorological dimension features include temperature features, humidity features, and wind speed features; and the time and historical load dimension features include historical moment load value features, date attribute features, and weekday type features.
[0007] Optionally, before mapping the original feature vectors to a high-dimensional feature space, a convergent cross-mapping algorithm is used to remove redundant feature variables.
[0008] Optionally, after extracting the time features of each variable, the layer normalization method is used to normalize all variables.
[0009] Optionally, the final output formula of the iTransformer-KAN model is:
[0010] in,, It is a predicted sequence; This is the (L-1)th KAN layer; It is the final token after the load has been processed by all Transformer layers, with dimension D.
[0011] Optionally, the Shapley value can be calculated using the following formula:
[0012] In the formula, Let S be the Shapley value corresponding to the i-th feature, where S is the subset of features that does not contain the i-th feature, and |S| is the number of features in the subset. Let S represent the expected output of the model under the feature subset S, and M be the total number of features.
[0013] Secondly, the present invention provides a load forecasting system, comprising: The data acquisition module is used to collect data on time and historical load dimensions, environmental and meteorological dimensions, and economic dimensions, and to construct an original feature vector that includes these dimensions. The model building module is used to map the original feature vectors to a high-dimensional feature space in the embedding layer of the iTransformer model; calculate the correlation weight between each variable and all other variables in the variable dimension; perform weighted summation of the features of the related variables according to the weights; and extract the temporal features of each variable through a feedforward network. The load calculation module is used to use the KAN network as the output layer of the iTransformer model. The B-spline activation function of the KAN network is used to perform nonlinear mapping on the time characteristics of each variable to obtain the load prediction results. The model correction module is used to employ the SHAP method to treat the load prediction results as the superposition of the contributions of each input feature to the model, calculate the Shapley value of each input feature, remove features whose absolute value is less than a preset value, and re-predict.
[0014] Thirdly, the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the load forecasting method.
[0015] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the load forecasting method.
[0016] Fifthly, the present invention provides a computer program product including a computer-readable medium, wherein computer-readable program code is included on the computer-readable medium, the program code performing the load forecasting method.
[0017] Compared with the prior art, the present invention has the following beneficial effects: The load forecasting method of this invention combines a deep learning architecture, a high-order nonlinear mapping layer, and a sophisticated interpretable attribution algorithm to efficiently achieve accurate forecasting of industry load and in-depth deconstruction of decision-making mechanisms in the power market environment. To achieve deep modeling of high-dimensional heterogeneous data, this invention employs a dimension-inverted iTransformer structure. By applying an attention mechanism to the variable dimension, the system can treat electricity prices, weather conditions, and historical loads of different dimensions as independent tokens, deeply capturing long-distance correlations and evolutionary patterns between heterogeneous features from a global sequence perspective. This integrated modeling approach avoids the dimensional confusion caused by heterogeneous variable spatial alignment in traditional time-series models, significantly improving the model's ability to represent complex time-series patterns. Simultaneously, combined with the game-theoretic SHAP attribution analysis method, this invention achieves transparent analysis throughout the entire process from feature source to prediction results. This mechanism can quantify the contribution weights of factors such as time-of-use electricity prices and temperature fluctuations to the prediction results, completely eliminating the black-box effect of deep learning models. This not only provides power dispatchers with intuitive and reliable decision-making basis, but also helps industry users identify key aspects of energy cost optimization, providing key technical support for the precise dispatching of the smart grid and the refined energy management under the power market in the future.
[0018] Furthermore, the prediction architecture proposed in this invention, by introducing a convergent cross-mapping algorithm that considers time delays, achieves quantitative causal identification of economic features such as time-of-use electricity prices and meteorological environmental features. This a priori causal screening mechanism can effectively decouple the complex causal chain between market economic signals and load fluctuations, eliminate the interference of spurious correlation variables, and greatly improve the physical meaning and quality of the model input features, thus ensuring the model's predictive robustness in the face of price-driven loads from the source.
[0019] Furthermore, the prediction mapping layer based on the KAN network designed in this invention can replace the fixed activation function in the traditional multilayer perceptron with a learnable B-spline basis function. This high-order nonlinear fitting capability enables the model to accurately characterize the step response characteristics of industrial load to electricity price signal switching and the high-order interaction effects between multiple variables with a smaller parameter scale, ensuring accurate capture of the temporal details of the prediction results. Attached Figure Description
[0020] The accompanying drawings described herein are for illustrative purposes only and are not intended to limit the scope of the invention in any way.
[0021] In the attached diagram: Figure 1 This is a schematic diagram of the overall process of an embodiment of the present invention; Figure 2 This is a schematic diagram of the predictive architecture of the model in an embodiment of the present invention; Figure 3 This is a global interpretability graph for a spring scene in an embodiment of the present invention; Figure 4 This is a local single-sample decision path diagram according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the prediction results in a spring scene according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the prediction results in a summer scenario according to an embodiment of the present invention; Figure 7 This is a schematic diagram of the prediction results in a winter scene according to an embodiment of the present invention; Detailed Implementation To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this invention.
[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0023] It should be noted that any reference signs placed between parentheses in the claims should not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. This application can be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.
[0024] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0025] The present invention will now be described in detail with reference to the accompanying drawings.
[0026] While existing forecasting studies broadly consider meteorological conditions, date attributes, and historical load characteristics, they often overlook time-of-use pricing, a crucial economic driver. This technical limitation makes it difficult for models to accurately characterize the shifting, peak-shaving, and load-reduction characteristics induced by cost signals, leading to significantly increased forecast bias during price switching periods. Furthermore, there is a significant nonlinear coupling between price signals and industry load, and meteorological characteristics such as temperature, due to thermal inertia and the cumulative effects of environmental regulation, often have significant leading or lagging effects on load changes, exhibiting complex cross-timestamp dynamic relationships. Traditional methods such as linear correlation analysis or Granger causality tests are insufficient to accurately characterize the driving relationships in nonlinear dynamic systems. Secondly, the model's high-order nonlinear representation is limited.
[0027] A load forecasting method of the present invention includes the following steps: Data on time and historical load dimensions, environmental and meteorological dimensions, and economic dimensions were collected to construct an original feature vector that includes these dimensions. In the embedding layer of the iTransformer model, the original feature vectors are mapped to a high-dimensional feature space; the correlation weights between each variable and all other variables are calculated in the variable dimension; the features of the related variables are weighted and summed according to the weights; and the temporal features of each variable are extracted through a feedforward network. Using the KAN network as the output layer of the iTransformer model, the time characteristics of each variable are nonlinearly mapped through the B-spline activation function of the KAN network to obtain the load prediction results. The SHAP method is used to treat the load prediction results as the sum of the contributions of each input feature to the model. The Shapley value of each input feature is calculated, and features whose absolute value is less than a preset value are removed, and the prediction is performed again.
[0028] Optionally, features with an absolute Shapley value less than 1% can be removed.
[0029] The load forecasting method of this invention employs an iTransformer structure with inverted dimensions. By applying an attention mechanism to the variable dimension, the system can treat electricity prices, weather conditions, and historical loads from different dimensions as independent tokens, deeply capturing long-distance correlations and evolutionary patterns between heterogeneous features from a global sequence perspective. Simultaneously, combined with the game-theoretic SHAP attribution analysis method, it achieves transparent analysis of the entire process from feature source to prediction result. This mechanism can quantify the contribution weight of factors such as time-of-use electricity prices and temperature fluctuations to the prediction result, completely eliminating the black-box effect of deep learning models.
[0030] Example 1 A load forecasting method according to this embodiment includes the following steps: Step 1: Causal association mining and core feature set selection of multi-source heterogeneous features; Step 2: Construct a load forecasting model architecture based on iTransformer-KAN; Step 3: Attribution analysis of decision-making mechanisms based on Shapley Additive Explanations (SHAP).
[0031] The specific steps for step one are as follows: First, a multi-source heterogeneous feature space is constructed: to comprehensively characterize the evolutionary characteristics of cost-driven industry loads, an original feature vector including the following dimensions is constructed. : Economic dimension features are used to introduce time-of-use pricing features and serve as the core economic signal to guide industrial users in load shifting and reduction.
[0032] Environmental and meteorological characteristics, including temperature, humidity, and wind speed.
[0033] Time and historical load dimension features, including historical moment load values, date attribute features, whether it is a holiday or a weekday type, are used as the basic time series features of the load sequence.
[0034] For the aforementioned high-dimensional feature space, a convergent cross-mapping algorithm is used to remove redundant variables. The specific process is as follows: Data preprocessing and standardization: Features other than time and historical load dimensions are set as sequences of length L. The time and historical load dimension features a sequence of length L. To eliminate the influence of dimensions and ensure the stability of distance calculations, normalization is performed on each component: Formula 1.1 Equation 1.2 Constructing the shadow manifold: The shadow manifold is constructed based on the delayed embedding theorem, for a selected embedding dimension E and embedding lag. The state vector at time t and Defined as: Equation 1.3 Equation 1.4 In the formula, The range of values is .
[0035] Find the nearest neighbor: In Vioclimatic space, calculation With all other points on the manifold The distance. Find the nearest one. Let be the nearest neighboring points. For this The time indexes of the nearest neighbors, satisfying: Formula 1.5 The Euclidean distance is defined as follows: Equation 1.6 Calculate the weights: First, calculate the non-normalized weights. : Equation 1.7 in This is the distance to the nearest neighbor, used to standardize the distance scale. If the distance is 0 (completely overlapping), the weight of that point is set to 1; otherwise, it is 0.
[0036] Then, normalization is performed so that the sum of the weights is 1: Formula 1.8 Predicting manifolds: In standard convergent cross mapping (CCM), utilizing... Neighbor index To predict the same period value However, in CCM that considers time delays, a prediction lag parameter is introduced. To predict The value at the offset time. Estimated value. The calculation is as follows: Equation 1.9 Calculate the CCM correlation coefficient: Formula 1.10 In the formula, ρ is a causal strength index based on the Pearson correlation coefficient (PCC), used to measure the degree of correlation between time series X and Y. The larger the ρ value, the stronger the correlation between the two variables.
[0037] Based on the above calculations, all candidate features are ranked by causal strength. The converged correlation coefficients are then used to... Compare with the preset significance threshold of 0.5. Eliminate. Variables that are spuriously correlated with or unrelated to the load are considered to be of a false correlation with the load. The set of features with strong causal indices is retained. This feature set, along with historical loads, is used as input to the subsequent iTransformer-KAN model.
[0038] The specific steps for step two are as follows: First, in the embedding layer of the iTransformer model, the original sequence of the core feature set selected in step one is mapped to a high-dimensional feature space D, including the features of factors in the time and historical load dimension, the environmental and meteorological dimension, and the economic dimension.
[0039] Multi-head attention mechanism is used to capture the dependencies between different features and aggregate information from related variables.
[0040] This involves using a multi-head self-attention mechanism to calculate the correlation weight between each variable and all other variables along the variable dimension. Based on the attention weights, the features of the related variables are weighted and summed, incorporating global correlation information into the representation of each variable.
[0041] The process of extracting the temporal features of each variable through a feedforward network and unifying the measurement units and feature distributions among the variables through layer normalization can be represented as follows: Equation 1.11 Equation 1.12 in, This represents the historical sequence of the nth variable, with an original length of T. It is a high-dimensional feature representation that maps the sequence of each variable to a D-dimensional feature space. It is the first The output of the Transformer block contains a set of Tokens with all N variables. , It is the final token after the workload has been processed by all Transformer layers, with dimension D. It integrates the co-evolution characteristics of historical load, time-of-use electricity prices, and meteorological variables across the entire time domain.
[0042] After completing the global correlation feature extraction, the existing iTransformer model uses a multilayer perceptron (MLP) with a fixed activation function for mapping, which limits the expression of nonlinear interactions.
[0043] KAN is introduced to replace MLP, utilizing its learnable edge activation function to capture complex functional relationships. As input to the KAN network for nonlinear mapping prediction, a general layered KAN network is composed of multiple KAN layers. Therefore, the final output of the iTransformer-KAN model is: Equation 1.13 in, It is a predicted sequence; This is the (L-1)th KAN layer; It is the final token after the load has been processed by all Transformer layers, with dimension D.
[0044] To facilitate optimization, KAN employs B-splines as its parameterization tool. The KAN activation function is defined as a combination of the basic function and the spline function: Equation 1.14 in, Choose the SiLU function ,and This can be represented as a linear combination of B-spline basis functions: Equation 1.15 in, It is a B-spline basis function; These are trainable spline coefficients, responsible for controlling the specific shape of the activation function.
[0045] The specific steps for step three are as follows: After obtaining the prediction results, the Shapley Additive Interpretation (SHAP) method is introduced to convert the model's predicted values into... This is considered as the sum of the marginal contributions of each input feature (such as time-of-use electricity price, historical load, and meteorological factors) to the prediction result. Based on the additive feature attribution model, the predicted value can be expressed as a baseline value, i.e., the average of all sample predictions, and a linear combination of the contribution values of each feature: Equation 1.16 In the formula, The baseline value is M, where M is the total number of features. Let be the Shapley value corresponding to the i-th feature. This value is obtained by weighting the marginal contributions of feature i across all possible combinations of feature subsets, and its standard calculation formula is: Equation 1.17 In the formula, S is the feature subset that does not contain the i-th feature, and |S| is the number of features in the subset. This represents the expected output of the model under the feature subset S. This method rigorously guarantees, mathematically, the fairness and consistency of the allocation of contributions from each feature.
[0046] A global feature importance assessment was performed. To identify the core drivers influencing load fluctuations, the absolute values of the Shapley scores for all samples in the test set were averaged to obtain a global ranking of feature importance. Global Importance Score The calculation formula is: Equation 1.18 In the formula, N is the total number of samples. This represents the contribution of the i-th feature in the j-th sample. This indicator quantifies the overall impact weight of time-of-use electricity price signals, environmental weather, and historical fluctuations on industry energy consumption behavior, verifies the effectiveness of the causal screening in step one, and provides macro-level decision-making references for grid dispatchers.
[0047] Finally, a local single-sample decision path tracing is performed. For specific prediction times or prediction anomalies, the SHAP waterfall plot is used to perform micro-analysis of the model's decision logic. By calculating the Shapley values corresponding to each input variable under this specific sample, their effect on boosting or inhibiting the prediction results is analyzed. If the Shapley value > 0, the feature has a positive driving effect on the load prediction value; if the Shapley value < 0, it indicates that the feature inhibits the increase in load. In this way, each prediction value can be traced back to the specific physical or economic feature source, clearly showing how the industry load responds to the step change of time-of-use electricity price, achieving transparent analysis of the entire process from feature source to prediction result.
[0048] SHAP analysis is an additive interpreter in cooperative game theory that quantifies the marginal contribution of each feature to the final prediction by calculating the Shapley value of the input features. A positive Shapley value indicates that the current value of the feature shifts the prediction value upwards; a negative Shapley value indicates that the current value of the feature decreases the prediction value.
[0049] Optionally, features with an absolute Shapley value less than 1% can be removed.
[0050] Example 2 The experimental dataset originates from load data related to the non-metallic mineral products industry in a certain province, and the experimental verification was conducted from January 1, 2022 to December 31, 2022. Load data, meteorological data, time-of-use electricity prices, and time data were analyzed every 15 minutes, totaling 34,348 records. The prediction inputs included load columns, temperature, humidity, time-of-use electricity prices, whether it was a weekday, and whether it was a holiday; the output was the predicted load value. The specific process is as follows: Evaluation metrics selection. Root Mean Square Error (RMSE), Mean Absolute Error (MAE), and Mean Absolute Percentage Error (MAPE) are selected as evaluation metrics to assess the model's predictive performance.
[0051] Equation 1.19 Equation 1.20 Equation 1.21 in, For the first i The true value of each data point For the first i Predicted values of the data points n This represents the number of final prediction results.
[0052] Hyperparameters and model settings. This invention uses Python 3.9.23 and the PyTorch platform to build the iTransformer-KAN load prediction model, and conducts training and testing. The model parameter values of this invention are shown in Table 1, with parameters without specified ranges being default values.
[0053] Table 1
[0054] To fully verify the superiority of the proposed method in short-term power load forecasting, this invention conducts comparative experiments with Gated Recurrent Unit (GRU), Bidirectional Long Short-Term Memory (BiLSTM) networks, and Long Short-Term Memory Network-Attention (LSTM-Attention) models. In selecting experimental scenarios, considering the highly similar climate attributes of autumn and spring, the generally consistent patterns of load fluctuations due to ambient temperature and humidity, and the fact that the autumn electricity market also implements a single peak-valley pricing system, this invention selects three representative scenarios for verification: the spring scenario implementing basic peak-valley pricing, and the high-temperature summer and cold winter scenarios where a peak pricing mechanism is superimposed on top of the peak-valley pricing.
[0055] Each model underwent a one-week load forecasting experiment under the aforementioned scenarios, while maintaining consistent external experimental conditions. The performance evaluation metrics for each model under different scenarios are shown in the following table, and the comparison of prediction curves is shown in the attached figures. Table 2 represents spring, Table 3 represents summer, and Table 4 represents winter.
[0056] Table 2 Model MAPE / % MAE / 10,000 kilowatts RMSE / 10,000 kilowatts GRU 1.92 1.10 1.46 BiLSTM 2.35 1.26 1.64 LSTM-Attention 2.70 1.44 2.11 iTransformer-KAN 1.38 0.74 0.99 Table 3 Model MAPE / % MAE / 10,000 kilowatts RMSE / 10,000 kilowatts GRU 2.04 1.69 2.18 BiLSTM 1.97 1.60 2.12 LSTM-Attention 1.95 1.43 2.04 iTransformer-KAN 1.64 1.36 1.76 Table 4 Model MAPE / % MAE / 10,000 kilowatts RMSE / 10,000 kilowatts GRU 1.99 1.18 1.45 BiLSTM 2.07 1.17 1.47 LSTM-Attention 2.05 1.17 1.54 iTransformer-KAN 1.76 1.03 1.34 Interpretability analysis based on SHAP. To further verify the physical interpretability of the iTransformer-KAN decision logic and enhance its credibility and applicability in real-world scenarios, the SHAP interpreter is used to perform attribution analysis on the final output from two dimensions: global feature interpretability and local single-sample interpretability, quantifying the contribution of each input feature.
[0057] SHAP Global Interpretability Graph Figure 1 As shown, the left side is the feature importance ranking plot, and the right side is the feature density bee colony plot, demonstrating the SHAP analysis results for the entire test set. The global interpretability plot quantifies the marginal contribution of each input feature to the model's prediction results from a macroscopic perspective.
[0058] Figure 1 The feature importance plot arranges each feature from top to bottom on the vertical axis according to its importance. The larger the absolute value of the average SHAP value, the more significant the impact of the corresponding feature on the model's prediction results. Historical load, time-of-use electricity price, and humidity are the main factors affecting load forecasting. Among them, the absolute value of the average SHAP of historical load and time-of-use electricity price is significantly higher than that of other features, making them the dominant factors driving load changes.
[0059] Figure 1 Each row in the bee colony graph represents the SHAP value distribution of the corresponding feature. Each point in the row represents a sample, and the color of the point represents the magnitude of the feature value; the redder the color, the larger the feature value, and the bluer the color, the smaller the feature value. A positive SHAP value for a sample indicates that the feature value boosts the model's prediction, while a negative SHAP value indicates that the feature value lowers the prediction.
[0060] To verify the reliability of the model's inference, two adjacent samples of time-of-use electricity price changes were randomly selected from the test set for local attribution analysis. The local single-sample decision path diagram is shown below. Figure 2 As shown, its model prediction value is 493,000 kW, which is 70,700 kW higher than the average baseline value of 422,300 kW for the whole sample.
[0061] The local single-sample decision path diagram illustrates the contributions of different features to the final prediction result from different directions, and the process of obtaining the predicted value through superposition. Red represents the positive driving force of features on the prediction, and blue represents the negative effect. The prediction process for the high electricity price sample begins with the baseline value. The baseline value, measured in megawatts, reflects the model's average prediction performance across the entire sample. The final prediction result... =493,000 kilowatts. The prediction result is determined by the marginal contributions of each feature variable. The width of each feature bar in the figure intuitively reflects the magnitude of the variable's influence on the current predicted value.
[0062] Specifically, time-of-use pricing showed the strongest positive driving force, with a SHAP value of +10.74, indicating that the current price signal significantly boosted the load forecast. Historical load showed a negative suppressive effect in the forecasting process, with a SHAP value of -10.69, pulling the forecast value downward. In addition, whether it was a holiday or not contributed a positive increment of +4.06, while humidity, whether it was a weekday, and temperature also produced positive driving forces of +1.64, +0.96, and +0.35, respectively. The forces of these characteristic variables canceled each other out and accumulated in the forecasting process, allowing the forecast value to still be revised upward despite the suppression by historical load, ultimately yielding the forecast value. =493,000 kW. This local explanatory analysis reveals how the model can accurately predict load while taking into account historical inertia, and also keenly capturing factors such as electricity price fluctuations, weather conditions, and calendar cycles.
[0063] Example 3 Based on the load forecasting method of Embodiment 1, a load forecasting system is disclosed, comprising: The data acquisition module is used to collect data on time and historical load dimensions, environmental and meteorological dimensions, and economic dimensions, and to construct an original feature vector that includes these dimensions. The model building module is used to map the original feature vectors to a high-dimensional feature space in the embedding layer of the iTransformer model; calculate the correlation weight between each variable and all other variables in the variable dimension; perform weighted summation of the features of the related variables according to the weights; and extract the temporal features of each variable through a feedforward network. The load calculation module is used to use the KAN network as the output layer of the iTransformer model. The B-spline activation function of the KAN network is used to perform nonlinear mapping on the time characteristics of each variable to obtain the load prediction results. The model correction module is used to employ the SHAP method to superimpose the load prediction results as the contribution of each input feature to the model and calculate the Shapley value of each input feature; if the Shapley value is negative, the feature is removed and prediction is performed again.
[0064] Example 4 The purpose of this embodiment is to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the load forecasting method.
[0065] Example 5 The purpose of this embodiment is to provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the load forecasting method.
[0066] Example 6 The purpose of this embodiment is to provide a computer program product including a computer-readable medium, wherein computer-readable program code is contained on the computer-readable medium, and the program code executes the load forecasting method.
[0067] The steps and methods involved in the apparatuses of the above embodiments 3, 4, 5 and 6 correspond to those in embodiment 1. For specific implementation details, please refer to the relevant description section of embodiment 1.
[0068] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0069] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0070] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0071] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0072] Unless otherwise specified, the working methods or control methods involved in the above embodiments are conventional working methods or control methods in the art.
[0073] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0074] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Any other modifications or equivalent substitutions made by those skilled in the art to the technical solutions of the present invention, as long as they do not depart from the spirit and scope of the technical solutions of the present invention, should be covered within the scope of the claims of the present invention.
Claims
1. A load forecasting method, characterized in that, Includes the following steps: Data on time and historical load dimensions, environmental and meteorological dimensions, and economic dimensions were collected to construct an original feature vector that includes these dimensions. In the embedding layer of the iTransformer model, the original feature vectors are mapped to a high-dimensional feature space; Calculate the correlation weight between each variable and all other variables along the variable dimension; sum the features of the related variables according to the weights; extract the temporal features of each variable through a feedforward network; Using the KAN network as the output layer of the iTransformer model, the time characteristics of each variable are nonlinearly mapped through the B-spline activation function of the KAN network to obtain the load prediction results. The SHAP method is used to treat the load prediction results as the sum of the contributions of each input feature to the model. The Shapley value of each input feature is calculated, and features whose absolute value is less than a preset value are removed, and the prediction is performed again.
2. The load forecasting method according to claim 1, characterized in that, The economic dimension features include time-of-use electricity pricing features; the environmental and meteorological dimension features include temperature features, humidity features, and wind speed features; the time and historical load dimension features include historical moment load value features, date attribute features, and weekday type features.
3. The load forecasting method according to claim 1, characterized in that, Before mapping the original feature vectors to a high-dimensional feature space, a convergent cross-mapping algorithm is used to remove redundant feature variables.
4. The load forecasting method according to claim 1, characterized in that, After extracting the time features of each variable, layer normalization is used to normalize all variables.
5. The load forecasting method according to claim 1, characterized in that, The final output formula of the iTransformer-KAN model is: in, It is a predicted sequence; This is the (L-1)th KAN layer; It is the final token after the load has been processed by all Transformer layers, with dimension D.
6. The load forecasting method according to claim 1, characterized in that, The formula for calculating the Shapley value is: In the formula, Let S be the Shapley value corresponding to the i-th feature, where S is the subset of features that does not contain the i-th feature, and |S| is the number of features in the subset. Let S represent the expected output of the model under the feature subset S, and M be the total number of features.
7. A load forecasting system, characterized in that, include: The data acquisition module is used to collect data on time and historical load dimensions, environmental and meteorological dimensions, and economic dimensions, and to construct an original feature vector that includes these dimensions. The model building module is used to map the original feature vectors to a high-dimensional feature space in the embedding layer of the iTransformer model; Calculate the correlation weight between each variable and all other variables along the variable dimension; sum the features of the related variables according to the weights; extract the temporal features of each variable through a feedforward network; The load calculation module is used to use the KAN network as the output layer of the iTransformer model. The B-spline activation function of the KAN network is used to perform nonlinear mapping on the time characteristics of each variable to obtain the load prediction results. The model correction module is used to employ the SHAP method to treat the load prediction results as the superposition of the contributions of each input feature to the model, calculate the Shapley value of each input feature, remove features whose absolute value is less than a preset value, and re-predict.
8. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the load forecasting method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the load forecasting method according to any one of claims 1-6.
10. A computer program product comprising a computer-readable medium, characterized in that, The computer-readable medium contains computer-readable program code that performs the load forecasting method according to any one of claims 1-6.
Citation Information
Patent Citations
Time-sharing electric quantity prediction method based on logarithmic load density growth curve
CN121602348A