Load prediction model construction method and load prediction method and system for complex scene

By using a load forecasting model based on cooperative game theory, the contribution of influencing factors is analyzed and scenarios are broken down. Expert models for subdivided scenarios are constructed, which solves the prediction bias and robustness problems of traditional models in complex scenarios and achieves high-precision load forecasting.

CN121880758APending Publication Date: 2026-04-17CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD
Filing Date
2025-11-28
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Traditional load forecasting models suffer from large prediction biases and low robustness in complex scenarios, making it difficult to cope with the highly nonlinear characteristics of load changes, especially failing in environments where temperature influence mechanisms are inconsistent.

Method used

Based on the cooperative game theory, we analyze the contribution of load influencing factors, screen sensitive factors for scenario segmentation, construct expert models for load prediction in subdivided scenarios, and dynamically call the best model for prediction through a model selector.

Benefits of technology

It significantly improves the accuracy and robustness of load forecasting in complex scenarios, enabling high-precision forecasting in variable environments and supporting the safe and stable operation of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121880758A_ABST
    Figure CN121880758A_ABST
Patent Text Reader

Abstract

The invention provides a load prediction model construction method for a complex scene, and a load prediction method and system, and relates to the field of power system load prediction. The method comprises the following steps: based on a cooperative game theory, analyzing a prediction result of a basic load prediction model under combined input of different load influence factors so as to calculate the contribution degree of each load influence factor; screening out various sensitive factors based on statistical characteristics of contribution degrees; performing scene splitting on the complex scene for each sensitive factor; performing feature extraction for each subdivided scene on historical meteorological data and historical load data of the target area in the complex scene; and training the basic tree model by using the feature data corresponding to each subdivided scene to obtain a load prediction expert model corresponding to each subdivided scene, and obtaining a complex scene load prediction model based on the constructed model selector and expert model. According to the method, the problems of low load prediction accuracy and model failure in the existing complex scene are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system load forecasting technology, specifically to a method for constructing a load forecasting model for complex scenarios, a load forecasting method, and a system. Background Technology

[0002] In the field of power load forecasting, with the advancement of smart grid construction and the large-scale grid connection of renewable energy, the accuracy of short-term load forecasting has become a core indicator affecting power dispatch and economic operation. However, traditional forecasting methods, such as ARIMA (Autoregressive Integrated Moving Average) time series models and gradient boosting decision trees, cannot cope with the highly nonlinear characteristics of load changes. For example, the influence mechanism of temperature on load exhibits different characteristics at different times and under different environments. Therefore, traditional load forecasting models suffer from large prediction biases and even model failures in complex scenarios, and their robustness is low. Summary of the Invention

[0003] To overcome the problems of low load forecasting accuracy and model failure in the aforementioned complex scenarios, this invention provides a method for constructing a load forecasting model, a load forecasting method, and a system for complex scenarios.

[0004] On the one hand, the present invention provides a method for constructing a load forecasting model for complex scenarios, including: Based on cooperative game theory, the prediction results of the basic load prediction model under different combinations of load influencing factors are analyzed to calculate the contribution of each load influencing factor. Multiple sensitive factors were selected based on the statistical characteristics of the contribution of each load influencing factor; the complex scenario was then broken down for each sensitive factor to obtain multiple sub-scenarios. Feature extraction is performed on historical meteorological data and historical load data of the target area under complex scenarios for each sub-scenario, resulting in feature data corresponding to each sub-scenario; a basic tree model is trained using the feature data corresponding to each sub-scenario to obtain a load prediction expert model corresponding to each sub-scenario. By establishing a mapping relationship between each load influencing factor and the load forecasting expert model corresponding to each sub-scenario, a model selector for each load forecasting expert model is constructed. Based on the model selector and the load forecasting expert model corresponding to each sub-scenario, a complex scenario load forecasting model for the target area is obtained. The basic load prediction model is obtained by training a basic tree model based on historical load data and historical load influencing factors.

[0005] Optionally, based on cooperative game theory, the prediction results of the basic load forecasting model under different combinations of load influencing factors are analyzed to calculate the contribution of each load influencing factor, including: Based on cooperative game theory, each load influencing factor is regarded as a participant. The change in the prediction result of the basic load forecasting model caused by adding each load influencing factor to different feature combinations is taken as the marginal contribution of the load influencing factor. The weighted marginal contribution of each load influencing factor under all possible feature combinations is calculated as the contribution degree of the load influencing factor.

[0006] Optionally, the contribution of each load influence factor is as follows:

[0007] In the formula, The contribution of load influence factor j, x As a sample, , For the set of load influencing factors, This indicates that load influence factor j has been removed from set N; The feature subset of N that does not contain the load influence factor j; This represents finding the union of sets; Indicated by The prediction results of the basic load forecasting model when the samples in the set are used as input. For The prediction results of the basic load forecasting model when the samples in the set are used as input. For mold taking operation, To find the factorial.

[0008] Optionally, multiple sensitivity factors are selected based on the statistical characteristics of the contribution of each load influencing factor, including: For each load impact factor, based on the mean and variance of the contribution of the load impact factor under different scenarios, the feature splitting efficiency index of the load impact factor is determined. Based on the characteristic decomposition efficiency index of each load influencing factor, target load influencing factors are selected from each load influencing factor as multiple sensitive factors.

[0009] Optionally, the feature decomposition efficiency index of the load impact factor is as follows:

[0010] in, Let i be the feature decomposition efficiency index of the i-th load influencing factor. , These are the weighting coefficients for the mean and variance. Let be the mean contribution of the i-th load factor. Contribution of the i-th load influence factor The mean.

[0011] Optionally, the training process of the basic load prediction model includes: With the goal of minimizing load forecasting error, the differential evolution algorithm is used to optimize the hyperparameters of the basic tree model and the load growth factor for different years. An initial basic tree model is constructed based on the optimized hyperparameters; the load data for each year is adjusted based on the optimized load growth factor corresponding to each year to obtain the adjusted historical load data. The adjusted historical load data and load influencing factors extracted from historical load data and historical meteorological data are used as training samples to train the initial basic tree model, thus obtaining the basic load prediction model.

[0012] Optionally, feature extraction is performed on historical meteorological data and historical load data of the target area for each sub-scenario to obtain feature data corresponding to each sub-scenario, including: Extract the target load influencing factors for each sub-scenario from the historical meteorological data and historical load data of the target area; Extract the target historical load data for each sub-scenario from the adjusted historical load data; The target load impact factor and target historical load data for each sub-scenario are used as the feature data for each sub-scenario.

[0013] Optionally, a model selector for each load forecasting expert model is constructed by establishing a mapping relationship between each load influencing factor and the load forecasting expert model corresponding to each sub-scenario, including: The adjusted historical load data and each load influencing factor are used as input samples and input into the load forecasting expert model corresponding to each sub-scenario to obtain the forecasting results of the load forecasting expert model corresponding to each sub-scenario. For each input sample, the type label corresponding to the load forecasting expert model with the highest prediction accuracy is used as the selection label for that input sample. The initial selector is trained based on the input samples and their selected labels to obtain the model selector.

[0014] Optionally, the initial selector is a multilayer perceptron; the initial selector is trained based on the input samples and their selection labels to obtain the model selector, including: The input samples are input into a multilayer perceptron to obtain the applicability probability of each input sample to the corresponding category of each load prediction expert model; The classification error is determined based on the applicability probability and corresponding selected label of each input sample; the model parameters of the multilayer perceptron are adjusted based on the classification error until the training stopping condition is met, thus obtaining the model selector.

[0015] On the other hand, the present invention also provides a load forecasting method for complex scenarios, comprising: Obtain historical load data and meteorological data for the forecast date; The load influencing factors for the forecast date are extracted from historical load data and meteorological data for the forecast date. By inputting historical load data and load influencing factors for the forecast date into the complex scenario load forecasting model constructed as described above, the load forecast data for the forecast date can be obtained.

[0016] Optionally, the complex scenario load forecasting model includes a model selector and load forecasting expert models corresponding to each sub-scenario; historical load data and load influencing factors for the forecast date are input into the complex scenario load forecasting model to obtain load forecasting data for the forecast date, including: The model selector is used to classify the historical load data and load influencing factors for the forecast date into scenarios, thereby obtaining the applicability probability of the input data with each load forecasting expert model. Based on the pre-defined mapping relationship between the elimination features and the load forecasting expert model, the feature data corresponding to the target load forecasting expert model is eliminated from the input data to obtain the target input features; The target load forecasting expert model is invoked to predict the target input features, thereby obtaining the load forecasting data for the forecast date; The target load forecasting expert model is the load forecasting expert model with the highest applicability to the input data.

[0017] On the other hand, the present invention also provides a load prediction model construction system for complex scenarios, comprising: The contribution calculation module is used to analyze the prediction results of the basic load prediction model under different combinations of load influencing factors based on cooperative game theory, so as to calculate the contribution of each load influencing factor. The scenario segmentation module is used to filter out multiple sensitive factors based on the statistical characteristics of the contribution of each load impact factor; it segments complex scenarios for each sensitive factor to obtain multiple sub-scenarios. The expert model building module is used to extract features from historical meteorological data and historical load data of the target area under complex scenarios for each sub-scenario, and obtain the feature data corresponding to each sub-scenario; the basic tree model is trained using the feature data corresponding to each sub-scenario to obtain the load prediction expert model corresponding to each sub-scenario. The selector building module is used to build a model selector for each load forecasting expert model by establishing a mapping relationship between each load influencing factor and the load forecasting expert model corresponding to each sub-scenario. The complex model building module is used to obtain the complex scenario load prediction model of the target area based on the model selector and the load prediction expert model corresponding to each sub-scenario; The basic load prediction model is obtained by training a basic tree model based on historical load data and historical load influencing factors.

[0018] Optionally, the contribution calculation module is specifically used for: Based on cooperative game theory, each load influencing factor is regarded as a participant. The change in the prediction result of the basic load prediction model caused by adding each load influencing factor to different feature combinations is taken as the marginal contribution of the load influencing factor. The weighted marginal contribution of each load influencing factor under all possible feature combinations is calculated as the contribution degree of the load influencing factor.

[0019] Optionally, the contribution of each load influence factor is as follows:

[0020] In the formula, The contribution of load influence factor j, As a sample, , For the set of load influencing factors, This indicates that load influence factor j has been removed from set N; for The feature subset that does not include the load influence factor j; This represents finding the union of sets; Indicated by The prediction results of the basic load forecasting model when the samples in the set are used as input. For The prediction results of the basic load forecasting model when the samples in the set are used as input. For mold taking operation, To find the factorial.

[0021] Optionally, the scene splitting module includes: The indicator calculation submodule is used to determine the feature splitting efficiency index of each load impact factor based on the mean and variance of the contribution of the load impact factor in different scenarios. The screening submodule is used to select target load impact factors as multiple sensitive factors based on the feature-splitting efficiency index of each load impact factor.

[0022] Optionally, the feature decomposition efficiency index of the load impact factor is as follows:

[0023] in, Let i be the feature decomposition efficiency index of the i-th load influencing factor. , These are the weighting coefficients for the mean and variance. Let be the mean contribution of the i-th load factor. Contribution of the i-th load influence factor The mean.

[0024] Optionally, it also includes a base model training module, the base model training module comprising: The parameter optimization submodule is used to optimize the hyperparameters of the base tree model and the load growth factor for different years with the goal of minimizing load forecasting error. The adjustment submodule is used to construct an initial basic tree model based on the optimized hyperparameters; and to adjust the load data of each year based on the optimized load growth factor corresponding to each year to obtain the adjusted historical load data. The basic training submodule is used to train the initial basic tree model using adjusted historical load data and load influencing factors extracted from the historical load data and historical meteorological data as training samples, so as to obtain the basic load prediction model.

[0025] Optionally, the expert model construction module includes a feature extraction submodule, which is used for: Extract the target load influencing factors for each sub-scenario from the historical meteorological data and historical load data of the target area; Extract the target historical load data for each sub-scenario from the adjusted historical load data; The target load impact factor and target historical load data for each sub-scenario are used as the feature data for each sub-scenario.

[0026] Optionally, the selector building module includes: The accuracy test submodule is used to input the adjusted historical load data and various load influencing factors as input samples into the load prediction expert model corresponding to each sub-scenario, and obtain the prediction results of the load prediction expert model corresponding to each sub-scenario. The sample construction submodule is used to select the type label of the load forecasting expert model with the highest prediction accuracy as the selection label for each input sample. The selector training submodule is used to train an initial selector based on the input samples and their selection labels to obtain the model selector.

[0027] Optionally, the initial selector is a multilayer perceptron; the selector training submodule is specifically used for: The input samples are input into a multilayer perceptron to obtain the applicability probability of each input sample to the corresponding category of each load prediction expert model; The classification error is determined based on the applicability probability and corresponding selected label of each input sample; the model parameters of the multilayer perceptron are adjusted based on the classification error until the training stopping condition is met, thus obtaining the model selector.

[0028] On the other hand, the present invention also provides a load forecasting system for complex scenarios, comprising: The data acquisition module is used to acquire historical load data and meteorological data for the forecast date. The impact factor extraction module is used to extract the load impact factors for the forecast date from historical load data and meteorological data for the forecast date. The forecasting module is used to input historical load data and load influencing factors for the forecast date into a complex scenario load forecasting model constructed from any of the above, and obtain the load forecast data for the forecast date.

[0029] Optionally, the complex scenario load forecasting model includes a model selector and load forecasting expert models corresponding to each sub-scenario; the forecasting module includes: The expert selection submodule is used to classify the historical load data and load influencing factors for the forecast date using the model selector, and obtain the applicability probability of the input data and each load forecasting expert model. The feature removal submodule is used to remove feature data corresponding to the target load forecasting expert model from the input data based on the preset mapping relationship between the removal features and the load forecasting expert model, so as to obtain the target input features; The prediction submodule is used to call the target load prediction expert model to predict the target input features and obtain the load prediction data for the prediction day. The target load forecasting expert model is the load forecasting expert model with the highest applicability to the input data.

[0030] On the other hand, the present invention also provides an electronic device, comprising: at least one processor and a memory; the memory and the processor are connected via a bus; The memory is used to store one or more programs; When the one or more programs are executed by the at least one processor, the method for constructing a load forecasting model for complex scenarios and / or the method for forecasting loads in complex scenarios described above are implemented.

[0031] On the other hand, the present invention also provides a readable storage medium having an executable program stored thereon, wherein when the executable program is executed, it implements the load prediction model construction method for complex scenarios and / or the load prediction method for complex scenarios as described in any one of the above.

[0032] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention provides a method and system for constructing load forecasting models for complex scenarios. Based on cooperative game theory, it analyzes the prediction results of a basic load forecasting model under different combinations of load influencing factors to calculate the contribution of each load influencing factor, quantify the nonlinear contribution of each load influencing factor, and analyze the complex interactions between different influencing factors, providing data support for understanding the deep mechanisms of load changes. Furthermore, based on the sensitivity factors determined by the contribution of each influencing factor, the macroscopic complex scenario is divided into multiple sub-scenarios, fundamentally resolving the fitting dilemma of the global model and avoiding its failure. On this basis, a load forecasting expert model is trained for each sub-scenarios, enabling each expert model to deeply focus on and learn the load patterns under specific local scenarios, thereby achieving extremely high prediction accuracy within its respective domain. Finally, a model selector dynamically establishes a mapping relationship between load influencing factors and the optimal expert model, transforming the traditional single-model global prediction architecture into one that automatically calls the best model for different scenarios, thus significantly improving the overall prediction accuracy, robustness, and adaptability of the model in variable environments and complex power scenarios. Attached Figure Description

[0033] Figure 1 This is a flowchart illustrating a method for constructing a load prediction model for complex scenarios according to the present invention. Figure 2 A flowchart illustrating the construction process of a basic load forecasting model as an example of the present invention; Figure 3 A flowchart illustrating the construction process of a model selector, as exemplified by the present invention. Figure 4A flowchart illustrating the construction process of a complex scenario load prediction model, as an example of the present invention; Figure 5 This is a statistical result graph of sample SHAP values ​​for an example of the present invention; Figure 6 A graph showing the average SHAP values ​​of various load influence factors as an example of the present invention; Figure 7 This is a block diagram of an electronic device according to the present invention. Detailed Implementation

[0034] In recent years, machine learning algorithms have been widely used in load forecasting due to their powerful nonlinear fitting capabilities, significantly improving forecasting performance for special scenarios such as extreme weather and holidays. Traditional statistical models and machine learning models typically treat input features as independent variables or only consider explicit interaction terms during the modeling process. However, in complex scenarios, nonlinear synergistic effects often exist between features, making it difficult to fully characterize them using traditional model structures, leading to systematic failure of the prediction model under special operating conditions. Furthermore, models lack the ability to perform scenario-based modeling, making it difficult to refine scenario modeling to improve prediction accuracy. For example, the insufficient scenario adaptability of global models makes it difficult for a single model to simultaneously adapt to the high-load-sensitivity scenarios of weekdays and the low-load-flexibility scenarios of rest days. Especially when meteorological changes occur on rest days, the model's prediction bias increases significantly because the proportion of such samples in the training data is low; manual scenario division lacks objective basis, leading to reliance on empirical rules that cannot accurately capture the boundaries of sudden changes in feature contribution.

[0035] Existing technologies primarily rely on global adjustment strategies, including various resampling techniques, cost-sensitive learning, and ensemble methods, to address the aforementioned problems. However, each of these methods has significant limitations. For example, resampling may lead to overfitting or information loss; the weight settings in cost-sensitive learning are experience-dependent and difficult to optimize; and ensemble methods are computationally expensive and have not completely resolved the problem of inherent data distribution bias. These methods typically adjust a single global model, failing to deeply explore and utilize the significant differences in sample distribution characteristics and the relationship between features and targets within different feature space sub-regions, thus limiting their potential to improve minority class identification performance. Furthermore, accurately assessing feature importance is fundamental to model understanding and feature selection. Traditional methods, based on the built-in feature importance assessment of decision tree models, tend to overestimate the importance of high-cardinality categorical variables. This bias can mislead feature selection, exacerbating the model's difficulty in understanding the intrinsic structure of data and identifying key discriminative features. This invention addresses the above problems by proposing a method and system for constructing a load forecasting model for complex scenarios, as well as a load forecasting method.

[0036] The specific embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0037] Example 1 This invention provides a method for constructing a load prediction model for complex scenarios, as illustrated in the following diagram. Figure 1 As shown, the method includes: Step S110: Based on cooperative game theory, analyze the prediction results of the basic load prediction model under different combinations of load influencing factors to calculate the contribution of each load influencing factor. Step S120: Based on the statistical characteristics of the contribution of each load influencing factor, select multiple sensitive factors; split the complex scenario for each sensitive factor to obtain multiple sub-scenarios; Step S130: Extract features from historical meteorological data and historical load data of the target area under complex scenarios for each sub-scenario to obtain feature data corresponding to each sub-scenario; train a basic tree model using the feature data corresponding to each sub-scenario to obtain a load prediction expert model corresponding to each sub-scenario. Step S140: By establishing a mapping relationship between each load influencing factor and the load forecasting expert model corresponding to each sub-scenario, a model selector for each load forecasting expert model is constructed. Step S150: Based on the model selector and the load prediction expert model corresponding to each sub-scenario, obtain the complex scenario load prediction model for the target area. The basic load prediction model is obtained by training a basic tree model based on historical load data and historical load influencing factors.

[0038] In this example implementation, cooperative game theory can be based on the SHAP (SHapley Additive ex Planations) method. SHAP is a game theory-based machine learning model interpretability method used to quantify the contribution of each feature to a single prediction result. The SHAP value explains the model prediction results in an additive attribution manner by calculating the expected marginal contribution of a feature across all possible feature combinations (conforming to the Shapley Value axiom). Load influencing factors refer to various factors affecting load prediction results. These factors can include lagged terms such as the previous day's load (T-1), the previous two days' load (T-2), and the previous three days' load (T-3); meteorological characteristics such as maximum temperature, minimum temperature, average temperature, the previous day's average temperature (tem-1), the previous two days' average temperature (tem-2), and the previous three days' average temperature (tem-3); humidity; temperature difference; and categorical variables such as weekday / rest day markings, months, days of the week, weekly order, and special control markings. Complex scenarios refer to those where different influencing factors exhibit nonlinear synergistic effects. For example, the mechanism by which temperature affects load differs significantly across different date types. Specifically, the same temperature change can produce opposite contributions (positive driving or negative inhibiting) on ​​weekdays and rest days; load variation patterns during holidays differ fundamentally from those on regular days, especially exhibiting a unique "V-shaped" fluctuation pattern at the beginning and end of long holidays; and the correlation between temperature and load shows special characteristics during special meteorological environments such as high temperatures and cold waves, as well as during policy regulation periods (such as time-of-use pricing and power rationing). Scenarios with multiple overlapping influencing factors or unconventional electricity usage can be considered complex scenarios. Sensitive factors can be those with significant contributions selected from various load-influencing factors. For example, if sensitive factors include maximum temperature, average temperature, weekday / rest day, and month, then subdivided scenarios can include weekday scenarios, rest day scenarios, high-temperature scenarios, and scenarios for different months or seasons. Historical meteorological data and historical load data can be data from similar periods that are relatively recent, such as load data from the past two years or meteorological data from the past month. The target area can be the region under study, such as the entire country, North China, or a specific province. For example, the execution process is as follows: First, based on cooperative game theory, analyze the prediction results of the basic load prediction model under different combinations of load influencing factors. Calculate the contribution of each load influencing factor (such as historical load, temperature, and date type) using the SHAP method. By analyzing the mean and variance of the SHAP values, identify features sensitive to scene changes (such as "weekdays / rest days" and "months"). Then, based on these sensitive features, break down the complex scene into multiple sub-scenes (such as weekdays, rest days, seasons, and high temperatures). For each scene, extract strongly correlated features from historical meteorological and load data, and train independent expert models using the LightGBM basic tree model.To achieve accurate matching of new samples, a model selector is constructed. This selector takes load data (daily maximum load) and various load influencing factors as input and outputs the matching probability between the input data and each expert model. When new data is input, the selector automatically matches and calls the best expert model for prediction. The load prediction expert model of this invention can be constructed using LightGBM (Light Gradient Boosting Machine), a high-efficiency gradient boosting decision tree framework developed by Microsoft. Its core innovations, namely one-sided gradient sampling (GOSS) and mutually exclusive feature binding (EFB), solve the computational bottleneck of traditional GBDT (Gradient Boosting Decision Tree) under massive data. It adopts a leaf-wise tree growth strategy (selectively expanding the leaf node with the largest loss reduction), significantly reducing computational complexity compared to the level-wise strategy, increasing training speed by more than 10 times, and reducing memory usage by 90%. It supports parallel learning and GPU acceleration and is suitable for training on large-scale datasets. Based on cooperative game theory, this invention quantifies feature contribution and dynamically divides scenarios to construct scenario-specific expert models and selectors, achieving accurate load prediction in complex scenarios. By calculating the contribution of various influencing factors to predict the decision logic of the model, the interpretability of the "black box" prediction model is enhanced, and the reliability and practicality of the prediction results under complex scenarios such as extreme weather and special holidays are improved. Improving the accuracy of power grid load prediction in complex scenarios helps the power grid accurately grasp the characteristics of load changes, providing support for power grid load analysis and prediction, supporting power grid companies in ensuring power supply during peak load periods, and guaranteeing the safe and stable operation of the power grid during peak electricity consumption periods in the new power system.

[0039] In some example implementations, the training process of the basic load prediction model includes: With the goal of minimizing load forecasting error, the differential evolution algorithm is used to optimize the hyperparameters of the basic tree model and the load growth factor for different years. An initial basic tree model is constructed based on the optimized hyperparameters; the load data for each year is adjusted based on the optimized load growth factor corresponding to each year to obtain the adjusted historical load data. The adjusted historical load data and the load influencing factors extracted from the historical load data and historical meteorological data are used as training samples to train the initial basic tree model, thereby obtaining the basic load prediction model.

[0040] In this example implementation, due to the year-on-year increase in domestic load consumption over the past few years, the model trained on historical load data is unable to make effective predictions, especially since peak load predictions are often underestimated, potentially leading to power safety issues during peak load periods. Therefore, corresponding load growth factors are set for historical load data from different years. Considering that the basic tree model cannot obtain globally optimal benefits in its initial state, directly implementing it into the system for load prediction would not eliminate the error accumulation caused by underestimating historical loads. Therefore, it is necessary to optimize the hyperparameters of the basic tree model. Based on the above analysis, the hyperparameters of the basic tree model and the load growth factors for different years are used as optimization variables. With the goal of minimizing load prediction errors, the differential evolution algorithm is used to optimize the hyperparameters of the basic tree model and the load growth factors for different years. For example, to learn load performance under different scenarios as much as possible, restore the contribution of numerous influencing factors to load prediction accuracy, and improve the reliability and practicality of the model's prediction results in complex scenarios, this example uses load data from 2022 to 2024 to construct an influence factor matrix D, and performs normalization on D. The influence factor matrix D is represented as follows:

[0041] in, , , These represent the load data (e.g., the maximum daily load within each year) for 2022, 2023, and 2024, respectively. , This represents the load growth factor for the corresponding year. , , These represent the load influencing factors for 2022, 2023, and 2024, such as lagged terms like the previous day's load (T-1) and the previous two days' load (T-2), meteorological characteristics like the highest temperature, lowest temperature, humidity, and temperature difference, and categorical variables like weekday / rest day markings, month, and weekday. , All initial values ​​are set to 1. All data within D will be divided into training, validation, and test sets in an 8:1:1 ratio. After dataset splitting and processing, this example introduces a tree model as the basic prediction model for further analysis of large amounts of high-dimensional data. Leveraging its leaf-wise tree growth strategy and feature bundling technique, the tree model reduces invalid splits and computational overhead, exhibiting higher efficiency and faster training speed compared to other prediction models when handling high-dimensional sparse data.

[0042] To improve the initial performance of the model and obtain the best prediction results, such as Figure 2As shown, this example introduces differential evolution to optimize the initial historical load growth coefficient and model hyperparameters by minimizing the root mean square error (RMSE) between the predicted load and the actual load. The model hyperparameters include: maximum tree depth (max_depth): controls the maximum depth of a single decision tree; a greater depth and more splits result in stronger learning ability but are more prone to overfitting; learning rate (learning_rate): controls the weight of each tree; a smaller value requires more iterations (number of trees) to reach the optimal solution, which can prevent overfitting to some extent; minimum number of child samples (min_child_samples): represents the minimum number of samples required for a leaf node, used to prevent overfitting and class imbalance; regularization parameter (…). ): Used to control the strength of regularization, promoting sparsity of unimportant feature weights and preventing overfitting. Differential evolution first defines the optimization variable as an optimization vector. :

[0043] A new solution is generated through vector difference, and the individual is processed according to the following formula. Generate the corresponding mutation vector:

[0044] in, , , These represent distinct random individual indices. , , This represents three different individuals. For individuals The corresponding mutation vector; F is the difference mutation factor, which is usually taken as a value of Subsequently, four individuals were generated for the experiment through cross-pollination. The fitness (prediction error) was then compared to determine whether to retain the original individuals. This process was repeated until convergence or a specified number of iterations were reached to obtain the optimized hyperparameters and the optimized load growth factors for each year. Using the optimized hyperparameters, a tree model was selected as the load prediction model to construct the basic tree model. The load data for each year was adjusted based on the optimized load growth factors, resulting in adjusted historical load data. Next, a normalized matrix composed of the adjusted historical load data and feature factors (load influence factors) was used as the model input. The model outputs predicted load values, and the model parameters of the basic tree were continuously optimized by calculating the loss function. During this process, the hyperparameters were continuously optimized using a differential evolution algorithm. The globally optimal parameters were then substituted into the tree model for load prediction on the test set to evaluate the model performance.

[0045] Considering existing methods for analyzing influencing factors, such as multiple regression, which treat the relationship between influencing factors and electricity consumption as linear, failing to fully account for the interactions between different influencing factors, their calculation of contribution has a significant bias, making it difficult to improve the interpretability of the prediction results. In some example implementations, step S110, based on cooperative game theory, analyzes the prediction results of the basic load prediction model under different combinations of load influencing factor inputs to calculate the contribution of each load influencing factor, including: Based on cooperative game theory, each load influencing factor is regarded as a participant. The change in the prediction result of the basic load prediction model caused by adding each load influencing factor to different feature combinations is taken as the marginal contribution of the load influencing factor. The weighted marginal contribution of each load influencing factor under all possible feature combinations is calculated as the contribution degree of the load influencing factor.

[0046] In this example implementation, the SHAP value is introduced to accurately decompose the feature indicators, thereby quantifying the contribution of each influencing factor. The SHAP value originates from cooperative game theory and calculates the expected marginal contribution of a feature across all possible combinations, enabling an additive attribution explanation of the prediction results. Its core idea is to allocate the total payoff based on each participant's contribution to the overall payoff in the cooperation, ensuring fairness and reasonableness in the allocation. In this example, the entire prediction process of the model is viewed as a cooperative game, with each feature indicator (load influencing factor) acting as a participant. Each feature added to the model contributes a certain increment to the prediction results; the SHAP value represents the average marginal contribution of each feature across all possible addition orders.

[0047] For example, the contribution of each load influence factor is as follows:

[0048] In the formula, The contribution of load influence factor j, As a sample, , For the set of load influencing factors, This indicates that load influence factor j has been removed from set N; for The feature subset that does not include the load influence factor j; This represents finding the union of sets; Indicated by The prediction results of the basic load forecasting model when the samples in the set are used as input. For The prediction results of the basic load forecasting model when the samples in the set are used as input. For mold taking operation, To calculate the factorial, the SHAP value is used to represent the contribution of each feature indicator to the cooperation. A higher SHAP value means that the feature contributes more to the overall cooperation. Calculating the SHAP value allows for a fair assessment of the contribution of influencing factors, thereby improving the interpretability of the prediction results and serving as a basis for feature selection in subsequent feature decomposition performance indicators and expert model establishment. In some implementations, the statistical characteristics of the contribution of each load influencing factor in step S120 are used to select multiple sensitive factors, including: For each load impact factor, based on the mean and variance of the contribution of the load impact factor under different scenarios, the feature splitting efficiency index of the load impact factor is determined. Based on the characteristic decomposition efficiency index of each load influencing factor, target load influencing factors are selected from each load influencing factor as multiple sensitive factors.

[0049] In this example implementation, to obtain the contribution of the same feature (such as load impact factor) in different scenarios and quantify its impact on the prediction results, it is necessary to further calculate the SHAP value of each feature in all sample scenarios (such as work / rest days, seasons, high temperature scenarios, etc.), that is, the contribution of each load impact factor in different scenarios. By calculating the mean and variance of the SHAP value of each load impact factor in different scenarios, features with large influence and significant differences are selected. For example, the variance of the SHAP value reflects the fluctuation range of the contribution of the feature (load impact factor) in different scenario samples. The larger the variance, the higher the sensitivity of the feature to scenario changes. Features with high SHAP mean and large variance are selected as the basis for scenario division to construct a feature splitting efficiency index.

[0050] For example, the feature decomposition efficiency index of the load impact factor is as follows:

[0051] in, Let i be the feature decomposition efficiency index of the i-th load influencing factor. , These are the weighting coefficients for the mean and variance. Let be the mean contribution of the i-th load factor. Contribution of the i-th load influence factor The average value is used. Based on the feature-based energy efficiency indicators, the features with the highest impact (the largest feature-based energy efficiency indicators) are selected as sensitive factors. According to the selected sensitive factors (such as "weekday / restday", "month", "high temperature"), the complex scenario is divided into multiple sub-scenarios. For example, based on the sensitive factor "weekday / restday", weekday scenarios and restday scenarios are divided; based on the sensitive factor "month", different seasonal scenarios or different monthly scenarios are divided; based on the sensitive factor "maximum temperature", high temperature scenarios are divided, and so on.

[0052] In some implementations, S130 performs feature extraction on historical meteorological data and historical load data of the target area for each sub-scenario, obtaining feature data corresponding to each sub-scenario, including: Extract the target load influencing factors for each sub-scenario from the historical meteorological data and historical load data of the target area; Extract the target historical load data for each sub-scenario from the adjusted historical load data; The target load impact factor and target historical load data for each sub-scenario are used as the feature data for each sub-scenario.

[0053] In this example implementation, the original dataset (i.e., historical meteorological data and historical load data, such as matrix D) is divided into "weekday / restday" subsets (i.e., data after removing load influencing factors corresponding to weekdays / restdays) according to weekday and restday scenarios. The original dataset is also divided into corresponding subsets according to spring, summer, autumn, and winter scenarios (i.e., data after removing load influencing factors corresponding to spring, summer, autumn, and winter). Data overlap is allowed between load datasets (training data) corresponding to different scenarios. That is, the same data can be used to train expert models for different scenarios. The daily maximum load for each scenario can be extracted from the adjusted historical load data (such as the load data in matrix D) to obtain the target historical load data for the weekday / restday scenarios. In other words, the feature data corresponding to each sub-scenario does not include the load influencing factors corresponding to that sub-scenario. For example, the feature data for the weekday scenario is obtained by removing weekday-related features and load influencing factors from the original dataset, and the feature data for the spring scenario is obtained by removing seasonal factors from the original dataset. The extracted target load influencing factors and target historical load data are used as the feature data for the corresponding sub-scenario. For example, the target load impact factor and target historical load data for each sub-scenarios are combined to form a feature matrix for that sub-scenarios. Based on the separated feature data for each sub-scenarios, a basic tree model is trained to obtain an expert model for the corresponding sub-scenarios. Each expert model is trained only for a specific scenario.

[0054] To avoid perturbations between features and improve the model's learning ability, this invention employs a strategy of building separate models for different scenarios. The SHAP method can more accurately identify the association between features and the prediction target, avoiding the overestimation bias of traditional tree-based feature importance assessment methods for high-cardinality categorical variables. The SHAP method can identify the association between each feature distribution and the prediction target, thus selecting strongly correlated and imbalanced features to build separate models. For features like "whether it's a weekday" that divides samples into a 5:2 ratio, the dataset can be split accordingly for separate modeling. This method effectively improves prediction accuracy in small-sample scenarios, particularly showing significant improvements in recall and F1 score.

[0055] In some implementations, a model selector is constructed for each load forecasting expert model by establishing a mapping relationship between each load influencing factor and the load forecasting expert model corresponding to each sub-scenario, including: The adjusted historical load data and each load influencing factor are used as input samples and input into the load forecasting expert model corresponding to each sub-scenario to obtain the forecasting results of the load forecasting expert model corresponding to each sub-scenario. For each input sample, the type label corresponding to the load forecasting expert model with the highest prediction accuracy is used as the selection label for that input sample. The initial selector is trained based on the input samples and their selected labels to obtain the model selector.

[0056] In this example implementation, after constructing multiple expert models trained for specific scenarios (such as holidays, high temperatures, low temperatures, and weekdays), achieving accurate matching between new samples and the most suitable expert model becomes a crucial step affecting the system's prediction accuracy and generalization ability. This example uses adjusted historical load data and load influence factors (such as matrix D) as input samples to the load prediction expert models corresponding to each specific scenario, obtaining the prediction results of each model. For each input sample, the type label corresponding to the load prediction expert model with the highest prediction accuracy is used as the selection label for that input sample; this selection label serves as the label during the model selector training process. Based on the input samples and their selection labels, an initial selector (such as a multi-classification model) is trained to obtain the model selector. This example labels samples based on the prediction accuracy of the expert models, thereby guiding the model selector training process through prediction accuracy and improving the prediction accuracy of the expert models selected by the model selector.

[0057] For example, the initial selector is a multilayer perceptron; training the initial selector based on the input samples and their selection labels to obtain the model selector includes: The input samples are input into a multilayer perceptron to obtain the applicability probability of each input sample to the corresponding category of each load prediction expert model; The classification error is determined based on the applicability probability and corresponding selected label of each input sample; the model parameters of the multilayer perceptron are adjusted based on the classification error until the training stopping condition is met, thus obtaining the model selector.

[0058] In this example implementation, load patterns differ across scenarios, and the effectiveness of expert models highly depends on the load characteristics of their training scenarios. Therefore, a model selection method is needed that can quickly identify the load scenario a sample belongs to based on its time scale and environmental factors, and automatically call the best-matching expert model to perform prediction. This example proposes a lightweight model selector design based on a Multi-Layer Perceptron (MLP) neural network. The input to the MLP is all features (such as matrix D), and the output is the probability that the input sample belongs to the corresponding category of each expert model, i.e., the applicability probability of the sample and the expert model. By calculating the classification error or loss function between the applicability probability of each input sample and the corresponding selection label, the model parameters of the MLP are gradually updated until the training stopping condition is met (such as convergence or reaching the maximum number of training iterations), thus obtaining the model selector.

[0059] For example, such as Figure 3 The diagram illustrates the complete model selector construction process, employing a lightweight and interpretable feature combination strategy to construct the model invocation path. First, by analyzing historical samples using SHAP values ​​and combining load forecasting experience with statistical patterns, a set of highly influential sensitive features on load changes is identified. These feature data (such as whether it is a work / rest day, day of the week, and the day's highest temperature) are input into the model selector (MLP network). The MLP network, through its multi-layered neural network structure, learns to map the input features to the probabilities of each expert model. During training, the applicability probability of the expert model output by the MLP network is compared with the selection label, and continuous optimization is achieved through supervised learning, ensuring that the model selector can accurately select the expert model suitable for the current scenario. After the MLP network is trained, it can be deployed for online operation. At this point, when the system receives a new load forecasting request, the model selector selects the most suitable expert model based on the training results and feature input, and invokes that model for load forecasting. The entire process relies solely on a simple neural network, exhibiting extremely high efficiency and determinism, making it particularly suitable for power system forecasting tasks with high real-time and stability requirements. The model selector enables precise assignment of expert models while ensuring system efficiency and stability.

[0060] Currently, there are methods for analyzing the factors influencing electricity consumption based on traditional statistics. These methods utilize multiple linear regression models, using economic and meteorological data as independent variables and electricity consumption as the dependent variable to model and analyze the data, calculating the regression coefficients of each factor to represent its contribution. However, multiple linear regression models have several limitations in quantifying the growth of electricity consumption in various industries: Firstly, they assume a linear relationship between electricity consumption and various influencing factors. In reality, this relationship is often non-linear. For example, the increase in residential electricity consumption under extreme temperatures is not linear, leading to deviations in the model's contribution calculation. Secondly, the model focuses on the linear correlation between individual factors and electricity consumption, failing to adequately consider the interactions between various influencing factors. For instance, the complex situation where industrial restructuring and economic development speed mutually influence electricity consumption makes it difficult to effectively represent their impact on contribution. Furthermore, the model's effectiveness heavily depends on data quality and completeness. When a large amount of data is missing or outliers exist, even after preprocessing, parameter estimation biases may still occur, affecting the accuracy of contribution quantification. Random forests are a commonly used machine learning technique in the analysis of factors influencing electricity consumption. Random forest models have several limitations in electricity consumption prediction: First, they are "black box" models, meaning their internal decision-making mechanisms are difficult to understand intuitively and the interaction of various influencing factors and the process of arriving at results are hard to explain clearly, making it impossible for power companies to formulate targeted electricity management strategies. Second, the contribution measurement is inaccurate. Although feature importance scores can be calculated to measure contribution, only a relative ranking can be given, making it difficult to accurately quantify the actual contribution ratio of each factor to changes in electricity consumption, thus failing to meet the precise quantification needs of power companies.

[0061] In reality, load data varies significantly across different scenarios, directly impacting the accuracy of prediction models. Models trained for a single scenario often suffer from large prediction biases and low robustness when encountering extreme weather or special holidays. Furthermore, the interpretability of prediction results remains a major pain point in the industry. The purpose of this invention is to improve the load prediction accuracy of the power grid in complex scenarios such as extreme weather and special holidays by constructing a segmented scenario expert model based on feature contribution and enhancing prediction accuracy. This involves a differentiated scenario modeling method based on SHAP values. This addresses the bottleneck of insufficient prediction accuracy in traditional prediction models under the combined effects of multiple factors, such as sudden temperature changes coupled with holiday effects, and in unconventional scenarios such as extreme weather and industry policy adjustments.

[0062] Load forecasting in power systems is a core technology area for energy dispatch and grid operation, and its development has always revolved around improving forecast accuracy. This invention innovatively uses SHAP to deconstruct the collaborative mechanism and scenario-based boundary rules of feature contributions. By quantifying the differentiated impact modes of key features under different scenarios, it identifies the persistent influence boundaries of historical loads (T-1, T-2) and the nonlinear coupling intervals of temperature and holiday factors. Based on this, scenario segmentation rules are constructed, and then expert prediction models specifically designed for subdivided scenarios such as work weeks, rest days, high temperatures, and cold waves are trained. This significantly improves the accuracy and robustness under extreme conditions and solves the prediction deviation problem caused by the neglect of feature heterogeneity in traditional global models.

[0063] This invention quantifies the contribution of each feature to the prediction target using SHAP values, calculates the expected marginal contribution of features across all possible combinations based on cooperative game theory, and interprets the model's prediction results using an additive attribution approach. Specifically, it selects dominant features by calculating the average absolute value of feature SHAP values, and combines the variance of SHAP values ​​to measure the sensitivity of features to scene changes, constructing an effectiveness index including weighted coefficients. This accurately identifies highly correlated features that are sensitive to sample distribution, providing an objective basis for scene segmentation. Based on the sensitive features selected by the feature effectiveness index, the dataset is dynamically divided into sub-scenes, and an expert model is trained independently for each scene. During model construction, a differential evolution algorithm is introduced to optimize hyperparameters, aiming to minimize the root mean square error of the training set. Load data is calibrated using annual growth coefficients to ensure the model's ability to fit specific features in each scene, improving the prediction robustness in small-sample scenarios. An expert model selector is constructed, using features selected by SHAP values ​​as the basis for scene segmentation, dynamically matching the dataset to the corresponding expert model. When a new sample is input, the selector automatically identifies the scene features of the sample, calls the corresponding expert model to generate a prediction value, avoids boundary errors caused by fixed thresholds, and achieves accurate prediction in complex scenarios.

[0064] Example 2 Based on the same inventive concept, the present invention also provides a load forecasting method for complex scenarios, comprising: Obtain historical load data and meteorological data for the forecast date; The load influencing factors for the forecast date are extracted from historical load data and meteorological data for the forecast date. By inputting historical load data and load influencing factors for the forecast date into the complex scenario load forecasting model constructed as in any of Examples 1, load forecast data for the forecast date is obtained.

[0065] In this example implementation, the forecast date can be a future day, such as a day closer to the present (tomorrow). Historical load data can be the daily maximum load for the target historical period, and meteorological data can include temperature, humidity, wind speed, etc. The load influencing factors are similar to those in Example 1. The historical load data and the load influencing factors for the forecast date are combined into a matrix, normalized, and used as the model input. The model outputs the load forecast data for the forecast date (such as the daily maximum load).

[0066] In some implementations, historical load data and load influencing factors for the forecast date are input into a complex scenario load forecasting model to obtain load forecast data for the forecast date, including: The model selector is used to classify the historical load data and load influencing factors for the forecast date into scenarios, thereby obtaining the applicability probability of the input data with each load forecasting expert model. Based on the pre-defined mapping relationship between the elimination features and the load forecasting expert model, the feature data corresponding to the target load forecasting expert model is eliminated from the input data to obtain the target input features; The target load forecasting expert model is invoked to predict the target input features, thereby obtaining the load forecasting data for the forecast date; The target load forecasting expert model is the load forecasting expert model with the highest applicability to the input data.

[0067] In this example implementation, the complex scenario load forecasting model includes a model selector and load forecasting expert models corresponding to each sub-scenario. A pre-defined table of correspondence between discarded features and each expert model is included in the model. After the model selector determines the target load forecasting expert model (i.e., the expert model with the highest applicability probability), the model automatically discards the input features corresponding to that target load forecasting expert model. For example, for a holiday scenario, holiday factors / features are discarded, and then the target load forecasting expert model is called to perform load forecasting on the discarded features.

[0068] For example, such as Figure 4As shown, the complex scenario load prediction model of this application mainly consists of four steps: basic model construction, influencing factor quantification, and model training. The basic model construction stage includes acquiring sample data, dividing the sample data into training data and validation data, training the basic tree model using the training data, evaluating the model using the validation data, and finally outputting the basic conformal prediction model. The influencing factor quantification stage calculates the feature SHAP value based on the basic conformal prediction model, quantifies the contribution of influencing factors using the controlled variable method, calculates the feature splitting efficiency index, and selects categorical variables based on this. The model training stage divides the scenario into sub-scenarios using the selected categorical variables and independently trains an expert model and a model selector for each sub-scenarios, ultimately obtaining the complex scenario load prediction model. A sample dataset was constructed using meteorological data and maximum load data from a specific region between 2022 and 2024. The load influencing factors included 35 items: maximum temperature (e.g., maximum temperature in Central China), minimum temperature (e.g., minimum temperature in North China), average temperature, humidity, working days / rest days, temperature / humidity, year, month, day, week, tem-1 (average temperature of the previous day), tem-2 (average temperature of the previous two days), tem-3 (average temperature of the previous three days), temperature difference, previous day's load, previous two days' load, and previous three days' load. The dataset was divided into training, testing, and validation sets in an 8:1:1 ratio. The training set contained 1247 items, with a training-to-test ratio of 8:1. The contribution of each load influencing factor, i.e., the SHAP value, was calculated based on the training set. The results are shown below. Figure 5 As shown, Figure 5 Each row represents a feature, and the last row represents the sum of 26 other features. The horizontal axis represents the SHAP value, and the right side shows a graph of feature values, with blue to red indicating high to low feature values. Figure 5 As shown, features are sorted according to their average absolute SHAP value. In the graph, each dot represents a sample, and wider areas represent clusters of large samples. The redder the color, the larger the feature value; the bluer the color, the smaller the feature value. The features shown in the graph are those more important to the model. The SHAP values ​​of each load factor are as follows: Figure 6 The SHAP values ​​of categorical variables are shown in Table 1. The variance and mean of the SHAP values ​​for each factor were calculated, and three influencing factors with larger values ​​were selected based on the feature-based performance index. To facilitate the explanation of the mechanism, the feature indicators with large contributions and large variances in the categorical variables were selected, namely, working days and months, which have the greatest impact on workload. Months can be considered as a seasonally related factor. Continuous variables can be extracted after hash binning.

[0069] Table 1. SHAP values ​​for categorical variables

[0070] A total of 1247 samples were selected from weekdays, rest days, and seasonal samples, as shown in Table 2. A mapping relationship was established between the "seasonal / weekday type" scenario division and the expert model. The division was based on the "month" and "weekday / rest day" sensitive features selected by SHAP values, dynamically dividing the dataset into 6 sub-scenarios. Each model was trained only for a specific scenario.

[0071] Table 2. Dataset Scene Classification

[0072] A dataset was constructed using meteorological and maximum load data from a certain region during the period from 2022 to 2024. Combining the model selector and the aforementioned model, a complex scenario model of this invention was obtained. The prediction accuracy of this invention and the existing basic prediction model was verified using a validation set. The verification results are shown in Tables 3 and 4.

[0073] Table 3. Prediction Results of Rest Days

[0074] Table 4. Weekday Forecast Results

[0075] As shown in Tables 3 and 4, the model of this invention can automatically select the appropriate model for validation based on the weekday type and season of the samples in the dataset. According to the results analysis, the prediction accuracy of the model of this invention is above 97.5% on both weekdays and rest days, with most exceeding 98%, indicating a high overall prediction accuracy. Compared with the basic prediction model, the prediction results for most prediction days show significant improvement. Table 5 quantifies the prediction error of the model in the weekday / rest day scenario.

[0076] Table 5

[0077] As shown in Table 5, compared with the basic prediction model, the expert model of this invention improves the average prediction accuracy by 3.7%, indicating that scenario-based modeling improves the robustness of the model to a minority of scenarios. This demonstrates the predictive advantages of this invention under extreme conditions, especially solving the problem of "high error" in traditional models under small sample scenarios.

[0078] This invention achieves a substantial breakthrough in the accuracy of power load forecasting by constructing a scenario-based dynamic modeling framework based on SHAP. Empirical testing of 344 samples over three consecutive months across the national power grid operating area demonstrates a significant improvement in overall forecasting accuracy. This method not only accurately quantifies the differentiated impact mechanisms under weekday / restday scenarios, significantly improving the interpretability of forecast results, but has also been successfully applied to power grid dispatching and load forecasting, providing reliable technical support for power system decision-making. Compared to traditional forecasting methods, this invention achieves substantial breakthroughs in mechanistic analysis depth, decision support capabilities, and practical application value.

[0079] In the field of power system load forecasting, with the advancement of smart grid construction and large-scale grid connection of renewable energy, accurate load forecasting has become a core requirement for power dispatching and economic operation. Traditional models lack sufficient prediction accuracy in unconventional scenarios such as extreme weather and holidays. This invention, however, significantly improves robustness in small-sample scenarios by dynamically identifying scenario boundaries and quantifying the differentiated contributions of features through SHAP values. With the continuous increase in the penetration rate of new energy sources and the construction of new power systems, this technology can be widely applied to grid dispatching, power generation and receiving load forecasting, and other businesses to support power supply security. Furthermore, its scenario-based modeling approach can be extended to fields such as integrated energy management. It is projected that the annual application scale will cover provincial power grids nationwide and tens of millions of load forecasting scenarios, creating significant economic and social benefits.

[0080] Example 3 Based on the same inventive concept, the present invention also provides a load prediction model construction system for complex scenarios, comprising: The contribution calculation module is used to analyze the prediction results of the basic load prediction model under different combinations of load influencing factors based on cooperative game theory, so as to calculate the contribution of each load influencing factor. The scenario segmentation module is used to filter out multiple sensitive factors based on the statistical characteristics of the contribution of each load impact factor; it segments complex scenarios for each sensitive factor to obtain multiple sub-scenarios. The expert model building module is used to extract features from historical meteorological data and historical load data of the target area under complex scenarios for each sub-scenario, and obtain the feature data corresponding to each sub-scenario; the basic tree model is trained using the feature data corresponding to each sub-scenario to obtain the load prediction expert model corresponding to each sub-scenario. The selector building module is used to build a model selector for each load forecasting expert model by establishing a mapping relationship between each load influencing factor and the load forecasting expert model corresponding to each sub-scenario. The complex model building module is used to obtain the complex scenario load prediction model of the target area based on the model selector and the load prediction expert model corresponding to each sub-scenario; The basic load prediction model is obtained by training a basic tree model based on historical load data and historical load influencing factors.

[0081] In one possible implementation, the contribution calculation module is specifically used for: Based on cooperative game theory, each load influencing factor is regarded as a participant. The change in the prediction result of the basic load prediction model caused by adding each load influencing factor to different feature combinations is taken as the marginal contribution of the load influencing factor. The weighted marginal contribution of each load influencing factor under all possible feature combinations is calculated as the contribution degree of the load influencing factor.

[0082] In one possible implementation, the contribution of each load influence factor is as follows:

[0083] In the formula, The contribution of load influence factor j, As a sample, , For the set of load influencing factors, This indicates that load influence factor j has been removed from set N; for The feature subset that does not include the load influence factor j; This represents finding the union of sets; Indicated by The prediction results of the basic load forecasting model when the samples in the set are used as input. For The prediction results of the basic load forecasting model when the samples in the set are used as input. For mold taking operation, To find the factorial.

[0084] In one possible implementation, the scene splitting module includes: The indicator calculation submodule is used to determine the feature splitting efficiency index of each load impact factor based on the mean and variance of the contribution of the load impact factor in different scenarios. The screening submodule is used to select target load impact factors as multiple sensitive factors based on the feature-splitting efficiency index of each load impact factor.

[0085] In one possible implementation, the feature decomposition efficiency index of the load impact factor is as follows:

[0086] in, Let i be the feature decomposition efficiency index of the i-th load influencing factor. , These are the weighting coefficients for the mean and variance. Let be the mean contribution of the i-th load factor. Contribution of the i-th load influence factor The mean.

[0087] In one possible implementation, a base model training module is also included, the base model training module comprising: The parameter optimization submodule is used to optimize the hyperparameters of the base tree model and the load growth factor for different years with the goal of minimizing load forecasting error. The adjustment submodule is used to construct an initial basic tree model based on the optimized hyperparameters; and to adjust the load data of each year based on the optimized load growth factor corresponding to each year to obtain the adjusted historical load data. The basic training submodule is used to train the initial basic tree model using adjusted historical load data and load influencing factors extracted from the historical load data and historical meteorological data as training samples, so as to obtain the basic load prediction model.

[0088] In one possible implementation, the expert model building module includes: a feature extraction submodule, the feature extraction submodule being used for: Extract the target load influencing factors for each sub-scenario from the historical meteorological data and historical load data of the target area; Extract the target historical load data for each sub-scenario from the adjusted historical load data; The target load impact factor and target historical load data for each sub-scenario are used as the feature data for each sub-scenario.

[0089] In one possible implementation, the selector building module includes: The accuracy test submodule is used to input the adjusted historical load data and various load influencing factors as input samples into the load prediction expert model corresponding to each sub-scenario, and obtain the prediction results of the load prediction expert model corresponding to each sub-scenario. The sample construction submodule is used to select the type label of the load forecasting expert model with the highest prediction accuracy as the selection label for each input sample. The selector training submodule is used to train an initial selector based on the input samples and their selection labels to obtain the model selector.

[0090] In one possible implementation, the initial selector is a multilayer perceptron; the selector training submodule is specifically used for: The input samples are input into a multilayer perceptron to obtain the applicability probability of each input sample to the corresponding category of each load prediction expert model; The classification error is determined based on the applicability probability and corresponding selected label of each input sample; the model parameters of the multilayer perceptron are adjusted based on the classification error until the training stopping condition is met, thus obtaining the model selector.

[0091] Example 4 Based on the same inventive concept, the present invention also provides a load forecasting system for complex scenarios, comprising: The data acquisition module is used to acquire historical load data and meteorological data for the forecast date. The impact factor extraction module is used to extract the load impact factors for the forecast date from historical load data and meteorological data for the forecast date. The forecasting module is used to input historical load data and load influencing factors for the forecast date into a complex scenario load forecasting model constructed from any of the above, and obtain the load forecast data for the forecast date.

[0092] In one possible implementation, the complex scenario load forecasting model includes a model selector and load forecasting expert models corresponding to each sub-scenario; the forecasting module includes: The expert selection submodule is used to classify the historical load data and load influencing factors for the forecast date using the model selector, and obtain the applicability probability of the input data and each load forecasting expert model. The feature removal submodule is used to remove feature data corresponding to the target load forecasting expert model from the input data based on the preset mapping relationship between the removal features and the load forecasting expert model, so as to obtain the target input features; The prediction submodule is used to call the target load prediction expert model to predict the target input features and obtain the load prediction data for the prediction day. The target load forecasting expert model is the load forecasting expert model with the highest applicability to the input data.

[0093] Example 5 like Figure 7 As shown, the present invention also provides an electronic device, which may be a computer device, a microcontroller device, a smart mobile device, etc. The electronic device in this embodiment may include a processor, a memory, a transceiver component, etc. The memory, processor, and transceiver component are connected via a bus; the memory can be used to store executable programs, and an exemplary executable program may include instructions; the processor is used to execute the instructions stored in the memory. The memory can also be used to store data, which can be accessed and / or modified when instructions are executed.

[0094] The processor may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, and it is suitable for implementing one or more instructions. Specifically, it is suitable for loading and executing one or more instructions in the storage medium to implement the corresponding method flow or corresponding function, so as to realize the steps of the load forecasting model construction and / or load forecasting method for a complex scenario in the above embodiments.

[0095] Example 6 Based on the same inventive concept, this invention also provides a readable storage medium, specifically an electronic device readable storage medium (Memory). An electronic device readable storage medium is a memory device within an electronic device used to store programs and data. It is understood that the storage medium here can include both built-in storage media within the electronic device and extended storage media supported by the electronic device. The storage medium provides storage space, which stores the terminal's operating system. Furthermore, this storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more executable programs (including program code). It should be noted that the storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device. Loading and executing one or more instructions stored in the storage medium by the processor can implement the steps of constructing a load forecasting model and / or a load forecasting method for a complex scenario as described in the above embodiments.

[0096] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention 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.

[0097] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. 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 illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0098] 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.

[0099] 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.

[0100] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit its scope of protection. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that after reading the present invention, they can still make various changes, modifications or equivalent substitutions to the specific implementation methods of the application, but these changes, modifications or equivalent substitutions are all within the scope of protection of the claims pending approval.

Claims

1. A method for constructing a load forecasting model for complex scenarios, characterized in that, include: Based on cooperative game theory, the prediction results of the basic load prediction model under different combinations of load influencing factors are analyzed to calculate the contribution of each load influencing factor. Multiple sensitive factors were selected based on the statistical characteristics of the contribution of each load influencing factor. The complex scenario is broken down into multiple sub-scenarios based on each sensitive factor; Feature extraction is performed on historical meteorological data and historical load data of the target area under complex scenarios for each sub-scenario, resulting in feature data corresponding to each sub-scenario; a basic tree model is trained using the feature data corresponding to each sub-scenario to obtain a load prediction expert model corresponding to each sub-scenario. By establishing a mapping relationship between each load influencing factor and the load forecasting expert model corresponding to each sub-scenario, a model selector for each load forecasting expert model is constructed. Based on the model selector and the load forecasting expert model corresponding to each sub-scenario, a complex scenario load forecasting model for the target area is obtained. The basic load prediction model is obtained by training a basic tree model based on historical load data and historical load influencing factors.

2. The construction method according to claim 1, characterized in that, The prediction results of the basic load forecasting model under different combinations of load influencing factors, based on cooperative game theory, are analyzed to calculate the contribution of each load influencing factor, including: Based on cooperative game theory, each load influencing factor is regarded as a participant. The change in the prediction result of the basic load prediction model caused by adding each load influencing factor to different feature combinations is taken as the marginal contribution of the load influencing factor. The weighted marginal contribution of each load influencing factor under all possible feature combinations is calculated as the contribution degree of the load influencing factor.

3. The construction method according to claim 2, characterized in that, The contribution of each load factor is as follows: In the formula, The contribution of load impact factor j, As a sample, , For the set of load influencing factors, This indicates that load influence factor j has been removed from set N; for The feature subset that does not include the load influence factor j; This represents finding the union of sets; Indicated by The prediction results of the basic load forecasting model when the samples in the set are used as input. For The prediction results of the basic load forecasting model when the samples in the set are used as input. For mold taking operation, To find the factorial.

4. The construction method according to claim 2, characterized in that, The statistical characteristics of the contribution of each load influence factor were used to screen out multiple sensitive factors, including: For each load impact factor, based on the mean and variance of the contribution of the load impact factor under different scenarios, the feature splitting efficiency index of the load impact factor is determined. Based on the characteristic decomposition efficiency index of each load influencing factor, target load influencing factors are selected from each load influencing factor as multiple sensitive factors.

5. The construction method according to claim 4, characterized in that, The feature decomposition efficiency index of the load impact factor is as follows: in, Let i be the feature decomposition efficiency index of the i-th load influencing factor. , These are the weighting coefficients for the mean and variance. Let be the mean contribution of the i-th load factor. Contribution of the i-th load influence factor The mean.

6. The construction method according to claim 1, characterized in that, The training process of the basic load prediction model includes: With the goal of minimizing load forecasting error, the differential evolution algorithm is used to optimize the hyperparameters of the basic tree model and the load growth factor for different years. An initial basic tree model is constructed based on the optimized hyperparameters; the load data for each year is adjusted based on the optimized load growth factor corresponding to each year to obtain the adjusted historical load data. The adjusted historical load data and the load influencing factors extracted from the historical load data and historical meteorological data are used as training samples to train the initial basic tree model, thereby obtaining the basic load prediction model.

7. The construction method according to claim 6, characterized in that, Feature extraction is performed on historical meteorological and historical load data of the target area for each sub-scenario, resulting in feature data corresponding to each sub-scenario, including: Extract the target load influencing factors for each sub-scenario from the historical meteorological data and historical load data of the target area; Extract the target historical load data for each sub-scenario from the adjusted historical load data; The target load impact factor and target historical load data for each sub-scenario are used as the feature data for each sub-scenario.

8. The construction method according to claim 7, characterized in that, By establishing a mapping relationship between each load influencing factor and the load forecasting expert model corresponding to each sub-scenario, a model selector is constructed for each load forecasting expert model, including: The adjusted historical load data and each load influencing factor are used as input samples and input into the load forecasting expert model corresponding to each sub-scenario to obtain the forecasting results of the load forecasting expert model corresponding to each sub-scenario. For each input sample, the type label corresponding to the load forecasting expert model with the highest prediction accuracy is used as the selection label for that input sample. The initial selector is trained based on the input samples and their selected labels to obtain the model selector.

9. The construction method according to claim 8, characterized in that, The initial selector is a multilayer perceptron; the initial selector is trained based on the input samples and their selected labels to obtain the model selector, including: The input samples are input into a multilayer perceptron to obtain the applicability probability of each input sample to the corresponding category of each load prediction expert model; The classification error is determined based on the applicability probability and corresponding selected label of each input sample; the model parameters of the multilayer perceptron are adjusted based on the classification error until the training stopping condition is met, thus obtaining the model selector.

10. A load forecasting method for complex scenarios, characterized in that, include: Obtain historical load data and meteorological data for the forecast date; The load influencing factors for the forecast date are extracted from historical load data and meteorological data for the forecast date. By inputting historical load data and load influencing factors for the forecast date into the complex scenario load forecasting model constructed as described in any one of claims 1-9, load forecast data for the forecast date is obtained.

11. The prediction method according to claim 10, characterized in that, The complex scenario load forecasting model includes a model selector and load forecasting expert models corresponding to each sub-scenario. Historical load data and load influencing factors for the forecast date are input into the complex scenario load forecasting model to obtain the load forecast data for the forecast date, including: The model selector is used to classify the historical load data and load influencing factors for the forecast date into scenarios, thereby obtaining the applicability probability of the input data with each load forecasting expert model. Based on the pre-defined mapping relationship between the elimination features and the load forecasting expert model, the feature data corresponding to the target load forecasting expert model is eliminated from the input data to obtain the target input features; The target load forecasting expert model is invoked to predict the target input features, thereby obtaining the load forecasting data for the forecast date; The target load forecasting expert model is the load forecasting expert model with the highest applicability to the input data.

12. A load forecasting model construction system for complex scenarios, characterized in that, include: The contribution calculation module is used to analyze the prediction results of the basic load prediction model under different combinations of load influencing factors based on cooperative game theory, so as to calculate the contribution of each load influencing factor. The scenario segmentation module is used to filter out multiple sensitive factors based on the statistical characteristics of the contribution of each load impact factor; The complex scenario is broken down into multiple sub-scenarios based on each sensitive factor; The expert model building module is used to extract features from historical meteorological data and historical load data of the target area under complex scenarios for each sub-scenario, and obtain the feature data corresponding to each sub-scenario; the basic tree model is trained using the feature data corresponding to each sub-scenario to obtain the load prediction expert model corresponding to each sub-scenario. The selector building module is used to build a model selector for each load forecasting expert model by establishing a mapping relationship between each load influencing factor and the load forecasting expert model corresponding to each sub-scenario. The complex model building module is used to obtain the complex scenario load prediction model of the target area based on the model selector and the load prediction expert model corresponding to each sub-scenario; The basic load prediction model is obtained by training a basic tree model based on historical load data and historical load influencing factors.

13. The construction system according to claim 12, characterized in that, The contribution calculation module is specifically used for: Based on cooperative game theory, each load influencing factor is regarded as a participant, and the change in the prediction result of the basic load prediction model caused by adding each load influencing factor to different feature combinations is regarded as the marginal contribution of the load influencing factor. Calculate the weighted marginal contribution of each load impact factor under all possible combinations of features, as the contribution level of that load impact factor.

14. The construction system according to claim 13, characterized in that, The contribution of each load factor is as follows: In the formula, The contribution of load impact factor j, As a sample, , For the set of load influencing factors, This indicates that load influence factor j has been removed from set N; for The feature subset that does not include the load influence factor j; This represents finding the union of sets; Indicated by The prediction results of the basic load forecasting model when the samples in the set are used as input. For The prediction results of the basic load forecasting model when the samples in the set are used as input. For mold taking operation, To find the factorial.

15. The construction system according to claim 13, characterized in that, The scene splitting module includes: The indicator calculation submodule is used to determine the feature splitting efficiency index of each load impact factor based on the mean and variance of the contribution of the load impact factor under different scenarios. The screening submodule is used to select target load impact factors as multiple sensitive factors based on the feature-splitting efficiency index of each load impact factor.

16. The construction system according to claim 15, characterized in that, The feature decomposition efficiency index of the load impact factor is as follows: in, Let i be the feature decomposition efficiency index of the i-th load influencing factor. , These are the weighting coefficients for the mean and variance. Let be the mean contribution of the i-th load factor. Contribution of the i-th load influence factor The mean.

17. The construction system according to claim 12, characterized in that, It also includes a basic model training module, which includes: The parameter optimization submodule is used to optimize the hyperparameters of the base tree model and the load growth factor for different years with the goal of minimizing load forecasting error. The adjustment submodule is used to construct an initial basic tree model based on the optimized hyperparameters; and to adjust the load data of each year based on the optimized load growth factor corresponding to each year to obtain the adjusted historical load data. The basic training submodule is used to train the initial basic tree model using adjusted historical load data and load influencing factors extracted from the historical load data and historical meteorological data as training samples, so as to obtain the basic load prediction model.

18. The construction system according to claim 17, characterized in that, The expert model construction module includes a feature extraction submodule, which is used for: Extract the target load influencing factors for each sub-scenario from the historical meteorological data and historical load data of the target area; Extract the target historical load data for each sub-scenario from the adjusted historical load data; The target load impact factor and target historical load data for each sub-scenario are used as the feature data for each sub-scenario.

19. The construction system according to claim 18, characterized in that, The selector construction module includes: The accuracy test submodule is used to input the adjusted historical load data and various load influencing factors as input samples into the load prediction expert model corresponding to each sub-scenario, and obtain the prediction results of the load prediction expert model corresponding to each sub-scenario. The sample construction submodule is used to select the type label of the load forecasting expert model with the highest prediction accuracy as the selection label for each input sample. The selector training submodule is used to train an initial selector based on the input samples and their selection labels to obtain the model selector.

20. The construction system according to claim 19, characterized in that, The initial selector is a multilayer perceptron; the selector training submodule is specifically used for: The input samples are input into a multilayer perceptron to obtain the applicability probability of each input sample to the corresponding category of each load prediction expert model; The classification error is determined based on the applicability probability and corresponding selected label of each input sample; the model parameters of the multilayer perceptron are adjusted based on the classification error until the training stopping condition is met, thus obtaining the model selector.

21. A load forecasting system for complex scenarios, characterized in that, include: The data acquisition module is used to acquire historical load data and meteorological data for the forecast date. The impact factor extraction module is used to extract the load impact factors for the forecast date from historical load data and meteorological data for the forecast date. The prediction module is used to input historical load data and load influencing factors for the prediction date into the complex scenario load prediction model constructed as described in any one of claims 1-9, and obtain the load prediction data for the prediction date.

22. The prediction system according to claim 21, characterized in that, The complex scenario load forecasting model includes a model selector and load forecasting expert models corresponding to each sub-scenario; the forecasting module includes: The expert selection submodule is used to classify the historical load data and load influencing factors for the forecast date using the model selector, and obtain the applicability probability of the input data with each load forecasting expert model. The feature removal submodule is used to remove feature data corresponding to the target load forecasting expert model from the input data based on the preset mapping relationship between the removal features and the load forecasting expert model, so as to obtain the target input features; The prediction submodule is used to call the target load prediction expert model to predict the target input features and obtain the load prediction data for the prediction day. The target load forecasting expert model is the load forecasting expert model with the highest applicability to the input data.

23. An electronic device, characterized in that, include: At least one processor and memory; The memory and processor are connected via a bus; The memory is used to store one or more programs; When the one or more programs are executed by the at least one processor, the method for constructing a load forecasting model for a complex scenario as described in any one of claims 1 to 9 is implemented, and / or the method for forecasting a load forecasting model for a complex scenario as described in claim 10 or 11 is implemented.

24. A readable storage medium, characterized in that, It contains an execution program, which, when executed, implements the method for constructing a load forecasting model for complex scenarios as described in any one of claims 1 to 9, and / or implements the method for forecasting loads in complex scenarios as described in claim 10 or 11.