A power price combination prediction method and system for fusing multi-source transaction data of a power transaction center and a medium
By constructing global and time-segmented LightGBM prediction models, performing data preprocessing and feature construction, and using calibration sets for fusion weight search and residual calibration, the problem of insufficient multi-source data fusion in electricity spot market price prediction is solved, achieving accurate capture and improved stability of electricity price changes.
Patent Information
- Application Number
- CN202611171206.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-04
- Publication Date
- 2026-11-24
AI Technical Summary
Existing electricity spot market price forecasting technologies have shortcomings in multi-source data fusion, failing to fully perceive the supply and demand factors affecting electricity price changes. Insufficient time-bound alignment and data quality control result in insufficient reliability and stability of forecast results, and a single model cannot take into account both global price patterns and time-specific characteristics.
We construct a global LightGBM prediction model and a time-specific LightGBM prediction model. Through data preprocessing and time alignment, we construct multi-source interpretable features and use a calibration set for fusion weight search and time-specific residual calibration to achieve accurate capture and improved stability of electricity price prediction.
It improves the accuracy and stability of electricity price forecasting, especially addressing forecast lag and oversmoothing issues during special periods, enhances the ability to respond to sudden changes in electricity prices, and ensures the continuity and reliability of forecast results.
Smart Images

Figure CN123160207A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electricity price forecasting technology, and more specifically, to a method, system, and medium for combined electricity price forecasting that integrates multi-source trading data from an electricity trading center. Background Technology
[0002] Short-term electricity price forecasting methods for the electricity spot market typically use historical cleared prices as a basis, combined with data on load, renewable energy output, generation output, and calendar periods. They employ time series models, regression models, gradient boosting decision trees, neural networks, and other methods to predict electricity prices for future trading days or several 15-minute periods. Currently, this technology has been applied in scenarios such as electricity trading declaration assistance, power purchase and sale strategy formulation, market operation analysis, and operational risk assessment. Some existing systems can already access multi-source data such as historical electricity prices, load, and renewable energy output, and output point-based predicted prices for target periods through machine learning models to assist market participants in judging future electricity price trends.
[0003] However, the aforementioned existing technologies still have significant shortcomings in multi-source data fusion. They typically only use partial transaction or operational data, lacking systematic modeling of factors such as cleared electricity volume, non-market unit output, net transmission power from tie lines, water season, and holidays. This results in the models being unable to fully perceive the supply and demand factors affecting electricity price changes. Furthermore, insufficient time-series alignment and data quality control lead to sample misalignment due to 15-minute granular data, 24-hour cross-day records, missing values, and outliers, affecting the reliability of prediction results. Additionally, most existing technologies employ a single model for electricity price prediction. Whether it's a global time series model or a single-structure machine learning model, it's difficult to simultaneously consider both global price patterns and time-of-use price characteristics at different times. Electricity spot market prices exhibit significant differences across different time periods within a day, with different price formation patterns during nighttime off-peak hours, midday high-output renewable energy periods, and morning and evening peak hours. When faced with such complex intraday variations, single models often tend to learn the overall average trend, leading to prediction lag or over-smoothing in specific periods, resulting in insufficient prediction stability.
[0004] Therefore, researching and designing a method, system, and medium for predicting electricity prices by integrating multi-source trading data from power trading centers that can overcome the above-mentioned shortcomings is an urgent problem to be solved. Summary of the Invention
[0005] To address the shortcomings of existing technologies, the purpose of this invention is to provide a method, system, and medium for predicting electricity prices by integrating multi-source trading data from power trading centers. This aims to improve the accuracy and stability of electricity price prediction, accurately capture the differentiated characteristics at different intraday times, and rapidly respond to sudden changes in electricity prices.
[0006] The above-mentioned technical objective of the present invention is achieved through the following technical solution: Firstly, a method for predicting electricity price combinations by integrating multi-source trading data from an electricity trading center is provided, including the following steps: Acquire historical power transaction and operation data, and perform data preprocessing and time alignment; The preprocessed data is divided into a training set and a calibration set, and multi-source interpretable features are constructed based on the training set. Construct a global LightGBM prediction model, train it using all historical samples in the training set, and output the global prediction result; Construct a time-sharing LightGBM prediction model, group the samples in the training set according to the 15-minute time point number within the day, and train each time-sharing LightGBM prediction model using only the historical samples of the corresponding time point within the day, and output the time-sharing prediction result; Based on the calibration set, a fusion weight search is performed on the global prediction result and the time-point prediction result to determine the final fusion weight that minimizes the calibration error, and the fusion prediction result is calculated based on the final fusion weight. Based on the calibration set, the residual distribution at different intraday times is calculated, and the predicted values at corresponding times in the fusion prediction results are calibrated using time-division residuals to output the final predicted electricity price.
[0007] Furthermore, the data preprocessing and time alignment include: The transaction date and time are uniformly parsed to generate a time index corresponding to a 15-minute transaction cycle. Based on the time index, the sample data is sorted, deduplicated, and standardized. For missing or outlier values in the original dataset, we use statistical patterns based on historical data from the same period and adjacent time points to fill and correct them.
[0008] Furthermore, the step of dividing the preprocessed data into a training set and a calibration set includes: The preprocessed data is arranged in chronological order, and the data of the most recent N complete trading days before the prediction time is used as the calibration set, and all historical data before the calibration set is used as the training set, where N is a preset positive integer.
[0009] Furthermore, the construction of multi-source interpretable features based on the training set includes: The net load characteristic is constructed based on the system load, the output of new energy sources, and the power of inter-regional tie lines. The net load characteristic is the value obtained by subtracting the output of new energy sources and the power of inter-regional tie lines from the system load. The output characteristics of conventional generating units are constructed based on total power generation output, renewable energy output, non-market generating unit output, and inter-regional tie line power. The output characteristics of conventional generating units are the total power generation output minus the renewable energy output, non-market generating unit output, and inter-regional tie line power in sequence.
[0010] Furthermore, the multi-source interpretable features include time calendar features, water season features, historical price inertia features, and operational data lag features; The time calendar features include hours, minutes, intraday hour numbers, weekdays, months, quarters, intrayear day numbers, weekend identifiers, holiday identifiers, and periodic sine and cosine codes; The water season characteristics are divided into high water season, normal water season and low water season according to the month to which the sample belongs; The historical price inertia characteristics include historical price lag terms, historical price rolling mean, historical price rolling standard deviation, historical prices at the same point in time on the same day, and multi-day statistical mean at the same point in time on the same day. The lagging characteristics of the operational data include at least one of the following: system load, new energy output, total power generation output, non-market unit output, inter-regional tie line power, net load, and conventional unit output, along with its lagging term, rolling average, and rolling fluctuation characteristics.
[0011] Furthermore, the step of performing a fusion weight search on the global prediction result and the time-specific prediction result based on the calibration set includes: Construct a set of candidate weights that increase from 0 to 1 with a fixed step size; For each candidate weight, calculate the average absolute error of the global prediction result and the time-point prediction result on the calibration set, weighted by the corresponding candidate weight; select the candidate weight that minimizes the average absolute error as the final fusion weight. When the average absolute errors corresponding to multiple candidate weights are equal or the difference is less than the preset tolerance, the candidate weight with the smallest value is selected as the final fusion weight.
[0012] Furthermore, the step of calculating the residual distribution at different intraday times based on the calibration set, and performing time-series residual calibration on the predicted values at corresponding times in the fusion prediction results, includes: The fusion prediction value of each sample in the calibration set is calculated based on the final fusion weight, and the difference between the actual electricity price of each sample and the fusion prediction value is calculated as the prediction residual. The predicted residuals are grouped according to the 15-minute time points within the day, and the median of the residuals corresponding to each time point within the day is calculated. Calculate the global median of the predicted residuals for all calibration samples; The initial calibration value is obtained by weighting the median of the residuals and the median of the global residuals based on the number of valid residual samples at each intraday time point; The initial calibration value is limited in amplitude to obtain a restricted time-division residual calibration value; The restricted time-sharing residual calibration amount is superimposed on the fusion prediction result at the corresponding time point to obtain the final predicted electricity price.
[0013] Furthermore, the method also includes: When the number of historical samples corresponding to a certain time point within a day is less than a preset threshold, the global prediction result is used to replace the time-specific prediction result for the corresponding time point.
[0014] Secondly, a price combination forecasting system integrating multi-source trading data from a power trading center is provided, including: The data processing module is used to acquire historical power transaction and operation data, and to perform data preprocessing and time alignment. The feature construction module is used to divide the preprocessed data into a training set and a calibration set, and construct multi-source interpretable features based on the training set. The global prediction module is used to build a global LightGBM prediction model, which is trained using all historical samples in the training set and outputs global prediction results. The time-sharing prediction module is used to construct time-sharing LightGBM prediction models. It groups the samples in the training set according to the 15-minute time point number within the day. Each time-sharing LightGBM prediction model is trained using only the historical samples of the corresponding time point within the day and outputs the time-sharing prediction results. The prediction fusion module is used to perform a fusion weight search on the global prediction result and the time-point prediction result based on the calibration set, determine the final fusion weight that minimizes the calibration error, and calculate the fusion prediction result based on the final fusion weight. The prediction calibration module is used to calculate the residual distribution at different intraday times based on the calibration set, perform time-series residual calibration on the predicted values at corresponding times in the fusion prediction results, and output the final predicted electricity price.
[0015] Thirdly, a computer-readable medium is provided having a computer program stored thereon, the computer program being executed by a processor to implement a method for predicting electricity price combinations that integrates multi-source trading data from an electricity trading center as described in any one of the first aspects.
[0016] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention provides a method for predicting electricity prices using a combination of multi-source trading data from a power trading center. By simultaneously constructing a global LightGBM prediction model and a time-specific LightGBM prediction model, and using a calibration set to perform fusion weight search and time-specific residual calibration on the prediction results of both models, accurate prediction of electricity spot market prices across all time periods is achieved. The global model is trained using all historical samples, enabling it to learn the overall changing patterns of electricity prices over long time scales and possessing good generalization ability. The time-specific model is trained separately for each of the 96 fifteen-minute time points within a day, deeply capturing the local price formation patterns at each specific time point. Based on this, a fusion weight search is performed using a calibration set independent of the training set, adaptively determining the optimal contribution ratio between the global model and the time-specific model, avoiding the problem of fixed weights failing under different market conditions. Furthermore, based on the calibration set, the residual distribution at different time points within the day is calculated and time-specific residual calibration is performed, effectively correcting systematic biases in the model at various time points and preventing positive and negative residuals from canceling each other out. This invention overcomes the shortcomings of a single model in simultaneously taking into account global trends and local accuracy, significantly improving the accuracy and stability of electricity price forecasting, and especially improving the forecast lag and oversmoothing problems in special periods.
[0017] 2. This invention ensures the continuity and consistency of multi-source data at a 15-minute time granularity by uniformly parsing, sorting, deduplicating, standardizing fields, and handling missing and outlier values based on historical contemporaneous and adjacent time points of power trading and operation data. Simultaneously, the preprocessed data is divided into training and calibration sets according to chronological order, with the calibration set placed after the training set, simulating real-world prediction scenarios and avoiding interference from future data leaks on model evaluation. Based on this, net load characteristics and conventional unit output characteristics are constructed using original fields such as system load, renewable energy output, and inter-regional tie-line power. This characterizes the supply and demand relationship in the electricity spot market from multiple dimensions, including load demand, renewable energy consumption, inter-regional power exchange, and the support capacity of conventional units. Furthermore, time calendar characteristics, water season characteristics, historical price inertia characteristics, and operational data lag characteristics are constructed, enabling the model to perceive intraday cycles, weekly cycles, seasonal cycles, holiday effects, electricity price autocorrelation, and the changing trends of operational variables. Through the systematic construction of the above-mentioned multi-source interpretable features, this invention solves the problems of insufficient multi-source data fusion and incomplete feature engineering in the prior art, enabling the prediction model to make full use of multi-dimensional information affecting electricity price changes, thereby improving the reliability and adaptability of the prediction results.
[0018] 3. This invention constructs a candidate weight set that increases in a fixed step size from 0 to 1, and calculates the weighted average absolute error (ASE) of the global prediction result and the time-specific prediction result for each candidate weight based on the calibration set. The candidate weight that minimizes the ASE is then selected as the final fusion weight, thus achieving automated optimal search for the fusion weight. When the ASEs of multiple candidate weights are equal or the difference is less than a preset tolerance, the weight with the smaller ASE is preferentially selected to enhance model stability. After obtaining the fusion prediction result, the prediction residuals of the calibration set are further grouped according to the 15-minute time point numbers within the day. The median of the residuals at each time point and the median of the global residuals are calculated, and the two are weighted based on the number of effective residual samples at each time point to obtain the initial calibration amount. Then, amplitude limitations are used to prevent over-correction, and finally, the limited time-specific residual calibration amount is superimposed on the fusion prediction result at the corresponding time point. This invention effectively solves the problem of varying directions and magnitudes of systematic deviations at different times of the day through a time-sharing residual calibration mechanism. It avoids the mutual cancellation of positive and negative residuals caused by uniform calibration, enabling the model to obtain targeted deviation corrections during special periods such as nighttime off-peak hours, midday peak renewable energy generation, and morning and evening peak hours, thereby improving prediction accuracy and responsiveness to sudden changes in electricity prices.
[0019] 4. This invention incorporates a fallback mechanism when constructing the time-specific LightGBM prediction model, in case the number of historical samples is less than a preset threshold. If the number of historical samples corresponding to a given time point within a day is insufficient to support independent time-specific model training, the construction of a time-specific model for that time point is automatically abandoned, and the result of the global LightGBM prediction model is directly used as the time-specific prediction result for that time point in subsequent predictions. This invention solves the problem of insufficient training and unreliable prediction results for time-specific models due to sparse historical data in the early stages of electricity market operation or at certain special time points. It ensures that effective prediction outputs are obtained for all 96 time points within a day, thereby maintaining the continuity and stability of the entire prediction process and avoiding prediction interruptions or abnormal fluctuations caused by missing local data. Attached Figure Description
[0020] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart from Embodiment 1 of the present invention; Figure 2 This is a graph showing the electricity price prediction results in Embodiment 1 of the present invention; Figure 3 This is a graph showing the electricity price prediction results of the RF-ARIMA method in Embodiment 1 of the present invention; Figure 4 This is a graph showing the electricity price prediction results of the CNN-LSTM method in Embodiment 1 of the present invention; Figure 5 This is a system block diagram in Embodiment 2 of the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.
[0022] Example 1: A method for predicting electricity prices by integrating multi-source trading data from an electricity trading center, such as... Figure 1 As shown, it includes the following steps: S1: Acquire historical power transaction and operation data, and perform data preprocessing and time alignment; S2: Divide the preprocessed data into a training set and a calibration set, and construct multi-source interpretable features based on the training set; S3: Construct a global LightGBM prediction model, train it using all historical samples in the training set, and output the global prediction results; S4: Construct a time-point LightGBM prediction model. Group the samples in the training set according to the 15-minute time point number within the day. Each time-point LightGBM prediction model is trained using only the historical samples of the corresponding time point within the day, and outputs the time-point prediction results. S5: Based on the calibration set, perform a fusion weight search on the global prediction results and time-point prediction results to determine the final fusion weight that minimizes the calibration error, and calculate the fusion prediction result based on the final fusion weight; S6: Calculate the residual distribution at different intraday times based on the calibration set, perform time-series residual calibration on the predicted values at the corresponding times in the fusion prediction results, and output the final predicted electricity price.
[0023] In step S1, historical power trading and operation data are first obtained from the power trading center. This data includes fields such as trading date, trading time, real-time clearing price, system load, renewable energy output, total generating output, non-market unit output, and inter-regional tie-line power. Specifically, the trading date represents the calendar day to which the data pertains; the trading time indicates the 15-minute time slot number within that day; the real-time clearing price is the market clearing price at the corresponding time; the system load is the total grid load at that time; renewable energy output is the total output of wind and solar power; total generating output is the sum of the output of all generating units in the entire grid; non-market unit output is the output of units that do not participate in spot market competition; and inter-regional tie-line power is the power value exchanged between regions, with positive values indicating incoming power and negative values indicating outgoing power.
[0024] After acquiring the raw data, the transaction dates and times are uniformly parsed to generate time indexes corresponding to a 15-minute trading cycle. Specifically, the transaction date and time are combined into a continuous timestamp, for example, by converting the date into a number of days offset from a certain base date, and then combining it with the transaction time number to form a unique and monotonically increasing time index. Based on this time index, the sample data is sorted to ensure that the data is arranged in chronological order; then, deduplication is performed to remove duplicate records caused by repeated collection or entry; finally, field standardization is performed to unify the data type, unit, and value range of each field, so that data from different sources can be aligned at a uniform time granularity, providing a continuous and consistent sample sequence for subsequent model training.
[0025] To address potential missing or outlier values in the original dataset, imputation and correction are performed based on statistical patterns from historical data of the same period and adjacent time points. For missing values, the corresponding values for the same time point within the same historical period are first searched. If a sufficient number of valid historical data points exist, their mean or median is used as the imputation value. If historical data is insufficient, linear interpolation from adjacent time points is used for imputation. For outliers, the mean and standard deviation of each field are calculated within a sliding window. Values exceeding the mean plus or minus three standard deviations are marked as outliers and replaced with the median within the window. This process effectively reduces the impact of local missing or outlier data on subsequent prediction processes, ensuring the continuity and availability of the prediction samples.
[0026] In step S2, the preprocessed data is used as a calibration set with data from the N most recent complete trading days before the prediction time, and as a training set with all historical data prior to the calibration set. Here, N is a pre-defined positive integer, the value of which can be adjusted according to the volatility characteristics of the electricity market and the required calibration sample size; for example, it can be 30 or 60 when data is abundant, and 7 or 14 when data is limited. By placing the calibration set after the training set, a realistic prediction scenario can be simulated: training the model using historical data and calibrating the fusion weights and residual distribution using recent data, thereby avoiding the impact of future data leakage on model evaluation.
[0027] Multi-source interpretable features are constructed based on the training set. These multi-source interpretable features include net load features, conventional unit output features, time calendar features, water season features, historical price inertia features, and operational data lag features.
[0028] Net load characteristics characterize the load demand that needs to be balanced by conventional generating units after deducting renewable energy output and inter-regional power exchange. Its value equals the system load minus renewable energy output and then minus inter-regional tie-line power. Conventional generating unit output characteristics characterize the output level of conventional power sources participating in spot market competition, reflecting the market-based supply-side capacity. Its value equals the total generating output minus renewable energy output, non-market generating unit output, and then minus inter-regional tie-line power. These net load and conventional generating unit output characteristics are derived features further constructed from original multi-source data, capable of depicting market supply and demand from aspects such as load demand, renewable energy consumption, inter-regional power exchange, and the support capacity of conventional generating units.
[0029] The time calendar features are used to characterize the changing patterns of electricity prices during daily, weekly, seasonal, and holiday periods. These features include hours, minutes, intraday hour numbers, weekdays, months, quarters, yearly day numbers, weekend markers, holiday markers, and periodic sine and cosine codes. Specifically, hours and minutes represent the hour and minute position of the sample; intraday hour numbers represent the 15-minute time slot number of the sample within that day, ranging from 0 to 95; weekdays indicate the day of the week the sample belongs to; months and quarters represent the month and quarter the sample belongs to, respectively; yearly day numbers indicate the day of the year the sample belongs to; weekend markers distinguish between weekdays and rest days; holiday markers indicate statutory holidays and adjusted workdays; and periodic sine and cosine codes map cyclical variables such as hours, minutes, weekdays, and months to continuous trigonometric function values to avoid the model treating 11 PM and midnight as distant values.
[0030] Water season characteristics are used to characterize the impact of changes in power structure, water inflow, and supply-demand relationships on electricity price formation mechanisms under different water season conditions. The water season is divided into high-water season, normal-water season, and low-water season based on the month of the sample. For example, in the Southwest electricity market where hydropower accounts for a large proportion, the high-water season typically corresponds to months with abundant rainfall and high hydropower output, the low-water season to months with less rainfall and lower hydropower output, and the normal-water season lies in between. By incorporating water season characteristics, the model can perceive the impact of seasonal changes in power structure on electricity prices.
[0031] Historical price inertia features are used to characterize the short-term inertia, intraday repeatability, and weekly cyclical changes in electricity prices. These features include historical price lags, historical price rolling averages, historical price rolling standard deviations, historical prices at the same point in time within a day, and the multi-day statistical averages at the same point in time within a day. Specifically, the historical price lags refer to the actual electricity prices at several adjacent points in time prior to the current forecast point, used to capture the short-term autocorrelation of electricity prices; the historical price rolling average is the average of historical electricity prices within a sliding window, used to characterize the recent price level; the historical price rolling standard deviation characterizes the degree of recent price volatility; the historical prices at the same point in time within a day refer to the electricity prices corresponding to the same time number over several past days, used to capture intraday repeatability patterns in electricity prices; and the multi-day statistical averages at the same point in time within a day refer to the average electricity prices at the same time number over several past days, used to characterize the long-term price benchmark at that point in time.
[0032] Operational data lag features are used to characterize the changing trends in electricity supply and demand and the impact of operational factors on real-time clearing prices. These features include lag terms, rolling means, and rolling fluctuation characteristics for at least one of the following: system load, renewable energy output, total generating output, non-market unit output, inter-regional tie-line power, net load, and conventional unit output. The lag terms characterize the short-term continuity of each operational variable, the rolling means characterize the recent average level of each operational variable, and the rolling fluctuation characteristics characterize the recent volatility of each operational variable. By introducing operational data lag features, the model can perceive the transmission effect of operational factors such as load change trends, renewable energy output fluctuations, and inter-regional power adjustments on electricity prices.
[0033] In some optional examples, the above features can also be normalized to scale all numerical features to the range of zero to one, so as to eliminate the influence of different units on model training.
[0034] In step S3, the global LightGBM prediction model uses all the multi-source interpretable features constructed based on the training set in step S2 as input features, and the real-time clearing price corresponding to each sample in the training set as the supervision label. Supervised training is performed using all historical samples in the training set. LightGBM is an ensemble learning algorithm based on gradient boosting decision trees, which gradually reduces prediction error by iteratively constructing decision trees and fitting the residuals of the previous round. The global LightGBM prediction model aims to learn the overall electricity price change patterns under different dates, different water seasons, different load levels, new energy output levels, and historical price inertia conditions. Because the model utilizes all historical samples in the training set for training, it can access a wide range of supply and demand scenarios and price patterns, thus exhibiting good overall generalization ability. After training, for any given sample to be predicted, the global LightGBM prediction model outputs the corresponding global prediction result, which reflects the estimated electricity price at that point in time based on global historical patterns.
[0035] In step S4, because electricity prices in the spot market vary significantly across different times of the day—for example, the price formation patterns differ during nighttime off-peak hours, midday peak hours for renewable energy, and morning and evening peak hours—a single global model is insufficient to fully capture the local price characteristics at each point in time. Therefore, the samples in the training set are grouped according to 15-minute time point numbers within the day. Since a day contains 96 15-minute time points, the values of the time point numbers range from 0 to 95. An independent time-segment LightGBM prediction model is constructed for each time point number, resulting in a total of 96 time-segment LightGBM prediction models.
[0036] Each time-of-day LightGBM prediction model is trained using only historical samples from the corresponding intraday time point in the training set. Specifically, for a time-of-day model with the intraday time point numbered h, where h ranges from 0 to 95, all samples with a trading time point equal to h are selected from the training set. Supervised training is then performed using the multi-source interpretable features of these samples as input and the real-time clearing price of the corresponding time point as the supervisory label. Because each time-of-day model only accesses historical data for that specific time point, it can deeply learn the relatively stable local price formation patterns at that time point. For example, electricity prices during off-peak hours at night are affected by base load and minimum output constraints of conventional units; during midday hours, they are affected by concentrated output from renewable energy sources and a decrease in net load; and during morning and evening peak hours, they are affected by rapid load changes.
[0037] During training, it's necessary to consider the issue of insufficient sample sizes for certain intraday time points due to a lack of historical data. For example, historical samples may be sparse at the initial stage of electricity market operation or at certain special times (such as specific periods in the early morning). When the number of historical samples corresponding to a given intraday time point is less than a preset threshold, the time-specific LightGBM prediction model for that time point cannot obtain sufficient training data. In this case, building a separate time-specific model for that time point is abandoned, and the result of the global LightGBM prediction model is directly used as the time-specific prediction result for that time point in subsequent predictions to ensure the continuity and stability of the prediction process. For intraday time points with sufficient sample sizes, the system completes the training of the time-specific model normally.
[0038] After training, for any given sample to be predicted, the corresponding time-of-day LightGBM prediction model is called according to the intraday time point number to which the sample belongs, and the time-of-day prediction result for that time point is output.
[0039] In step S5, since the global model focuses on the overall trend while the time-specific model focuses on local time-period features, the two prediction results have their own advantages and disadvantages in different scenarios. Simple equal-weighted averaging or empirical weighting cannot guarantee the best results in all time periods. Therefore, this invention uses a calibration set to perform a fusion weight search on the global prediction results and the time-specific prediction results to determine the final fusion weight that minimizes the calibration error.
[0040] Since the calibration set is time-series data independent of the training set and reflects recent market conditions, the fusion weights obtained based on the calibration set can adaptively adjust the contribution ratio of the global model and the time-specific model in the fusion. To achieve this, a candidate weight set is first constructed. The candidate weight set contains a series of discrete values from 0 to 1, increasing by a fixed step size. For example, with a step size of 0.05, the candidate weight set is {0, 0.05, 0.10, 0.15, ..., 0.95, 1.00}. Each candidate weight w represents the proportion of the time-specific prediction result in the fusion result, and the corresponding proportion of the global prediction result is 1 minus w.
[0041] For each candidate weight w, the system calculates the fusion prediction result for all samples on the calibration set, expressed as: ; in, This represents the fusion prediction result of the i-th sample in the calibration set under the candidate weight w; This represents the global prediction result for the i-th sample; This represents the time-point prediction result corresponding to the i-th sample.
[0042] Then, the mean absolute error on the calibration set under the candidate weights is calculated. Its expression is: ; in, This represents the total number of samples in the calibration set. Let represent the actual electricity price of the i-th sample. The mean absolute error measures the average deviation between the fused prediction result and the actual electricity price under the candidate weights; a smaller value indicates a better fusion effect.
[0043] Iterate through all candidate weights, calculate the mean absolute error for each candidate weight, and select the candidate weight that minimizes the mean absolute error as the final fusion weight, denoted as . Since the candidate weight set is discrete, there may be multiple candidate weights with equal mean absolute errors or differences less than the preset tolerance. When this occurs, the candidate weight with the smaller value is preferentially selected as the final fusion weight. This is because smaller time-point weights mean greater reliance on the global model, which typically has better stability and reduces the risk of overfitting.
[0044] Determine the final fusion weights Then, the fusion prediction results of each sample in the calibration set are calculated based on the weight.
[0045] In step S6, due to differences in load levels, power structure, and supply-demand patterns across different intraday time periods, the fusion prediction model may exhibit systematic prediction biases of varying directions and magnitudes at different intraday points. For example, electricity prices during off-peak hours at night are typically more susceptible to the influence of base load and minimum output constraints of conventional units; during morning peak hours, they are more susceptible to rapid load increases; during midday, they are more susceptible to concentrated renewable energy output and net load declines; and during evening peak hours, they may be simultaneously affected by declining renewable energy output and sustained high load levels. If a uniform residual calibration is used across all time points, positive and negative residuals at different intraday points may cancel each other out, making it difficult to correct persistent biases at specific points. Therefore, this invention groups recent fusion prediction residuals according to the intraday 15-minute transaction time point number and uses historical residuals from the same intraday time point to individually calibrate the fusion prediction results for corresponding future time points.
[0046] The first step in time-sharing residual calibration is to calculate the fusion prediction value for each sample in the calibration set based on the final fusion weights. For the i-th sample in the calibration set, its fusion prediction value is expressed as: ; in, This represents the fusion prediction value of the i-th sample in the calibration set; This represents the global prediction result for the i-th sample; This represents the time-point prediction result corresponding to the i-th sample.
[0047] The second step is to calculate the prediction residual for each sample. The prediction residual is defined as the difference between the actual electricity price and the merged prediction value, and its expression is: ; in, This represents the prediction residual for the i-th sample. This represents the actual electricity price for the i-th sample. When... A value greater than 0 indicates that the fusion prediction result is lower than the actual electricity price; A value less than 0 indicates that the fusion prediction result is higher than the actual electricity price.
[0048] The third step is to group the prediction residuals according to the 15-minute time point number within the day. Based on the time point number h to which each sample belongs within the day, the prediction residuals of that sample are assigned to the corresponding residual set. For the h-th time point within the day, its residual set is represented as: ; in, This represents the set of indices for all calibration samples with time point number h within a day. This represents the intraday time point number of the i-th sample.
[0049] The fourth step is to calculate the median of the residuals for each intraday time point. For the h-th intraday time point, the median of the residuals is calculated as follows: ; in, This represents the median of the time-of-day residuals at the h-th time point. Using the median instead of the residual mean can reduce the impact of extreme electricity prices, abnormal clearing results, and short-term operational mutations on the calibration quantity.
[0050] The fifth step is to calculate the median of the global residuals for all calibration samples. The median of the global residuals does not distinguish between intraday time points, and its expression is: ; in, This represents the median of the global residuals. This represents the set of indices for all calibration samples. The global residual median will serve as a backup calibration value when the time-division residual samples are insufficient.
[0051] The sixth step is to reliably weight the median of the time-sharing residuals and the median of the global residuals based on the number of effective residual samples at each intraday time point to obtain the initial calibration value. Since the number of effective residual samples at each intraday time point within the recent calibration window may be small, directly using the median of the time-sharing residuals may lead to unstable calibration values. Therefore, this invention employs a reliability-weighted method to shrink the median of the time-sharing residuals towards the median of the global residuals, the expression of which is: ; in, This represents the initial calibration value at time point h within the day; This represents the number of valid calibration samples corresponding to the h-th time point within the day. A positive integer parameter representing the degree to which the time-sharing calibration quantity shrinks towards the global calibration quantity. When it is large, It is mainly determined by the historical residuals of that intraday time point itself; when When smaller, To more closely approximate the global residual median, thus avoiding significant fluctuations in calibration values due to a small number of outlier samples. When no valid residual sample exists at the h-th intraday time point, the global residual median is directly used. As the calibration value at that point in time.
[0052] The seventh step is to impose an amplitude limit on the initial calibration value to obtain a constrained time-division residual calibration value. To prevent extreme residuals from causing over-correction of the prediction results, the system imposes an amplitude limit on the initial calibration value, the expression of which is: ; The function is defined as follows: ; in, This represents the restricted time-of-use residual calibration amount at time point h within the day; C represents the maximum permissible calibration range. The maximum permissible calibration range can be determined based on the preset quantiles of the absolute values of the residuals in the calibration set, or it can be preset based on the price fluctuation range of the target electricity market.
[0053] The eighth step is to superimpose the restricted time-sharing residual calibration amount onto the fusion prediction result at the corresponding time point to obtain the final predicted electricity price. For future samples to be predicted, first determine the intraday time point number h corresponding to the sample, and then superimpose the corresponding restricted time-sharing residual calibration amount onto the fusion prediction result. The expression is as follows: ; in, This represents the final calibrated predicted electricity price at time t; This represents the fusion prediction result for the corresponding samples. This represents the constrained time-sharing residual calibration amount corresponding to the intraday time point of the sample.
[0054] In practical applications, before generating the forecast results for each new trading day, the time-sharing residual calibration is updated based on data from the most recent complete trading days prior to the forecast time. This ensures that the calibration reflects recent market changes in a timely manner. Through this time-sharing residual calibration process, the systematic biases of the fusion forecast model at different points in time within a day can be effectively corrected, improving forecast accuracy and responsiveness to sudden changes in electricity prices.
[0055] Experimental verification The mean absolute error (MAE), root mean square error (RMSE), mean absolute percentage error (MAPE), and coefficient of determination were used. The predictive performance of the model is evaluated. MAE measures the mean absolute deviation between the predicted and actual values; a smaller value indicates a lower overall model error. RMSE is more sensitive to larger errors and reflects the model's predictive stability during periods of sharp fluctuations or abrupt changes in electricity prices. MAPE expresses the prediction error as a percentage, facilitating a direct comparison of the prediction accuracy of different models. It is used to measure the model's ability to explain the actual trend of electricity price changes. The closer its value is to 1, the better the model fits.
[0056] like Figure 2 As shown, the electricity price forecast for the next 300 points yields the following relevant indicators: MAE=16.0807, RMSE=17.1868, MAPE=4.77%, R 2 =0.8408.
[0057] like Figure 3 As shown, this is the result of electricity price forecasting using the RF-ARIMA method. The relevant indicators obtained are: MAE=19.0023, RMSE=20.3169, MAPE=5.53%, R 2 =0.7775.
[0058] like Figure 4 As shown, this is the electricity price prediction result based on the CNN-LSTM method. The relevant indicators obtained are: MAE=21.9682, RMSE=27.0206, MAPE=6.69%, R 2 =0.6065.
[0059] In summary, all three methods can track the trend of real electricity price changes to some extent. However, the method of this invention outperforms the RF-ARIMA and CNN-LSTM methods in all indicators, indicating that the method of this invention has higher prediction accuracy and better trend fitting ability. The prediction curves of the RF-ARIMA and CNN-LSTM methods are relatively smooth, and their ability to characterize local fluctuations is insufficient. The red dashed box in the figure marks the area of sharp fluctuations in electricity prices in a short period of time, used to observe the model's ability to capture extreme situations. Within this area, the method of this invention can better follow the rapid decline and recovery of real electricity prices, while the RF-ARIMA and CNN-LSTM methods have a weaker response to the magnitude of abrupt changes, exhibiting certain smoothing and lag phenomena.
[0060] Example 2: A price combination prediction system integrating multi-source trading data from a power trading center. This system is used to implement the price combination prediction method integrating multi-source trading data from a power trading center described in Example 1, such as... Figure 5 As shown, it includes a data processing module, a feature construction module, a global prediction module, a time-sharing prediction module, a prediction fusion module, and a prediction calibration module.
[0061] The system comprises the following modules: a data processing module for acquiring historical electricity trading and operational data, and performing data preprocessing and time alignment; a feature construction module for dividing the preprocessed data into training and calibration sets, and constructing multi-source interpretable features based on the training set; a global prediction module for building a global LightGBM prediction model, training it using all historical samples in the training set, and outputting the global prediction result; a time-of-day prediction module for building a time-of-day LightGBM prediction model, grouping samples in the training set according to the 15-minute time point number within the day, with each time-of-day LightGBM prediction model trained only using historical samples from the corresponding time point within the day, and outputting the time-of-day prediction result; a prediction fusion module for searching fusion weights between the global prediction result and the time-of-day prediction result based on the calibration set, determining the final fusion weights that minimize the calibration error, and calculating the fused prediction result based on the final fusion weights; and a prediction calibration module for calculating the residual distribution of different time points within the day based on the calibration set, performing time-of-day residual calibration on the predicted values of the corresponding time points in the fused prediction result, and outputting the final predicted electricity price.
[0062] Example 3: A computer-readable medium having a computer program stored thereon, the computer program being executed by a processor to implement a method for predicting electricity price combinations that integrates multi-source trading data from an electricity trading center as described in Example 1.
[0063] Working Principle: This invention achieves accurate all-day prediction of electricity spot market prices by simultaneously constructing a global LightGBM prediction model and a time-specific LightGBM prediction model, and using a calibration set to perform fusion weight search and time-specific residual calibration on the prediction results of the two models. The global model is trained using all historical samples, enabling it to learn the overall change pattern of electricity prices over a long time scale and possessing good generalization ability. The time-specific model is trained separately for each of the 96 fifteen-minute time points within a day, enabling it to deeply capture the local price formation patterns at each specific time point. Based on this, a fusion weight search is performed using a calibration set independent of the training set to adaptively determine the optimal contribution ratio of the global model and the time-specific model, avoiding the problem of fixed weights failing under different market conditions. Furthermore, the residual distribution at different time points within the day is calculated based on the calibration set, and time-specific residual calibration is performed, which can effectively correct the systematic biases of the model at each time point and prevent positive and negative residuals from canceling each other out. This invention overcomes the shortcomings of a single model in simultaneously taking into account global trends and local accuracy, significantly improving the accuracy and stability of electricity price forecasting, and especially improving the forecast lag and oversmoothing problems in special periods.
[0064] 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.
[0065] 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.
[0066] 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 1One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0067] 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.
[0068] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for predicting electricity prices by integrating multi-source trading data from an electricity trading center, characterized in that, Includes the following steps: Acquire historical power transaction and operation data, and perform data preprocessing and time alignment; The preprocessed data is divided into a training set and a calibration set, and multi-source interpretable features are constructed based on the training set. Construct a global LightGBM prediction model, train it using all historical samples in the training set, and output the global prediction result; Construct a time-sharing LightGBM prediction model, group the samples in the training set according to the 15-minute time point number within the day, and train each time-sharing LightGBM prediction model using only the historical samples of the corresponding time point within the day, and output the time-sharing prediction result; Based on the calibration set, a fusion weight search is performed on the global prediction result and the time-point prediction result to determine the final fusion weight that minimizes the calibration error, and the fusion prediction result is calculated based on the final fusion weight. Based on the calibration set, the residual distribution at different intraday times is calculated, and the predicted values at corresponding times in the fusion prediction results are calibrated using time-division residuals to output the final predicted electricity price.
2. The method for predicting electricity prices by integrating multi-source trading data from a power trading center according to claim 1, characterized in that, The data preprocessing and time alignment include: The transaction date and time are uniformly parsed to generate a time index corresponding to a 15-minute transaction cycle. Based on the time index, the sample data is sorted, deduplicated, and standardized. For missing or outlier values in the original dataset, we use statistical patterns based on historical data from the same period and adjacent time points to fill and correct them.
3. The method for predicting electricity prices by integrating multi-source trading data from a power trading center according to claim 1, characterized in that, The step of dividing the preprocessed data into a training set and a calibration set includes: The preprocessed data is arranged in chronological order, and the data of the most recent N complete trading days before the prediction time is used as the calibration set, and all historical data before the calibration set is used as the training set, where N is a preset positive integer.
4. The method for predicting electricity prices by integrating multi-source trading data from a power trading center according to claim 1, characterized in that, The construction of multi-source interpretable features based on the training set includes: The net load characteristic is constructed based on the system load, the output of new energy sources, and the power of inter-regional tie lines. The net load characteristic is the value obtained by subtracting the output of new energy sources and the power of inter-regional tie lines from the system load. The output characteristics of conventional generating units are constructed based on total power generation output, renewable energy output, non-market generating unit output, and inter-regional tie line power. The output characteristics of conventional generating units are the total power generation output minus the renewable energy output, non-market generating unit output, and inter-regional tie line power in sequence.
5. The method for predicting electricity prices by integrating multi-source trading data from a power trading center according to claim 1, characterized in that, The multi-source interpretable features include time calendar features, water season features, historical price inertia features, and operational data lag features; The time calendar features include hours, minutes, intraday hour numbers, weekdays, months, quarters, intrayear day numbers, weekend identifiers, holiday identifiers, and periodic sine and cosine codes; The water season characteristics are divided into high water season, normal water season and low water season according to the month to which the sample belongs; The historical price inertia characteristics include historical price lag terms, historical price rolling mean, historical price rolling standard deviation, historical prices at the same point in time on the same day, and multi-day statistical mean at the same point in time on the same day. The lagging characteristics of the operational data include at least one of the following: system load, new energy output, total power generation output, non-market unit output, inter-regional tie line power, net load, and conventional unit output, along with its lagging term, rolling average, and rolling fluctuation characteristics.
6. The method for predicting electricity prices by integrating multi-source trading data from a power trading center according to claim 1, characterized in that, The step of performing a fusion weight search on the global prediction result and the time-specific prediction result based on the calibration set includes: Construct a set of candidate weights that increase from 0 to 1 with a fixed step size; For each candidate weight, calculate the average absolute error of the global prediction result and the time-point prediction result on the calibration set, weighted by the corresponding candidate weight; select the candidate weight that minimizes the average absolute error as the final fusion weight. When the average absolute errors corresponding to multiple candidate weights are equal or the difference is less than the preset tolerance, the candidate weight with the smallest value is selected as the final fusion weight.
7. The method for predicting electricity prices by integrating multi-source trading data from a power trading center according to claim 1, characterized in that, The step of calculating the residual distribution at different intraday times based on the calibration set, and performing time-series residual calibration on the predicted values at corresponding times in the fusion prediction results, includes: The fusion prediction value of each sample in the calibration set is calculated based on the final fusion weight, and the difference between the actual electricity price of each sample and the fusion prediction value is calculated as the prediction residual. The predicted residuals are grouped according to the 15-minute time points within the day, and the median of the residuals corresponding to each time point within the day is calculated. Calculate the global median of the predicted residuals for all calibration samples; The initial calibration value is obtained by weighting the median of the residuals and the median of the global residuals based on the number of valid residual samples at each intraday time point; The initial calibration value is limited in amplitude to obtain a limited time-division residual calibration value; The restricted time-sharing residual calibration amount is superimposed on the fusion prediction result at the corresponding time point to obtain the final predicted electricity price.
8. The method for predicting electricity prices by integrating multi-source trading data from a power trading center according to claim 1, characterized in that, The method also includes: When the number of historical samples corresponding to a certain time point within a day is less than a preset threshold, the global prediction result is used to replace the time-specific prediction result for the corresponding time point.
9. A power price combination forecasting system integrating multi-source trading data from a power trading center, characterized in that, include: The data processing module is used to acquire historical power transaction and operation data, and to perform data preprocessing and time alignment. The feature construction module is used to divide the preprocessed data into a training set and a calibration set, and construct multi-source interpretable features based on the training set. The global prediction module is used to build a global LightGBM prediction model, which is trained using all historical samples in the training set and outputs global prediction results. The time-sharing prediction module is used to construct time-sharing LightGBM prediction models. It groups the samples in the training set according to the 15-minute time point number within the day. Each time-sharing LightGBM prediction model is trained using only the historical samples of the corresponding time point within the day and outputs the time-sharing prediction results. The prediction fusion module is used to perform a fusion weight search on the global prediction result and the time-point prediction result based on the calibration set, determine the final fusion weight that minimizes the calibration error, and calculate the fusion prediction result based on the final fusion weight. The prediction calibration module is used to calculate the residual distribution at different intraday times based on the calibration set, perform time-series residual calibration on the predicted values at corresponding times in the fusion prediction results, and output the final predicted electricity price.
10. A computer-readable medium having a computer program stored thereon, characterized in that, The computer program is executed by a processor to implement a method for predicting electricity price combinations that integrates multi-source trading data from an electricity trading center, as described in any one of claims 1-8.
