Power load prediction method and electronic device
Patent Information
- Application Number
- CN202610764589.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-29
- Publication Date
- 2026-09-22
AI Technical Summary
首先,传统统计模型和单一机器学习模型在处理复杂的非线性特征和多源数据时能力有限,难以有效融合气象、节假日等外部因素对负荷的动态影响
[0019]从上面所述可以看出,本申请提供的电力负荷预测方法和电子设备,获取负荷数据以及与所述负荷数据对应的气象数据和日期数据;基于所述负荷数据、所述气象数据和所述日期数据构建多源特征;利用混合预测模型对所述多源特征进行处理,得到基础预测结果;所述混合预测模型包括用于提取时序依赖的第一模型和用于融合多源特征的第二模型;对所述基础预测结果进行动态权重修正,得到修正预测结果;根据预测日所处的节假日阶段,对所述修正预测结果进行时间衰减修正,得到最终预测结果。本申请实施例通过获取负荷数据、气象数据以及日期数据,全面整合电力负荷变化的多维影响因素。在预测过程中,不仅充分考虑了历史负荷的时间依赖性和短期变化趋势,还融合了气象条件和日期特性,使得预测模型能够全面反映负荷变化的驱动机制。通过构建时序特征、气象特征和节假日特征,模型能够有效刻画负荷的动态规律、环境影响和社会节奏变化,充分利用数据的潜在信息,提升预测的精准性。采用混合预测模型的架构,其中第一模型负责提取负荷数据的时间依赖关系,第二模型负责融合多源特征并进行最终预测,充分发挥了深度学习的时序建模能力和机器学习的多源特征处理能力,确保预测结果的科学性和全面性。在此基础上,本申请引入动态权重修正机制,利用SHAP值量化各特征的重要性,并结合预测日的特征偏离程度,对基础预测结果进行动态调整,从而增强模型对负荷异常波动和极端场景的适应性。同时,针对节假日对负荷的特殊影响规律,构建节假日影响因子并结合节假日阶段划分规则进行时间衰减修正,通过分阶段处理节前下降期、节中低谷期和节后恢复期的负荷变化,有效提升了节假日场景下的预测精度。整体而言,本申请通过多源特征构建、混合预测模型、动态权重修正和节假日时间衰减修正的协同处理,显著提高了负荷预测方法的适应性和精确性,为电力系统的规划与调度提供了可靠的技术支持。
Smart Images

Figure CN122801209A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power load forecasting technology, and in particular to a power load forecasting method and electronic device. Background Technology
[0002] Electricity load forecasting is a crucial aspect of power system planning and dispatching, widely applied in load management, electricity market trading, and grid operation optimization. Current technologies primarily rely on statistical and machine learning models, such as ARIMA (Age-In-Time Modeling) and Support Vector Machines (SVM). These methods utilize historical load data and some external features for forecasting, meeting the basic requirements of short-term load forecasting to a certain extent. Meanwhile, with the rise of deep learning technology, models such as Recurrent Neural Networks (RNNs) and Long Short-Term Memory Networks (LSTMs) are increasingly being used for time series modeling, demonstrating better performance in capturing the time dependencies of load changes.
[0003] However, existing technologies still have many shortcomings. First, traditional statistical models and single machine learning models have limited capabilities when dealing with complex nonlinear features and multi-source data, making it difficult to effectively integrate the dynamic impact of external factors such as weather and holidays on the load. Second, while deep learning-based models can capture time-series dependencies, they have weak interpretability of external features and are susceptible to overfitting. Furthermore, existing technologies handle load changes in special scenarios (such as holidays) in a relatively simplistic way, failing to fully consider the phased load fluctuation patterns during holidays. Summary of the Invention
[0004] In view of this, the purpose of this application is to propose a power load forecasting method and electronic device.
[0005] To achieve the above objectives, this application provides a power load forecasting method, comprising:
[0006] Acquire load data and the corresponding meteorological and date data; Multi-source features are constructed based on the load data, the meteorological data, and the date data; The multi-source features are processed using a hybrid prediction model to obtain basic prediction results; the hybrid prediction model includes a first model for extracting temporal dependencies and a second model for fusing multi-source features; The basic prediction results are dynamically weighted to obtain the corrected prediction results; Based on the holiday period in which the prediction date falls, the revised prediction result is adjusted for time decay to obtain the final prediction result.
[0007] In one possible implementation, constructing multi-source features based on the load data, the meteorological data, and the date data includes: Time-series characteristics are determined based on the load data; the time-series characteristics include historical load sequences. Meteorological characteristics are determined based on the meteorological data; The characteristics of holidays are determined based on the date data.
[0008] In one possible implementation, processing the multi-source features using a hybrid prediction model to obtain the basic prediction result includes: The historical load sequence is input into the first model to extract deep temporal features; The deep temporal features are concatenated with other features in the temporal features, the meteorological features, and the holiday features to obtain a fused feature vector; The fused feature vector is input into the second model for prediction to obtain the basic prediction result.
[0009] In one possible implementation, the first model is a long short-term memory network, and the second model is a lightweight gradient booster.
[0010] In one possible implementation, the step of dynamically weighting the basic prediction result to obtain the corrected prediction result includes: Based on the SHAP value of the second model, the importance score of each feature in the multi-source features is determined; The average importance score of each feature in the multi-source features within the recent time window is determined based on the importance score, and the dynamic weight is obtained. Calculate the deviation of each feature in the multi-source features of the predicted day from the historical mean; Based on the dynamic weights and the deviation, the basic prediction result is dynamically weighted and corrected to obtain the corrected prediction result.
[0011] In one possible implementation, the dynamic weights are calculated using the following formula:
[0012] in, Indicates the first i Dynamic weights of each feature Indicates the first i The average SHAP value of each feature within the recent window.
[0013] In one possible implementation, the deviation is calculated using the following formula:
[0014] in, Indicates the predicted day i The value of each feature, and This represents the historical mean and standard deviation of the feature.
[0015] In one possible implementation, the corrected prediction result is calculated using the following formula:
[0016] in, This represents the predicted load after multi-factor correction. Indicates the basic forecast load, Indicates the first i Dynamic weights of each feature Indicates the first i Deviation of each feature This represents the correction factor, which controls the correction range.
[0017] In one possible implementation, the step of applying time decay correction to the revised prediction result based on the holiday period of the prediction date to obtain the final prediction result includes: Determine whether the predicted date falls within the period affected by holidays. If so, apply time decay correction to the modified prediction result based on the pre-constructed holiday impact factor to obtain the final prediction result. If not, use the modified prediction result as the final prediction result.
[0018] Based on the same inventive concept, embodiments of this application also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the power load forecasting method as described in any of the above.
[0019] As described above, the power load forecasting method and electronic device provided in this application acquire load data and corresponding meteorological and date data; construct multi-source features based on the load data, meteorological data, and date data; process the multi-source features using a hybrid forecasting model to obtain basic forecast results; the hybrid forecasting model includes a first model for extracting time-series dependencies and a second model for fusing multi-source features; dynamically weight-correct the basic forecast results to obtain corrected forecast results; and perform time decay correction on the corrected forecast results according to the holiday period of the forecast date to obtain the final forecast result. This application's embodiments comprehensively integrate the multi-dimensional influencing factors of power load changes by acquiring load data, meteorological data, and date data. During the forecasting process, not only are the time dependencies and short-term trends of historical loads fully considered, but meteorological conditions and date characteristics are also integrated, enabling the forecasting model to comprehensively reflect the driving mechanism of load changes. By constructing time-series features, meteorological features, and holiday features, the model can effectively characterize the dynamic patterns of load, environmental impacts, and changes in social rhythms, fully utilizing the potential information in the data and improving the accuracy of forecasts. This paper adopts a hybrid prediction model architecture, where the first model is responsible for extracting the time dependencies of load data, and the second model is responsible for fusing multi-source features and making the final prediction. This fully leverages the temporal modeling capabilities of deep learning and the multi-source feature processing capabilities of machine learning, ensuring the scientific rigor and comprehensiveness of the prediction results. Building upon this, the paper introduces a dynamic weight correction mechanism. This mechanism uses SHAP values to quantify the importance of each feature and dynamically adjusts the basic prediction results based on the feature deviation on the prediction day, thereby enhancing the model's adaptability to abnormal load fluctuations and extreme scenarios. Simultaneously, considering the unique impact of holidays on load, a holiday impact factor is constructed and time decay correction is applied using holiday phase division rules. By processing load changes in stages—the pre-holiday decline period, the mid-holiday trough period, and the post-holiday recovery period—the prediction accuracy under holiday scenarios is effectively improved. Overall, this paper, through the synergistic processing of multi-source feature construction, hybrid prediction models, dynamic weight correction, and holiday time decay correction, significantly improves the adaptability and accuracy of load prediction methods, providing reliable technical support for power system planning and dispatch. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1This is a schematic flowchart of the power load forecasting method according to an embodiment of this application; Figure 2 This is a schematic diagram of the electronic device structure according to an embodiment of this application. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.
[0023] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this application should have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms "first," "second," and similar terms used in the embodiments of this application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are only used to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0024] It is understood that before using the technical solutions of the various embodiments in this disclosure, users will be informed of the type, scope of use, and usage scenarios of the personal information involved in an appropriate manner, and user authorization will be obtained.
[0025] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose, based on the prompt message, whether to provide personal information to the software or hardware such as electronic devices, applications, servers, or storage media performing the operations of this disclosed technical solution.
[0026] As an optional but not limited implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0027] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0028] As described in the background section, power load forecasting is a crucial aspect of power system planning and dispatching, widely applied in load management, electricity market trading, and grid operation optimization. Existing technologies, such as traditional time series models (ARIMA) and support vector machines (SVM), can utilize historical load data and some external features for forecasting, meeting certain short-term load forecasting needs. Meanwhile, deep learning techniques, such as recurrent neural networks (RNN) and long short-term memory networks (LSTM), show good performance in capturing the time dependence of load. However, existing technologies have limited capabilities in handling complex nonlinear features and multi-source data, making it difficult to effectively integrate the dynamic impact of external factors such as weather and holidays on load. While deep learning models excel at time series modeling, they have weak interpretability of external features and are susceptible to overfitting. Furthermore, existing technologies handle load fluctuations in special scenarios such as holidays in a relatively simplistic manner, failing to fully consider phased patterns, resulting in larger forecast errors during holiday scenarios and limiting their practical application value.
[0029] Based on the above considerations, this application proposes a power load forecasting method. The method involves acquiring load data and corresponding meteorological and date data; constructing multi-source features based on the load data, meteorological data, and date data; processing the multi-source features using a hybrid forecasting model to obtain a basic forecast result; the hybrid forecasting model includes a first model for extracting time-series dependencies and a second model for fusing multi-source features; dynamically adjusting the weights of the basic forecast result to obtain a revised forecast result; and applying time decay correction to the revised forecast result based on the holiday period of the forecast date to obtain the final forecast result. This application integrates multi-dimensional influencing factors of power load changes by acquiring load data, meteorological data, and date data, comprehensively considering the time dependence, short-term trends, and meteorological and date characteristics of historical loads, thereby improving forecast accuracy. By constructing time-series features, meteorological features, and holiday features, the model can characterize the dynamic patterns of load, environmental impacts, and changes in social rhythms. The hybrid forecasting model architecture, where the first model extracts the time dependencies of load data and the second model fuses multi-source features for forecasting, combines the advantages of deep learning and machine learning to ensure the scientific validity of the forecast results. Based on a dynamic weight correction mechanism, this paper utilizes SHAP values to quantify the importance of features and dynamically adjusts the prediction results by combining the deviation of features on the prediction day, thereby enhancing the model's adaptability to abnormal load fluctuations and extreme scenarios. Simultaneously, by addressing holiday impact factors and processing load changes in stages—pre-holiday decline, mid-holiday trough, and post-holiday recovery—the prediction accuracy under holiday scenarios is effectively improved. This application significantly improves the adaptability and accuracy of load forecasting methods, providing reliable support for power system planning and dispatch.
[0030] The technical solutions of the embodiments of this application will be described in detail below through specific examples.
[0031] refer to Figure 1 The power load forecasting method of this application includes the following steps: Step S101: Obtain load data and corresponding meteorological and date data; Step S102: Construct multi-source features based on the load data, the meteorological data, and the date data; Step S103: The multi-source features are processed using a hybrid prediction model to obtain a basic prediction result; the hybrid prediction model includes a first model for extracting temporal dependencies and a second model for fusing multi-source features; Step S104: Dynamically adjust the weights of the basic prediction results to obtain the corrected prediction results; Step S105: Based on the holiday period of the predicted date, perform time decay correction on the modified prediction result to obtain the final prediction result.
[0032] For step S101, load data and meteorological data and date data corresponding to the load data are acquired.
[0033] In this embodiment, load data is the core input of the entire model, primarily consisting of historical load data at 96 points, representing the electricity load value every 15 minutes of the day (typically, a day is divided into 96 time points). To ensure the accuracy of the prediction and the model's generalization ability, the load data needs to cover a time span of at least one year. For example, assuming the goal is to predict the short-term load of an industrial park, it is necessary to obtain the industrial park's electricity consumption data for the past year, with the daily load data recorded as 96 time-series data points. This data can be directly extracted from the power company's electricity metering system or collected through smart meters or other power monitoring equipment. Load data reflects the trend of electricity load changes at different times of the day; for example, in a commercial area, electricity consumption rises rapidly during the morning peak hours (e.g., 8:00 AM to 10:00 AM) and decreases significantly during the late night hours (e.g., 1:00 AM to 4:00 AM).
[0034] Secondly, meteorological data corresponding to the load data is also an important input for this application. Meteorological data mainly includes daily average temperature, maximum temperature, minimum temperature, temperature difference, and weather type (such as sunny, cloudy, overcast, rainy, snowy, etc.). This data can be obtained through meteorological observation stations or publicly available online meteorological data interfaces (such as the National Meteorological Administration API, third-party meteorological service providers). For example, for load forecasting of a residential community, meteorological data for the area where the community is located over the past year can be collected. Assume the meteorological data for a certain day is: daily average temperature 25℃, maximum temperature 30℃, minimum temperature 20℃, temperature difference 10℃, and weather type "sunny". This meteorological information can reflect the significant impact of weather changes on electricity load. For example, during sunny and hot summer days, electricity consumption usually increases significantly due to increased air conditioning load, while electricity load may decrease relatively on cloudy and rainy days.
[0035] In addition, date data is an indispensable auxiliary information in load forecasting models, mainly including whether it is a weekday, whether it is a holiday, the type of holiday, and the number of days until the holiday. This data can be generated through calendar interfaces or custom rules. For example, for date data of a certain year, the "weekday" and "holiday" attributes can be marked. For example, October 1, 2023 is National Day (a statutory holiday), and its holiday type is "National Statutory Holiday," with 0 days until the holiday; while October 2, 2023 is the second day of the National Day holiday, and the holiday type is still "National Statutory Holiday," with 1 day until the holiday. Furthermore, date data can also indicate the work recovery phase after holidays. For example, the first working day after the Spring Festival usually represents a rapid increase in applied electricity load. This type of information helps the model capture the phased impact of holidays on electricity consumption behavior.
[0036] After data collection is complete, further data preprocessing can be performed, including steps such as missing value imputation, outlier identification, and time alignment. For example, for a few missing time points in the load data, the average of adjacent time points can be used for imputation; for outliers in meteorological data (such as significant jumps in daily average temperature), they can be identified and corrected using the upper and lower quartile ranges of historical data. Through such processing, complete and consistent load, meteorological, and date data are finally generated, laying a solid foundation for subsequent feature extraction and modeling.
[0037] Furthermore, in step S102, multi-source features are constructed based on the load data, the meteorological data, and the date data.
[0038] In some embodiments, constructing multi-source features based on the load data, the meteorological data, and the date data includes: determining time-series features based on the load data; the time-series features include historical load sequences; determining meteorological features based on the meteorological data; and determining holiday features based on the date data.
[0039] In this embodiment, firstly, the extracted time-series features for the load data mainly include historical load sequences and statistical characteristics of the load. When predicting the load for a specific day, load data from a period prior to that day is selected as input, typically a load sequence from the most recent 30 to 60 days. For example, to predict the load on October 10, 2023, 96 load data points from September 10, 2023 to October 9, 2023 can be extracted to form a two-dimensional time-series matrix of size (L×96), where L is the number of days and 96 represents the number of time points per day. These historical load sequences help the model capture the time-series dependence of the load. Furthermore, statistical characteristics can be calculated from the load data, such as the load mean, standard deviation, maximum value, and minimum value for the past 7, 14, and 30 days. These statistics reflect the overall trend and fluctuation range of the load. For example, the load mean for the past 7 days can represent a stable center of a certain short-term load, while the standard deviation reflects the fluctuation range. In addition, differential load characteristics and growth rates can be calculated, such as the difference between the daily total load and the previous day's load, and the month-on-month growth rate, thereby capturing dynamic information about load change trends. For cyclical load characteristics, such as the significant differences between weekday and weekend loads, this can be described using cyclical feature encoding, including hourly codes (0-23), day-of-the-week codes (0-6), and month codes (1-12). These features help the model uncover cyclical patterns in the load. For example, the load in a commercial area may be significantly higher at midday on weekends (hourly codes 11-13, day-of-the-week code 6) than during weekday mornings.
[0040] Secondly, various meteorological features can be extracted from meteorological data. These features directly reflect the impact of weather on electricity consumption. For example, basic meteorological information such as daily average temperature, maximum temperature, minimum temperature, and temperature difference can be extracted and directly used as model input. For instance, if the daily average temperature is 30℃ and the temperature difference is 15℃, this information can directly reflect the impact of external weather conditions on the load of equipment such as air conditioners or heating systems. Furthermore, the changing characteristics of meteorological data can be calculated, such as the average temperature difference between the predicted day and the previous day, representing the short-term fluctuation range of temperature, thereby capturing the instantaneous impact of meteorological changes on the load. Weather types (such as sunny, cloudy, overcast, rainy, snowy, etc.) can also be encoded as categorical variables, for example, using one-heat coding to convert each weather type into a numerical form. Taking a day in a certain region as an example, the meteorological data includes "sunny, daily average temperature of 25℃, temperature difference of 10℃, and the previous day's average temperature of 22℃". Features such as "sunny day code (e.g., 1,0,0,0,0)", "daily average temperature of 25℃", "temperature difference of 10℃", and "temperature change of 3 (25-22℃)" can be extracted. In this way, meteorological features can comprehensively reflect the impact of weather conditions on users' electricity consumption behavior.
[0041] Finally, holiday features are extracted based on the date data. These features can reflect the significant impact of holidays on social activities and electricity consumption habits. Specifically, the following feature variables can be constructed: whether it is a holiday (1 represents a holiday, 0 represents a non-holiday), the type of holiday (such as "Spring Festival", "National Day", etc.), and the number of days until the nearest holiday (positive values represent the number of days until the next holiday, negative values represent the number of days until the previous holiday). For example, October 1, 2023 is National Day, so "Holiday Identifier = 1", "Holiday Type = National Day", and "Number of Days Until Holiday = 0" can be extracted; while September 30, 2023 is the last day before the holiday, so "Holiday Identifier = 0" and "Number of Days Until Holiday = -1" can be extracted. In addition, to characterize the different impacts of holidays on different industries, holiday features can be further refined by combining industry type labels, such as industrial, commercial, and residential. For example, during the Spring Festival, industrial electricity load may decrease significantly, while residential electricity load may increase due to family gatherings. This difference can be reflected by combining industry labels and holiday features. Through these features, the model can effectively capture the phased impact of holidays on electricity consumption behavior in different industries and at different times.
[0042] In practical implementation, the above three types of features can be organically combined to form a complete feature vector. For example, when predicting the load on October 10, 2023, the following features can be extracted: time-series features, including the 96-point load sequence from September 10, 2023 to October 9, 2023, the load mean and standard deviation over the past 7 days, and hourly codes (e.g., if the prediction period is 10 o'clock, the code is 10); meteorological features, including the weather type code for October 10, 2023 (e.g., sunny is [1,0,0,0,0]), daily average temperature, temperature difference, and the change in temperature from the previous day; and holiday features, including "holiday identifier = 0" and "number of days until National Day = 3". These features can be combined to form a unified input vector, which corresponds to the target load value, and used for subsequent model training and prediction.
[0043] By constructing the aforementioned multi-source features, key factors in load changes can be comprehensively characterized, including both the temporal dependence of historical loads and the impact of external environments such as weather conditions and holidays on electricity consumption behavior. This multi-level, multi-category feature system lays a solid foundation for high-precision prediction models.
[0044] Furthermore, in step S103, the multi-source features are processed using a hybrid prediction model to obtain a basic prediction result; the hybrid prediction model includes a first model for extracting temporal dependencies and a second model for fusing multi-source features.
[0045] In some embodiments, the process of using a hybrid prediction model to process the multi-source features to obtain a basic prediction result includes: inputting the historical load sequence into the first model to extract deep time-series features; concatenating the deep time-series features with other features in the time-series features, the meteorological features, and the holiday features to obtain a fused feature vector; and inputting the fused feature vector into the second model for prediction to obtain a basic prediction result.
[0046] In some embodiments, the first model is a long short-term memory network, and the second model is a lightweight gradient booster.
[0047] In this embodiment, the historical load sequence is first input into the first model for processing. The first model employs a Long Short-Term Memory (LSTM) network, which excels at capturing long-term dependencies and non-linear variation characteristics in time series data. For example, to predict the load on October 10, 2023, the historical load sequence from September 10, 2023 to October 9, 2023 can be selected as input. Assuming the time dimension of this data is 30 days, with 96 time points per day, the shape of the input is (30×96, 1), where 30×96 is the time step and 1 is the feature dimension. The LSTM network structure typically consists of multiple stacked layers, such as a two-layer LSTM stacked architecture: the first LSTM layer processes the input sequence and returns the complete time series, while the second LSTM layer receives the output of the first layer and only returns the hidden state of the last time step. The hidden state can be viewed as a deep temporal feature vector of the historical load sequence, containing the time dependencies and dynamic variation patterns of the load data. To avoid overfitting, a Dropout layer is added after each LSTM layer to improve the robustness of the model by randomly discarding the output of some neurons. For example, after two layers of LSTM processing, a deep time series feature vector of length D (e.g., D=128) is obtained, which condenses the core change pattern of the load sequence over the past 30 days.
[0048] Subsequently, the deep time-series features output by the LSTM are concatenated with other multi-source features to form a fused feature vector. Specifically, in addition to the deep time-series features extracted from historical load sequences, other statistical measures (such as the mean and standard deviation of the load over the past 7 days), meteorological features (such as the average temperature, temperature difference, and weather type code for the forecast day), and holiday features (such as holiday identifiers and the number of days until the holiday) are also included. For example, when forecasting the load on October 10, 2023, assuming the size of the deep time-series feature vector extracted by the LSTM is (1×128), the size of other statistical features (such as mean, standard deviation, and difference) is (1×10), the size of meteorological features is (1×6), and the size of holiday features is (1×3), then the size of the concatenated fused feature vector is (1×147). This fused feature vector contains both the time-dependent information of the load sequence and the influencing factors of the external environment, providing global information support for the prediction model.
[0049] Next, the fused feature vector is input into the second model for processing. The second model employs Lightweight Gradient Boosting Machine (LightGBM), an efficient gradient boosting decision tree algorithm with fast training speed and excellent prediction performance. LightGBM effectively handles high-dimensional features through its decision tree structure and automatically mines non-linear relationships between features based on feature split points. For example, in LightGBM, each column of the fused feature vector (such as average temperature in meteorological features, or holiday identifiers in holiday features) is used as feature input. The model constructs multiple weak decision trees and performs weighted ensemble, ultimately outputting load prediction values for 96 time points (i.e., load values every 15 minutes throughout the day). LightGBM uses mean squared error (MSE) as the loss function, and through continuous iterative optimization, minimizes the error between the predicted values and the actual load values. For example, during training, the model dynamically adjusts the split points and weights of each feature, making the prediction results closer to reality.
[0050] In some embodiments, the hybrid forecasting model is trained using a 5-fold cross-validation strategy. Specifically, historical data is randomly divided into five parts, with four parts used as the training set and one part as the validation set, repeated five times to ensure the model's generalization ability. After training, the model can output basic forecast results, i.e., load values at 96 time points on the forecast day, which reflect preliminary electricity load estimates under current characteristic conditions. For example, in the forecast for October 10, 2023, the model might output the following basic forecast results: a load value of 10.5kW at the first time point (00:00-00:15), a load value of 10.7kW at the second time point (00:15-00:30), and so on, ultimately outputting 96 load forecast values.
[0051] Utilizing a hybrid architecture of LSTM and LightGBM leverages the strengths of both. LSTM excels at capturing the temporal dependencies of load sequences, while LightGBM efficiently processes multi-source features and uncovers nonlinear relationships between them. By combining deep learning and traditional machine learning, the hybrid model not only improves the accuracy of predictions but also offers a degree of interpretability. For example, analyzing the decision tree structure of LightGBM can identify which features contribute most to the predictions, providing a basis for subsequent dynamic adjustments. Therefore, the foundational predictions based on the hybrid model lay a solid foundation for subsequent steps such as weight adjustments and holiday time decay corrections.
[0052] Furthermore, in step S104, the basic prediction results are dynamically weighted to obtain the corrected prediction results.
[0053] In some embodiments, the step of dynamically weighting the basic prediction result to obtain a corrected prediction result includes: determining the importance score of each feature in the multi-source features based on the SHAP value of the second model; determining the average importance score of each feature in the multi-source features within a recent time window based on the importance score to obtain a dynamic weight; calculating the deviation of each feature in the multi-source features relative to the historical mean on the prediction date; and dynamically weighting the basic prediction result based on the dynamic weight and the deviation to obtain the corrected prediction result.
[0054] In some embodiments, the dynamic weights are calculated using the following formula:
[0055] in, Indicates the first i Dynamic weights of each feature Indicates the first i The average SHAP value of each feature within the recent window.
[0056] In some embodiments, the deviation is calculated using the following formula:
[0057] in, Indicates the predicted day i The value of each feature, and This represents the historical mean and standard deviation of the feature.
[0058] In some embodiments, the corrected prediction result is calculated using the following formula:
[0059] in, This represents the predicted load after multi-factor correction. Indicates the basic forecast load, Indicates the first i Dynamic weights of each feature Indicates the first i Deviation of each feature This represents the correction factor, which controls the correction range.
[0060] In this embodiment, the basic prediction results are optimized through dynamic weight correction to further improve the accuracy of prediction and adaptability to anomalies. Specifically, based on the SHAP value calculated by the second model (such as LightGBM), the marginal contribution of each feature in the multi-source features to the prediction results is quantified, and the basic prediction results are weighted and corrected by combining the deviation of the feature values of the prediction day and the dynamic weights, finally generating the corrected prediction results.
[0061] In practice, the importance scores of multi-source features are first determined using SHAP (SHapley Additive exPlanations). SHAP is a tool for interpreting the output of a machine learning model; it quantitatively assesses feature importance by calculating the marginal contribution of each feature to the prediction result. For example, when predicting the load for a particular day, the meteorological feature "daily average temperature" may have a significant impact on the prediction result, and its corresponding SHAP value may be high, while the holiday feature "days until holiday" contributes less in some non-holiday scenarios, and its SHAP value may be low. For each feature's SHAP value, it can be averaged in the prediction samples to obtain the average importance score of that feature within a recent time window (e.g., the last 30 days). Assuming that the average SHAP value of "daily average temperature" is 0.45 and the average SHAP value of "days until holiday" is 0.12 over the past 30 days, this reflects that "daily average temperature" has higher importance in the recent load forecasting task.
[0062] Based on the importance scores mentioned above, dynamic weights are further calculated to reflect the proportion of importance of each feature in the current prediction scenario. For example, assuming the average SHAP values of three features are 0.45, 0.25, and 0.12, their dynamic weights are 0.52, 0.29, and 0.19, respectively. These dynamic weights can effectively reflect the relative importance of different features in the recent prediction scenario.
[0063] Next, the deviation of each feature for the predicted day is calculated to quantify the degree of deviation of the current predicted day's feature value from the historical mean. For example, assuming the "daily average temperature" for a certain region on the predicted day is 30℃, while the historical mean and standard deviation are 25℃ and 2℃ respectively, then the deviation of this feature is (30-25) / 2=2.5, indicating that the value of this feature is significantly higher than the historical mean. Similarly, the deviation of other features can also be calculated using this formula to reflect the degree of anomaly of the current predicted feature.
[0064] By combining dynamic weights and deviations, the basic forecast results are corrected, ultimately yielding the revised forecast results. For example, assuming the basic forecast load... 100kW, dynamic weight , , The deviations are 0.5, 0.3, and 0.2 respectively. , , The values are 2, 1, and -0.5 respectively, and the correction factor γ is 0.1. Therefore, the corrected predicted load is... =100×(1+(0.5×2+0.3×1-0.2×0.5)×0.1)=105.5kW. Through this process, the model can dynamically adjust the predicted load according to the degree and importance of the current characteristics, thereby improving its ability to respond to emergencies.
[0065] The core logic of dynamic weight correction lies in this: if a feature has a large deviation and a high dynamic weight, the correction to the prediction result will be larger; conversely, if the feature's deviation is close to 0 or its dynamic weight is low, the correction to the prediction result will be smaller. For example, under extreme weather conditions, an abnormal increase in the "daily average temperature" may lead to a surge in air conditioning load. Because this feature has a high dynamic weight and a large deviation, the correction formula will significantly increase the predicted load value to match the actual situation; however, if the weather change is not significant and the load change is relatively stable, the correction will be smaller.
[0066] This approach, based on SHAP value-based importance quantification, dynamic weight generation, and deviation correction, effectively enhances the adaptability and robustness of the prediction model, especially in scenarios with complex load characteristics and volatile external influencing factors. The resulting corrected predictions more accurately reflect actual load demand, providing reliable support for power dispatch and resource optimization.
[0067] Furthermore, in step S105, the modified prediction result is time-decayed based on the holiday period of the predicted date to obtain the final prediction result.
[0068] In some embodiments, the step of applying time decay correction to the modified prediction result based on the holiday period in which the prediction date falls to obtain the final prediction result includes: determining whether the prediction date is in the holiday period; if so, applying time decay correction to the modified prediction result based on a pre-constructed holiday impact factor to obtain the final prediction result; if not, using the modified prediction result as the final prediction result.
[0069] In some embodiments, the final prediction result is represented by the following formula:
[0070] in, This indicates the final prediction result. This indicates the impact factor of holidays.
[0071] In some embodiments, the holiday impact factor is expressed by the following formula:
[0072] in, Indicates the first i The first industry jThe holiday impact factors for each long holiday, a, b, c, d, and e, were all determined by fitting historical data.
[0073] In this embodiment, the first step is to determine whether the prediction date falls within a holiday period. This determination is based on the holiday identifier and holiday type information in the date data. For example, for October 1, 2023 (the first day of the National Day holiday), the holiday identifier is 1, and the holiday type is "National Day," so the prediction date is determined to be within the holiday period. However, for October 10, 2023 (a working day), the holiday identifier is 0, so the prediction date is not within the holiday period. If the prediction date is not within the holiday period, the revised prediction result is directly used as the final prediction result, without further adjustments.
[0074] If the forecast date falls within the period affected by a holiday, the revised forecast result is adjusted for time decay based on the pre-constructed holiday impact factor to obtain the final forecast result. Holiday impact factor This paper describes the impact of holidays on electricity load at different stages (before, during, and after the holiday). By analyzing the load variation patterns of different industries during historical long holidays, the impact of holidays can be divided into three stages: a pre-holiday decline period, a mid-holiday trough period, and a post-holiday recovery period. Influence factor functions are fitted for each stage. For example, for historical electricity consumption data of an industrial park, it can be observed that electricity load gradually decreases from 7 days to 1 day before the holiday, reaches a trough from the first to the last day of the holiday, and gradually recovers from the first to the 7th day after the holiday. Based on these patterns, the holiday influence factor can be represented by a piecewise function, as described above.
[0075] Specifically, assuming that the load variation pattern of a certain industry during the National Day holiday has been fitted with an influencing factor function using historical data, and if the prediction date is the third day of the National Day holiday (the mid-holiday trough), and the prediction results are corrected... The power consumption is 100kW, and the impact factor during holidays is also considered. The final prediction result =100 × 0.8 = 80kW, indicating that the off-peak effect of the National Day holiday led to a 20% reduction in load. Similarly, if the forecast date is two days before the holiday (the pre-holiday downturn period), and =a×t+b=-0.05×2+1=0.9, then the final prediction result is... =100×0.9=90kW, reflecting the gradual downward trend of load before the holiday.
[0076] By incorporating holiday impact factors, this method can adjust the prediction results in a targeted manner based on the degree of interference of holidays on electricity load in different industries and at different stages. For example, during the Spring Festival, residential electricity load may increase due to family gatherings and heating demand, while industrial electricity load may decrease significantly due to factory shutdowns. This industry-specific holiday impact can be achieved by separately fitting holiday impact factors for different industries such as industry, commerce, and residential, thereby improving the model's prediction accuracy and applicability.
[0077] Ultimately, the holiday time decay correction combines the corrected forecast results with the holiday impact factor, enabling the final forecast to more accurately reflect the actual load demand under the phased impact of holidays, providing precise support for power dispatch and resource allocation. For example, in a power consumption area encompassing multiple industries, by independently calculating and correcting the holiday impact factor for each industry, more detailed load forecast results can be generated, thereby meeting the business needs of different power consumption scenarios within the area.
[0078] As can be seen from the above embodiments, the power load forecasting method described in this application acquires load data and corresponding meteorological and date data; constructs multi-source features based on the load data, meteorological data, and date data; processes the multi-source features using a hybrid forecasting model to obtain a basic forecast result; the hybrid forecasting model includes a first model for extracting time-series dependencies and a second model for fusing multi-source features; dynamically weights the basic forecast result to obtain a revised forecast result; and performs time decay correction on the revised forecast result according to the holiday period of the forecast date to obtain the final forecast result. This application comprehensively integrates the multi-dimensional influencing factors of power load by acquiring load data, meteorological data, and date data. During the forecasting process, not only are historical load change trends considered, but meteorological conditions and date characteristics are also integrated, enabling the forecasting model to comprehensively reflect the driving mechanism of load changes, thus improving the scientific nature of the forecast and the richness of the data foundation.
[0079] By constructing time-series features, meteorological features, and holiday features, this application achieves a comprehensive characterization of complex load variation patterns. Time-series features extract short-term trends, periodicity, and statistical characteristics from load data; meteorological features capture the impact of environmental variables such as temperature and weather type on load; and holiday features reflect the phased impact of changes in social rhythms on load. This multi-source feature construction method ensures that the model can fully utilize the potential information in the data, improving the accuracy of load forecasting.
[0080] This application proposes a load forecasting method based on a hybrid forecasting model. The first model extracts the temporal dependencies of load data, while the second model fuses multi-source features and performs the final forecast. This architecture effectively combines the temporal modeling capabilities of deep learning with the multi-source feature processing capabilities of machine learning. It can capture the dynamic changes in load and quantify the impact of external environmental factors on the load, significantly improving the model's predictive performance.
[0081] By employing a dynamic weight correction mechanism, this application utilizes SHAP values to quantify the importance of multi-source features and dynamically adjusts the prediction results by combining the deviation of the predicted daily feature values from historical averages. This correction method can adapt to feature changes in different scenarios in real time, and can effectively reduce prediction errors and enhance the model's scenario adaptability, especially for special situations such as abnormal load fluctuations and extreme weather.
[0082] To address the unique impact of holidays on load, this application constructs a holiday impact factor and applies time decay correction to the prediction results by combining holiday phase division rules. By processing load changes in stages—the pre-holiday decline period, the mid-holiday trough period, and the post-holiday recovery period—this application can accurately reflect the load patterns under holiday scenarios and significantly improve the prediction accuracy of the model in holiday scenarios.
[0083] This application employs a collaborative process involving multi-source feature construction, a hybrid prediction model, dynamic weight correction, and holiday time decay correction to develop a power load forecasting method that combines data fusion capabilities, time-series modeling capabilities, and scenario adaptability. This method significantly improves the accuracy and practicality of load forecasting in complex scenarios, providing reliable technical support for power system planning and scheduling.
[0084] It should be noted that the method in this embodiment can be executed by a single device, such as a computer or server. The method can also be applied in a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method in this embodiment, and the multiple devices will interact with each other to complete the method described.
[0085] It should be noted that the above description describes some embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0086] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the power load forecasting method described in any of the above embodiments.
[0087] Figure 2 This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.
[0088] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0089] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.
[0090] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.
[0091] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0092] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.
[0093] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.
[0094] The electronic devices described above are used to implement the corresponding power load forecasting methods in any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0095] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this application (including the claims) is limited to these examples; within the framework of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this application as described above, which are not provided in the details for the sake of brevity.
[0096] Furthermore, to simplify the description and discussion, and to avoid obscuring the embodiments of this application, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of this application, it will be apparent to those skilled in the art that the embodiments of this application may be practiced without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0097] Although this application has been described in conjunction with specific embodiments thereof, many substitutions, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description.
[0098] The embodiments of this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this application should be included within the protection scope of this application.
Claims
1. A method for predicting electricity load, characterized in that, include: Acquire load data and the corresponding meteorological and date data; Multi-source features are constructed based on the load data, the meteorological data, and the date data; The multi-source features are processed using a hybrid prediction model to obtain basic prediction results; the hybrid prediction model includes a first model for extracting temporal dependencies and a second model for fusing multi-source features; The basic prediction results are dynamically weighted to obtain the corrected prediction results; Based on the holiday period in which the prediction date falls, the revised prediction result is adjusted for time decay to obtain the final prediction result.
2. The method according to claim 1, characterized in that, The construction of multi-source features based on the load data, the meteorological data, and the date data includes: Time-series characteristics are determined based on the load data; the time-series characteristics include historical load sequences. Meteorological characteristics are determined based on the meteorological data; The characteristics of holidays are determined based on the date data.
3. The method according to claim 2, characterized in that, The process of using a hybrid prediction model to process the multi-source features to obtain basic prediction results includes: The historical load sequence is input into the first model to extract deep temporal features; The deep temporal features are concatenated with other features in the temporal features, the meteorological features, and the holiday features to obtain a fused feature vector; The fused feature vector is input into the second model for prediction to obtain the basic prediction result.
4. The method according to any one of claims 1 to 3, characterized in that, The first model is a long short-term memory network, and the second model is a lightweight gradient booster.
5. The method according to claim 1, characterized in that, The step of dynamically weighting the basic prediction results to obtain the corrected prediction results includes: Based on the SHAP value of the second model, the importance score of each feature in the multi-source features is determined; The average importance score of each feature in the multi-source features within the recent time window is determined based on the importance score, and the dynamic weight is obtained. Calculate the deviation of each feature in the multi-source features of the predicted day from the historical mean; Based on the dynamic weights and the deviation, the basic prediction result is dynamically weighted and corrected to obtain the corrected prediction result.
6. The method according to claim 5, characterized in that, The dynamic weights are calculated using the following formula: in, Indicates the first i Dynamic weights of each feature Indicates the first i The average SHAP value of each feature within the recent window.
7. The method according to claim 5, characterized in that, The deviation is calculated using the following formula: in, Indicates the predicted day i The value of each feature, and This represents the historical mean and standard deviation of the feature.
8. The method according to claim 5, characterized in that, The corrected prediction result is calculated using the following formula: in, This represents the predicted load after multi-factor correction. Indicates the basic forecast load, Indicates the first i Dynamic weights of each feature Indicates the first i Deviation of each feature This represents the correction factor, which controls the correction range.
9. The method according to claim 1, characterized in that, The step of applying time decay correction to the revised prediction result based on the holiday period of the prediction date to obtain the final prediction result includes: Determine whether the predicted date falls within the period affected by holidays. If so, apply time decay correction to the modified prediction result based on the pre-constructed holiday impact factor to obtain the final prediction result. If not, use the modified prediction result as the final prediction result.
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 computer program, it implements the method as described in any one of claims 1 to 9.