A power spot declaration coefficient generation method based on bidirectional classification-regression fusion and mathematical programming optimization

CN122736675APending Publication Date: 2026-09-11SHANSHU TECH (BEIJING) CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611024257.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-10
Publication Date
2026-09-11

AI Technical Summary

Technical Problem

[0012]本发明的目的在于提出一种用于解决电力现货申报场景下电力现货申报系数计算不准及风险平衡的问题

Benefits of technology

[0057] The bidirectional classification-regression fusion model accurately predicts the direction and magnitude of price spreads, and combines mathematical programming optimization to achieve a dynamic balance between revenue and constraints, significantly improving the accuracy of the reporting coefficient. The parameter adaptive mechanism enhances the model's generalization ability and reduces reliance on manual parameter tuning. Multi-dimensional feature engineering and data-driven methods effectively cope with market fluctuations, providing scientific decision support for electricity spot trading, reducing operational risks, and enhancing market competitiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122736675A_ABST
    Figure CN122736675A_ABST
Patent Text Reader

Abstract

The application discloses a power spot declaration coefficient generation method based on bidirectional classification-regression fusion and mathematical programming optimization, which accurately predicts the price difference direction and amplitude through a bidirectional classification-regression fusion model, realizes the dynamic balance of income and constraints in combination with mathematical programming optimization, and significantly improves the precision of the declaration coefficient; a parameter self-adaptive mechanism enhances the generalization ability of the model and reduces the dependence on artificial parameter adjustment; multi-dimensional feature engineering and data-driven methods effectively cope with market fluctuations, provide scientific decision support for power spot trading, reduce operating risks, and improve market competitiveness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power market transaction decision support technology, and in particular to a method for generating power spot market declaration coefficients based on bidirectional classification-regression fusion and mathematical programming optimization. Background Technology

[0002] Currently, China's electricity spot market generally adopts a dual-market parallel settlement mechanism of day-ahead and real-time markets. Under this mechanism, electricity retailers are required to submit their purchase / sale coefficients for each trading day to the power exchange center before the end of each trading day. The final settlement profit depends on the price difference between the day-ahead clearing price and the real-time clearing price. Therefore, the core issue for electricity retailers to maximize profits and minimize risks is how to generate the optimal submission coefficients based on accurate predictions of the future direction and magnitude of the price difference, while meeting business constraints.

[0003] Existing methods generally use data-driven models to assist or directly generate declaration strategies, and can be mainly divided into the following categories:

[0004] One method is based on single-point regression prediction. This method uses machine learning models such as XGBoost and LSTM to directly predict the specific value of the price difference, and then determines the declaration strategy according to the preset simple threshold rules (such as declaring a high coefficient if the predicted price difference is greater than zero).

[0005] The second method is based on statistical probability modeling. This method fits the probability distribution of historical price differences (such as normal distribution or t-distribution) or uses kernel density estimation, and then makes decisions based on principles such as maximizing expected utility.

[0006] Third, a few cutting-edge studies have attempted to use deep reinforcement learning methods to directly learn end-to-end application strategies from market observations.

[0007] However, none of the above methods can solve the complex decision-making problems in the electricity spot market:

[0008] The single-point regression method treats price spread prediction as a continuous numerical fit, which is insufficient for explicit modeling of the price spread direction. It is prone to misjudgment of direction at ambiguous time points where the absolute value of the price spread is small. Furthermore, its commonly used symmetric loss function (such as MSE) is not compatible with the asymmetric risk of misjudgment of direction in power trading.

[0009] Methods based on statistical probability modeling typically assume that price spreads follow a specific parametric distribution, making it difficult to capture the heavy-tailed, skewed, and multimodal characteristics of price spreads in the actual market, and lacking the ability to incorporate conditional variables such as new energy output and net load into the distribution model.

[0010] While deep reinforcement learning methods are theoretically feasible, they require a lot of interactive trial and error, have low sample efficiency, poor model interpretability, and are unstable in training in non-stationary electricity market environments, making them difficult to implement in engineering.

[0011] Therefore, a new method for generating electricity spot market declaration coefficients is urgently needed to solve the above-mentioned technical problems. Summary of the Invention

[0012] The purpose of this invention is to propose a method to solve the problems of inaccurate calculation of electricity spot market declaration coefficients and risk balancing in the context of electricity spot market declaration.

[0013] To achieve this objective, the present invention adopts the following technical solution:

[0014] A method for generating electricity spot market declaration coefficients based on bidirectional classification-regression fusion and mathematical programming optimization includes the following steps:

[0015] S101. Obtain historical market data of the electricity market, and construct a multi-dimensional feature set based on the historical market data;

[0016] S102. Based on the multidimensional feature set, construct and train a bidirectional classification model. The bidirectional classification model includes a first classifier for predicting the probability of a first-direction price difference and a second classifier for predicting the probability of a second-direction price difference. The first-direction price difference indicates that the real-time electricity price is higher than the day-ahead electricity price, and the second-direction price difference indicates that the day-ahead electricity price is higher than the real-time electricity price.

[0017] S103. Obtain the predicted market data for the target day, construct a target feature set based on the predicted market data, and input the target feature set into the bidirectional classification model to obtain the first predicted probability of the first directional price difference and the second predicted probability of the second directional price difference.

[0018] S104. Based on the first predicted probability and the second predicted probability, calculate the theoretical application coefficient for the target day;

[0019] S105. With the goal of maximizing expected returns and based on the preset business constraints of electricity market transactions, a mathematical programming model is constructed. The theoretical application coefficient is used as the input parameter to solve the mathematical programming model and obtain the optimal application coefficient for the target day.

[0020] Furthermore, step S101 includes the following sub-steps:

[0021] S1011. Obtain the historical market data, which includes historical day-ahead electricity prices, historical real-time electricity prices, renewable energy output data, load data, and market transaction data.

[0022] S1012. Based on the historical market data, construct the multidimensional feature set, which includes:

[0023] Business experience characteristics: The proportion of new energy output, net load, absolute deviation between day-ahead electricity price and real-time electricity price, and self-correction characteristics of forecast deviation are calculated based on historical data.

[0024] Sliding window statistical features: daily average electricity price, real-time average electricity price, average price difference, and standard deviation of price difference within a specified time window;

[0025] Historical similar day condition statistical characteristics: The conditional mean and conditional standard deviation of the price difference are calculated based on historical samples that have similar relative deviations from the day-ahead electricity price forecast of the target day.

[0026] Furthermore, step S102 includes the following sub-steps:

[0027] S1021. Preprocess the multidimensional feature set, wherein the preprocessing includes at least one of normalization and missing value imputation.

[0028] S1022. Perform stratified undersampling on the training samples, including:

[0029] Group the negative samples in the training samples by month;

[0030] For each group, determine the number of negative samples that need to be retained for that group based on the proportion of positive samples in that group to the total number of positive samples.

[0031] Sample a corresponding number of negative samples from the negative samples of each group, and merge them with all positive samples to form a balanced training set;

[0032] S1023. Based on the balanced training set, train the first classifier to predict the probability of the first directional price difference occurring, and train the second classifier to predict the probability of the second directional price difference occurring, wherein the first classifier and the second classifier adopt the same model structure and set different learning objectives.

[0033] S1024. The output probabilities of the first classifier and the output probabilities of the second classifier are used as meta-features and combined with the original features in the multi-dimensional feature set to train a regression model to predict the price difference range, thereby obtaining the bidirectional classification model.

[0034] Furthermore, in step S1023, both the first classifier and the second classifier use the LightGBM or random forest model, and the model hyperparameters are tuned through five-fold cross-validation.

[0035] Furthermore, step S103 includes the following sub-steps:

[0036] S1031. Obtain the forecast market data for the target day, wherein the forecast market data includes the day-ahead electricity price forecast, the renewable energy output forecast, and the load forecast for the target day;

[0037] S1032. Based on the predicted market data, construct the target feature set, wherein the target feature set includes the same feature types as the multidimensional feature set;

[0038] S1033. Input the target feature set into the bidirectional classification model to obtain the first predicted probability of the first directional price difference and the second predicted probability of the second directional price difference.

[0039] Furthermore, in step S104, the theoretical reporting coefficient is calculated using one of the following methods:

[0040] S1041. Based on the absolute difference model: Calculate the difference between the first predicted probability and the second predicted probability, and use the difference as the theoretical reporting coefficient.

[0041] S1042. Based on the proportional difference model: calculate the proportional difference between the first predicted probability and the second predicted probability, and use the proportional difference as the theoretical declaration coefficient;

[0042] S1043. Based on regression fusion mode: the first predicted probability and the second predicted probability are used as meta-features and combined with the screening features in the multi-dimensional feature set. The trained regression model is used to predict the price difference range, and the predicted value of the price difference range is used as the theoretical application coefficient.

[0043] S1044. Based on the mean substitution model: Calculate the mean of the first predicted probability and the second predicted probability, and use the mean as the theoretical reporting coefficient.

[0044] Furthermore, step S105 includes the following sub-steps:

[0045] S1051. Construct the mathematical programming model, wherein the objective function of the mathematical programming model is to maximize the expected revenue, and the preset business constraints include:

[0046] Upper and lower bound constraints on the declaration coefficient: The declaration coefficient at each point in time is within the first preset range;

[0047] Hourly coefficient and constraint: The sum of the reporting coefficients at all times throughout the day must be within the second preset range;

[0048] Fluctuation penalty: This is used to penalize deviations between the reported coefficient at each time point and the average coefficient for the whole day. The fluctuation penalty is the square of the weighted sum of the differences between the coefficient at each time point and the average coefficient for the whole day.

[0049] S1052. The mathematical programming model is solved using a convex optimization solver to obtain the optimal application coefficient that satisfies the preset business constraints.

[0050] Furthermore, step S102 includes the following steps:

[0051] S201. Define a hyperparameter space, which includes at least one of the following: training window length, orientation segmentation threshold, and undersampling ratio;

[0052] S202. Evaluate the cumulative gains of different hyperparameter combinations on historical data through daily rolling backtesting;

[0053] S203. Select at least one hyperparameter combination with the highest cumulative return for training the bidirectional classification model in step S102.

[0054] Furthermore, the method for generating electricity spot market declaration coefficients based on bidirectional classification-regression fusion and mathematical programming optimization also includes the following steps:

[0055] S106. Update the multidimensional feature set based on real-time market data, and retrain the bidirectional classification model based on the updated multidimensional feature set.

[0056] The technical solution provided by this invention may include the following beneficial effects:

[0057] The bidirectional classification-regression fusion model accurately predicts the direction and magnitude of price spreads, and combines mathematical programming optimization to achieve a dynamic balance between revenue and constraints, significantly improving the accuracy of the reporting coefficient. The parameter adaptive mechanism enhances the model's generalization ability and reduces reliance on manual parameter tuning. Multi-dimensional feature engineering and data-driven methods effectively cope with market fluctuations, providing scientific decision support for electricity spot trading, reducing operational risks, and enhancing market competitiveness. Attached Figure Description

[0058] Figure 1 This is a flowchart illustrating the steps of the method for generating electricity spot market declaration coefficients based on bidirectional classification-regression fusion and mathematical programming optimization provided in this embodiment of the invention. Detailed Implementation

[0059] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that the specific embodiments described herein are for illustrative and explanatory purposes only and are not intended to limit the present invention.

[0060] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating the steps of the method for generating electricity spot market declaration coefficients based on bidirectional classification-regression fusion and mathematical programming optimization provided in this embodiment of the invention. The method for generating electricity spot market declaration coefficients based on bidirectional classification-regression fusion and mathematical programming optimization includes the following steps:

[0061] S101. Obtain historical market data of the electricity market and construct a multi-dimensional feature set based on the historical market data.

[0062] Furthermore, step S101 includes the following sub-steps:

[0063] S1011. Obtain the historical market data, which includes historical day-ahead electricity prices, historical real-time electricity prices, renewable energy output data, load data, and market transaction data.

[0064] S1012. Based on the historical market data, construct the multidimensional feature set, which includes:

[0065] Business experience characteristics: The proportion of new energy output, net load, absolute deviation between day-ahead electricity price and real-time electricity price, and self-correction characteristics of forecast deviation are calculated based on historical data.

[0066] Sliding window statistical features: daily average electricity price, real-time average electricity price, average price difference, and standard deviation of price difference within a specified time window;

[0067] Historical similar day condition statistical characteristics: The conditional mean and conditional standard deviation of the price difference are calculated based on historical samples that have similar relative deviations from the day-ahead electricity price forecast of the target day.

[0068] The multi-dimensional feature set construction process described in step S101 aims to extract key information from raw market data that reflects market supply and demand, price fluctuation patterns, and historical similarities. Specifically, this process includes data acquisition and preprocessing, as well as the construction of three types of core features to comprehensively characterize the market conditions affecting electricity price spreads.

[0069] Specifically, in this embodiment of the invention, the data input uniformly originates from a full-feature wide table data_{province}_full_data constructed from historical market data. This table is generated by software such as databases based on historical market data and includes the following data dimensions:

[0070] ;

[0071] in Clear historical market data (such as day-ahead electricity prices, real-time electricity prices, load forecasts, renewable energy forecasts, and unit output). This is aggregating weather data (such as regional statistics aggregated by city, including sunshine, wind speed, temperature, and cloud cover). The day-ahead and real-time electricity price forecasts generated by external forecasting tools.

[0072] During implementation, due to differences in database field names and business meanings across different regions, a predefined column mapping configuration was used to automatically map database fields to unified business fields. This mechanism decouples the core algorithm layer from the specific database structure; when adding a new region, only a new column mapping needs to be configured.

[0073] For missing feature values ​​in the prediction set, this embodiment of the invention uses a three-level progressive imputation algorithm for processing:

[0074] Input: Training set Prediction set Missing feature set ;

[0075] Output: Filled ;

[0076] First level, most recent concurrent filling:

[0077] Last day of obtaining the training set ;

[0078] For each :

[0079] like For missing and exist:

[0080] ;

[0081] Second level, filler using the average of the same points over the past 15 days:

[0082] For each :

[0083] If the missing information is still present after filling, then calculate:

[0084] ;

[0085] ;

[0086] Level 3, Feature Discarding:

[0087] If the feature is filled in two stages If missing values ​​still exist, they are removed from the feature set;

[0088] Finally, output the filled version. .

[0089] For missing values ​​in the training set, when the directional model uses random forest, they are filled with 0; when using LightGBM, the original missing values ​​are preserved.

[0090] In predictive scenarios (such as predicting Monday from Friday), Saturday and Sunday are missing data. Directly using the full feature table containing the missing data for feature construction will severely impact feature quality.

[0091] In this embodiment of the invention, holiday data completion processing can be performed during the data initialization phase: using historical data prior to the last non-holiday as a benchmark, the moving average is calculated by grouping by time point, or statutory holidays are used as a retrospective substitute to construct feature data for the holiday period. This mechanism ensures the integrity of feature construction during holiday prediction and avoids feature engineering failures caused by data gaps.

[0092] S102. Based on the multidimensional feature set, construct and train a bidirectional classification model. The bidirectional classification model includes a first classifier for predicting the probability of a first-direction price difference and a second classifier for predicting the probability of a second-direction price difference. The first-direction price difference indicates that the real-time electricity price is higher than the day-ahead electricity price, and the second-direction price difference indicates that the day-ahead electricity price is higher than the real-time electricity price.

[0093] Furthermore, step S102 includes the following sub-steps:

[0094] S1021. Preprocess the multidimensional feature set, wherein the preprocessing includes at least one of normalization and missing value imputation.

[0095] S1022. Perform stratified undersampling on the training samples, including:

[0096] Group the negative samples in the training samples by month;

[0097] For each group, determine the number of negative samples that need to be retained for that group based on the proportion of positive samples in that group to the total number of positive samples.

[0098] Sample a corresponding number of negative samples from the negative samples of each group, and merge them with all positive samples to form a balanced training set;

[0099] S1023. Based on the balanced training set, train the first classifier to predict the probability of the first directional price difference occurring, and train the second classifier to predict the probability of the second directional price difference occurring, wherein the first classifier and the second classifier adopt the same model structure and set different learning objectives.

[0100] S1024. The output probabilities of the first classifier and the output probabilities of the second classifier are used as meta-features and combined with the original features in the multi-dimensional feature set to train a regression model to predict the price difference range, thereby obtaining the bidirectional classification model.

[0101] The core of constructing and training the bidirectional classification model described in step S102 lies in solving the sample imbalance problem and adopting an innovative classification-regression fusion architecture. Specifically, firstly, the training samples are balanced using a grouped stratified undersampling technique. Then, classifiers for predicting different price difference directions are trained separately. Finally, the output of the classifiers is used as meta-features and combined with the original features to train the regression model, thereby achieving joint prediction of the price difference direction and magnitude.

[0102] Specifically, in this embodiment of the invention, the feature engineering system includes five major feature categories and hundreds of features, which characterize the supply and demand status and price difference patterns of the electricity market from different perspectives, including:

[0103] I. Business Experience Characteristics:

[0104] Business experience characteristics are constructed based on knowledge of the electricity market and physical constraints, reflecting the market's supply and demand balance, including:

[0105] Characteristics of the proportion of new energy sources:

[0106] ;

[0107] ;

[0108] The proportion of renewable energy reflects the proportion of uncontrollable power sources in the total supply. The higher the proportion, the more sensitive the real-time electricity price is to fluctuations in renewable energy output, and the greater the price difference volatility.

[0109] Net load characteristics:

[0110] ;

[0111] Net load excludes the impact of renewable energy and non-market units, reflecting the true market supply and demand tension. A typical method for calculating net load is as follows:

[0112] ;

[0113] Prediction bias self-correction characteristics:

[0114] Using historical prediction errors as correction signals for current predictions:

[0115] ;

[0116] ;

[0117] ;

[0118] Its core assumption is that prediction bias has a short-term memory effect, and the prediction errors from the previous two days contain systematic bias information that can be used to correct the current prediction. This is equivalent to a first-order error compensator, which significantly improves the prediction accuracy of key input variables in actual operation.

[0119] Lagging price spread characteristics:

[0120] Autoregressive effects and mean-reverting properties used to capture price spreads:

[0121] ;

[0122] in Indicates the number of days of lag, aligned by time point within the same day.

[0123] ;

[0124] ;

[0125] Daily type characteristics:

[0126] Based on the statutory holiday database, each day is divided into three categories: weekdays (0), weekends (1), and statutory holidays (2), and independent hot unique coding features are generated. The load curve patterns and price difference behaviors of different day types are significantly different.

[0127] II. Statistical Characteristics of Sliding Windows

[0128] In this embodiment of the invention, a sliding window is used to construct sliding statistics in two directions—daily average and point average—for core electricity indicators to capture time-series patterns at different scales, including:

[0129] Daily average dimensions (grouped and sliding by time point):

[0130] For window length Day, calculation:

[0131] ;

[0132] ;

[0133]

[0134] ;

[0135] ;

[0136] in It can be any power indicator (load, wind power, photovoltaic, etc.). This is a point-in-time index. Daily average statistics capture the periodic changes in the same point in time across different dates.

[0137] Average dimension per point (sequential sliding, not grouped by time point):

[0138] For consecutive points :

[0139] ;

[0140] ;

[0141] Point-average dimensional statistics capture trend change characteristics while ignoring differences between time points.

[0142] The core fields covered by the sliding feature include: wind power output forecast, photovoltaic power output forecast, load forecast, external power output forecast, historical thermal power output, historical wind power output, historical photovoltaic power output, historical electricity price, historical market-based electricity volume, and more than ten other core indicators, with a daily average dimension window. Each field generates 5 statistical measures, and with the addition of the bias term, the daily average dimension produces hundreds of features; the point average dimension can also produce more than a hundred features.

[0143] Difference and lag characteristics:

[0144] Calculate the first-order difference and lag value for key indicators to capture their short-term rate of change and acceleration.

[0145] ;

[0146] ;

[0147] The core fields covered by differential features include: wind power output forecast, photovoltaic power output forecast, pumped storage power output forecast, external power output forecast, load forecast, new energy power output forecast, and the proportion of new energy.

[0148] Statistical characteristics of historically similar dates:

[0149] This feature aims to address the problem that traditional global statistical features cannot distinguish the differences in price difference patterns under different electricity price levels. Based on the idea of ​​conditional probability, it makes statistical inferences under similar market conditions.

[0150] Similar day filtering:

[0151] For the target sample In the window of history Filter similar samples that meet the criteria within the (default 33 days) range:

[0152] ;

[0153] in For similarity threshold, This refers to the current day's electricity price.

[0154] Avoidance strategies when fitness is insufficient:

[0155] When the number of similar samples that meet the conditions in the historical window is too small, a backoff strategy is used, that is, only the average of all price differences within that date range is calculated as a substitute to avoid missing statistics due to insufficient samples.

[0156] Calculation of conditional statistics:

[0157] For the selected set of similar samples, calculate the core statistic of the price difference distribution:

[0158] ;

[0159] ;

[0160] ;

[0161] ;

[0162] ;

[0163] The above-mentioned similar day screening algorithm generates conditional statistical features such as the price difference conditional mean.

[0164] Furthermore, a dynamic threshold adaptive adjustment mechanism based on a sliding window—similarity threshold—can be extended. It can automatically scale based on recent market volatility, and automatically widen the threshold to include more similar samples when market volatility intensifies, ensuring a sufficient sample size for statistical estimation. In the implementation of this invention, a fixed similarity threshold and regional feature engineering configuration are mainly used to achieve this type of conditional statistical feature.

[0165] Weather auxiliary features:

[0166] In regions with available weather data, the weather data is collected by region and incorporated into the feature system as a region-wide aggregated indicator:

[0167] ;

[0168] Weather features can be processed using aggregate statistics or binning coding to convert continuous numerical values ​​into categorical features. The binning threshold can be dynamically determined based on the percentile distribution of historical data to ensure a relatively balanced number of samples in each category, thereby enhancing the model's robustness to extreme weather conditions.

[0169] Furthermore, this embodiment of the invention adopts a classification-first, regression-enhanced fusion paradigm to decompose price spread prediction into two sub-tasks: direction discrimination and magnitude estimation.

[0170] Task 1, used for the first-direction spread (day-to-day price - real-time price):

[0171] ;

[0172] in The directional segmentation threshold. This indicates a strong negative price difference where the day-ahead electricity price is significantly higher than the real-time electricity price.

[0173] Task 2, used for the second-direction spread (real-time price - day-ahead price):

[0174] ;

[0175] This indicates a strong positive price spread where the real-time electricity price is significantly higher than the day-ahead electricity price.

[0176] Negative samples (label=0) for both tasks contain intervals. The flat points within the sample and the extreme points in the opposite direction. This non-mutually exclusive label construction method (a sample's...) and (They can both be 0, but not both be 1) This allows the two classifiers to focus on identifying specific signal patterns for extreme first-direction price differences and extreme second-direction price differences, respectively.

[0177] Furthermore, since extreme price difference points usually account for a small proportion, if a binary classifier is trained directly on the original imbalanced data, the model will tend to predict all samples as the majority class (label=0), resulting in a very weak ability to identify extreme directions.

[0178] This invention proposes a grouped hierarchical undersampling algorithm that preserves the monthly structure of the original data while balancing positive and negative samples.

[0179] Input: Training dataset Label column name Monthly grouping, undersampling ratio ;

[0180] Output: Balanced training dataset ;

[0181] Separating positive and negative samples:

[0182] ;

[0183] ;

[0184] Retain all positive samples: ;

[0185] Negative samples were grouped by month;

[0186] Statistical distribution of positive samples by month:

[0187] For each month ,calculate The number of items belonging to that month ;

[0188] calculate total ;

[0189] Calculate the target negative sample number for each monthly group:

[0190] For each month k: ,in Let k be the number of positive samples in month k. Let be the total number of positive samples, and rate be the undersampling ratio. This formula ensures that the negative sample allocation ratio for each month is consistent with the proportion of positive samples in the total positive samples for that month.

[0191] For each month calculate:

[0192] ;

[0193] Independent sampling was performed for each month group:

[0194] For each calculate:

[0195] ;

[0196] The final output is the merged result:

[0197] .

[0198] The key advantage of this algorithm is:

[0199] Monthly distribution is preserved. The sampling ratio for each month is determined by the proportion of positive samples in that month relative to the total positive samples, ensuring that the monthly distribution of negative samples after sampling is consistent with that of positive samples, thereby making the overall monthly distribution of the training set consistent with the original data;

[0200] Temporal structure protection. This avoids introducing temporal distribution distortions during undersampling, preventing the model from learning spurious temporal correlations.

[0201] Positive samples are fully preserved. Extreme price difference samples are also fully preserved to ensure the model's ability to learn from the minority class.

[0202] In this embodiment of the invention, an independent binary classifier is trained for each directional task, supporting two model selections:

[0203] Mode A: LightGBM classifier. During implementation, it is trained using the native lightgbm.train() API, supports automatic category feature recognition, optimizes binary logloss, and evaluates AUC. LightGBM is based on a leaf-wise growth strategy, achieving higher accuracy than RF with the same computational cost.

[0204] Mode B: Random Forest (RF) classifier. In implementation, sklearn.ensemble.RandomForestClassifier is used, and class_weight='balanced' is set to automatically adjust class weights. This is suitable for scenarios with high feature dimensions and collinearity.

[0205] Furthermore, in step S1023, both the first classifier and the second classifier use the LightGBM or random forest model, and the model hyperparameters are tuned through five-fold cross-validation.

[0206] Furthermore, step S102 includes the following steps:

[0207] S201. Define a hyperparameter space, which includes at least one of the following: training window length, orientation segmentation threshold, and undersampling ratio;

[0208] S202. Evaluate the cumulative gains of different hyperparameter combinations on historical data through daily rolling backtesting;

[0209] S203. Select at least one hyperparameter combination with the highest cumulative return for training the bidirectional classification model in step S102.

[0210] To improve the model's adaptability and robustness in non-stationary market environments, an adaptive parameter selection process is included before performing model training step S102. This process defines a search space containing key hyperparameters and uses daily rolling backtesting, with historical cumulative returns as the evaluation metric, to automatically optimize and select the optimal hyperparameter combination for subsequent model training.

[0211] Specifically, the non-stationarity of the electricity market requires that the model hyperparameters be able to adaptively adjust according to market conditions. This invention presents a complete backtesting-evaluation-selection-integration parameter adaptive link.

[0212] The system's performance is highly dependent on three core hyperparameters, defining the Cartesian product parameter space:

[0213] ;

[0214] The specific parameters are:

[0215] Training window length The number of days of historical data used for model training is controlled. Shorter windows focus on recent market patterns, while longer windows contain more training samples but may include outdated market structure information.

[0216] Directional segmentation threshold Define the threshold for determining the sample direction of the first or second price difference. The smaller the threshold, the higher the proportion of positive samples but the lower the purity of the direction signal; the larger the threshold, the purer the direction signal but the sparser the positive samples.

[0217] undersampling ratio The ratio of negative samples to positive samples. A higher ratio means more negative samples in the training set, and a sample distribution closer to the natural distribution; a lower ratio means a more balanced distribution of positive and negative samples.

[0218] Examples of parameter space configurations for different regions are shown in Table 1 below.

[0219] Table 1. Example of spatial parameter configuration for a region

[0220]

[0221] The actual parameter space can be flexibly configured according to the characteristics of each regional market, and supports Cartesian product expansion in any dimension.

[0222] Secondly, for each combination of parameters in the parameter space Perform the following backtesting process:

[0223] Historical truncation: Extracting a length of [length missing] from historical data. A data window of 1 day ensures that the construction of lagging and rolling features is supported by sufficient historical data;

[0224] Feature engineering: Performs a complete multidimensional feature engineering pipeline on the truncated data;

[0225] Daily training and prediction: For each day within the backtesting window :-by The data from days ago is used as the training set, The day is the prediction date. The bidirectional classification and fusion regression model is used for training and prediction, and the theoretical coefficients for each time point of the prediction date are output.

[0226] Coefficient optimization: Input the theoretical coefficients into the strategy optimization model to calculate the optimal application coefficients that satisfy business constraints;

[0227] Revenue Assessment: Backtesting revenue is calculated using actual price differences. Geographical application of the volume-price model:

[0228] ;

[0229] The geographical application of the quantity-only pricing model is as follows:

[0230] ;

[0231] Finally, the average daily return within the backtesting window is calculated as the overall score for this parameter combination:

[0232] .

[0233] During implementation, since the parameter space may contain dozens of combinations, if executed serially, the daily training-prediction-optimization process can take several hours. This invention employs a multi-process parallel framework, where each sub-process independently completes data loading, feature engineering, model training, prediction, and policy optimization. Multiple parameter combinations are executed in parallel, significantly reducing the total time required.

[0234] S103. Obtain the predicted market data for the target date, construct a target feature set based on the predicted market data, and input the target feature set into the bidirectional classification model to obtain the first predicted probability of the first directional price difference and the second predicted probability of the second directional price difference.

[0235] Step S103 is the specific process of applying the trained bidirectional classification model to the target day. This process first obtains the predicted market data for the target day, and constructs the target feature set in the same way as in step S101. Then, it is input into the trained model to obtain the first predicted probability of the first direction price difference and the second predicted probability of the second direction price difference, providing the core input for the subsequent calculation of the declaration coefficient.

[0236] Furthermore, step S103 includes the following sub-steps:

[0237] S1031. Obtain the forecast market data for the target day, wherein the forecast market data includes the day-ahead electricity price forecast, the renewable energy output forecast, and the load forecast for the target day;

[0238] S1032. Based on the predicted market data, construct the target feature set, wherein the target feature set includes the same feature types as the multidimensional feature set;

[0239] S1033. Input the target feature set into the bidirectional classification model to obtain the first predicted probability of the first directional price difference and the second predicted probability of the second directional price difference.

[0240] S104. Based on the first predicted probability and the second predicted probability, calculate the theoretical application coefficient for the target day.

[0241] Furthermore, in step S104, the theoretical reporting coefficient is calculated using one of the following methods:

[0242] S1041. Based on the absolute difference model: calculate the difference between the first predicted probability and the second predicted probability, and use the difference as the theoretical reporting coefficient;

[0243] S1042. Based on the proportional difference model: Calculate the proportional difference between the first predicted probability and the second predicted probability, and use the proportional difference as the theoretical declaration coefficient.

[0244] S1043. Based on regression fusion mode: the first predicted probability and the second predicted probability are used as meta-features and combined with the screening features in the multi-dimensional feature set. The trained regression model is used to predict the price difference range, and the predicted value of the price difference range is used as the theoretical application coefficient.

[0245] S1044. Based on the mean substitution model: Calculate the mean of the first predicted probability and the second predicted probability, and use the mean as the theoretical reporting coefficient.

[0246] The calculation of the theoretical reporting coefficient in step S104 aims to transform the probability information output by the model into a specific and quantifiable reporting guidance value. Specifically, four calculation modes are provided to adapt to the decision-making needs under different market scenarios.

[0247] Specifically, for any sample Calculate the conditional probabilities for both directions:

[0248] ;

[0249] ;

[0250] This invention supports multiple probability combination modes to fuse two probabilities into a theoretical coefficient:

[0251] Mode 1: Absolute Difference Mode:

[0252] ;

[0253] The economic implications of this model are as follows: the theoretical coefficient is positive when the probability of the second price spread direction is significantly higher than that of the first price spread direction; conversely, it is negative; and the theoretical coefficient approaches zero when the two probabilities are close. The theoretical coefficient serves as an input signal for optimizing profit reporting, and its numerical range can be tailored or standardized according to region and model.

[0254] Mode 2: Proportional Difference Mode

[0255] ;

[0256] When the probability of the first price difference direction is close to zero, the proportional difference approaches infinity, which is suitable for amplifying signals in highly volatile markets.

[0257] Mode 3: Regression-Fusion Mode

[0258] When the system is configured in fusion mode, an independent regression branch is added to the bidirectional probabilities. In some regions, a nested probability-regression fusion mode is used, where the probabilities output by the classification model are used as meta-features input into the regression model to transfer directional information to amplitude estimation. This process includes the following steps:

[0259] Feature selection: Rank the features by importance using the two classifiers, and retain the Top-K most important features.

[0260] ;

[0261] Meta-feature construction: The probabilities of two directions and their difference are added as meta-features to the regression feature set.

[0262] ;

[0263] The meta-features are then standardized (or normalized).

[0264] Weighted regression model training: The XGBoost regression model (or LightGBM) is used to predict the raw price spread values. Extreme price spread samples are given higher weights.

[0265] ;

[0266] During implementation, the loss function is weighted RMSE.

[0267] Quantile Regression: When quantile regression is enabled, three additional quantile models are trained to output conditional quantile estimates of the price difference.

[0268] ;

[0269] in This is the quantile loss function.

[0270] Pattern 4: Mean Replacement Pattern

[0271] ;

[0272] In this model, the theoretical coefficient reflects the total probability of extreme market deviations, without distinguishing between directions.

[0273] S105. With the goal of maximizing expected returns and based on the preset business constraints of electricity market transactions, a mathematical programming model is constructed. The theoretical application coefficient is used as the input parameter to solve the mathematical programming model and obtain the optimal application coefficient for the target day.

[0274] Furthermore, step S105 includes the following sub-steps:

[0275] S1051. Construct the mathematical programming model, wherein the objective function of the mathematical programming model is to maximize the expected revenue, and the preset business constraints include:

[0276] Upper and lower bound constraints on the declaration coefficient: The declaration coefficient at each point in time is within the first preset range;

[0277] Hourly coefficient and constraint: The sum of the reporting coefficients at all times throughout the day must be within the second preset range;

[0278] Fluctuation penalty: This is used to penalize deviations between the reported coefficients at each time point and the average coefficient for the whole day. The fluctuation penalty is the squared value of the weighted sum of the differences between the coefficients at each time point and the average coefficient for the whole day.

[0279] S1052. The mathematical programming model is solved using a convex optimization solver to obtain the optimal application coefficient that satisfies the preset business constraints.

[0280] The mathematical programming model described in step S105 aims to optimize the initially calculated theoretical reporting coefficients while satisfying the constraints of actual transaction operations, in order to find the final optimal reporting coefficients. This model uses maximizing expected returns as the objective function and introduces upper and lower bound constraints on the reporting coefficients, hourly coefficients, and a volatility penalty term for smoothing the reporting curve. Finally, it is solved using a convex optimization solver.

[0281] Specifically, in this embodiment of the invention, the strategy optimization layer transforms the theoretical coefficients after Top-K integration into the final reporting coefficients that meet business constraints, serving as a bridge connecting prediction and decision-making.

[0282] In implementation, this invention employs mathematical programming solvers such as COPT to construct the optimization model. Without fluctuation penalty, the model is a linear programming problem; with fluctuation penalty enabled, the objective function includes convex quadratic terms, forming a convex quadratic programming problem.

[0283] Specifically, the decision variables of the optimization model in this embodiment of the invention are defined as follows: , indicating the first The reporting coefficient at each point in time, .

[0284] Objective function for the quantity-only (no price quote) mode:

[0285] ;

[0286] in This is the average coefficient over the entire day. This is the fluctuation penalty coefficient.

[0287] Objective function in the volume-price model:

[0288] ;

[0289] The design principle of the fluctuation penalty term: when In this process, the optimizer, while maximizing expected returns, penalizes coefficients at time points that deviate too far from the mean, thereby suppressing drastic fluctuations in coefficients between adjacent time points. This design has a clear business logic; overly aggressive time-level game theory may lead to unpredictable settlement risks, while a smooth coefficient curve is more in line with a robust business strategy.

[0290] Among the preset business constraints:

[0291] Constraint 1, upper and lower bounds of coefficients:

[0292]

[0293] The upper and lower bounds of the coefficients for each region are configured differently according to market rules, and typical ranges are shown in Table 2 below.

[0294] Table 2 Examples of Differentiated Configuration of Upper and Lower Bounds of Coefficients

[0295]

[0296] Constraint 2, Hourly Factor and Constraints:

[0297] Hour groups consisting of 4 time points The coefficients must be within a certain range:

[0298] ;

[0299] For example, a region that enables this constraint is set as follows: This is equivalent to an hourly average at between.

[0300] During implementation, an optimization model is constructed using solvers such as COPT, decision variables at each time point are defined, and upper and lower bound constraints on coefficients and hourly coefficient sum constraints are set. The objective function is to maximize the expected return after adjustment for volatility penalties. Under linear programming or convex quadratic programming forms, this model can provide an optimal solution or a feasible fallback result in a relatively short time.

[0301] The final output of the application coefficient vector, along with the theoretical coefficients, directional probabilities, quantile predictions, etc., is packaged and written into the database and table files for review and submission.

[0302] The complete output data structure in this embodiment of the invention is shown in Table 3 below.

[0303] Table 3 Example of data structure for output of declaration coefficients

[0304]

[0305] Furthermore, the method for generating electricity spot market declaration coefficients based on bidirectional classification-regression fusion and mathematical programming optimization also includes the following steps:

[0306] S106. Update the multidimensional feature set based on real-time market data, and retrain the bidirectional classification model based on the updated multidimensional feature set.

[0307] To maintain the model's responsiveness to dynamic market changes, the method also includes a model evaluation and update step. This step involves periodically acquiring the latest market data, updating the statistics in the multidimensional feature set, and retraining the bidirectional classification model based on the updated data, thereby achieving iterative optimization and performance maintenance of the model.

[0308] To demonstrate the effectiveness of the method proposed in the embodiments of the present invention, the embodiments of the present invention also provide the following experimental data:

[0309] Based on the actual operating data of a power sales company in a certain region's electricity spot market, historical data from July to December 2025 (a total of 6 months) was selected as the experimental sample. The market adopts a dual-market settlement mechanism of day-ahead market and real-time market (volume reporting without price quotation mode), and the coefficient range of the reporting strategy is [0.8, 1.2]. The power sales company's average daily electricity consumption is approximately 1200 MWh. The experiment adopts a daily rolling backtesting (Walk-Forward) method: with each day as the decision node, the model is trained using only the historical data before that day to generate a 96-point reporting strategy for the next day, and the revenue is settled based on the actual clearing price of the next day.

[0310] The comparison methods include:

[0311] Trader-based manual experience strategy: Experienced traders manually determine the direction of the price spread at various points in time based on historical price spread trends and load forecasts, and set coefficients (usually between 0.85 and 1.15).

[0312] Global average strategy: The simple arithmetic average of historical price differences at each point in time is used as the basis for determining the direction. For positive price differences, the upper limit of the coefficient is 1.2, and for negative price differences, the lower limit of the coefficient is 0.

[0313] The method proposed in this invention is based on bidirectional classification-regression fusion prediction and mathematical programming strategy optimization.

[0314] The comparative experiment uses cumulative settlement return, return per unit of electricity, daily return volatility, maximum drawdown, Sharpe ratio (annualized), and Sortino ratio (annualized) as strategy evaluation indicators. Return per unit of electricity reflects the average profitability per MWh of electricity, while the Sharpe ratio and Sortino ratio measure the quality of risk-adjusted returns.

[0315] The formula for calculating revenue per kilowatt-hour is:

[0316] ;

[0317] in The reporting coefficient at time point t. This represents the real-time to day-ahead price difference.

[0318] ;

[0319] ;

[0320] in This represents the actual electricity consumption at time t (MWh).

[0321] The overall backtesting results over 6 months are shown in Table 4 below.

[0322] Table 4 Overall backtesting results

[0323]

[0324] The monthly electricity revenue and detailed monthly indicators of the method proposed in this embodiment are shown in Table 5 below.

[0325] Table 5. Electricity Revenue and Detailed Monthly Indicators

[0326]

[0327] The overall experimental results show that the method proposed in this invention significantly outperforms the comparative strategies in all indicators. Regarding cumulative settlement returns, the method proposed in this invention achieved a cumulative return of RMB 2.896 million over six months, which is 71.9% higher than the trader's experience-based strategy and 122.4% higher than the global average strategy. In terms of risk control, the maximum drawdown of the method proposed in this invention is RMB 91,200, far lower than the trader's strategy (RMB 138,600) and the global average strategy (RMB 208,600), verifying the effectiveness of the proposed method in constraining extreme loss scenarios within the mathematical programming optimization layer.

[0328] From a monthly comparison perspective, the method proposed in this invention maintains the optimal per-kilowatt-hour revenue in each month, with minimal fluctuations in revenue between months. Notably, in August, due to the tight power supply and demand and volatile price spreads caused by high summer temperatures, the per-kilowatt-hour revenue of all strategies declined. However, the relative advantage of the method proposed in this invention was most prominent in this month (per-kilowatt-hour revenue was 82.4% higher than the trader strategy), indicating that the bidirectional classification-regression fusion prediction architecture has better directional discrimination ability under extreme market conditions.

[0329] The significant improvements in the Sharpe ratio and Sortino ratio (reaching 1.85 and 2.48, respectively) indicate that the method proposed in this embodiment not only outperforms in absolute returns but also demonstrates a clear advantage in risk-adjusted return quality. The percentage of profitable days increased from 51.2% for the trader strategy to 57.3%, suggesting that the method proposed in this embodiment has a higher accuracy rate in predicting intraday direction and stronger decision-making stability.

[0330] Based on the comparative experiments above, the bidirectional classification-regression fusion and mathematical programming optimization framework proposed in this invention demonstrates significant revenue improvement and strong risk control capabilities in the day-ahead electricity spot price reporting decision-making task. It provides electricity retailers with automated reporting decision support that surpasses manual experience and traditional statistical methods. The prediction results can be directly used in downstream reporting strategy models, improving price spread direction judgment and coefficient optimization by providing more accurate day-ahead electricity price estimates, thereby enhancing the overall trading revenue of electricity retailers.

[0331] The technical solution provided by this invention may include the following beneficial effects:

[0332] The bidirectional classification-regression fusion model accurately predicts the direction and magnitude of price spreads, and combines mathematical programming optimization to achieve a dynamic balance between revenue and constraints, significantly improving the accuracy of the reporting coefficient. The parameter adaptive mechanism enhances the model's generalization ability and reduces reliance on manual parameter tuning. Multi-dimensional feature engineering and data-driven methods effectively cope with market fluctuations, providing scientific decision support for electricity spot trading, reducing operational risks, and enhancing market competitiveness.

[0333] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0334] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0335] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory / random access memory, magnetic disk, optical disk) and includes several instructions to cause a multimedia terminal device (which may be a mobile phone, computer, television receiver, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0336] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for generating electricity spot market declaration coefficients based on bidirectional classification-regression fusion and mathematical programming optimization, characterized in that, Includes the following steps: S101. Obtain historical market data of the electricity market, and construct a multi-dimensional feature set based on the historical market data; S102. Based on the multidimensional feature set, construct and train a bidirectional classification model. The bidirectional classification model includes a first classifier for predicting the probability of a first-direction price difference and a second classifier for predicting the probability of a second-direction price difference. The first-direction price difference indicates that the real-time electricity price is higher than the day-ahead electricity price, and the second-direction price difference indicates that the day-ahead electricity price is higher than the real-time electricity price. S103. Obtain the predicted market data for the target day, construct a target feature set based on the predicted market data, and input the target feature set into the bidirectional classification model to obtain the first predicted probability of the first directional price difference and the second predicted probability of the second directional price difference. S104. Based on the first predicted probability and the second predicted probability, calculate the theoretical application coefficient for the target day; S105. With the goal of maximizing expected returns and based on the preset business constraints of electricity market transactions, a mathematical programming model is constructed. The theoretical application coefficient is used as the input parameter to solve the mathematical programming model and obtain the optimal application coefficient for the target day.

2. The method for generating electricity spot market declaration coefficients based on bidirectional classification-regression fusion and mathematical programming optimization according to claim 1, characterized in that, Step S101 includes the following sub-steps: S1011. Obtain the historical market data, which includes historical day-ahead electricity prices, historical real-time electricity prices, renewable energy output data, load data, and market transaction data. S1012. Based on the historical market data, construct the multidimensional feature set, which includes: Business experience characteristics: The proportion of new energy output, net load, absolute deviation between day-ahead electricity price and real-time electricity price, and self-correction characteristics of forecast deviation are calculated based on historical data. Sliding window statistical features: daily average electricity price, real-time average electricity price, average price difference, and standard deviation of price difference within a specified time window; Historical similar day condition statistical characteristics: The conditional mean and conditional standard deviation of the price difference are calculated based on historical samples that have similar relative deviations from the day-ahead electricity price forecast of the target day.

3. The method for generating electricity spot market declaration coefficients based on bidirectional classification-regression fusion and mathematical programming optimization according to claim 1, characterized in that, Step S102 includes the following sub-steps: S1021. Preprocess the multidimensional feature set, wherein the preprocessing includes at least one of normalization and missing value imputation. S1022. Perform stratified undersampling on the training samples, including: Group the negative samples in the training samples by month; For each group, determine the number of negative samples that need to be retained for that group based on the proportion of positive samples in that group to the total number of positive samples. Sample a corresponding number of negative samples from the negative samples of each group, and merge them with all positive samples to form a balanced training set; S1023. Based on the balanced training set, train the first classifier to predict the probability of the first directional price difference occurring, and train the second classifier to predict the probability of the second directional price difference occurring, wherein the first classifier and the second classifier adopt the same model structure and set different learning objectives. S1024. The output probabilities of the first classifier and the output probabilities of the second classifier are used as meta-features and combined with the original features in the multi-dimensional feature set to train a regression model to predict the price difference range, thereby obtaining the bidirectional classification model.

4. The method for generating electricity spot market declaration coefficients based on bidirectional classification-regression fusion and mathematical programming optimization according to claim 3, characterized in that, In step S1023, both the first classifier and the second classifier use the LightGBM or random forest model, and the model hyperparameters are tuned through five-fold cross-validation.

5. The method for generating electricity spot market declaration coefficients based on bidirectional classification-regression fusion and mathematical programming optimization according to claim 1, characterized in that, Step S103 includes the following sub-steps: S1031. Obtain the forecast market data for the target day, wherein the forecast market data includes the day-ahead electricity price forecast, the renewable energy output forecast, and the load forecast for the target day; S1032. Based on the predicted market data, construct the target feature set, wherein the target feature set includes the same feature types as the multidimensional feature set; S1033. Input the target feature set into the bidirectional classification model to obtain the first predicted probability of the first directional price difference and the second predicted probability of the second directional price difference.

6. The method for generating electricity spot market declaration coefficients based on bidirectional classification-regression fusion and mathematical programming optimization according to claim 1, characterized in that, In step S104, the theoretical reporting coefficient is calculated using one of the following methods: S1041. Based on the absolute difference model: calculate the difference between the first predicted probability and the second predicted probability, and use the difference as the theoretical reporting coefficient; S1042. Based on the proportional difference model: calculate the proportional difference between the first predicted probability and the second predicted probability, and use the proportional difference as the theoretical declaration coefficient; S1043. Based on regression fusion mode: the first predicted probability and the second predicted probability are used as meta-features and combined with the screening features in the multi-dimensional feature set. The trained regression model is used to predict the price difference range, and the predicted value of the price difference range is used as the theoretical application coefficient. S1044. Based on the mean substitution model: Calculate the mean of the first predicted probability and the second predicted probability, and use the mean as the theoretical reporting coefficient.

7. The method for generating electricity spot market declaration coefficients based on bidirectional classification-regression fusion and mathematical programming optimization according to claim 1, characterized in that, Step S105 includes the following sub-steps: S1051. Construct the mathematical programming model, wherein the objective function of the mathematical programming model is to maximize the expected revenue, and the preset business constraints include: Upper and lower bound constraints on the declaration coefficient: The declaration coefficient at each point in time is within the first preset range; Hourly coefficient and constraint: The sum of the reporting coefficients at all times throughout the day must be within the second preset range; Fluctuation penalty: This is used to penalize deviations between the reported coefficient at each time point and the average coefficient for the whole day. The fluctuation penalty is the square of the weighted sum of the differences between the coefficient at each time point and the average coefficient for the whole day. S1052. The mathematical programming model is solved using a convex optimization solver to obtain the optimal application coefficient that satisfies the preset business constraints.

8. The method for generating electricity spot market declaration coefficients based on bidirectional classification-regression fusion and mathematical programming optimization according to claim 1, characterized in that, The steps preceding step S102 include: S201. Define a hyperparameter space, which includes at least one of the following: training window length, orientation segmentation threshold, and undersampling ratio; S202. Evaluate the cumulative gains of different hyperparameter combinations on historical data through daily rolling backtesting; S203. Select at least one hyperparameter combination with the highest cumulative return for training the bidirectional classification model in step S102.

9. The method for generating electricity spot market declaration coefficients based on bidirectional classification-regression fusion and mathematical programming optimization according to claim 1, characterized in that, The method for generating electricity spot market declaration coefficients based on bidirectional classification-regression fusion and mathematical programming optimization also includes the following steps: S106. Update the multidimensional feature set based on real-time market data, and retrain the bidirectional classification model based on the updated multidimensional feature set.