Power load prediction method and system based on ensemble learning
By constructing multi-granularity temporal features, training scene recognizers and heterogeneous base model groups, and combining dynamic weight allocation and online learning, the problems of insufficient scene adaptability and accuracy in power load forecasting are solved, and efficient and stable power load forecasting is achieved.
Patent Information
- Application Number
- CN202511707938.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-20
- Publication Date
- 2026-02-27
AI Technical Summary
Existing power load forecasting methods lack the ability to deeply integrate multi-source information, automatically identify operating scenarios, and intelligently and dynamically integrate data, resulting in insufficient forecast accuracy. In particular, they perform poorly under different dates and weather conditions, and the models are prone to overfitting when the data quality is insufficient, resulting in poor adaptability.
By employing a method of multi-granularity temporal feature construction, scene recognizer training, heterogeneous base model group training, and scene adaptive ensemble inference, accurate prediction of power load is achieved through multi-timescale feature extraction, dynamic weight allocation, and online learning.
It improves the accuracy and robustness of power load forecasting, can adapt to changes in different scenarios, reduces maintenance costs, and enhances the model's anti-interference ability and the stability of the forecasting system.
Smart Images

Figure CN121579978A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power system analysis and operation control, in particular to a power load prediction method and system based on ensemble learning. BACKGROUND
[0002] Power load prediction is the core foundation work of power system safety, stability and economic operation. Accurate short-term load prediction (such as 24 to 168 hours in the future) is crucial for developing power generation plans, arranging unit start-stop, conducting power flow analysis and power market transactions. The improvement of prediction accuracy can bring significant economic and social benefits, such as reducing power generation cost, improving power supply reliability, optimizing resource allocation, etc.
[0003] Traditional load prediction methods are mainly based on time series analysis (such as ARIMA model) and regression analysis. Although these methods are simple in model and small in calculation, they are difficult to effectively capture the complex nonlinear and non-stationary characteristics of power load sequence and the coupling relationship of various influencing factors such as weather and date type. The prediction accuracy and robustness often cannot meet the requirements of modern smart grid.
[0004] With the development of machine learning technology, especially the rise of deep learning models, the accuracy of load prediction has been significantly improved. For example, support vector machine (SVM), artificial neural network (ANN), especially long short-term memory network (LSTM) and time series convolution network (TCN) models have become the current mainstream prediction technology due to their strong nonlinear fitting and time series dependence capturing ability. However, single machine learning model has inherent limitations. Model selection dilemma: different models have different sensitivity to different data patterns and features. Overfitting risk: complex deep learning models are prone to overfitting when the data volume is insufficient or the data quality is not high, which leads to the decline of model generalization ability. Poor scene adaptability: power load shows completely different patterns under different dates (such as weekdays, weekends, holidays) and different weather conditions (such as extreme high temperature, severe cold).
[0005] The existing power load prediction method based on ensemble learning has the following defects in operation: static weight problem: most ensemble strategies use fixed weights to fuse the prediction results of base learners, which cannot dynamically adjust the weight distribution strategy according to the specific situation of the current prediction point (such as the load scene it belongs to); insufficient feature utilization: lack of explicit modeling of the multi-time scale characteristics of load data, unable to systematically extract and utilize features of different granularities such as short-term fluctuations, daily cycles, weekly trends, limiting the model's understanding of the overall load; insufficient intelligence: the existing ensemble system lacks automatic perception and judgment ability of the operating scene, and the ensemble strategy cannot be deeply related to the internal driving force affecting the load change (such as weather, date), and the adaptive and self-evolutionary ability is limited, so there is a lack of a new power load prediction method that can deeply integrate multi-source information, automatically identify the operating scene, and intelligently dynamically integrate accordingly. SUMMARY
[0006] The present application aims to provide a power load prediction method and system based on ensemble learning, mainly to solve the technical problem that the existing technology lacks a new power load prediction method that can deeply integrate multi-source information, automatically identify the operating scene, and intelligently dynamically integrate accordingly.
[0007] To solve the above technical problems, the present application provides the following technical solutions:
[0008] A power load prediction method based on ensemble learning, comprising the following steps:
[0009] S1, a multi-granularity time series feature construction step, obtaining historical power load and related factor data, after preprocessing, using a parallel feature extraction channel, respectively taking hour-level, day-level, and week-level as window scales, extracting heterogeneous time series features describing short-term fluctuations, periodic patterns, and long-term trends, to form a multi-granularity feature vector;
[0010] S2, a scene recognizer training step, taking the multi-granularity feature vector as input and the load scene label divided based on date attribute and extreme weather event as output, training a dedicated scene classification model to form a scene recognizer;
[0011] S3, a heterogeneous base model group training step, configuring and training a group of base learners with different emphases, the base learners are trained using the multi-granularity feature vector, and are initially configured to focus on learning different subsets of features in the multi-granularity feature vector;
[0012] S4, a scene-adaptive ensemble inference step, for the sample to be predicted, first extract its multi-granularity feature vector and input it into the scene recognizer to obtain the prediction scene category, then call the weight combination based on model feature importance analysis pre-bound to the scene category, and weight and fuse the outputs of each base learner;
[0013] S5, a prediction result output and feedback step, outputting the final load prediction value of the sample, and feeding back the new data and its actual value to the system for incremental updating of the scene identifier and weight combination.
[0014] A power load prediction system based on ensemble learning, comprising:
[0015] A multi-granularity feature parallel extraction module is used to receive original time series data from the power dispatching system and the meteorological database interface, complete data cleaning and normalization preprocessing, and is responsible for parallel calculation and splicing to generate a comprehensive feature vector containing short-term fluctuations, daily cycles and weekly trend information through configurable hour-level, day-level and week-level sliding windows;
[0016] A scene identifier module internally stores and runs a trained deep learning classification model, which receives the comprehensive feature vector as input, outputs the fine load scene classification result of the current input data through model forward calculation, and the scene at least includes regular weekdays, weekends and holidays, and extreme high temperature days;
[0017] A heterogeneous base model group module contains a model pool composed of a time series convolution network, a long short-term memory network and a gradient boosting decision tree, each model receives the same comprehensive feature vector, and through its network structure or algorithm itself, it focuses on learning the rules of different time scales in the feature vector, thereby forming a differentiated prediction perspective;
[0018] A scene-weight mapping library module is a dynamic knowledge base that stores the mapping relationship between different load scene identifiers and corresponding optimal weight vectors in the form of key-value pairs, and the weight vector is based on the learning contribution of each base model to the key features in a specific scene, and is obtained through offline training by calculation method;
[0019] An adaptive ensemble inference engine module serves as the prediction scheduling center of the system, which receives real-time prediction requests, calls each module in turn, first obtains the feature vector, then determines the scene, then queries the corresponding weight vector from the mapping library, and finally the model pool performs weighted voting to generate and output the final load prediction value.
[0020] The working principle and beneficial effects of the present application are as follows:
[0021] 1. Working principle: The multi-granularity time sequence feature construction step overcomes the limitations of traditional single time window in comprehensively capturing the complex time sequence rules of power load through parallel feature extraction of multiple time scales, providing rich and differentiated feature input for subsequent scene recognition and model integration, facilitating subsequent improvement of prediction accuracy; the scene recognizer training step builds scene recognition as a classification problem, automatically identifies load patterns using multi-granularity features, replacing traditional scene division methods based on fixed rules, improving the accuracy and adaptability of scene recognition; the heterogeneous base model group training step focuses on learning features of different time scales by guiding base learners of different structures, forming complementary specialized capabilities at the model level, effectively avoiding homogenization competition between models, facilitating subsequent high-quality integration; the scene-adaptive integrated inference step realizes a scene-aware-weight-adaptive intelligent integration mechanism, ensuring that the most suitable model combination can be called under different load scenarios; the prediction result output and feedback step introduces an online learning mechanism, enabling the system to continuously optimize and adapt to dynamic changes in power load patterns, ensuring the accuracy and practicality of the prediction model during long-term use;
[0022] The multi-granularity feature parallel extraction module accelerates the feature engineering process through hardware parallelization, ensuring that the system can process massive time series data in real time, facilitating subsequent high-frequency prediction tasks; the scene recognizer module encapsulates complex scene judgment logic as reusable software components, reducing system maintenance complexity, while ensuring high accuracy of scene recognition through deep learning models; the heterogeneous base model group module supports flexible expansion through modular design, allowing the addition, deletion, or replacement of base learners based on actual needs, with good scalability and maintainability; the scene-weight mapping library module datafies the core decision logic of the system, achieving real-time weight allocation through a key-value query mechanism, balancing decision quality and system response speed; the adaptive integrated inference engine module integrates all modules organically through process orchestration, realizing a fully automated intelligent decision-making pipeline from data input to prediction output.
[0023] 2. Beneficial effects:
[0024] (1) By introducing a scene recognizer and a scene-aware dynamic weighted integration mechanism, accurate prediction is achieved according to local conditions. The system can automatically identify different scenarios such as regular weekdays, holidays, or extreme high-temperature days, and automatically call the model combination and its weight that performs best in that scenario for prediction, thereby improving prediction accuracy under various complex working conditions and overcoming the disadvantage of increased prediction error when switching scenarios in traditional methods.
[0025] (2) Through the model pool combined with the weight distribution strategy based on feature importance, the sensitivity of different structures of the model to data noise and abnormal patterns is different, when a certain model fails due to data quality problems or sudden abnormal events, other models with stronger learning ability to the core features of the current scene will play a leading role in the integration, so as to ensure that the output of the system as a whole is still stable and reliable, and the anti-interference ability and robustness of the prediction system are improved.
[0026] (3) Through the multi-granularity feature parallel extraction technology, the features of different time scales such as hourly fluctuations, daily cycles and weekly trends are explicitly and structurally extracted from the original data, providing information input for subsequent model learning, so that the model can better capture the internal law of power load, thereby improving the information utilization efficiency and representation ability of the model.
[0027] (4) The system can continuously monitor its prediction performance, and when performance degradation or new load patterns are found, the update of the scene recognizer and the integration weight can be automatically triggered, so that the system can continuously learn from new data, adapt to the long-term evolution of power load patterns, effectively solve the problem of rapid failure of traditional static models due to concept drift, reduce maintenance cost, and ensure the practical value of long-term use.
[0028] (5) Through multiple modular system designs, the complex algorithm process is encapsulated into feature extraction, scene recognition, model pool management, integrated reasoning and other independent modules with clear responsibilities, so that the system architecture is clear, the complexity of integration and deployment is reduced, and the system also has good scalability, such as easily adding new base learners or defining new scenes without changing the overall architecture, which is suitable for industrial application and promotion.
[0029] Preferably, the initial configuration is that the time series convolution network model is preferentially configured to learn the hourly fluctuation features; the long short-term memory network model is preferentially configured to learn the daily cycle features; and the gradient boosting decision tree model is preferentially configured to learn the weekly trend features and static environmental factors. This configuration utilizes the inherent advantages of different algorithm models to form complementarity at the feature learning level, ensuring that each base learner can deeply mine the load law from different time dimensions to provide support for subsequent scene adaptive integration.
[0030] Preferably, the weight combination is determined by the following method: for a specific scene , the feature importance contribution of each base learner on the scene validation set is calculated , and the contribution is measured by the degree of attenuation of the prediction performance of the model after blocking different granularity features; then the weight of the base learner in the scene is The calculation method is: wherein, is the index of all base learners in the model pool; the weight distribution strategy is based on the real learning ability of the model to key features in the actual scene, rather than simply sorting the prediction accuracy, so that the model with better analysis ability to the dominant features in a specific scene improves the rationality and effectiveness of the ensemble.
[0031] Preferably, the weight combination is dynamically updated, and for the current moment , the base learner The maximum weight of the scene is: = * +(1- )* wherein, is a decay factor and 0 ≤1, is the theoretical weight calculated according to the latest validation set, is the weight used in the last period; the introduction of the time decay factor realizes the smooth transition of the weight, which can not only reflect the latest performance change of the system in time, but also effectively avoid the sharp oscillation of the weight caused by single prediction fluctuation, and ensure the stability and reliability of the integrated system.
[0032] Preferably, the incremental update adopts a time decay mechanism, which exponentially decays the weight of historical data, so that the model can adapt to the latest changes of the load pattern; this mechanism enables the system to have a continuous learning ability, which can automatically adjust with the time evolution of the power load pattern, effectively solving the performance degradation problem of traditional static models caused by load characteristic drift.
[0033] Preferably, the construction and update logic of the scene-weight mapping library module is defined by the feature importance contribution calculation method and the dynamic update trigger condition; this definition ensures the consistency of the system decision logic and the innovative method, and guarantees the scientificity and timeliness of the weight distribution.
[0034] Preferably, it further includes a closed-loop feedback and evolution module, which continuously monitors the prediction error in each scene, and automatically triggers incremental learning of the scene recognizer module and recalculation of the scene-weight mapping library module when the performance degrades, forming a self-optimizing closed loop; this module enables the system to have the ability of self-evolution, so that it can maintain the prediction accuracy for a long time, reduce the cost of manual maintenance, and improve the practical value of the system in the real industrial environment.
[0035] Preferably, the multi-granularity feature parallel extraction module, the scene identifier module, the heterogeneous base model group module and the adaptive integrated inference engine module are all deployed on the cloud platform server of the power dispatch center, and the scene-weight mapping library module is deployed in the memory database for high-speed query by the adaptive integrated inference engine module; considering different needs for computing resources and response speed, the cloud platform is used to ensure the computing capacity of model training and complex feature extraction, and the memory database is used to ensure low-latency access during real-time prediction, so as to realize the optimized balance between performance and cost.
[0036] Preferably, an electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the method of any one of claims 1 to 5 when executing the program. BRIEF DESCRIPTION OF DRAWINGS
[0037] Figure 1 A flowchart of a power load prediction method based on integrated learning according to the present application;
[0038] Figure 2 A flowchart of a power load prediction system based on integrated learning according to the present application. DETAILED DESCRIPTION
[0039] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor are within the scope of protection of the present application.
[0040] Embodiment one, as shown in a power load prediction method based on integrated learning, comprising the following steps: Figure 1
[0041] S1. Multi-granularity time-series feature construction steps: Acquire historical power load and related factor data. After preprocessing, use parallel feature extraction channels, with hourly, daily, and weekly window scales respectively, to extract heterogeneous time-series features describing short-term fluctuations, cyclical patterns, and long-term trends, which together constitute a multi-granularity feature vector. Specific implementation of multi-granularity feature extraction: Short-term feature extraction channel (hourly): Uses a 6-hour sliding window; extracted features include: moving average, standard deviation, and first-order difference variance: focusing on the instantaneous fluctuation characteristics of the load; Medium-term feature extraction channel (daily): Uses a 24-hour sliding window; extracted features include: daily load factor (average load / maximum load), peak-to-valley difference, and load curve shape characteristics; focusing on capturing daily cyclical patterns; Long-term feature extraction channel (weekly): Uses a 168-hour (7-day) sliding window; extracted features include: weekly ratio, trend slope, and cyclical component intensity; mainly reflecting long-term trends and cyclical characteristics. The features extracted by the three channels together constitute a 256-dimensional multi-granularity feature vector.
[0042] S2. Scene Recognizer Training Steps: Using multi-granularity feature vectors as input and load scene labels based on date attributes and extreme weather events as output, a dedicated scene classification model is trained to form a scene recognizer. Scene recognizer training implementation: Scene definition: Based on business needs, four typical scenarios are defined: regular workdays (Monday to Friday, non-extreme weather); weekends (Saturday and Sunday); public holidays (statutory public holidays); extreme weather days (high temperatures, cold waves, etc.).
[0043] Model training: Multilayer Perceptron (MLP) is used as the scene recognizer; Input layer: 256 nodes (corresponding to feature dimensions); Hidden layers: a three-layer structure of 128-64-32. Activation function; Training strategy: Five-fold cross-validation and early stopping strategy are used to prevent overfitting. A 256-dimensional multi-granularity feature vector is used as the input of the MLP, where the first X dimensions are hourly features, the middle Y dimensions are daily features, and the last Z dimensions are weekly features. The output layer has 4 neurons, corresponding to 4 scenarios. The probability distribution is obtained using the Softmax function, and the scenario category with the highest probability value is finally selected as the output.
[0044] S3, heterogeneous base model group training step, configure and train a group of base learners with different emphasis, the base learners are trained using multi-granularity feature vectors, and are initially configured to emphasize learning different subset features in the multi-granularity feature vectors, the initially configured time series convolutional network model is preferentially configured to learn hour-level fluctuation features; the long short-term memory network model is preferentially configured to learn day-level periodicity features; the gradient boosting decision tree model is preferentially configured to learn week-level trend features and static environmental factors, the heterogeneous base model group is constructed and implemented: model selection and configuration: time series convolutional network (TCN): specialized in capturing short-term local patterns; configured with 8 layers of dilated causal convolution, the dilation coefficient increases by a power of 2; use residual connection to ensure gradient flow; long short-term memory network (LSTM): focuses on learning daily periodicity; adopts a structure of two layers of 128 units; use Dropout=0.3 to prevent overfitting; gradient boosting tree (GBDT): good at processing feature interaction and long-term trend; the number of trees is set to 200, and the maximum depth is 6; the learning rate is set to 0.1; all models are trained using the same multi-granularity feature vector, but through the design of the model structure, it naturally tends to learn features of different time scales. For the TCN model, by setting its convolution kernel size and dilation coefficient, it naturally tends to capture short-term local patterns within the hour-level window; for the LSTM model, by adjusting its time step and hidden state, it focuses on learning 24-hour periodic dependencies;
[0045] For the hour-level feature subset, random noise is added or local zeroing is performed on the time dimension of the input data to simulate occlusion; for the day-level and week-level features, the statistical quantities (such as mean, variance) are calculated and perturbed to simulate occlusion
[0046] S4, scene adaptive integrated inference step, for the sample to be predicted, first extract its multi-granularity feature vector and input it into the scene recognizer to obtain the predicted scene category, then call the weight combination based on model feature importance analysis that is pre-bound to the scene category, weight the outputs of each base learner and fuse them, the weight combination is determined as follows: for a certain scene , calculate the feature importance contribution of each base learner on the scene validation set , the contribution is measured by the degree of performance degradation of the model after occluding different granularity features; then the weight of the base learner in the scene is calculated as follows: , where is the index of all base learners in the model pool;
[0047] The weight combination is dynamically updated, and for the current time Base learner In the scene Final weights for: = * +(1- )* ,in, It is the attenuation factor and 0 < ≤1, The theoretical weights are calculated based on the latest validation set. Using the weights used in the previous cycle, scene-adaptive ensemble implementation: Weight allocation strategy: For each scene, the optimal weight combination is determined through the following steps: Scene validation set construction: Extract all samples of the scene from the training set; Feature importance evaluation: Calculate the sensitivity of each model to features of different granularities using the occlusion method; Weight calculation: Base learner In the scene The weights below The calculation method is as follows: The occlusion method involves randomly setting a specific time granularity dimension of the input feature vector to zero or adding Gaussian noise to simulate the state of missing feature information in that part.
[0048] S5. Prediction Result Output and Feedback Steps: Output the final load prediction value for the sample and feed back the new data and its actual values to the system for incremental updates to the scene recognizer and weight combination. The incremental update adopts a time decay mechanism, exponentially decaying the weights of historical data to enable the model to adapt to the latest changes in load patterns. Real-time prediction process: For a new prediction time, first extract its multi-granularity features; input to the scene recognizer to obtain the scene probability distribution; select the scene with the highest probability as the current scene; read the weight combination corresponding to the scene from the weight mapping library; each base model predicts in parallel and is fused by weight; output the final prediction result.
[0049] Example 2, as follows Figure 2 As shown, an ensemble learning-based power load forecasting system includes:
[0050] The multi-granularity feature parallel extraction module is used to receive raw time-series data from the interface between the power dispatching system and the meteorological database, complete data cleaning and normalization preprocessing, and is responsible for parallel calculation and splicing to generate a comprehensive feature vector containing short-term fluctuations, daily cycles and weekly trend information through configurable hourly, daily and weekly sliding windows.
[0051] a scene recognizer module, which internally stores and runs a trained deep learning classification model, receives the comprehensive feature vector as input, and outputs the refined load scene classification result to which the current input data belongs through forward calculation of the model. The scenes include at least regular weekdays, weekends and holidays, and extreme high-temperature days;
[0052] a heterogeneous base model group module, which contains a model pool composed of a time series convolution network, a long short-term memory network, and a gradient boosting decision tree. Each model receives the same comprehensive feature vector and focuses on learning the rules of different time scales in the feature vector through its network structure or algorithm itself, thereby forming a differentiated prediction perspective;
[0053] a scene-weight mapping library module, which is a dynamic knowledge base that stores the mapping relationship between different load scene identifiers and corresponding optimal weight vectors in the form of key-value pairs. The weight vector is based on the learning contribution of each base model to key features in a specific scene and is obtained through offline training. The construction and update logic of the scene-weight mapping library module is defined by the feature importance contribution calculation method and the dynamic update trigger condition.
[0054] an adaptive integrated reasoning engine module, which serves as the prediction and scheduling center of the system. This module receives real-time prediction requests, sequentially calls each module, first obtains the feature vector, then determines the scene, subsequently queries the corresponding weight vector from the mapping library, and finally the model pool performs weighted voting to generate and output the final load prediction value.
[0055] It also includes a closed-loop feedback and evolution module that continuously monitors the prediction error under each scene. When the performance degrades, it automatically triggers incremental learning of the scene recognizer module and re-computation of the scene-weight mapping library module, forming a self-optimizing closed loop.
[0056] The multi-granularity feature parallel extraction module, the scene recognizer module, the heterogeneous base model group module, and the adaptive integrated reasoning engine module are all deployed on the cloud platform server of the power dispatch center. The scene-weight mapping library module is deployed in the in-memory database for high-speed query by the adaptive integrated reasoning engine module.
[0057] Data preparation and preprocessing: First, historical power load data is obtained from the power grid dispatching system, with a time resolution of 15 minutes or 1 hour. At the same time, corresponding temperature, humidity, and weather type data, as well as date type information (workday, weekend, holiday), are obtained from the meteorological department.
[0058] The data preprocessing includes the following steps: outlier processing: the box plot method is used to identify outliers, and the data points outside the continuous 3 standard deviations are regarded as outliers, and the linear interpolation of the two normal values before and after is used for replacement; missing value filling: for continuous missing data, the time series specificity method is used, and the historical mean value and recent change trend of the same period are combined for filling; data normalization: the maximum and minimum normalization method is used to map the load data to the interval [0, 1];
[0059] Performance optimization measures: feature extraction parallelization: three granularity features are calculated in parallel; model prediction pipeline: each base model prediction task is executed in parallel; result cache: the scene-weight mapping of frequent queries is cached in Redis;
[0060] Model updating mechanism: a model performance monitoring system is established, and updating is triggered when the following conditions occur: the prediction error is continuously more than the threshold value (such as MAPE>3%) for 3 days; obvious concept drift is detected; regular monthly update: when the system monitors that the average absolute percentage error (MAPE) of continuous N time points is more than the threshold value T, or the data distribution is identified to have a significant change through the concept drift detection algorithm, the weight recalculation and update process is automatically triggered;
[0061] An electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the method of any one of claims 1 to 5 when executing the program, and the system deployment and optimization: the feature extraction, scene identification, model prediction and other functional modules are modularized and deployed through to communicate.
[0062] From the above, the specific embodiment of the present application is as follows:
[0063] Data preparation and preprocessing implementation: first, historical power load data is obtained from the power grid dispatching system, and the time resolution is preferably 15 minutes or 1 hour, and corresponding temperature, humidity, weather type data and date type information (workday, weekend, holiday) are obtained from the meteorological department;
[0064] Data preprocessing includes the following steps: outlier processing: the box plot method is used to identify outliers, and the data points outside the continuous 3 standard deviations are regarded as outliers, and the linear interpolation of the two normal values before and after is used for replacement; missing value filling: for continuous missing data, the time series specificity method is used, and the historical mean value and recent change trend of the same period are combined for filling; data normalization: the maximum and minimum normalization method is used to map the load data to the interval [0, 1];
[0065] Implementation of multi-granularity feature extraction: Short-term feature extraction channel (hour level): use 6-hour sliding window; extracted features include: sliding average, standard deviation, first-order difference variance: focus on the instantaneous fluctuation characteristics of the load; Medium-term feature extraction channel (day level): use 24-hour sliding window; extracted features include: daily load rate (average load / maximum load), peak-valley difference, load curve shape feature; focus on capturing daily periodic regularity; Long-term feature extraction channel (week level): use 168-hour (7-day) sliding window; extracted features include: week same period ratio, trend slope, periodic component strength; mainly reflect long-term trend and periodic characteristics, the features extracted by the three channels together constitute a 256-dimensional multi-granularity feature vector, which is used as the input of the MLP, where the first X dimensions are hour-level features, the middle Y dimensions are day-level features, and the last Z dimensions are week-level features. The output layer has 4 neurons, corresponding to 4 scenarios, and the probability distribution is obtained using the Softmax function. Finally, the scenario category with the highest probability value is selected as the output. For the hour-level feature subset, random noise or local zero is added in the time dimension of the input data to simulate occlusion; For day-level and week-level features, their statistical quantities (such as mean and variance) are calculated and perturbed to simulate the occlusion effect;
[0066] Scenario recognizer training implementation: Scenario definition: According to business needs, define 4 typical scenarios: regular weekday (Monday to Friday, non-extreme weather); weekend (Saturday, Sunday); holiday (legal holidays); extreme weather day (high temperature, cold wave, etc.);
[0067] Model training: Use multi-layer perceptron (MLP) as the scenario recognizer; input layer: 256 nodes (corresponding to feature dimension); hidden layer: three-layer structure of 128-64-32, using activation function; Training strategy: use five-fold cross-validation, early stopping strategy to prevent overfitting;
[0068] Heterogeneous base model group construction implementation: Model selection and configuration: Time series convolution network (TCN): specializes in capturing short-term local patterns; Configure 8 layers of dilated causal convolution, with the dilation coefficient increasing by powers of 2; Use residual connection to ensure gradient flow; Long short-term memory network (LSTM): focuses on learning daily periodic regularity; Use two layers of 128 units structure; Use Dropout=0.3 to prevent overfitting; Gradient boosting tree (GBDT): good at handling feature interaction and long-term trend; The number of trees is set to 200, and the maximum depth is 6; Learning rate is set to 0.1; All models use the same multi-granularity feature vector for training, but through the design of the model structure, it naturally tends to learn features of different time scales;
[0069] Scenario adaptive integration implementation: weight allocation strategy: for each scenario, determine the optimal weight combination by the following steps: scenario validation set construction: extract all samples of this scenario from the training set; feature importance evaluation: calculate the sensitivity of each model to different granularity features by the masking method; weight calculation: base learners Under the scenario The weight is calculated as: The masking method is: randomly set to zero or add Gaussian noise to the specific time granularity dimension of the input feature vector to simulate the state of missing this part of the feature information;
[0070] Real-time prediction process: for a new prediction time, first extract its multi-granularity features; input the scene identifier to obtain the scene probability distribution; select the scene with the maximum probability as the current scene; read the weight combination corresponding to the scene from the weight mapping library; each base model is predicted in parallel, and the results are fused according to the weight; output the final prediction result;
[0071] System deployment and optimization: adopt micro-service architecture, modularize feature extraction, scene identification, model prediction and other functional modules, and communicate through ;
[0072] Performance optimization measures: feature extraction parallelization: three granularity features are calculated in parallel; model prediction pipeline: each base model prediction task is executed in parallel; result cache: the scene-weight mapping cache is cached in Redis for frequent queries;
[0073] Model update mechanism: establish a model performance monitoring system, and trigger update when the following conditions occur: the prediction error exceeds the threshold value (such as MAPE> 3%) for 3 consecutive days; obvious concept drift is detected; regular monthly update: when the system monitors that the average absolute percentage error (MAPE) of N consecutive time points exceeds the threshold value T, or the concept drift detection algorithm identifies that the data distribution has changed significantly, the weight recalculation and update process is automatically triggered.
[0074] The above is only an embodiment of the present application, and common knowledge such as specific structures and properties in the scheme is not described in detail. It should be pointed out that for those skilled in the art, without departing from the structure of the present application, a number of modifications and improvements can be made, which should be regarded as the protection scope of the present application, and these will not affect the effect and practicality of the patent. The protection scope claimed in this application should be subject to the content of its claims, and the specific implementation mode and the like recorded in the specification can be used to explain the content of the claims.
Claims
1. A power load forecasting method based on ensemble learning, characterized in that, Includes the following steps: S1. Multi-granularity time series feature construction steps: acquire historical power load and related factor data, and after preprocessing, use parallel feature extraction channels to extract heterogeneous time series features describing short-term fluctuations, periodic patterns and long-term trends at hourly, daily and weekly levels respectively, which together constitute a multi-granularity feature vector. S2. Scene Recognizer Training Steps: Take multi-granularity feature vectors as input and load scene labels based on date attributes and extreme weather events as output to train a dedicated scene classification model, forming a scene recognizer. S3. Training steps for heterogeneous base model groups: Configure and train a group of base learners with different focuses. The base learners are all trained using multi-granularity feature vectors and are initially configured to focus on learning different subset features in the multi-granularity feature vectors. S4. Scene Adaptive Integrated Inference Step: For the sample to be predicted, firstly, its multi-granularity feature vector is extracted and input into the scene recognizer to obtain the predicted scene category. Then, the weight combination based on the importance analysis of model features and pre-bound to the scene category is called to perform weighted fusion of the outputs of each base learner. S5. Prediction result output and feedback step: Output the final load prediction value of the sample and feed the new data and its actual value back to the system for incremental updates of the scene recognizer and weight combination.
2. The power load forecasting method based on ensemble learning according to claim 1, characterized in that: The initial configuration prioritizes the temporal convolutional network model for learning hourly fluctuation features. Long Short-Term Memory (LSTM) network models are prioritized for learning daily cyclical features; gradient boosting decision tree models are prioritized for learning weekly trend features and static environmental factors.
3. The power load forecasting method based on ensemble learning according to claim 1, characterized in that: The weight combination is determined as follows: for a specific scenario Calculate each base learner Feature importance contribution on the validation set in this scenario This contribution is measured by the degree of performance degradation of the model after occluding features of different granularities; then the base learner In the scene The weights below The calculation method is as follows: ,in, This represents the index of all base learners in the model pool.
4. The power load forecasting method based on ensemble learning according to claim 3, characterized in that: The weight combination is dynamically updated for the current time. Base learner In the scene Final weights for: = * +(1- )* ,in, It is the attenuation factor and 0 < ≤1, The theoretical weights are calculated based on the latest validation set. The weights used in the previous period.
5. The power load forecasting method based on ensemble learning according to claim 1, characterized in that: The incremental update employs a time decay mechanism, exponentially decaying the weights of historical data to enable the model to adapt to the latest changes in load patterns.
6. A power load forecasting system based on ensemble learning, characterized in that, include: The multi-granularity feature parallel extraction module is used to receive raw time-series data from the interface between the power dispatching system and the meteorological database, complete data cleaning and normalization preprocessing, and is responsible for parallel calculation and splicing to generate a comprehensive feature vector containing short-term fluctuations, daily cycles and weekly trend information through configurable hourly, daily and weekly sliding windows. The scene recognizer module internally stores and runs a trained deep learning classification model. This module receives a comprehensive feature vector as input, performs forward computation through the model, and outputs a refined classification result of the load scene to which the current input data belongs. The scenes include at least regular weekdays, weekends and holidays, and extreme high-temperature days. The heterogeneous base model group module contains a model pool consisting of a temporal convolutional network, a long short-term memory network, and a gradient boosting decision tree. Each model receives the same comprehensive feature vector, and focuses on learning the patterns of different time scales in the feature vector through its network structure or algorithm itself, thereby forming a differentiated prediction perspective. The scenario-weight mapping library module is a dynamic knowledge base that stores the mapping relationship between different load scenario identifiers and their corresponding optimal weight vectors in the form of key-value pairs. The weight vectors are obtained through offline training based on the learning contribution of each base model to key features in a specific scenario. The adaptive integrated inference engine module, serving as the system's prediction and scheduling center, receives real-time prediction requests, calls each module in sequence, first obtains feature vectors, then determines the scenario, then queries the corresponding weight vectors from the mapping library, and finally performs weighted voting in the model pool to generate and output the final load prediction value.
7. The power load forecasting system based on ensemble learning according to claim 6, characterized in that: The construction and update logic of the scenario-weight mapping library module is jointly defined by the feature importance contribution calculation method and the dynamic update triggering conditions.
8. The power load forecasting system based on ensemble learning according to claim 6, characterized in that: It also includes a closed-loop feedback and evolution module, which continuously monitors the prediction error in various scenarios. When the performance degrades, it automatically triggers incremental learning of the scene recognizer module and recalculation of the scene-weight mapping library module, forming a self-optimizing closed loop.
9. A power load forecasting system based on ensemble learning according to claim 6, characterized in that: The multi-granularity feature parallel extraction module, scene recognizer module, heterogeneous base model group module, and adaptive ensemble inference engine module are all deployed on the cloud platform server of the power dispatch center. The scene-weight mapping library module is deployed in an in-memory database for high-speed querying by the adaptive ensemble inference engine module.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method of any one of claims 1 to 5.