Multi-time granularity electric quantity prediction method based on gradient lifting integration model

By using gradient boosting ensemble models and feature engineering, the accuracy and consistency issues of traditional power load forecasting methods at different time granularities are resolved, achieving high-precision and robust power load forecasting that adapts to changing power environments.

CN121769844APending Publication Date: 2026-03-31CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Traditional power forecasting methods are difficult to adapt to changes in power load at different time granularities, resulting in decreased forecast accuracy and insufficient model generalization ability, and failing to maintain consistency and efficient scheduling across different time scales.

Method used

A gradient boosting ensemble model is adopted, combined with K-Means clustering, EWMA, SARIMA and Pearson correlation coefficient analysis, to construct a multi-time granularity power prediction method. Feature selection and result fusion are achieved through feature importance evaluation and hyperparameter optimization of CatBoost and XGBoost models.

Benefits of technology

It significantly improves the accuracy and robustness of electricity prediction, can adapt to changes in electricity load at different time granularities, enhances the model's explanatory power and generalization performance for complex electricity consumption behaviors, and reduces the risk of overfitting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121769844A_ABST
    Figure CN121769844A_ABST
Patent Text Reader

Abstract

The invention relates to a multi-time granularity electric quantity prediction method based on a gradient lifting integration model, and belongs to the technical field of electric quantity prediction. The method solves the limitation that a traditional electric quantity prediction model cannot adapt to different time granularities at the same time and is difficult to capture load nonlinear and non-stationary characteristics. According to the technical scheme, the method comprises the steps that users are grouped through K-means clustering to reduce electricity consumption behavior heterogeneity; combining exponential weighted moving average to extract trend features, a seasonal difference autoregression moving average model to capture periodicity, and a Pearson's correlation coefficient to analyze time interval correlation to construct a feature set; the feature importance is evaluated by utilizing CatBoost, and an optimal subset is screened; and the features are input into a CatBoost model and an XGBoost model, and a prediction result is weighted and integrated after hyper-parameter optimization. The method can improve prediction precision and robustness, is adaptive to a multi-time granularity distribution rule, and provides reliable support for electricity market transaction and energy planning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power prediction technology and relates to a multi-time granularity power prediction method based on a gradient boosting ensemble model. Background Technology

[0002] In power system planning and operation, high-precision power generation forecasting plays a crucial role in ensuring system security, achieving economic dispatch, and promoting the consumption of renewable energy. However, due to the combined influence of multiple factors such as weather conditions and holiday types on electricity consumption behavior, actual power load exhibits significant nonlinear and non-stationary dynamic characteristics. Traditional forecasting methods, such as the smoothing curve method and the elasticity coefficient method, are mostly based on linear or quasi-linear assumptions, making it difficult to fully capture such complex dynamic behavior. This leads to a significant decrease in forecast accuracy and insufficient model generalization ability when facing drastic weather changes or special events.

[0003] The medium- to long-term market focuses on the overall scale of electricity consumption and the distribution of electricity during peak, flat, and valley periods, providing a basis for long-term planning and cross-period resource allocation. The spot market, however, requires more granular forecasting, demanding hourly load forecasts or 96 15-minute timeframes. The connection between these two is crucial, ensuring forecast consistency across different time scales, optimizing dispatch and resource allocation, and simultaneously improving the efficiency, stability, and risk management capabilities of the power system, thereby enhancing decision support for market participants. Against this backdrop, traditional modeling methods relying solely on historical electricity data are insufficient to meet the higher demands on feature representation and model generalization capabilities for forecasting tasks at different time granularities. Electricity forecasting at different time granularities is an important research direction in electricity forecasting. Compared to general time-series forecasting, its constraints are more stringent: while maintaining consistency between the feature space and the forecasting objective, the model must possess good predictive performance across different time granularities. In electricity forecasting practice, since load data at different time granularities have their own unique distribution patterns, how to construct targeted forecasting models for each time granularity within a unified modeling framework becomes key to improving forecast accuracy and practicality.

[0004] Based on the above requirements, the current technology has obvious shortcomings, and there is an urgent need to build a power prediction method that can adapt to multiple time granularities in order to improve the prediction performance and scenario adaptability of the system. Summary of the Invention

[0005] In view of this, the purpose of this invention is to provide a multi-time granularity power prediction method based on a gradient boosting ensemble model.

[0006] To achieve the above objectives, the present invention provides the following technical solution: A multi-time-granularity power prediction method based on a gradient boosting ensemble model includes the following steps: Step 1: Obtain historical electricity consumption data of multiple users at different time granularities, use K-Means clustering method to cluster users, group users with similar electricity consumption behavior into one category, and aggregate the electricity consumption data of users in each category into a virtual user's electricity consumption data sequence; Step 2: For the electricity consumption data sequences of the virtual users at different time granularities, the dynamic trend features are extracted using the Exponentially Weighted Moving Average (EWMA) method, the seasonal autoregressive integrated moving average (SARIMA) model is used to capture seasonal variation patterns, and the correlation between different time periods is analyzed by combining the Pearson correlation coefficient to construct a comprehensive feature set; Step 3: Input all features into the CatBoost model for feature importance evaluation, and then evaluate the feature importance based on the mean absolute percentage error (MAPE), mean absolute error (MAE), root mean square error (RMSE), and coefficient of determination (R²). 2 Multiple performance metrics were used to select the optimal feature subset. Step 4: Input the optimal feature subset into the CatBoost and XGBoost models respectively for training, and use a random search strategy to optimize the hyperparameters of each model. Then, fuse the prediction results of each optimized model through a weighted ensemble method. The optimal weight combination is determined with the goal of minimizing the root mean square error of the fusion result, and the final power prediction value is obtained.

[0007] Furthermore, in step 1, clustering users using the K-Means clustering method includes: Based on users’ historical electricity consumption data, the elbow rule is used to calculate the dispersion of data within groups under different numbers of groups, and the most suitable number of clusters for the K-Means algorithm is selected. If there is a category with an excessively large number of users after clustering, then the category is recursively subdivided until the distribution of users in each category is relatively balanced or the dispersion of data within the category no longer decreases significantly.

[0008] Furthermore, in step 2, extracting dynamic trend features using the EWMA method includes: The decreasing weight allocation mechanism of the exponentially weighted moving average algorithm is used to strengthen the contribution of recent data to the current estimate, while gradually weakening the influence of long-term data, in order to extract short-term fluctuations and long-term trend information of electricity data. Based on the EWMA base value, trend characteristics, volatility characteristics, momentum characteristics, directional characteristics, and second-order trend characteristics are constructed.

[0009] Furthermore, in step 2, using the SARIMA model to capture seasonal variation patterns includes: using the SARIMA algorithm to identify seasonality and periodicity in electricity data.

[0010] Furthermore, in step 2, the correlation analysis between different time periods using the Pearson correlation coefficient includes: calculating the correlation coefficient between historical electricity data from other time periods and electricity data from the target time period, and selecting previous historical data that are significantly related to the prediction point as input features for the model.

[0011] Furthermore, in step 3, selecting the optimal feature subset includes: The importance of each feature is evaluated using the CatBoost model, and the features are ranked from highest to lowest importance. The sorted features are then input into the CatBoost model sequentially to evaluate the prediction performance under different numbers of features. The optimal number of features is determined by comprehensively considering multiple performance indicators, including mean absolute percentage error, mean absolute error, root mean square error, and coefficient of determination.

[0012] Furthermore, in step 4, optimizing hyperparameters using a random search strategy includes: using a random search algorithm to optimize the hyperparameters of the CatBoost model and the XGBoost model respectively.

[0013] Furthermore, in step 4, fusing the prediction results of each model through a weighted fusion method includes: fusing the prediction results generated by CatBoost and XGBoost through a weighted method, and optimizing the weight allocation based on a random search strategy, with the optimization objective being to minimize the root mean square error of the fusion result.

[0014] Furthermore, the different time granularities include daily peaks, flats, valleys, or 24-hour periods per day.

[0015] Furthermore, in step 4, determining the optimal weight combination with the objective of minimizing the root mean square error of the fusion result includes: optimizing the prediction weights of CatBoost and XGBoost through a random search strategy to minimize the root mean square error of the weighted fusion result.

[0016] The beneficial effects of this invention are as follows: First, this invention significantly improves the accuracy and robustness of power load forecasting. By applying a gradient boosting ensemble model, it effectively captures the nonlinear and non-stationary dynamic characteristics of power load, overcoming the limitations of traditional linear assumption methods. This method does not rely on complex data preprocessing and can adapt to load fluctuations, ensuring high reliability of forecast results under different scenarios.

[0017] Secondly, this invention possesses excellent adaptability, flexibly adapting to the unique distribution patterns of different time granularities, such as peak, off-peak, and 24-hour periods. Based on a unified prediction framework, the method can specifically process independent time series data for each time period without needing to adjust and reconstruct the model due to time granularity, thus avoiding the performance degradation caused by changes in time scale in traditional methods. This flexibility makes this invention widely applicable in variable power environments.

[0018] Third, by integrating feature engineering and intelligent screening mechanisms, this invention enhances the model's ability to discriminate key influencing factors. A highly discriminative feature set is constructed using a combination of trend extraction, seasonality analysis, and correlation assessment. Furthermore, the input features are optimized through feature importance evaluation, thereby significantly improving the model's explanatory power for complex electricity consumption behaviors.

[0019] Fourth, this invention further enhances the generalization performance of predictions through model ensemble and hyperparameter optimization. A random search strategy is employed to optimize individual models, and a weighted fusion mechanism is combined to balance the advantages of each model. This ensures that the overall prediction system maintains stable output even in the face of abnormal events or data noise, reducing the risk of overfitting.

[0020] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description

[0021] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein: Figure 1 This is a flowchart of the present invention; Figure 2 This is a schematic diagram of the CatBoost algorithm. Figure 3 This is a schematic diagram of the XGBoost algorithm. Detailed Implementation

[0022] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0023] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures, and should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0024] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.

[0025] A power prediction method based on a gradient boosting ensemble model with different time granularities includes the following steps: Step 1: To address the significant heterogeneity in electricity consumption behavior among different users, the K-Means clustering method is used to cluster users, grouping users with similar or identical electricity consumption patterns into one category to reduce the impact of heterogeneity among users. Based on the sum of historical electricity consumption data of users within each category, the electricity consumption data of users within each category is aggregated into a sequence of electricity consumption data for a virtual user. Step 2: Based on this, the dynamic trend features in the electricity series are extracted using the EWMA method, the seasonal variation pattern is captured using the SARIMA model, and the correlation between different time periods or hours is analyzed by combining the Pearson correlation coefficient, so as to construct a more representative and discriminative feature set. Step 3: Input all features into the CatBoost model for feature importance evaluation, and then evaluate the feature importance based on the mean absolute percentage error (MAPE), mean absolute error (MAE), root mean square error (RMSE), and coefficient of determination (R²). 2 Multiple performance metrics were used to select the optimal feature subset. Step 4: Input the feature subset into the CatBoost and XGBoost models respectively, optimize the hyperparameters using a random search strategy, and finally fuse the prediction results of each model through a weighted ensemble method. With the goal of minimizing the root mean square error (RMSE) of the fusion result, the optimal weight combination is determined through random search. Furthermore, in step 1: Addressing the significant heterogeneity in electricity consumption behavior among different users, the K-Means clustering method is used to cluster users, grouping those with similar or identical electricity consumption patterns into one category to reduce the impact of heterogeneity among users, and aggregating users from each category into a single user; specifically: Based on users' historical electricity consumption data, the elbow rule is used to calculate the dispersion of data within groups under different numbers of groups, observe the changing trends, and select the most suitable number of clusters for the K-Means algorithm. It is possible that after clustering, there are categories with an excessively large proportion of users. This uneven distribution may lead to oversimplification of users' electricity consumption characteristics, affecting the overall prediction model's accuracy in identifying electricity consumption fluctuations. Therefore, the above K-Means clustering steps are repeated to recursively subdivide the category until the distribution of users in each cluster is relatively balanced or the dispersion of data within the category no longer decreases significantly, obtaining the final classification. Then, based on the sum of the historical electricity consumption data of users within each category, the electricity consumption data of users within each category is aggregated into a virtual user's electricity consumption data sequence.

[0026] Furthermore, in step 2: based on this, the dynamic trend features in the electricity series are extracted using the EWMA method, the seasonal variation pattern is captured using the SARIMA model, and the correlation between different time periods or hours is analyzed using the Pearson correlation coefficient, thereby constructing a more representative and discriminative feature set; specifically: First, the decreasing weighting mechanism of the exponentially weighted moving average (EWMA) algorithm is used to strengthen the contribution of recent data to the current estimate while gradually weakening the influence of long-term data, thereby extracting short-term fluctuations and long-term trend information from electricity data. Based on the EWMA baseline, trend features, volatility features, momentum features, directional features, and second-order trend features are constructed to enhance the ability to capture changes in electricity data. Simultaneously, the SARIMA algorithm is used to identify seasonality and periodicity in the electricity data. Furthermore, Pearson correlation coefficient analysis is employed to analyze the correlation between electricity data from different time periods. By calculating the correlation coefficient between historical electricity data from other time periods and the target time period's electricity data, historical data significantly correlated with the prediction point are selected as input features for the model, introducing explanatory variables with time-series dependence.

[0027] Furthermore, in step 3: all features are input into the CatBoost model for feature importance evaluation, and then the evaluation is based on the mean absolute percentage error (MAPE), mean absolute error (MAE), root mean square error (RMSE), and coefficient of determination (R²). 2 Multiple performance metrics were used to select the optimal feature subset; specifically: The dynamic trend features extracted based on EWMA, the seasonal and cyclical components identified based on SARIMA, and the relevant historical features screened based on Pearson correlation coefficient are all input into the CatBoost model. The importance of each feature is evaluated using the CatBoost model, and the features are ranked from highest to lowest importance. The sorted features are sequentially input into the CatBoost model to evaluate the prediction performance under different numbers of features. The performance evaluation metrics include mean absolute percentage error, mean absolute error, root mean square error, and coefficient of determination. The optimal number of features is determined by comprehensively considering the multiple performance indicators, thus forming the optimal feature subset. Further, in step 4: the feature subset is input into the CatBoost and XGBoost models respectively, and the hyperparameters are optimized using a random search strategy. Finally, the prediction results of each model are fused through a weighted ensemble method, with the goal of minimizing the root mean square error (RMSE) of the fusion result. The optimal weight combination is determined through random search. Specifically: The selected optimal feature sets are input into the CatBoost and XGBoost models for training and prediction, respectively. A random search algorithm is used to optimize the hyperparameters of both models to improve their individual prediction performance. Then, the prediction results from CatBoost and XGBoost are fused using a weighted method, and the weight allocation is optimized using the same random search strategy. The optimization objective is to minimize the root mean square error (RMSE) of the fused result, thereby determining the optimal weight combination. The final fused prediction result is used to output the predicted electricity consumption values ​​at different time granularities.

Claims

1. A multi-time-granularity power prediction method based on a gradient boosting ensemble model, characterized in that: Includes the following steps: Step 1: Obtain historical electricity consumption data of multiple users at different time granularities, use K-Means clustering method to cluster users, group users with similar electricity consumption behavior into one category, and aggregate the electricity consumption data of users in each category into a virtual user's electricity consumption data sequence; Step 2: For the electricity consumption data sequences of the virtual users at different time granularities, the dynamic trend features are extracted using the Exponential Weighted Moving Average (EWMA) method, the seasonal differential autoregressive moving average (SARIMA) model is used to capture seasonal variation patterns, and the correlation between different time periods is analyzed by combining the Pearson correlation coefficient to construct a comprehensive feature set. Step 3: Input all features into the CatBoost model for feature importance evaluation, and then evaluate the feature importance based on the mean absolute percentage error (MAPE), mean absolute error (MAE), root mean square error (RMSE), and coefficient of determination (R²). 2 Multiple performance metrics were used to select the optimal feature subset. Step 4: Input the optimal feature subset into the CatBoost and XGBoost models respectively for training, and use a random search strategy to optimize the hyperparameters of each model. Then, fuse the prediction results of each optimized model through a weighted ensemble method. The optimal weight combination is determined with the goal of minimizing the root mean square error of the fusion result, and the final power prediction value is obtained.

2. The multi-time granularity power prediction method based on the gradient boosting ensemble model according to claim 1, characterized in that: In step 1, the K-Means clustering method is used to cluster users, including: Based on users’ historical electricity consumption data, the elbow rule is used to calculate the dispersion of data within groups under different numbers of groups, and the most suitable number of clusters for the K-Means algorithm is selected. If there is a category with an excessively large number of users after clustering, then the category is recursively subdivided until the distribution of users in each category is relatively balanced or the dispersion of data within the category no longer decreases significantly.

3. The multi-time-granularity power prediction method based on the gradient boosting ensemble model according to claim 1, characterized in that: In step 2, extracting dynamic trend features using the EWMA method includes: The decreasing weight allocation mechanism of the exponentially weighted moving average algorithm is used to strengthen the contribution of recent data to the current estimate, while gradually weakening the influence of long-term data, in order to extract short-term fluctuations and long-term trend information of electricity data. Based on the EWMA base value, trend characteristics, volatility characteristics, momentum characteristics, directional characteristics, and second-order trend characteristics are constructed.

4. The multi-time-granularity power prediction method based on the gradient boosting ensemble model according to claim 1, characterized in that: Step 2, which uses the SARIMA model to capture seasonal variation patterns, includes using the SARIMA algorithm to identify seasonality and periodicity in electricity data.

5. The multi-time-granularity power prediction method based on the gradient boosting ensemble model according to claim 1, characterized in that: In step 2, the correlation analysis between different time periods using the Pearson correlation coefficient includes: calculating the correlation coefficient between historical electricity data of other time periods and electricity data of the target time period, and selecting previous historical data that are significantly related to the prediction point as input features of the model.

6. The multi-time granularity power prediction method based on the gradient boosting ensemble model according to claim 1, characterized in that: In step 3, selecting the optimal feature subset includes: The importance of each feature is evaluated using the CatBoost model, and the features are ranked from highest to lowest importance. The sorted features are then input into the CatBoost model sequentially to evaluate the prediction performance under different numbers of features. The optimal number of features is determined by comprehensively considering multiple performance indicators, including mean absolute percentage error, mean absolute error, root mean square error, and coefficient of determination.

7. The multi-time granularity power prediction method based on the gradient boosting ensemble model according to claim 1, characterized in that: In step 4, optimizing hyperparameters using a random search strategy includes: using a random search algorithm to optimize the hyperparameters of the CatBoost model and the XGBoost model respectively.

8. The multi-time-granularity power prediction method based on the gradient boosting ensemble model according to claim 1, characterized in that: In step 4, fusing the prediction results of each model through weighted integration includes: fusing the prediction results generated by CatBoost and XGBoost through weighted integration, and optimizing the weight allocation based on a random search strategy, with the optimization objective being to minimize the root mean square error of the fusion result.

9. The multi-time-granularity power prediction method based on the gradient boosting ensemble model according to claim 1, characterized in that: The different time granularities include daily peaks, flats, valleys, or 24-hour periods.

10. The multi-time granularity power prediction method based on the gradient boosting ensemble model according to claim 1, characterized in that: In step 4, determining the optimal weight combination with the goal of minimizing the root mean square error of the fusion result includes: optimizing the prediction weights of CatBoost and XGBoost through a random search strategy to minimize the root mean square error of the weighted fusion result.