A structured decomposition loss function design method for electricity spot market price forecasting
By designing a structured decomposition loss function, the electricity price series is decomposed into trend, periodic, and peak impact components. Combined with an adaptive weighting mechanism, the stability and robustness of electricity spot market price forecasting are improved, solving the problem of insufficient fitting ability in existing technologies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG HUAHE GREEN ENERGY CO LTD
- Filing Date
- 2026-04-21
- Publication Date
- 2026-07-17
AI Technical Summary
Existing electricity price forecasting methods struggle to effectively fit trend changes, peak-valley structures, and peak events when faced with non-stationary changes and peak fluctuations in the electricity spot market, resulting in insufficient stability and robustness of the forecast results.
A structured decomposition loss function design method is adopted. By obtaining a training sample set, an electricity price prediction model is constructed and the trend, cycle and peak impact components are decomposed. Combined with an adaptive weighting mechanism, a total loss function is formed, and the model is iteratively trained to improve the fitting ability.
It improves the ability of electricity price forecasting models to fit trends, peak-valley structures, and peak events, enhances the stability and robustness of forecast results, and supports the accuracy of trading decisions.
Smart Images

Figure CN122412950A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electricity market data analysis technology, specifically to a structured decomposition loss function design method for electricity spot market price forecasting. Background Technology
[0002] In the electricity spot market, day-ahead and real-time electricity prices are influenced by factors such as load levels, renewable energy output forecasts, unit availability, network constraints, and market trading behavior. The electricity price series exhibits significant non-stationary characteristics, with a clear intraday peak-valley cycle structure and large-amplitude spikes in a few periods, which increases the difficulty of electricity price forecasting and affects the accuracy of market decisions.
[0003] Existing electricity price forecasting methods typically use point prediction losses such as mean squared error or mean absolute error as training targets, or simply smooth the prediction output. However, these loss functions mainly focus on hourly errors and lack specific constraints on trend changes, peak-valley structure time series characteristics, and peak events within the prediction interval. This may lead to cumulative biases in the prediction results, peak-valley time period shifts, and insufficient peak identification and amplitude fitting capabilities, thereby affecting the stability and robustness of the prediction results.
[0004] Therefore, it is necessary to propose a training objective design method for electricity price forecasting, which can perform structured decomposition of electricity price or price difference sequences within the forecast interval, and set supervision terms for trend components, periodic components and peak impact components respectively and introduce an adaptive weight adjustment mechanism to improve the comprehensive fitting ability of the electricity price forecasting model to trend changes, peak-valley structure and peak events, thereby improving the stability and robustness of the forecast results. Summary of the Invention
[0005] The technical problem to be solved by this invention is to overcome the above-mentioned technical defects and provide a structured decomposition loss function design method for electricity spot market price forecasting, which effectively improves the fitting ability of the electricity price forecasting model to medium- and long-term trends, peak-valley structure and sudden peak events, thereby improving the stability and robustness of the forecasting results.
[0006] To solve the above-mentioned technical problems, the technical solution provided by this invention is: a structured decomposition loss function design method for electricity spot market price forecasting, comprising the following steps: S1: Obtain a training sample set including historical market data and corresponding day-ahead and real-time electricity price sequences; S2: Construct the electricity price prediction model to be optimized based on the training sample set and set the prediction time window and loss function configuration parameters; S3: Perform structural decomposition on the electricity price series or price difference series within the prediction time window to obtain trend components, cycle components and peak impact components; S4: Calculate the supervision loss terms for the corresponding components obtained in S3 respectively; S5: Based on the adaptive weighting mechanism, the loss terms are weighted and combined to form the total loss function used for model training; S6: Iteratively train the electricity price prediction model based on the total loss function until the convergence condition is met; S7: Based on the trained electricity price prediction model, output the predicted price before the operating day, the predicted real-time price, and the price difference for the operating day.
[0007] Preferably, the structural decomposition in S3 includes: Use exponential moving average, multi-scale moving average, or causal filtering methods to extract trend components; Subtracting the trend component from the original sequence yields the periodic component; Peak labels are constructed based on the peak discrimination threshold to obtain peak impact components.
[0008] Preferably, the peak discrimination threshold is determined based on the quantile of the price difference sequence or electricity price sequence within the historical window, or the peak discrimination threshold is dynamically updated based on a rolling window.
[0009] Preferably, the monitoring loss term in S4 includes a trend loss term, a periodic loss term, and a spike impact loss term; The trend loss term penalizes the trend difference based on smoothed L1 loss, constraining the direction and magnitude of the predicted trend; The periodic loss term is based on adaptive weighted mean square error, which strengthens the fitting constraints during key peak and valley periods; The peak impact loss term includes peak detection loss and peak conditional regression loss.
[0010] Preferably, the time period weighting coefficient in the periodic loss term is based on the net load forecast, the network constraint strength index, and the prior of the historical peak occurrence frequency; The time period weight coefficients satisfy the normalization condition and their sum is 1.
[0011] Preferably, the peak impact loss term includes peak detection loss and peak conditional regression loss; The peak detection loss is based on FocalLoss to constrain peak event identification, while the peak conditional regression loss only strengthens the constraint on the prediction error during peak periods.
[0012] Preferably, step S4 further includes constructing a differentiable phase alignment penalty term, which is used to penalize the time offset of the predicted periodic peak-valley structure relative to the actual periodic peak-valley structure.
[0013] Preferably, the phase alignment penalty term is constructed based on the soft-argmax method, including constructing an energy representation based on the real periodic component and the predicted periodic component, normalizing the energy representation to obtain a weight distribution, calculating the soft peak time, and defining the phase alignment penalty term based on the offset of the soft peak time.
[0014] Preferably, the phase alignment penalty term is constructed based on the cross-correlation method, which includes calculating the cross-correlation between the true periodic component and the predicted periodic component within a preset delay window, performing Softmax normalization on the cross-correlation results to obtain the delay weight distribution, calculating the soft delay estimate, and defining the phase alignment penalty term based on the soft delay estimate.
[0015] Preferably, the adaptive weighting mechanism in S5 includes: S5.1: Calculate the moving average of each loss component during the training process; S5.2: Dynamically adjust the weight coefficients of each loss term based on the moving average; S5.3: Normalize the dynamically adjusted weight coefficients to maintain the stability of the numerical scale of the total loss.
[0016] The advantages of this invention compared with the prior art are: this invention can adaptively decompose the electricity price error within the prediction interval into trend components, periodic components and peak impact components, and construct corresponding supervision terms and weight adjustment mechanisms respectively; This invention takes "model setting - sample construction - structural decomposition - component loss calculation - adaptive weighted combination - backpropagation update - prediction and application" as the main line to achieve joint supervision of trend components, cyclical components and peak impact components, and uses the trained model to run day-ahead electricity price / spread prediction and trading decision assistance. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the overall process of the method of the present invention; Figure 2 This is a schematic diagram of the algorithm flow for calculating the structured decomposition loss function and adaptive weight adjustment in this invention. Detailed Implementation
[0018] The present invention will now be described in further detail with reference to the accompanying drawings.
[0019] Combined with appendix Figure 1 As shown, a structured decomposition loss function design method for electricity price forecasting is characterized by the following steps: Step 1: Set the electricity price prediction model, training data, prediction interval, and loss function parameters; The electricity price prediction model is used to predict the day-ahead electricity price sequence and real-time electricity price sequence of operating day D based on the market disclosure information and historical information of the day before operating day D-1, or to predict the price difference sequence in its equivalent form. Step 2: Obtain samples from the training data, construct the real electricity price sequence and the predicted electricity price sequence, and calculate the electricity price difference sequence or price difference sequence; Step 3: Perform structural decomposition on the electricity price sequence or price difference sequence within the prediction interval to obtain trend components, periodic components, and peak impact components; Step 4: Calculate the trend loss term, cycle loss term, and peak impact loss term respectively, and combine each loss term in a weighted manner according to the adaptive weighting mechanism to obtain the total loss function used for backpropagation to update the model parameters. Step 5: Using the electricity price prediction model trained in Step 4, output the predicted price, predicted real-time price and its price difference for operating day D before the operating day. Use the prediction results to form trading direction signals and application adjustment suggestions to realize the engineering application of the prediction results.
[0020] In step 4, the peak impact loss term includes peak detection loss and peak conditional regression loss. Peak detection loss is used to improve the ability to identify peak events, while peak conditional regression loss is used to enhance the amplitude fitting ability of peak periods, thereby improving the model's fitting accuracy for rare peak events. At the same time, step 4 introduces a differentiable phase alignment penalty term to penalize the time offset of the peak and valley structure of the prediction period relative to the actual structure, thereby reducing the impact of peak and valley period misalignment on the stability of prediction results and the judgment of trading direction.
[0021] In specific implementation of this invention: Setting up the model and data: In a preferred embodiment of the present invention, step 1 sets the electricity price prediction model, training data, and loss function parameters. The electricity price prediction model can be a linear model, a recurrent neural network, a temporal convolutional network, a Transformer temporal model, or a combination thereof; the training data includes at least: historical day-ahead price series, historical real-time price series, and D-1 day market disclosure information (including but not limited to total grid load forecast, unit maintenance availability information, new energy forecast information, and constraint information); The historical day-ahead price series is used to characterize the temporal evolution of day-ahead market clearing prices, reflecting the planned clearing results based on D-1 day forecast information. The historical real-time price series is used to characterize the changes in adjustment prices in the real-time equilibrium market, reflecting the impact of disturbances such as new energy output deviations, changes in unit availability, and real-time adjustments to network constraints on prices. Since day-ahead and real-time prices differ in their formation mechanisms, volatility, and frequency of spikes, this invention introduces both types of price series to enhance the modeling capabilities for cross-market price spread structures and trading decision-related characteristics.
[0022] Furthermore, the overall network load forecast represents the total electricity demand of the system at each time period on the forecast day, preferably formed and disclosed by the grid dispatching agency or market operator based on historical load, meteorological, and calendar factors; the unit maintenance availability information represents the operational status and available capacity / output limit of each generating unit on the forecast day, preferably determined by the unit maintenance plan, dispatching plan, or available capacity data disclosed by the market; the renewable energy forecast information represents the output forecast values of renewable energy sources such as wind power and photovoltaics at each time period on the forecast day, preferably formed and disclosed based on meteorological forecasts and historical output models; the constraint information represents grid transmission limitation indicators such as line / section power flow constraints and congestion intensity, preferably determined by the constraint set disclosed by the dispatching safety check or the market. The above-mentioned disclosed information is input as exogenous features into the electricity price forecasting model to enhance the model's ability to characterize the coupling relationship of "load-supply-network constraints" in the electricity price formation mechanism; The loss function parameters include at least a trend smoothing parameter. Periodic weight parameters Peak threshold parameter and peak classification loss parameters ,in Used to control the smoothness of trend extraction. Used to adjust the strength of time period weights in periodic loss. Used for setting the peak discrimination threshold. Focusing degree adjustment used for peak classification loss; In a preferred embodiment of the present invention, the output of the electricity price prediction model includes: price difference regression output. and peak probability output The price spread regression output is used to provide the predicted price for the current day. Predicting real-time prices and / or its equivalent form of predicted price difference The peak probability output is used to characterize the probability of a peak event occurring during the specified time period, and is used for subsequent peak detection loss calculation and regression enhancement of the peak time period.
[0023] Specifically, the model includes a shared temporal encoder and at least two output heads: a regression head. Output ; Classification Head Output logit And through the Sigmoid function Mapping yields the peak probability: in, The logit value output by the classification head is used to characterize the time period. The intensity of the peak event; The sigmoid function is used to map real numbers to... interval; Indicates time period The predicted probability of a spike event occurring; Constructing prediction objects: In a preferred embodiment of the present invention, step 2 involves constructing both the actual electricity price sequence and the predicted electricity price sequence. Assume there are a total of [number missing] electricity prices within the prediction interval. For each time period, the true daily price series is: The real-time price series is The predicted price series for the day is The predicted real-time price series is ; Furthermore, construct a price spread series: The price spread sequence is used to characterize the relative magnitude between the day-to-day and real-time prices, which facilitates direct judgment of the direction of spot arbitrage in the power market.
[0024] Structural decomposition: In a preferred embodiment of the present invention, step 3 performs structural decomposition on the price difference sequence or electricity price sequence within the prediction interval to obtain trend components, periodic components and peak impact components.
[0025] Trend Extraction: Exponential moving average (EMA), multi-scale moving average, or causal filtering methods are used to analyze the sequence. Extracting trend components From the sequence Extracting trend components The EMA recursive formula is as follows: in This is the trend smoothing parameter.
[0026] Periodic extraction: Subtracting the trend component from the original sequence yields the periodic component: Peak impact extraction: Constructing peak labels based on peak discrimination rules of real sequences. Preferably: in, Represents the absolute value operator; The threshold for peak discrimination is preferably selected from historical windows. The threshold is determined by the quantile (e.g., the 95th percentile) or business experience threshold; more preferably, past experience thresholds can be used. The rolling window for each trading day Updates are made to adapt to changes in market conditions, including The length of the rolling statistics window (in trading days).
[0027] Construct the loss function and weighted combination: The trend loss term is used to constrain the direction and magnitude of the predicted trend, and a smoothed L1 loss is used to penalize the trend difference. in , .
[0028] The periodic loss term is used to constrain the prediction accuracy of peak-valley structure, employing an adaptive weighted mean square error: in, These are time-period weighting coefficients used to enhance the fitting constraint strength for key peak and trough periods and high-risk periods, preferably satisfying... and .
[0029] Time period weight construction: Assume the disclosed information includes load forecasts. New energy forecast or net load and constraint / congestion intensity index Simultaneously, a priori information on the frequency of historical spikes is constructed: Will Normalization Define the overall score: in, Indicates the forecast day period The system load forecast value; Indicates the forecast day period Forecast values of new energy power output; This represents the net load forecast. Indicates time period Network constraint / congestion intensity index; Indicates the time period within the historical window Prior information on the frequency of peak occurrence; Indicates the first in history The period of each trading day Does a spike occur? To calculate the length of the statistical window; Indicates to The normalized value is preferably obtained by range scaling (min-max) or quantile scaling, so that it falls within the range of... interval; The non-negative coefficient for the overall score is used to adjust the relative contributions of net load, congestion intensity, and peak prior to the weight construction.
[0030] Time-period weights are constructed based on scores: in, It is an exponential function; This is a truncation function used to truncate the input. Limited to the range within; denominator This represents the exponential mean of the scores within the prediction interval, used to scale the weights to avoid overall weight shifts between different samples. This is a periodic weight parameter used to adjust the dispersion and intensity of the weights.
[0031] The peak impact loss term includes peak detection loss and peak conditional regression loss, where peak detection probability is the most significant factor. Obtained from the peak probability output head (or derived from the differentiability of the prediction periodic component amplitude), used in conjunction with peak labels. Calculate the peak detection loss; Peak detection loss: Peak detection loss is achieved using Focal Loss: in, It is the natural logarithm function; To focus parameters, this is used to reduce the contribution of easily classified samples to the loss and increase the contribution of difficult-to-classify samples to the loss, thereby alleviating the class imbalance problem caused by the sparsity of samples during peak events; in one implementation, to avoid The numerical problem can be solved by... Cut off to The interval, in which It is a very small positive number.
[0032] Peak conditional regression loss: The peak-conditional regression loss only reinforces the error during peak periods: in, To prevent constants with a denominator of zero; by only considering... By weighting the error over time periods, the model's ability to fit the amplitude of peak periods can be improved and the impact of missed fitting of peak periods on trading risk control can be reduced.
[0033] To penalize the time shift of the predicted periodic peak-valley structure relative to the actual periodic peak-valley structure, a phase alignment penalty term can be introduced. .
[0034] Phase offset is used to characterize the positional difference of the peak (or valley) of the periodic component on the time axis; by penalizing the phase offset, the bias in the trading direction judgment caused by the "peak-valley misalignment" in the prediction results can be reduced.
[0035] To facilitate end-to-end training, the phase alignment penalty term is preferably constructed in a differentiable form.
[0036] soft-argmax phase alignment: In a preferred embodiment, based on the true periodic component With prediction periodic components Constructing energy representation: in, For the time period index within the prediction interval, To predict the total number of time periods in the interval; It is an absolute value operator used to simultaneously characterize the magnitude of positive peaks and negative troughs; This is a temperature / sharpening parameter used to control the sharpness of the energy distribution. The larger the amplitude, the more concentrated the energy distribution is in the period with the larger amplitude.
[0037] Normalizing the energy representation yields the weight distribution: in, and Let represent the normalized weights of the actual periodic component and the predicted periodic component in each time period, respectively, satisfying ... and .
[0038] Furthermore, the soft-argmax time is defined as follows: in, This is the result of estimating the position of the peak (or valley) on the time axis in a differentiable manner.
[0039] The phase alignment penalty term is defined as follows: in, Represents the absolute value, used to measure the offset between the predicted peak and valley positions and the actual peak and valley positions; The larger the value, the more severe the peak-valley misalignment.
[0040] Cross-correlation phase alignment: In another embodiment, phase alignment is performed using a cross-correlation method, preferably in The cross-correlation between the actual periodic component and the predicted periodic component is calculated within the delay window: in, The delay is an integer, representing the number of time intervals the predicted sequence has shifted relative to the true sequence. The maximum allowable delay window is used to limit the range of possible time offsets in the peak-valley structure; when Exceeding When this is the case, it is preferable to use a truncation or zero-filling method.
[0041] The delay weight distribution is obtained by performing Softmax normalization on the cross-correlation results: in, and ; The temperature parameter controls the sharpness of the delay distribution, thus yielding a soft delay estimate. The phase alignment penalty term can be preferably defined as: Used to penalize overall translational deviation; or can be defined as: It is used to maximize alignment similarity in a differentiable form and indirectly suppress phase shift.
[0042] The total loss function of this invention is: in, The weighting coefficients for each loss component are preferably non-negative and are used to adjust the contribution ratio of different supervision targets (trend direction, peak-valley structure, peak identification, peak amplitude fitting, and phase alignment) to the total loss.
[0043] Loss weight adaptive adjustment: To avoid training bias caused by different dimensions or numerical scales of multiple loss components, the numerical scale of each loss component during training can be statistically analyzed, and the weights can be adaptively adjusted accordingly.
[0044] Specifically, set Indicates the training iteration round or batch number. Indicates the first During the nth iteration For each loss component, calculate its moving average: in For the first The moving average of each loss component during the iteration process. This is the attenuation coefficient, used to balance the impact of historical statistics with current losses.
[0045] Dynamic weights are set based on the moving average: Among them, the bottom right index Indicates the category number of the loss component; for different loss components, with prior coefficients Generally different, therefore the calculated They are usually different in numerical value, but they are all updated adaptively in the same form; This is the prior importance coefficient, used to reflect the relative importance of different loss components in the business objective; To prevent constants with a denominator of zero, the above construction is used to determine the numerical scale of a certain loss component ( When the value is large, its corresponding weight will decrease relatively, and vice versa, thereby alleviating the training imbalance caused by differences in different dimensions / scales.
[0046] Furthermore, to prevent the dynamic weights of each loss component from being amplified or reduced as a whole during training, thus affecting the numerical scale of the total loss, the dynamic weights can be normalized to maintain a fixed overall magnitude. Specifically, the first... The weights obtained in the next iteration Scaled according to its proportion in all loss weights and updated as follows: in," " indicates that the weight value on the left is updated using the calculation result on the right; For the summation index, Indicates a set of indexes Weighted summation of all loss components; Here is the total scaling factor for the weights. Through the above normalization, the normalized weights can satisfy... This maintains the overall magnitude of the total loss and improves the numerical stability of the training.
[0047] By employing the aforementioned structured loss and adaptive weighting mechanism, the model simultaneously focuses on the medium- to long-term trend direction, intraday peak-to-valley structure, and rare peak events during the training phase. This suppresses the adverse effects of peak-to-valley time misalignment on prediction results and trading direction judgment, thereby improving the stability and robustness of electricity price / spread prediction.
[0048] In a preferred embodiment of the present invention, after completing the training described in steps 1 to 4 and obtaining the trained electricity price prediction model, step 5 is executed to realize prediction and application.
[0049] Step 5 includes: on the operating day The day before It obtains market disclosure information and historical price information as model input, calls the trained electricity price prediction model, and outputs the operating day. Forecast Price Series for Each Time Period Predicting real-time price series Alternatively, output its equivalent form of the predicted price difference sequence. and peak risk indicator series ,in: In a preferred embodiment of the present invention, the model input includes at least: The exogenous features disclosed daily include network load forecasts, unit maintenance availability information, new energy forecasts, network constraint information, and / or congestion intensity indicators, as well as time-series features such as historical day-ahead prices, historical real-time prices, and historical price differences; these exogenous features are preferably those provided by the trading center or dispatching agency. The operational forecast information disclosed daily is used to characterize the operational day. Key drivers of price formation.
[0050] In a preferred embodiment, a trading direction signal is constructed based on the predicted price spread. : in, This indicates that the price before the forecast date is higher than the forecast real-time price. This indicates that the price before the forecast date is lower than the forecast real-time price. This indicates that the two are equivalent. The transaction direction signal is used for the running day. It provides decision support for the electricity reporting strategy.
[0051] In a preferred embodiment, a declaration adjustment ratio is constructed to meet the declaration deviation constraints in the spot market. And the benchmark declared electricity volume Adjustments will be made: in, The declared electricity volume is based on the medium- and long-term contract volume or the planned volume. In order to apply for an adjustment ratio, to meet the requirements , The maximum permissible deviation ratio is preferably [value missing]. Furthermore, one can base their decisions on trading direction signals. Constrain the sign: when Time to take ;when Time to take ; and can be based on Size pair The magnitude is adjusted to reflect the strength of the predicted price spread.
[0052] In a preferred embodiment, to reduce peak risk and improve the robustness of the reporting strategy, peak risk indicators can be used. Risk mitigation measures should be implemented for adjustments to the declaration. When... Above the threshold At that time, the adjustment ratio for declarations was suppressed, and the updated adjustment ratio for declarations was recorded as follows: : And order .in, Peak risk threshold; The suppression coefficient, The larger the value, the stronger the suppression. By adjusting reporting during periods of high risk, the adverse impact of drastic price fluctuations on decision-making outcomes can be reduced.
[0053] Step 5 utilizes the trained electricity price prediction model to predict the operating day before operation. The system forecasts day-ahead prices, real-time prices, and their spreads, and maps the forecast results into trading direction signals, order adjustments, and risk mitigation suggestions. This reduces electricity purchase costs or increases spot arbitrage profits while meeting market rule constraints, and enhances the stability and robustness of trading decisions.
[0054] The contents not described in detail in this specification are existing technologies known to those skilled in the art.
[0055] The present invention and its embodiments have been described above. This description is not restrictive, and the accompanying drawings are only one embodiment of the present invention; the actual structure is not limited thereto. In conclusion, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the invention, such designs should fall within the protection scope of the present invention.
Claims
1. A structured decomposition loss function design method for electricity spot market price forecasting, characterized in that: Includes the following steps: S1: Obtain a training sample set including historical market data and corresponding day-ahead and real-time electricity price sequences; S2: Construct the electricity price prediction model to be optimized based on the training sample set and set the prediction time window and loss function configuration parameters; S3: Perform structural decomposition on the electricity price series or price difference series within the prediction time window to obtain trend components, cycle components and peak impact components; S4: Calculate the supervision loss terms for the corresponding components obtained in S3 respectively; S5: Based on the adaptive weighting mechanism, the loss terms are weighted and combined to form the total loss function used for model training; S6: Iteratively train the electricity price prediction model based on the total loss function until the convergence condition is met; S7: Based on the trained electricity price prediction model, output the predicted price before the operating day, the predicted real-time price, and the price difference for the operating day.
2. The structured decomposition loss function design method for electricity spot market price forecasting according to claim 1, characterized in that: The structural decomposition in S3 includes: Use exponential moving average, multi-scale moving average, or causal filtering methods to extract trend components; Subtracting the trend component from the original sequence yields the periodic component; Peak labels are constructed based on the peak discrimination threshold to obtain peak impact components.
3. The structured decomposition loss function design method for electricity spot market price forecasting according to claim 2, characterized in that: The peak discrimination threshold is determined based on the quantile of the price difference sequence or electricity price sequence within the historical window, or it is dynamically updated based on a rolling window.
4. The structured decomposition loss function design method for electricity spot market price forecasting according to claim 1, characterized in that: The monitoring loss term in S4 includes trend loss term, periodic loss term, and peak impact loss term; The trend loss term penalizes the trend difference based on smoothed L1 loss, constraining the direction and magnitude of the predicted trend; The periodic loss term is based on adaptive weighted mean square error, which strengthens the fitting constraints during key peak and valley periods; The peak impact loss term includes peak detection loss and peak conditional regression loss.
5. The structured decomposition loss function design method for electricity spot market price forecasting according to claim 4, characterized in that: The time period weighting coefficient in the periodic loss term is based on the net load forecast, the network constraint strength index, and the prior of the historical peak occurrence frequency. The time period weight coefficients satisfy the normalization condition and their sum is 1.
6. The structured decomposition loss function design method for electricity spot market price forecasting according to claim 4, characterized in that: The peak impact loss term includes peak detection loss and peak conditional regression loss; The peak detection loss is based on Focal Loss to constrain peak event identification, where the peak conditional regression loss only strengthens the constraint on the prediction error during peak periods.
7. The structured decomposition loss function design method for electricity spot market price forecasting according to claim 1, characterized in that: S4 also includes constructing a differentiable phase alignment penalty term, which is used to penalize the time offset of the predicted periodic peak-valley structure relative to the actual periodic peak-valley structure.
8. The structured decomposition loss function design method for electricity spot market price forecasting according to claim 7, characterized in that: The phase alignment penalty term is constructed based on the soft-argmax method, including constructing an energy representation based on the real periodic component and the predicted periodic component, normalizing the energy representation to obtain the weight distribution, calculating the soft peak time, and defining the phase alignment penalty term based on the offset of the soft peak time.
9. The structured decomposition loss function design method for electricity spot market price forecasting according to claim 7, characterized in that: The phase alignment penalty term is constructed based on the cross-correlation method, which includes calculating the cross-correlation between the true periodic component and the predicted periodic component within a preset delay window, performing Softmax normalization on the cross-correlation results to obtain the delay weight distribution, calculating the soft delay estimate, and defining the phase alignment penalty term based on the soft delay estimate.
10. The structured decomposition loss function design method for electricity spot market price forecasting according to claim 1, characterized in that: The adaptive weighting mechanism in S5 includes: S5.1: Calculate the moving average of each loss component during the training process; S5.2: Dynamically adjust the weight coefficients of each loss term based on the moving average; S5.3: Normalize the dynamically adjusted weight coefficients to maintain the stability of the numerical scale of the total loss.