Power intraday price forecasting method based on dynamic holiday weight and multi-source fusion
By using a dynamic holiday weighting and multi-source fusion method, combined with a feedforward neural network and a bagged regression tree model, the problem of uncaptured holiday impacts in the electricity market was solved, achieving high-precision and stable intraday electricity price forecasting.
Patent Information
- Application Number
- CN202511473640.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-15
- Publication Date
- 2026-05-15
- Estimated Expiration
- 2045-10-15
AI Technical Summary
Existing electricity market price forecasting methods fail to fully capture the impact of complex factors such as holidays, leading to increased forecasting bias. Furthermore, they lack a systematic screening of multi-dimensional input factors and a model coordination mechanism, resulting in insufficient forecasting accuracy, especially during non-working days.
A high-dimensional predictive factor matrix is constructed by adopting a dynamic holiday weighting mechanism and a multi-source fusion method. Combined with a collaborative optimization strategy of feedforward neural network and bagged regression tree model, hourly power load and electricity price prediction results are generated.
It significantly improves the accuracy and stability of intraday electricity price and load forecasts in the power market, especially in forecasting special date periods such as holidays. It enhances the model's ability to perceive and utilize multi-dimensional influencing factors, and improves the comprehensiveness and reliability of forecasts.
Smart Images

Figure CN121480797B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electricity market price forecasting, and in particular to a method for intraday electricity price forecasting based on dynamic holiday weighting and multi-source fusion. Background Technology
[0002] With the continuous development and increasing complexity of the electricity market, accurate forecasting of electricity load and market prices is crucial for ensuring the safe and stable operation of the power grid and for market participants to make informed decisions. Currently, the forecasting methods widely used in this field rely heavily on historical load and price data, as well as meteorological information, and utilize traditional statistical models or some machine learning algorithms for modeling and analysis. However, electricity load and prices are influenced by a complex interplay of factors, including weather conditions, economic fluctuations, supply and demand, holidays, weekends, and various special events. Especially during non-working days (such as statutory holidays), load demand and electricity prices often exhibit significant structural fluctuations. If the forecasting model fails to adequately capture these temporal characteristics, it will lead to increased forecasting bias.
[0003] Furthermore, historical electricity price and load data in the electricity market generally contain missing values and noise interference, making it difficult for traditional interpolation and cleaning methods to effectively restore the true data distribution, further affecting prediction accuracy. On the other hand, when constructing prediction models, how to select the most predictive factor combination from multiple inputs such as temperature, humidity, historical load and electricity price, fuel price, time series characteristics, and the influence weight of holidays remains a challenge in current research. Existing technologies typically use all available historical data directly as input, lacking a systematic introduction and dynamic adjustment of holiday weights, and also lacking empirical comparisons and analyses of the performance of different predictive factor combinations. In particular, when applying modern machine learning algorithms such as neural networks and ensemble learning, a complete factor selection and model collaboration mechanism has not yet been formed. Summary of the Invention
[0004] The purpose of this invention is to provide a method for predicting intraday electricity prices based on dynamic holiday weighting and multi-source fusion. By introducing a dynamic holiday weighting mechanism, constructing a high-dimensional prediction factor matrix of multi-source fusion, and adopting a multi-model combination prediction strategy of feedforward neural network and bagged regression tree co-optimization, the accuracy and stability of intraday electricity price and load prediction in the electricity market are effectively improved.
[0005] To address the aforementioned technical problems, a first aspect of this invention provides a method for intraday electricity price forecasting based on dynamic holiday weighting and multi-source fusion, comprising the following steps:
[0006] Acquire historical data from multiple sources and perform time synchronization processing;
[0007] Obtain holiday time information and generate dynamic weights based on the impact of holidays and their upstream and downstream dates on power load and electricity prices;
[0008] A multidimensional predictive factor matrix is constructed based on the multi-source historical data after time synchronization processing;
[0009] Based on the multidimensional predictor matrix, intraday joint forecasting is performed using a multi-model combination that includes a feedforward neural network model and a bagged regression tree model. The intraday joint forecasting refers to the process of forecasting power load and electricity price hourly, and outputting the hourly forecast results of power load and electricity price.
[0010] Furthermore, the acquisition of holiday time information, and the generation of dynamic weights based on the impact of holidays and their upstream and downstream dates on power load and electricity prices, includes:
[0011] Based on the preset holiday identification rules, all dates that meet the rules within the target forecast period are obtained from the date database or the historical date record set of the electricity market, forming a set of dates to be weighted.
[0012] For each weighted date in the set of weighted dates, the actual fluctuation range of power load and the actual fluctuation range of electricity price corresponding to the weighted date in the same period of the historical electricity market are statistically analyzed in combination with historical operation data of the electricity market, and the influence intensity level is classified.
[0013] Based on the level of influence, a dynamic weight value is assigned to each date in the set of dates to be weighted.
[0014] Furthermore, the impact intensity levels include strong impact level, medium impact level, and weak impact level;
[0015] The strong impact level corresponds to a date when the historical fluctuation range exceeds a first preset threshold, the medium impact level corresponds to a date when the historical fluctuation range is between the first preset threshold and a second preset threshold, and the weak impact level corresponds to a date when the historical fluctuation range is below the second preset threshold.
[0016] Wherein, the first preset threshold is greater than the second preset threshold.
[0017] Furthermore, the construction of a multidimensional predictive factor matrix based on the time-synchronized multi-source historical data includes:
[0018] Meteorological parameters, time factors, and fuel price data are extracted from the multi-source historical data after time synchronization processing. Based on the preset lag order selection rule, historical load lag samples and historical electricity price lag samples are extracted.
[0019] The dynamic weights are converted into holiday weighted labels and integrated with the extracted meteorological parameters, time factors, fuel price data, historical load lag samples, and historical electricity price lag samples to form an initial prediction input feature set.
[0020] Based on the length of the prediction period, the features in the initial prediction input feature set are divided into corresponding short-term prediction input feature subsets or long-term prediction input feature subsets, and then structurally integrated to generate the multidimensional prediction factor matrix.
[0021] Furthermore, the dynamic weights are converted into holiday-weighted labels and integrated with the extracted meteorological parameters, time factors, fuel price data, historical load lag samples, and historical electricity price lag samples to form an initial prediction input feature set, including:
[0022] The dynamic weight value corresponding to each date is converted into a discrete holiday weighted label according to a preset weight-label mapping rule;
[0023] The holiday weighted markers are aligned and combined with the extracted meteorological parameters, time factors, fuel price data, historical load lag samples, and historical electricity price lag samples according to a unified time dimension.
[0024] All feature variables that have undergone alignment and encoding are concatenated in time series order to form a two-dimensional structured feature dataset in which rows correspond to time points and columns correspond to different feature variables, thus obtaining the initial prediction input feature set.
[0025] Furthermore, the step of dividing the features in the initial prediction input feature set into corresponding short-term prediction input feature subsets or long-term prediction input feature subsets according to the length of the prediction period includes:
[0026] If the forecast period is short-term, then features strongly correlated with recent dynamics are selected from the initial forecast input feature set to form a subset of short-term forecast input features. The features strongly correlated with recent dynamics include meteorological parameters at the current time and near time, time factors, holiday weighting labels, and historical load lag samples and historical electricity price lag samples selected based on the first lag time window.
[0027] If the prediction period is a long-term prediction, then features related to long-term trends and periodic patterns are selected from the initial prediction input feature set to form a long-term prediction input feature subset. In addition to the features in the short-term prediction input feature subset, the features related to long-term trends and periodic patterns further include fuel price data and historical load lag samples and historical electricity price lag samples selected based on the second lag time window, wherein the time span of the second lag time window is greater than that of the first lag time window.
[0028] The selected subset of short-term or long-term prediction input features is normalized, and all features are arranged in a preset order and structurally integrated to obtain the multidimensional prediction factor matrix applicable to the corresponding prediction period.
[0029] Furthermore, the intraday joint forecasting based on a collaboratively optimized multi-model combination including a feedforward neural network model and a bagged regression tree model includes:
[0030] The multidimensional predictor matrix is input into the feedforward neural network model and the bagged regression tree model, respectively.
[0031] Based on a preset collaborative invocation mechanism, the output results of the feedforward neural network model and the bagged regression tree model are fused to obtain hourly prediction results of power load and electricity price.
[0032] Furthermore, the step of fusing the outputs of the feedforward neural network model and the bagged regression tree model based on a preset collaborative invocation mechanism to obtain hourly prediction results of power load and electricity price includes:
[0033] Based on the date type and hour period corresponding to the target time period, determine the time period type identifier to which the target time period belongs;
[0034] Based on the time period type identifier, the basic weight allocation ratios corresponding to the feedforward neural network model and the bagged regression tree model are obtained from the model weight configuration table.
[0035] The prediction error sequences of the feedforward neural network model and the bagged regression tree model in several adjacent time periods before the current prediction time period are obtained in real time, and the average error values of the feedforward neural network model and the bagged regression tree model in the several adjacent time periods are calculated respectively. The basic weight allocation ratio is dynamically adjusted according to the average error value.
[0036] By using a dynamically adjusted weight allocation ratio, the first prediction result output by the feedforward neural network model and the second prediction result output by the bagged regression tree model are weighted and fused to obtain the final predicted values of the hourly power load and electricity price.
[0037] Accordingly, a second aspect of the present invention provides an electronic device, including: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the above-described method for predicting intraday electricity prices based on dynamic holiday weights and multi-source fusion.
[0038] Accordingly, a third aspect of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-described method for intraday electricity price forecasting based on dynamic holiday weighting and multi-source fusion.
[0039] The above-described technical solutions of the embodiments of the present invention have the following beneficial technical effects:
[0040] 1. By constructing a dynamic holiday weight generation mechanism, the non-uniform impact of holidays and the dates before and after them on power load and electricity price fluctuations can be accurately captured. This effectively overcomes the structural prediction bias caused by insufficient holiday modeling in traditional forecasting methods and significantly improves the accuracy and adaptability of forecasts for special date periods.
[0041] 2. By integrating multi-source data and constructing a high-dimensional predictive factor matrix that includes meteorological, temporal, historical load, electricity price lag indicators, fuel prices, and holiday weighting, this invention achieves a systematic organization and switching of short-term and long-term predictive features, enhances the model's ability to perceive and utilize multi-dimensional influencing factors in the electricity market, and thus improves the comprehensiveness and reliability of the prediction.
[0042] 3. By adopting a dual-model collaborative training and optimization strategy of feedforward neural network and bagged regression tree, combined with input factor subset screening mechanism and multi-scale error evaluation visualization tool, this invention not only optimizes the model structure and feature combination, but also significantly improves the generalization performance and interpretability of the prediction model, providing users with joint prediction results with higher accuracy and stronger stability. Attached Figure Description
[0043] Figure 1 This is a flowchart of the intraday electricity price forecasting method based on dynamic holiday weighting and multi-source fusion provided in this embodiment of the invention. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments and the accompanying drawings. It should be understood that these descriptions are merely exemplary and not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.
[0045] Please refer to Figure 1 The first aspect of this invention provides a method for predicting intraday electricity prices based on dynamic holiday weighting and multi-source fusion, comprising the following steps:
[0046] Step S100: Obtain multi-source historical data and perform time synchronization processing.
[0047] Acquiring and synchronizing multi-source historical data involves collecting time-series data, including but not limited to system load, nodal marginal electricity prices, dry-bulb temperature, dew point temperature, and fuel prices, from multiple independent data sources such as the electricity market operation database and meteorological data service platform. This data typically originates from different acquisition systems and storage formats, leading to issues such as inconsistent timestamp benchmarks and varying sampling frequencies. Therefore, time alignment is crucial. This involves uniformly sampling all data to the same time granularity (e.g., 1 hour) and establishing a unified time index using numerical timestamps (e.g., Unix timestamps or serialized date values). This ensures strict synchronization of all data across time dimensions, providing a consistent data foundation for subsequent joint forecasting models.
[0048] Step S200: Obtain holiday time information and generate dynamic weights based on the impact of holidays and their upstream and downstream dates on power load and electricity price.
[0049] The system acquires holiday date information and generates dynamic weights, including extracting all statutory holidays and user-defined specific dates (such as important event days) for a given year from public calendar services or custom rule bases. Furthermore, it supports identifying complex rules such as "Monday of the Nth week of a month" or "last working day" to comprehensively cover dates that may affect electricity consumption patterns. For each target date (e.g., the day of the holiday, the day before, and the day after), it analyzes the historical impact on load and electricity price fluctuations in the region by combining historical electricity data from the same period, classifying the impact intensity into different levels (e.g., high, medium, low) and assigning different numerical weights (e.g., 1 for the day of the holiday, 0.5 for the days before and after). This mechanism can dynamically adapt to the actual impact patterns of different holidays and non-working days.
[0050] Step S300: Construct a multidimensional predictive factor matrix based on the multi-source historical data after time synchronization processing.
[0051] Based on the aforementioned synchronized and weighted multi-source data, a multi-dimensional factor matrix is constructed for model training and prediction. This matrix includes not only real-time meteorological parameters (temperature, humidity) and time-series features (hours, days of the week), but also historical load and electricity price lag terms (such as the previous hour, the same day of the previous week, etc.), various fuel prices, and numerically encoded holiday weights. These factors together constitute the model input feature set, which is a structured two-dimensional dataset with rows representing time points and columns representing different feature variables. Appropriate feature combinations can be flexibly selected according to the length of the prediction period (short-term or long-term) to adapt to the needs of different prediction tasks.
[0052] Step S400: Based on the multidimensional prediction factor matrix, intraday joint prediction is performed using a multi-model combination of collaborative optimization, including a feedforward neural network model and a bagged regression tree model. Intraday joint prediction refers to the process of predicting power load and electricity price hourly, and outputting the hourly prediction results of power load and electricity price.
[0053] Based on the constructed multidimensional predictor matrix, a combined model of a feedforward neural network and bagged regression trees is used for joint prediction of electricity load and price. Specifically, for the same input feature set, the two models are trained and predicted separately. The neural network can capture nonlinear relationships, while the ensemble tree model has good robustness to outliers and noise. The performance of each model under different input subsets is evaluated using performance indicators (such as mean absolute error (MAE) and mean absolute percentage error (MAPE) to select the optimal combination of predictor factors and model parameters. During the prediction process, the outputs of the two models are weighted and fused to form the final hourly load and price prediction results, thereby enhancing the generalization and stability of the model while ensuring prediction accuracy.
[0054] Through the coordination and implementation of the above steps, this invention can significantly improve the accuracy and practicality of intraday electricity price and load forecasting in the electricity market environment, especially improving forecasting performance during special periods such as holidays, while enhancing the model's systematic processing capabilities for multi-source information fusion and factor selection.
[0055] Furthermore, in step S200, obtaining holiday time information and generating dynamic weights based on the impact of holidays and their upstream and downstream dates on power load and electricity prices includes:
[0056] Step S210: Based on the preset holiday identification rules, obtain all dates that meet the rules within the target forecast period from the date database or the historical date record set of the power market, and form a set of dates to be weighted.
[0057] Based on preset holiday identification rules, all relevant dates within the target forecast period are retrieved from a structured date database or historical electricity market operation logs. These rules not only include fixed holidays (such as New Year's Day and National Day) but also support dynamic rules defined based on week order and working days, such as "the last Monday in May of a certain year" or "the first working day after Thanksgiving." By parsing these rules, a list of eligible dates is automatically generated, forming a set of dates to be weighted, ensuring coverage of all special dates that may affect electricity load and prices, providing a basis for subsequent weight allocation.
[0058] Step S220: For each date to be weighted in the set of dates to be weighted, combine historical operating data of the electricity market to statistically analyze the actual fluctuation range of electricity load and the actual fluctuation range of electricity price corresponding to the same period in history, and classify the level of influence intensity.
[0059] For each date in the set of dates to be weighted, the historical electricity market database is accessed to extract load and electricity price data for that date and several days before and after it over many years. By statistically analyzing the fluctuation characteristics of these historical data, such as calculating the load change rate, the standard deviation of electricity price fluctuations, or the magnitude of change relative to normal working days, the actual impact of each date on the electricity market is quantitatively assessed. Based on preset thresholds, these impacts are further classified into different levels, such as "strong impact," "moderate impact," and "weak impact," thereby establishing an objective, data-driven classification basis for each specific date type.
[0060] Step S230: Assign a dynamic weight value to each date in the set of dates to be weighted according to the level of influence intensity.
[0061] Based on the influence intensity level determined in step S220, a corresponding dynamic weight value is assigned to each date to be weighted. For example, a higher weight (e.g., 1.0) is assigned to holidays with extremely significant fluctuations in historical data (such as New Year's Day and Christmas); a medium weight (e.g., 0.5) is assigned to dates with slightly weaker influence, such as the day before or after the holiday; and a weight of 0.2 may be assigned to special working days or adjusted workdays with relatively weak influence. This weight value is ultimately stored in structured numerical form and associated with the time series data, serving as an important component of the input features in the prediction model and directly participating in the model training and prediction process.
[0062] Accordingly, the impact intensity levels include strong impact, medium impact, and weak impact. A strong impact level corresponds to dates where the historical fluctuation range exceeds a first preset threshold; a medium impact level corresponds to dates where the historical fluctuation range is between the first and second preset thresholds; and a weak impact level corresponds to dates where the historical fluctuation range is below the second preset threshold. The first preset threshold is greater than the second preset threshold.
[0063] In determining the level of impact intensity, two fluctuation thresholds are first set based on historical data as the classification criteria. The first preset threshold is usually set to a higher value to identify dates that have a significant impact on the operation of the power system, such as dates with load fluctuations exceeding 20% or electricity price fluctuations exceeding 30%. The second preset threshold is set to a relatively lower value to identify dates with a less severe impact, such as dates with load fluctuations below 10% or electricity price fluctuations below 15%. The relationship between these two thresholds ensures the rationality and hierarchy of the classification standard; that is, the first preset threshold is always greater than the second preset threshold, thus forming a division range of three impact levels: strong, medium, and weak.
[0064] For the "strong impact" category, dates with historical fluctuations exceeding a first preset threshold are assigned. These dates typically include the days of major public holidays, such as New Year's Day and National Day. These dates are often accompanied by significant changes in electricity consumption patterns across society, leading to abnormal load curve shapes and drastic electricity price fluctuations. By identifying these dates and assigning them higher weights, the forecasting model can focus on these special periods, thereby more accurately capturing their structural change characteristics.
[0065] The medium impact level corresponds to dates whose historical fluctuation range falls between the first and second preset thresholds. These dates may include adjusted workdays before and after holidays, some regional holidays, or important event days. Although their impact is not as strong as that of dates with high impact, they still significantly deviate from the normal workday pattern. By assigning a medium weight, the model can maintain its focus on major holidays while also appropriately considering the impact of these less important dates, achieving a more comprehensive coverage of time-series features.
[0066] The "weak impact" level corresponds to dates whose historical fluctuations are below the second preset threshold. These dates typically include special workdays with only minor impacts or local holidays with relatively weak impacts, where load and electricity price fluctuations are small, close to normal workday levels. By assigning lower weights, the impact information of these dates is preserved while avoiding noise interference that may result from overemphasizing secondary factors, thus maintaining the robustness of the forecasting model.
[0067] The aforementioned dual-threshold-based impact intensity grading mechanism enables a refined quantitative assessment of the impact on different dates, providing an objective and reliable basis for subsequent dynamic weight allocation. This significantly enhances the predictive model's ability to characterize and predict electricity market behavior on special dates.
[0068] Furthermore, step S300, which involves constructing a multidimensional predictor matrix based on the time-synchronized multi-source historical data, includes:
[0069] Step S310: Extract meteorological parameters, time factors, and fuel price data from the multi-source historical data after time synchronization processing, and extract historical load lag samples and historical electricity price lag samples based on the preset lag order selection rules.
[0070] The preset lag order selection rule is a systematic method for determining the lag order of historical load and price data. Based on the principle of time series analysis, it automatically selects a lag order that can effectively reflect the future trend of the current moment by analyzing the periodicity and autocorrelation of load and price changes in historical data. For example, it selects data from the previous hour, the previous 24 hours, or the previous week as input features to capture short-term fluctuations and long-term cycle patterns, thereby improving the accuracy and robustness of the prediction model.
[0071] The process of constructing a multidimensional predictive factor matrix based on time-synchronized multi-source historical data begins with extracting key feature variables from the aligned and standardized data. These variables include meteorological parameters such as dry-bulb temperature and dew point temperature, reflecting weather conditions; time factors such as hourly and day-of-week information; and external economic factors such as fuel prices. Furthermore, based on pre-defined lag order rules, lagged samples are extracted from historical load and electricity price data, such as load and price data from the previous period, day, or even week, to capture autocorrelation and trend characteristics in the time series. This step ensures that the model input not only includes current-time state information but also encompasses historical behavioral patterns, providing a more comprehensive data foundation for subsequent predictions.
[0072] The aforementioned time factors are a set of variables used to characterize the time-varying features, including dimensions such as hour, weekday, month, season, and whether it is a workday. These factors are embedded into the prediction model through numerical or one-hot encoding methods, which can effectively capture the periodic and trend patterns of electricity load and price changes over time. They play an important role, especially in distinguishing between workdays and holidays, and peak and off-peak periods, and are one of the basic features for building high-precision prediction models.
[0073] The aforementioned fuel price data is introduced as a key external influencing factor, typically including the market prices of energy sources required for power generation such as natural gas, coal, and oil. This type of data is acquired in real time or periodically through a database interface, and after cleaning and alignment, it is incorporated into the predictive factor matrix. Its changes directly affect power generation costs and market electricity prices, thus it is one of the indispensable and important input variables in the predictive model, which can enhance the model's ability to respond to market supply and demand dynamics.
[0074] Step S320: The dynamic weights are converted into holiday weighted labels and integrated with the extracted meteorological parameters, time factors, fuel price data, historical load lag samples and historical electricity price lag samples to form an initial prediction input feature set.
[0075] The dynamically generated holiday weight information is transformed into holiday weighted labels that can be used as model input. Specifically, date types are mapped to numerical labels according to preset rules (such as assigning different weights to the day of the holiday, the day before, and the day after), and these labels are integrated with meteorological parameters, time factors, fuel prices, historical load lag samples, and historical electricity price lag samples extracted from multi-source data. Through this integration, a structured initial predictive input feature set is formed. This set not only contains raw data information but also incorporates the dynamic impact of holidays and non-working days on the electricity market, thus more accurately reflecting the complex time variability and external event influences in the actual power system.
[0076] Step S330: Based on the length of the prediction period, the features in the initial prediction input feature set are divided into corresponding short-term prediction input feature subsets or long-term prediction input feature subsets, and then structured and integrated to generate a multidimensional prediction factor matrix.
[0077] Based on the time scale of the prediction task, the initial feature set is further divided into a short-term prediction input feature subset and a long-term prediction input feature subset. For example, short-term predictions may rely more on load and meteorological data from the most recent few hours, while long-term predictions require the introduction of more historical lag features and periodic time indicators. Through a structured integration mechanism, features at different time granularities are organized into multi-dimensional matrix forms suitable for model input, ensuring that the model obtains the most representative and discriminative feature combinations, whether predicting for the next few hours or days.
[0078] This invention achieves efficient integration and structured processing of multi-source heterogeneous data, significantly improving the predictive model's ability to model complex time-series patterns and responses to external events in the electricity market. This method not only enhances the systematicity and interpretability of feature engineering but also provides a high-quality, multi-scale input foundation for subsequent machine learning-based load and electricity price forecasting, thereby improving the overall accuracy and stability of the prediction results.
[0079] Further, in step S320, the dynamic weights are converted into holiday-weighted labels and integrated with the extracted meteorological parameters, time factors, fuel price data, historical load lag samples, and historical electricity price lag samples to form an initial prediction input feature set, including:
[0080] Step S321: Convert the dynamic weight value corresponding to each date into a discrete holiday weighted label according to the preset weight-label mapping rule.
[0081] The process of converting dynamic weights into holiday-weighted labels is based on a pre-defined weight-label mapping rule. This rule assigns different numerical labels to different date types and their degree of influence. For example, a holiday day might be mapped to a label value of 1, the day before or after a holiday to 0.5, and a regular workday to 0. This discretization not only simplifies the model's understanding of the holiday effect but also transforms continuous weights into categorical or ordinal features that the model can recognize and process, enhancing feature interpretability and model learning efficiency.
[0082] Step S322: Align and combine the holiday weighted markers with the extracted meteorological parameters, time factors, fuel price data, historical load lag samples, and historical electricity price lag samples according to a unified time dimension.
[0083] The generated holiday-weighted tags are integrated with meteorological parameters, time factors, fuel price data, and lagged samples of historical load and electricity prices extracted from multi-source data. During integration, it is crucial to ensure strict alignment of all features along the time dimension; that is, the data for each point in time (e.g., each hour) must maintain consistency. For example, using a unified timestamp index, temperature and humidity from meteorological data, day of the week and hour information from time factors, fuel price data, and historical load and electricity price data lagged by one or more orders are combined with the corresponding holiday tags to form a complete feature vector. This step relies on an efficient data merging and alignment mechanism to avoid information distortion caused by time misalignment.
[0084] Step S323: All feature variables after alignment and encoding are concatenated in time series order to form a two-dimensional structured feature dataset with rows corresponding to time points and columns corresponding to different feature variables, thus obtaining the initial prediction input feature set.
[0085] All aligned and encoded feature variables are organized chronologically into a structured two-dimensional dataset. Each row represents a specific point in time (e.g., a specific hour), and each column represents a feature variable, such as temperature, holiday markers, or historical load lag values. This organization constructs an initial set of predictive input features suitable for training machine learning models. This set preserves the continuity of the time series while incorporating multi-dimensional features, providing a rich and consistent input data foundation for subsequent short-term or long-term prediction tasks.
[0086] The above steps achieve a systematic integration of dynamic holiday weights and multi-source features, significantly improving the standardization and usability of feature engineering. This method not only enhances the model's ability to capture time variability and the impact of external events, but also provides a well-structured and comprehensive set of input features for high-precision power load and price forecasting, thereby effectively supporting the training and optimization of subsequent machine learning models and comprehensively improving the accuracy and stability of prediction results.
[0087] Further, step S330, which divides the features in the initial prediction input feature set into corresponding short-term prediction input feature subsets or long-term prediction input feature subsets based on the length of the prediction period, includes:
[0088] Step S331: If the prediction period is short-term, then select features that are strongly correlated with recent dynamics from the initial prediction input feature set to form a subset of short-term prediction input features. Features that are strongly correlated with recent dynamics include meteorological parameters at the current time and near time, time factors, holiday weighting labels, and historical load lag samples and historical electricity price lag samples selected based on the first lag time window.
[0089] Feature selection is performed for short-term forecasting tasks. Short-term forecasting typically focuses on load and price changes over the next few hours to a day, and its fluctuations are mainly influenced by recent factors. Therefore, feature variables strongly correlated with recent dynamics are selected from the initial feature set. These features include meteorological parameters (such as temperature and humidity) at the current and near time, time factors (such as hours, whether it is a weekday), holiday weighting, and historical load and price lag samples selected based on the first lag time window. The first lag time window is usually set to a relatively short time span, such as the past 6 to 24 hours, to capture recent load and price fluctuation patterns. By focusing on these recent features, short-term forecasting models can respond more sensitively to immediate changes in the electricity market.
[0090] Step S332: If the prediction period is a long-term prediction, then select features related to long-term trends and periodic patterns from the initial prediction input feature set to form a long-term prediction input feature subset. In addition to the features in the short-term prediction input feature subset, the features related to long-term trends and periodic patterns also include fuel price data and historical load lag samples and historical electricity price lag samples selected based on the second lag time window, wherein the time span of the second lag time window is greater than that of the first lag time window.
[0091] Step S332 applies to long-term forecasting scenarios, aiming to predict load and price trends over the next few days or even weeks. Long-term forecasting needs to capture cyclical patterns and long-term trends, thus allowing for a wider range of feature selection. In addition to the features used in short-term forecasting, the long-term forecasting input feature subset further incorporates external economic indicators such as fuel price data, as well as historical load and electricity price lag samples selected based on a second lag window. The second lag window has a larger time span, such as historical data from the past week, month, or the same working days, reflecting long-term patterns such as weekly cyclical and seasonal changes. This allows the model to simultaneously consider recent fluctuations and long-term trends, improving its ability to understand complex time patterns.
[0092] Step S333: Normalize the selected short-term or long-term prediction input feature subsets, arrange all features in a preset order, and perform structured integration to obtain a multidimensional prediction factor matrix suitable for the corresponding prediction period.
[0093] The selected feature subset is normalized to eliminate the impact of differences in feature dimensions on model training. Normalization methods can employ min-max scaling or Z-score standardization to transform various features to similar numerical ranges. Subsequently, all features are arranged in a preset order (e.g., meteorological parameters first, then time factors, lagged samples, and finally external indicators), and a two-dimensional multidimensional predictor matrix is generated through structured integration. The rows of this matrix correspond to time points, and the columns correspond to feature variables, forming a unified data structure suitable for model input.
[0094] Through the aforementioned feature segmentation and structuring, customized feature engineering for different forecast periods was achieved, significantly enhancing the model's ability to capture short-term fluctuations and long-term trends in the electricity market. This method not only improves the targeting and effectiveness of feature selection but also provides high-quality, multi-scale input data for subsequent forecast models, thereby comprehensively optimizing the accuracy and stability of the forecast results.
[0095] Further, step S400, which involves performing intraday joint forecasting based on a collaboratively optimized multi-model combination including a feedforward neural network model and a bagged regression tree model, includes:
[0096] Step S410: Input the multidimensional predictor matrix into the feedforward neural network model and the bagged regression tree model respectively.
[0097] The constructed multidimensional predictor matrix is input into the feedforward neural network model and the bagged regression tree model, respectively. The feedforward neural network model adopts a structure containing a single hidden layer (e.g., 20 neurons), with the number of input layer nodes matching the feature dimension, and the output layer corresponding to the prediction target (e.g., next hour's load or electricity price). This model is trained using the backpropagation algorithm, with mean absolute error (MAE) as the main optimization objective.
[0098] The bagged regression tree model is an ensemble learning method that, in this invention, works in conjunction with a neural network model for predicting electricity load and prices. This model reduces overfitting risk and improves generalization ability by constructing multiple regression trees and averaging or voting on the prediction results. In this invention, the model is also used for feature importance assessment, helping to identify and filter out input factors with high noise or low contribution, thereby optimizing the model structure and improving prediction performance. The bagged regression tree model constructs multiple regression trees using a bootstrap sampling method, with parameters including the number of trees and the minimum number of samples per leaf node. Overfitting is avoided during training by monitoring out-of-bag errors.
[0099] The two types of models learn linear and nonlinear relationships in the data from different perspectives: neural networks are good at capturing complex nonlinear mappings, while bagged regression trees are more robust to feature interactions and outliers.
[0100] Step S420: Based on the preset collaborative calling mechanism, the output results of the feedforward neural network model and the bagged regression tree model are fused to obtain the hourly prediction results of power load and electricity price.
[0101] The outputs of two types of models are fused based on a pre-defined collaborative invocation mechanism. This mechanism can employ weighted averaging, stacked generalization, or dynamic selection strategies. For example, dynamic weights can be assigned to the neural network and regression tree based on validation set performance, with the higher-performing model having a higher weight in the ensemble. Alternatively, a meta-learner can be introduced, using the prediction results of both models as input to train a second-layer model to generate the final prediction. The fused result not only includes hourly load forecasts but also outputs parallel electricity price forecasts. Furthermore, prediction intervals or confidence indices can be calculated to quantify prediction uncertainty and provide users with more comprehensive decision support.
[0102] Among them, the preset collaborative invocation mechanism is the operating logic and control process for realizing the collaborative work of the neural network and bagged regression tree dual models. This mechanism includes the performance comparison of the input subset, error evaluation and factor screening in the model training stage, as well as the model selection and result fusion strategy in the prediction stage. Through this mechanism, the optimal model or combination method can be dynamically selected for prediction, giving full play to the advantages of different models in handling different types of features, and improving the overall prediction accuracy and stability.
[0103] The aforementioned collaborative optimization multi-model combination mechanism effectively integrates the advantages of feedforward neural networks and bagged regression tree algorithms. It retains the high fitting ability of neural networks to complex patterns while leveraging ensemble learning to improve model stability and generalization performance. This hybrid method significantly improves the accuracy and reliability of intraday fluctuation forecasting in the electricity market, exhibiting stronger adaptability, especially during periods of high variability (such as holidays or sudden load changes), providing more precise data support for power system dispatching and market trading.
[0104] Furthermore, in step S420, based on a preset collaborative invocation mechanism, the output results of the feedforward neural network model and the bagged regression tree model are fused to obtain hourly prediction results of power load and electricity price, including:
[0105] Step S421: Determine the time period type identifier of the target time period based on the date type and hour period corresponding to the target time period.
[0106] The process of determining the time period type identifier based on the predicted target time period involves refined classification based on date and hour information. First, it identifies whether the date is a weekday, weekend, public holiday, or a specific date before or after it (e.g., the day before or after a holiday). This is then combined with hourly information (e.g., peak hours, average hours, off-peak hours) for a comprehensive judgment. For example, 8-10 AM on a weekday might be identified as "morning peak," while the same time period on a holiday might be identified as "holiday peak." This classification is achieved through a predefined rule table, which contains combinations of different date types and hour segments along with their corresponding unique identifiers, ensuring that each predicted time period can be accurately categorized.
[0107] Step S422: Based on the time period type identifier, obtain the basic weight allocation ratios corresponding to the feedforward neural network model and the bagged regression tree model from the model weight configuration table.
[0108] The basic weight allocation ratio is obtained from the model weight configuration table based on the time period type identifier. This configuration table is pre-determined through historical data validation and grid search, recording the initial weights of the neural network model and the bagged regression tree model for different time period types. For example, for peak holiday periods with large load fluctuations, the bagged regression tree model may be assigned a higher weight (e.g., 0.6) because it is more robust to outliers; while for weekday flat periods with strong load patterns, the neural network model may have a higher weight (e.g., 0.7) to fully utilize its nonlinear fitting ability. This mechanism ensures that the model fusion strategy matches the actual operating characteristics of the electricity market.
[0109] The aforementioned model weight configuration table is a structured data table used to record different date types (such as the day of a holiday, the day before, and the day after) and their corresponding influence weights. This table is dynamically generated and updated by the rule engine. The weight values are usually derived from historical data analysis and are used to weight the input features of holidays and related dates during the prediction process to more accurately reflect the special impact of non-working days on electricity load and prices, and enhance the model's adaptability to changes in time series structure.
[0110] Step S423: In real time, obtain the prediction error sequence of the feedforward neural network model and the bagged regression tree model in several adjacent time periods before the current prediction time period, and calculate the average error value of the feedforward neural network model and the bagged regression tree model in several adjacent time periods respectively, and dynamically adjust the basic weight allocation ratio based on the average error value.
[0111] The base weights are dynamically adjusted through real-time error monitoring. Prediction error sequences for two models over several neighboring periods (e.g., the past 6 hours) preceding the current prediction period are obtained, and their mean absolute error (MAE) or mean absolute percentage error (MAPE) is calculated for each. If a model shows significantly lower error recently, its weight is dynamically increased proportionally to its error; conversely, its weight is decreased. For example, if the neural network's average error is 20% lower than that of the bagged regression tree in recent periods, its base weight is increased by 10%. This dynamic adjustment mechanism enables the model to adaptively respond to real-time changes in the electricity market, maintaining predictive stability, especially during periods of sudden load changes or abnormal electricity price fluctuations.
[0112] Step S424: Using the dynamically adjusted weight allocation ratio, the first prediction result output by the feedforward neural network model and the second prediction result output by the bagged regression tree model are weighted and fused to obtain the final predicted values of hourly power load and electricity price.
[0113] The outputs of the two models are weighted and fused using dynamically adjusted weights. The first prediction from the neural network and the second prediction from the bagged regression tree are weighted and summed according to their final weights to generate the final predicted values for the hourly load and electricity price. For example, if the neural network weight is adjusted to 0.6 and the bagged regression tree weight is 0.4, the final predicted value is the weighted average of the two predictions. The system also supports outputting prediction intervals and provides users with risk references by calculating the variance of the prediction results from the two models.
[0114] Through the aforementioned collaborative invocation and dynamic weight adjustment mechanism, this invention achieves adaptive fusion of multi-model prediction results, significantly improving the accuracy and robustness of load and electricity price predictions under different time periods. This scheme not only fully combines the complementary advantages of neural networks and ensemble learning algorithms, but also effectively reduces the systematic bias that a single model may exhibit in specific time periods through real-time error feedback and weight optimization, providing more reliable intraday forecast support for electricity market participants.
[0115] Accordingly, a second aspect of the present invention provides an electronic device, including: at least one processor; and a memory connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the above-described method for predicting intraday electricity prices based on dynamic holiday weights and multi-source fusion.
[0116] Accordingly, a third aspect of the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the above-described method for intraday electricity price forecasting based on dynamic holiday weighting and multi-source fusion.
[0117] This invention aims to protect a method for intraday electricity price forecasting based on dynamic holiday weighting and multi-source fusion, which has the following advantages:
[0118] 1. By constructing a dynamic holiday weight generation mechanism, the non-uniform impact of holidays and the dates before and after them on power load and electricity price fluctuations can be accurately captured. This effectively overcomes the structural prediction bias caused by insufficient holiday modeling in traditional forecasting methods and significantly improves the accuracy and adaptability of forecasts for special date periods.
[0119] 2. By integrating multi-source data and constructing a high-dimensional predictive factor matrix that includes meteorological, temporal, historical load, electricity price lag indicators, fuel prices, and holiday weighting, this invention achieves a systematic organization and switching of short-term and long-term predictive features, enhances the model's ability to perceive and utilize multi-dimensional influencing factors in the electricity market, and thus improves the comprehensiveness and reliability of the prediction.
[0120] 3. By adopting a dual-model collaborative training and optimization strategy of feedforward neural network and bagged regression tree, combined with input factor subset screening mechanism and multi-scale error evaluation visualization tool, this invention not only optimizes the model structure and feature combination, but also significantly improves the generalization performance and interpretability of the prediction model, providing users with joint prediction results that are more accurate and more stable.
[0121] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0122] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0123] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0124] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for intraday electricity price forecasting based on dynamic holiday weighting and multi-source fusion, characterized in that, Includes the following steps: Acquire historical data from multiple sources and perform time synchronization processing; Obtain holiday time information and generate dynamic weights based on the impact of holidays and their upstream and downstream dates on power load and electricity prices; A multidimensional prediction factor matrix is constructed based on the multi-source historical data after time synchronization processing. Based on the multidimensional predictor matrix, intraday joint forecasting is performed using a multi-model combination that includes a feedforward neural network model and a bagged regression tree model. The intraday joint forecasting refers to the process of forecasting power load and electricity price hourly, and outputting the hourly forecast results of power load and electricity price. The process of obtaining holiday time information and generating dynamic weights based on the impact of holidays and their upstream and downstream dates on power load and electricity prices includes: Based on the preset holiday identification rules, all dates that meet the rules within the target forecast period are obtained from the date database or the historical date record set of the electricity market, forming a set of dates to be weighted. For each weighted date in the set of weighted dates, the actual fluctuation range of power load and the actual fluctuation range of electricity price corresponding to the weighted date in the same period of the historical electricity market are statistically analyzed in combination with historical operation data of the electricity market, and the influence intensity level is classified. Based on the level of influence intensity, assign a dynamic weight value to each date in the set of dates to be weighted; The method of performing intraday joint forecasting based on a collaborative optimization multi-model combination including a feedforward neural network model and a bagged regression tree model includes: The multidimensional predictor matrix is input into the feedforward neural network model and the bagged regression tree model, respectively. Based on a preset collaborative invocation mechanism, the output results of the feedforward neural network model and the bagged regression tree model are fused to obtain hourly prediction results of power load and electricity price. The method, based on a preset collaborative invocation mechanism, fuses the outputs of the feedforward neural network model and the bagged regression tree model to obtain hourly predictions of power load and electricity price, including: Based on the date type and hour period corresponding to the target time period, determine the time period type identifier to which the target time period belongs; Based on the time period type identifier, the basic weight allocation ratios corresponding to the feedforward neural network model and the bagged regression tree model are obtained from the model weight configuration table. The prediction error sequences of the feedforward neural network model and the bagged regression tree model in several adjacent time periods before the current prediction time period are obtained in real time, and the average error values of the feedforward neural network model and the bagged regression tree model in the several adjacent time periods are calculated respectively. The basic weight allocation ratio is dynamically adjusted according to the average error value. By using a dynamically adjusted weight allocation ratio, the first prediction result output by the feedforward neural network model and the second prediction result output by the bagged regression tree model are weighted and fused to obtain the final predicted values of the hourly power load and electricity price.
2. The method for intraday electricity price forecasting based on dynamic holiday weighting and multi-source fusion according to claim 1, characterized in that, The impact intensity levels include strong impact level, medium impact level and weak impact level; The strong impact level corresponds to a date when the historical fluctuation range exceeds a first preset threshold, the medium impact level corresponds to a date when the historical fluctuation range is between the first preset threshold and a second preset threshold, and the weak impact level corresponds to a date when the historical fluctuation range is below the second preset threshold. Wherein, the first preset threshold is greater than the second preset threshold.
3. The method for intraday electricity price forecasting based on dynamic holiday weighting and multi-source fusion according to claim 1, characterized in that, The construction of a multidimensional predictive factor matrix based on the multi-source historical data after time synchronization processing includes: Meteorological parameters, time factors, and fuel price data are extracted from the multi-source historical data after time synchronization processing. Based on the preset lag order selection rule, historical load lag samples and historical electricity price lag samples are extracted. The dynamic weights are converted into holiday weighted labels and integrated with the extracted meteorological parameters, time factors, fuel price data, historical load lag samples, and historical electricity price lag samples to form an initial prediction input feature set. Based on the length of the prediction period, the features in the initial prediction input feature set are divided into corresponding short-term prediction input feature subsets or long-term prediction input feature subsets, and then structurally integrated to generate the multidimensional prediction factor matrix.
4. The method for intraday electricity price forecasting based on dynamic holiday weighting and multi-source fusion according to claim 3, characterized in that, The dynamic weights are converted into holiday-weighted labels and integrated with the extracted meteorological parameters, time factors, fuel price data, historical load lag samples, and historical electricity price lag samples to form an initial prediction input feature set, including: The dynamic weight value corresponding to each date is converted into a discrete holiday weighted label according to the preset weight-label mapping rule; The holiday weighted markers are aligned and combined with the extracted meteorological parameters, time factors, fuel price data, historical load lag samples, and historical electricity price lag samples according to a unified time dimension. All feature variables that have undergone alignment and encoding are concatenated in time series order to form a two-dimensional structured feature dataset in which rows correspond to time points and columns correspond to different feature variables, thus obtaining the initial prediction input feature set.
5. The method for intraday electricity price forecasting based on dynamic holiday weighting and multi-source fusion according to claim 3, characterized in that, The step of dividing the features in the initial prediction input feature set into corresponding short-term prediction input feature subsets or long-term prediction input feature subsets according to the length of the prediction period includes: If the forecast period is short-term, then features strongly correlated with recent dynamics are selected from the initial forecast input feature set to form a subset of short-term forecast input features. The features strongly correlated with recent dynamics include meteorological parameters at the current time and near time, time factors, holiday weighting labels, and historical load lag samples and historical electricity price lag samples selected based on the first lag time window. If the prediction period is a long-term prediction, then features related to long-term trends and periodic patterns are selected from the initial prediction input feature set to form a long-term prediction input feature subset. In addition to the features in the short-term prediction input feature subset, the features related to long-term trends and periodic patterns further include fuel price data and historical load lag samples and historical electricity price lag samples selected based on the second lag time window, wherein the time span of the second lag time window is greater than that of the first lag time window. The selected subset of short-term or long-term prediction input features is normalized, and all features are arranged in a preset order and structurally integrated to obtain the multidimensional prediction factor matrix applicable to the corresponding prediction period.
6. An electronic device, characterized in that, include: At least one processor; The at least one processor is connected to a memory; wherein the memory stores instructions that can be executed by the at least one processor to cause the at least one processor to perform the intraday electricity price forecasting method based on dynamic holiday weighting and multi-source fusion as described in any one of claims 1-5.
7. A computer-readable storage medium, characterized in that, It stores computer instructions that, when executed by a processor, implement the intraday electricity price forecasting method based on dynamic holiday weighting and multi-source fusion as described in any one of claims 1-5.