A two-step deep learning short-term electricity price prediction method based on error compensation

By employing a two-step deep learning approach, combining VMD-CLSTM and quadratic VMD-ERCRF models, we achieved in-depth mining and accurate compensation of initial prediction errors, thereby improving the accuracy and robustness of short-term electricity price forecasts and adapting to the needs of different electricity market scenarios.

CN122246735APending Publication Date: 2026-06-19SICHUAN SHUYUAN INTELLIGENT TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SICHUAN SHUYUAN INTELLIGENT TECHNOLOGY CO LTD
Filing Date
2026-01-29
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing short-term electricity price forecasting methods suffer from low prediction accuracy and insufficient robustness in complex scenarios. Furthermore, they neglect the compensation and optimization of initial prediction errors, resulting in a significant drop in prediction performance under extreme peak electricity price scenarios, making it difficult to meet the high requirements of practical engineering applications.

Method used

A two-step deep learning method based on error compensation is adopted. First, the initial prediction is performed through the VMD-CLSTM model. Then, the residual error sequence is compensated through the quadratic VMD-ERCRF model. Finally, the final predicted value is output by dynamically weighted fusion of adaptive variational mode decomposition and improved random forest model.

Benefits of technology

It significantly improves the accuracy and robustness of short-term electricity price forecasting, especially under extreme peak electricity price scenarios, and solves the problems of insufficient decomposition and inadequate error compensation in traditional methods, making it suitable for electricity price forecasting needs in multiple scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122246735A_ABST
    Figure CN122246735A_ABST
Patent Text Reader

Abstract

This invention discloses a two-step deep learning method for short-term electricity price forecasting based on error compensation. The method includes: collecting historical electricity price data, load data, renewable energy output data, and meteorological data from the electricity spot market and preprocessing them to obtain a standardized electricity price sequence; constructing a VMD-CLSTM initial prediction model and outputting initial predicted values; calculating the residual error sequence between the initial predicted values ​​and actual electricity prices, and standardizing the residual error sequence; constructing a quadratic VMD-ERCRF prediction model to compensate for the error in the residual error sequence; and dynamically weighting and fusing the output, determining the weights of the initial predicted values ​​and the error compensation values ​​according to the current scenario requirements, and calculating the final predicted value. This approach, through two-step modeling, deeply mines the patterns and error characteristics of electricity price fluctuations, significantly improving the prediction accuracy and robustness of half-hour-level short-term electricity prices, and enhancing prediction performance under extreme peak electricity price scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of electricity market forecasting and artificial intelligence technology, and in particular to a two-step deep learning method for short-term electricity price forecasting based on error compensation. Background Technology

[0002] With the deepening of power market reform, the electricity spot market uses half-hour as the basic trading cycle. Electricity prices are affected by multiple factors such as load fluctuations, renewable energy output, and extreme weather, exhibiting characteristics such as strong randomness, nonlinearity, and sudden peak changes. Accurate short-term electricity price forecasting has become a key support for ensuring the safe and economical dispatch of the power grid and improving the bidding efficiency of market participants.

[0003] Existing short-term electricity price forecasting methods are mainly divided into two categories: traditional time series forecasting methods and single deep learning methods. Traditional time series forecasting methods, such as the ARIMA model, have high computational efficiency, but they are difficult to capture the nonlinear characteristics of the electricity price series and have limited prediction accuracy. Single deep learning methods, such as Long Short-Term Memory Network (LSTM) and Convolutional Neural Network (CNN), can extract some time series features, but they are prone to large prediction bias and insufficient robustness when facing complex scenarios such as high penetration of new energy sources and extreme weather.

[0004] Furthermore, existing technologies often neglect the compensation and optimization of initial prediction errors, failing to fully exploit the potential patterns inherent in the error sequence. This leads to a significant drop in prediction performance under extreme peak electricity price scenarios, making it difficult to meet the high requirements of prediction accuracy and stability in practical engineering applications. Therefore, there is an urgent need for a short-term electricity price prediction method that can deeply explore the patterns of electricity price fluctuations, accurately compensate for prediction errors, and adapt to multiple scenarios. Summary of the Invention

[0005] To address the shortcomings of existing short-term electricity price forecasting methods, such as low prediction accuracy, insufficient robustness, and neglect of error compensation optimization in complex scenarios, this invention provides a two-step deep learning-based short-term electricity price forecasting method with error compensation. Through a two-step modeling approach of "initial prediction + error compensation," combined with adaptive variational mode decomposition and an improved random forest model, it achieves accurate prediction of short-term electricity prices at the half-hour level, especially improving prediction performance under extreme peak electricity price scenarios, and providing reliable support for decision-making by various stakeholders in the electricity market.

[0006] This invention is achieved using the following technical solution: A two-step deep learning method for short-term electricity price forecasting based on error compensation includes the following steps: Step S1: Collect historical electricity price data, load data, renewable energy output data, and meteorological data from the electricity spot market and preprocess them to obtain a standardized electricity price sequence; Step S2: Construct the VMD-CLSTM initial prediction model and output the initial prediction values. ; Step S3: Calculate the initial predicted value With actual electricity value residual error sequence and the residual error sequence Standardize and represent as , and These are the minimum and maximum values ​​of the residual sequence in the training set, respectively; Step S4: Construct a quadratic VMD-ERCRF prediction model and analyze the residual error sequence. Perform error compensation; Step S5: Dynamic weighted fusion output. Based on the current scenario requirements, determine the initial prediction value weight and the error compensation value weight, and calculate the final prediction value.

[0007] Specifically, the data preprocessing in step S1 includes missing value imputation, outlier removal and normalization, as well as correlation analysis or time series correlation analysis selected according to the scenario.

[0008] Specifically, the VMD-CLSTM initial prediction model includes: Scenario-adaptive VMD decomposition unit: In the model preprocessing stage, based on typical electricity market scenarios, the number of modes K, penalty factor α, and convergence tolerance ε are dynamically adjusted to decompose the original non-stationary electricity price sequence into K stationary subsequences. Multi-dimensional conditional input layer: For each stationary subsequence after decomposition, four core correlation dimensions are integrated to form a multi-source conditional vector set {V1,V2,V3,V4}, where V1 is the time feature vector, V2 is the supply and demand feature vector, V3 is the new energy feature vector, and V4 is the environmental feature vector. Temporal Attention Fusion Unit: The internal optimization module of CLSTM adopts a two-stage attention mechanism. In the early stage, key condition variables are selected by feature importance, and in the later stage, the focus is on key time periods of temporal dependence, and the weights of each condition vector are dynamically allocated. Improved CLSTM computation unit: It integrates multi-dimensional conditional fusion vectors with stationary subsequences decomposed by scene-adaptive VMD decomposition unit as input, optimizes the computation logic of gating mechanism, and enhances the dual capture capability of long-term sequence dependence and local features; Output mapping layer: The hidden states of CLSTM are transformed into preliminary predicted values ​​of each stationary subsequence through a fully connected network. After superposition, the initial predicted value ŷ(t) of the original electricity price sequence is obtained.

[0009] Specifically, step S2 includes the following steps: Step S21: Determine the scenario type based on the current electricity market operation data; based on the scenario type, adopt a scenario-adaptive VMD parameter configuration strategy to perform VMD decomposition on the standardized electricity price series to obtain... a stationary subsequence ; Step S22: Multi-dimensional conditional vector fusion; for each stationary subsequence, extract the temporal feature vector. Supply and demand feature vectors New energy feature vectors and environmental feature vectors The weights of each conditional vector are calculated using a two-stage attention mechanism, as shown in the formula: ; Where i = 1, 2, 3, 4, , This is the weight matrix. , For bias terms, The previous hidden state of the CLSTM is represented by [;], which indicates vector concatenation. The softmax function ensures that the weights sum to 1. The fused condition vector is obtained by weighting and summing the condition vectors according to their weights. ; Step S23: The improved CLSTM computing unit performs gated computation, for The CLSTM outputs of the stationary subsequences are superimposed to obtain the initial predicted value of the original electricity price sequence. : ; in, , For the first The output layer weight matrix and bias terms corresponding to each subsequence For the first CLSTM subsequences The status is always hidden.

[0010] Specifically, the gated computation of the improved CLSTM computing unit includes: The forget gate controls the proportion of historical cell states retained, which is incorporated into the fusion condition vector. , represented as: =0 ⋅ ;𝑉+ ; in For subsequence of Time-standardized value, Here is the forget gate weight matrix. For bias terms, It is a sigmoid activation function with an output range of [0,1]. The input gate determines the update ratio of the information at the current moment, expressed as: =0 ⋅ ;𝑉+ ; = ⋅ ;𝑉+ ; in, , This is the weight matrix; , For bias terms, Candidate values ​​for cell state; Cell state update is represented as: = ⊙ + ⊙ ; Where ⊙ represents element-wise product operation. This represents the cell state at the previous moment. Output gate and hidden state update are represented as follows: =0 ⋅ ;𝑉+ ; = ⊙𝑡𝑎𝑛ℎ ; in, This is the output gate weight matrix. For bias terms, Hide the current state.

[0011] Specifically, in step S4, the secondary VMD-ERCRF prediction model introduces an error temporal feature attention mechanism based on the traditional random forest, and integrates error hierarchical decomposition and bias calibration strategies, specifically including: Error sequence preprocessing unit: receives initial predicted values The residual sequence with respect to the actual electrical value y(t) After standardization, error-stationary subsequences are obtained through secondary VMD decomposition. Error Time-Series Attention Unit: Assigns differentiated weights to features at different time steps of the error-stationary subsequence, using an attention weight matrix. Focusing on error mutation points and periods of trend change, the weight calculation incorporates the temporal correlation of the error sequence; Random Forest Basic Prediction Unit: Based on the error features after attention weighting, bootstrap sampling is used to generate K training subsets to construct K decision trees. Each tree is completely split based on the principle of minimizing mean square error to ensure the model's ability to fit nonlinear errors. Error hierarchical compensation unit: decomposes the error into systematic errors. and randomness error Sub-prediction models are constructed separately, and preliminary error prediction values ​​are obtained through weighted fusion. Bias calibration unit: Estimates prediction bias using out-of-bag (OOB) data and calibrates the initial error prediction value using the unbiased sample variance correction formula.

[0012] Specifically, step S4 includes the following steps: Step S41: Process the standardized residual sequence Perform a second VMD decomposition with the same parameter configuration as the initial VMD decomposition, and obtain... A stationary subsequence of errors { },in = m= ; Step S42: Error temporal attention weighting, for each error subsequence Calculate the attention weights of the features at each time step, expressed as: ; in, The feature weight matrix, The time decay coefficient, For the normalized time step and , Let t be the error value of the m-th subsequence at time t. The weight of the recent error characteristics is enhanced by introducing a time decay coefficient. Step S43: Train the ERCRF model and perform error decomposition and prediction, using out-of-bag (OOB) data to calculate the prediction bias. The formula is: ; in, The number of samples outside the bag. Samples outside the bag The predicted value; the calibrated error compensation value is: ; in It is a symbolic function.

[0013] Specifically, the training of the ERCRF model in step S43 includes: Sample construction, using weighted error stationary subsequences { } represents the input features, and the original residual sequence. Construct a training sample set using labels. ; Sample sampling, drawing from D using bootstrap sampling. training subset Each subset contains N samples; Decision tree construction, for each subset Random selection Features and Decision trees are constructed based on the principle of minimizing the Gini coefficient. The formula for calculating the Gini coefficient is: ; Where C is the number of error categories, Let be the proportion of the c-th type of error in the sample set D.

[0014] Specifically, the error decomposition and prediction in step S43 includes: Systematic error extraction is performed using the moving average method, with the following formula: ; in, To smooth out window sizes; Random error extraction, the formula is: ; Dual error prediction: The system error compensation value is predicted separately using the ERCRF model. and random error compensation value : ; ; in , The first The decision tree has a systematic error prediction branch and a random error prediction branch.

[0015] Specifically, step S5 includes the following steps: Step S51: Adaptively adjust the weights of the initial prediction value and the error compensation value according to the core requirements of the scenario, including accuracy-first scenario, balanced scenario and efficiency-first scenario; Step S52: Calculate the final predicted value using the following formula: ; in for Final forecast of electricity price for half an hour at any given time; Step S53: Inverse standardization of results. If the initial predicted value has been standardized, inverse standardization is performed on the final predicted value to restore the original electricity price scale. ; in, , These are the maximum and minimum values ​​of the original electricity price sequence, respectively. This is the final predicted value for the actual electricity price.

[0016] The beneficial effects of this invention are as follows: (1) A two-step modeling architecture of “VMD-CLSTM initial prediction + secondary VMD-ERCRF error compensation” is proposed. For the first time, the secondary mode decomposition of the error sequence is combined with targeted compensation, breaking the inherent pattern of the traditional single model “prediction-output”. Through in-depth mining and accurate compensation of the initial error, the prediction accuracy is significantly improved, especially the peak capture capability in extreme scenarios is optimized. 2. Design a scenario-adaptive VMD parameter configuration strategy. For three typical scenarios, namely conventional load, high penetration of new energy, and extreme weather peak, establish a dynamic adaptation mechanism for the number of modes K, penalty factor α, and convergence tolerance ε to solve the problem of insufficient stationarity decomposition of electricity price series under different scenarios. This improves the stationarity of the decomposed subsequence by more than 40%, providing high-quality input data for subsequent models. 3. An Error Compensated Random Forest (ERCRF) model is proposed. Based on the traditional random forest, an attention mechanism for error time series features is introduced. By weighting and strengthening the temporal correlation of the residual sequence, the accuracy of capturing error trends and abrupt changes is improved, which solves the problem of poor adaptability of traditional error compensation models to nonlinear error sequences. 4. Construct a dynamic weighted fusion mechanism to adaptively adjust the fusion weight of the initial prediction value and the error compensation value according to the core needs of different scenarios (accuracy priority / efficiency priority), so as to achieve a dynamic balance between prediction accuracy and computational efficiency and adapt to the differentiated needs of different engineering application scenarios. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0018] Figure 1This is a flowchart of a two-step deep learning short-term electricity price prediction process based on error compensation in an embodiment of the present invention. Figure 2 This is a schematic diagram illustrating the adaptation of VMD decomposition parameters in different scenarios in this embodiment of the invention; Figure 3 This is a comparison chart of model prediction accuracy in embodiments of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0020] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0021] The following is in conjunction with the appendix Figures 1-3 The following describes some embodiments of the present invention in detail. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0022] This invention proposes a two-step deep learning method for short-term electricity price prediction based on error compensation. In a preferred embodiment, the prediction process is as follows: Figure 1 As shown, the specific steps include: Step 1: Data Preprocessing. Collect historical electricity price data, load data, renewable energy output data, meteorological data, etc. from the electricity spot market, and perform missing value imputation (using linear interpolation), outlier removal (using the 3σ criterion), and normalization (mapping to the [0,1] interval) to obtain a standardized electricity price sequence.

[0023] Step 2: Initial Prediction Stage – VMD-CLSTM Model Prediction. Based on the current application scenario, a scenario-adaptive VMD parameter configuration strategy is adopted to perform VMD decomposition on the standardized electricity price series, obtaining multiple stationary subsequences. Each stationary subsequence is input into the CLSTM model, where local temporal features are extracted through convolutional layers, long-term dependency features are captured through LSTM layers, and the initial predicted value ŷ(t) is output by the fully connected layer.

[0024] Step 3: Calculate the residual error sequence. Calculate the residual error sequence e(t) = y(t) - ŷ(t) between the initial predicted value ŷ(t) and the actual electricity value y(t), and standardize the residual sequence.

[0025] Step 4: Error Compensation Stage – Quadratic VMD-ERCRF Model Prediction. The standardized residual error sequence is subjected to a quadratic VMD decomposition to obtain a stationary error subsequence. This stationary error subsequence is then input into the ERCRF model, where the temporal features of the error are enhanced through an attention mechanism, and the error compensation value ê(t) is output.

[0026] Step 5: Dynamically Weighted Fusion Output. Based on the current scenario requirements, determine the initial predicted value weight w and the error compensation value weight (1-w), using the formula... The final predicted value was calculated. .

[0027] In this embodiment, the VMD-CLSTM model is the initial prediction module. It deeply integrates scenario-adaptive VMD decomposition with multi-dimensional conditional fusion CLSTM. Based on the core logic of "decomposition-prediction," it enhances the modeling capability for complex electricity price sequences through internal structure optimization, solving the problem of insufficient adaptation of traditional CLSTM to multi-source coupling factors. The VMD-CLSTM model specifically consists of: (1) Scenario-adaptive VMD decomposition unit: As a model preprocessing step, based on three typical scenarios in the power market (conventional load scenario, high penetration of new energy scenario, and extreme weather peak scenario), the modality number K, penalty factor α, and convergence tolerance ε are dynamically adjusted (the parameter adaptation standard is strictly followed). Figure 2 According to regulations, the original non-stationary electricity price series is decomposed into K stationary subsequences, which improves the stationarity of the subsequences (ADF statistic) by more than 40%. In one embodiment, 1000 half-hourly data samples were selected from each of the following scenarios in a provincial electricity spot market in July 2023: regular load scenario (18% renewable energy), August renewable energy high penetration scenario (35% wind power + photovoltaic), and January extreme low temperature peak scenario (daily minimum temperature -12℃). The VMD decomposition stationarity was verified, and the results are shown in Table 1. Table 1. Verification of VMD Decomposition Stationarity (2) Multi-dimensional conditional input layer: For each stationary subsequence after decomposition, four core correlation dimensions are integrated to form a multi-source conditional vector set {V1,V2,V3,V4}, where V1 is a time feature vector (including time period, weekday / holiday identifier), V2 is a supply and demand feature vector (including power load, power generation), V3 is a new energy feature vector (including wind power / photovoltaic output), and V4 is an environmental feature vector (including meteorological data such as temperature and humidity).

[0028] (3) Temporal attention fusion unit: adopts a two-stage attention mechanism. In the early stage, key condition variables are selected by feature importance, and in the later stage, the focus is on the key time period of temporal dependence. The weights of each condition vector are dynamically allocated to avoid prediction bias caused by multi-dimensional information redundancy. This unit is an internal optimization module of CLSTM and does not change the overall architecture of VMD-CLSTM. In one specific embodiment, under extreme weather peak scenarios, the attention weight distribution of each condition vector was statistically analyzed. The results showed that the weight of temperature features accounted for 32%, the weight of load change rate accounted for 28%, the weight of new energy output fluctuation accounted for 21%, and the weight of time period features accounted for 19%. This is highly consistent with the actual engineering understanding of the core influencing factors of electricity prices under this scenario, verifying the rationality of the weight allocation.

[0029] (4) Improved CLSTM computation unit: The multi-dimensional conditional fusion vector and the stationary subsequence after VMD decomposition are input together to optimize the computation logic of the gating mechanism and enhance the dual capture ability of long-term dependence and local features of the sequence.

[0030] (5) Output mapping layer: The hidden state of CLSTM is transformed into the preliminary predicted value of each stationary subsequence through a fully connected network. After superposition, the initial predicted value ŷ(t) of the original electricity price sequence is obtained, which provides basic data for subsequent error compensation.

[0031] In this embodiment, the VMD-CLSTM model possesses the following key technical features: (1) Decomposition-Prediction Coordination Mechanism: The parameter configuration of VMD decomposition and the structural parameters of CLSTM (such as the number of hidden layer neurons and the number of iterations) are adjusted in conjunction with the scene type to ensure that the characteristics of the decomposed subsequences are accurately matched with the model's modeling capabilities. The comparison of the initial prediction accuracy of the VMD-CLSTM model under different scenes (test set sample size = 800) is shown in Table 2: Table 2 Comparison of initial prediction accuracy of VMD-CLSTM model in different scenarios (2) Dynamic weighting of condition vectors: The multi-dimensional condition vectors are adaptively allocated through the attention weight matrix W_att. The weight calculation satisfies ∑ωᵢ=1 (ωᵢ is the attention weight of the i-th type of condition vector), so that the model can automatically focus on the core influencing factors in different scenarios (such as strengthening the meteorological feature weight in extreme weather scenarios).

[0032] (3) Gating mechanism optimization: Multi-dimensional conditional fusion information is introduced simultaneously in the calculation of forget gate, input gate and output gate to correct the defect of traditional LSTM in adapting to multiple external variables. The formula clearly reflects the synergistic effect of conditional vector and input sequence.

[0033] In this embodiment, the quadratic VMD-ERCRF model is the core module of the error compensation stage. It introduces an error temporal feature attention mechanism based on the traditional random forest, and integrates error hierarchical decomposition and bias calibration strategies to achieve accurate prediction and compensation of the residual sequence. The core technical modules of the model include: (1) Error Sequence Preprocessing Unit: Receives the residual sequence e(t) = y(t) - ŷ(t) of the initial predicted value ŷ(t) and the actual electricity value y(t). After standardization, it obtains a stationary error subsequence through secondary VMD decomposition (parameter configuration follows a scenario adaptive strategy). In one embodiment, a comparison of error characteristics before and after secondary VMD decomposition of the residual sequence under extreme weather peak scenarios is shown in Table 3: Table 3 Comparison of error characteristics of residual sequences before and after secondary VMD decomposition under extreme weather peak scenarios. (2) Error Time Series Attention Unit: Differentiated weights are assigned to the features of different time steps of the error stationary subsequence. The attention weight matrix W_e focuses on the error mutation points and trend change periods. The weight calculation incorporates the temporal correlation of the error sequence (e.g., the weight of recent error features is higher than that of the distant ones). This unit is the core innovative module of ERCRF. In one embodiment, attention weights were validated by selecting error mutation samples (single error change ≥ 0.05 yuan / degree). The results showed that the error feature weights accounted for 68% in the 1-3 time periods before the mutation, which was significantly higher than the non-mutation period (average weights accounted for 23%), proving that the model can effectively focus on the key error change periods.

[0034] (3) Random Forest Basic Prediction Unit: Based on the error characteristics after attention weighting, bootstrap sampling is used to generate K training subsets and construct K decision trees. Each tree is completely split based on the principle of minimizing mean square error to ensure the model's ability to fit nonlinear errors.

[0035] (4) Error Hierarchical Compensation Unit: The error is decomposed into systematic error ε_sys (caused by limitations in model structure) and random error ε_rand (caused by accidental factors such as data noise). Sub-prediction models are constructed for each, and the preliminary error prediction value is obtained through weighted fusion. The error composition ratio statistics under different scenarios (sample size = 1000) are shown in Table 4 below: Table 4. Statistics on the proportion of error components in different scenarios (5) Bias Calibration Unit: The prediction bias is estimated using out-of-bag (OOB) data, and the initial error prediction value is calibrated using the unbiased sample variance correction formula to further improve the compensation accuracy. Table 5 shows a comparison of the error prediction accuracy before and after ERCRF model bias calibration. Table 5 Comparison of error prediction accuracy before and after ERCRF model bias calibration In this embodiment, the quadratic VMD-ERCRF model includes the following key technical features: (1) Temporal attention guidance: The temporal feature weight allocation of the error sequence is strengthened through the attention mechanism to solve the problem that traditional random forests are insufficient in capturing the trend and abruptness of errors; (2) Dual error collaborative modeling: The hierarchical modeling of systematic error and random error can be flexibly enabled according to the needs of the scenario (such as a normal load scenario can be simplified to a single error model), enhancing the adaptability of the model; (3) Secondary VMD-Attention-Random Forest Linkage: The error subsequence after secondary VMD decomposition is optimized for input quality through attention unit, and then modeled and calibrated by random forest to form a complete error compensation link of "decomposition-weighting-prediction-calibration"; Table 6 shows a comparison of the compensation effects of different error handling methods (extreme weather peak scenario): Table 6 Comparison of compensation effects of different error processing methods The following section provides a detailed explanation of some steps in the error-compensated two-step deep learning short-term electricity price prediction method of this invention, using specific calculation formulas: In this embodiment, step 2, VMD-CLSTM model training and initial prediction, specifically includes the following sub-steps: Step 2.1: Data Preprocessing and Sequence Construction (1) Sequence Representation: For the half-hour electricity price forecasting scenario, the historical data time window length is set to T=336 (i.e., 7 days × 48 half-hour periods), and the forecast step size is set to H=48 (i.e., forecasting the electricity price for the next 24 hours × 48 half-hour periods). The input sequence is constructed. ,in ( The electricity price for half an hour at time t. For the corresponding time period load, To contribute to new energy sources during the corresponding period, (For meteorological factors corresponding to the time period), construct the output sequence. ,in The target for electricity price forecast for the h-th half-hour period; (2) Data standardization: The input data is processed using Min-Max standardization, and the formula is: in , These are the minimum and maximum values ​​of the corresponding features in the training set, respectively. After standardization, the data is mapped to the interval [0,1].

[0036] Step 2.2: Scene Adaptive VMD Decomposition (1) Scene identification: Based on the current electricity market operation data, determine the scene type (normal load scene / high penetration of new energy scene / extreme weather peak scene). The scene identification indicators are as follows: Typical load scenario: renewable energy (wind power + photovoltaic) accounts for ≤20%, and load fluctuation range is ≤10% / day; High penetration of new energy scenarios: New energy (wind power + photovoltaic) accounts for ≥30%, and the output fluctuation range is ≥20% / day; Extreme weather peak scenario: Daily maximum / minimum temperature exceeds the historical average by ±5℃, and load changes by ≥15% per period.

[0037] (2) VMD parameter configuration: The parameters are dynamically adjusted according to the scene type. The specific configuration is shown in Table 7 below: Table 7 VMD Parameter Configuration (3) Sequence decomposition: Perform VMD decomposition on the standardized input sequence X to obtain a stationary subsequence ,in The decomposition process satisfies the variational constraints of VMD: in The set of subsequences after decomposition. The center frequency of each subsequence, is the Dirac function, and * indicates convolution operation.

[0038] Step 2.3: Multi-dimensional conditional vector fusion (CLSTM internal optimization) (1) Conditional vector construction: for each stationary subsequence Extract four types of core condition vectors: Time feature vector ( For time period identifiers (1-48). For identifying holidays (0 = weekday, 1 = holiday)); Supply and demand feature vectors ( For the current time period load, (load of the previous period); New energy feature vector ( To contribute to new energy sources during the current period, , (to contribute to the first two periods); Environmental feature vector ( This represents the current temperature. (Humidity at the current time).

[0039] (2) Attention weight calculation: The weights of each condition vector are calculated using a two-stage attention mechanism. The formula is as follows: in (Corresponding to four types of conditional vectors) , This is the weight matrix. , For bias terms, This represents the hidden state of the CLSTM at the previous time step. [;] indicates vector concatenation, and the softmax function ensures that the sum of the weights is 11.

[0040] In this embodiment, under the scenario of high penetration of new energy, the average attention weight calculation results of different condition vectors are: V1 (time feature) = 0.15, V2 (supply and demand feature) = 0.22, V3 (new energy feature) = 0.43, V4 (environmental feature) = 0.20, which is consistent with the characteristic that the fluctuation of new energy output is the core influencing factor in this scenario.

[0041] (3) Fusion condition vector: The fusion condition vector V is obtained by weighting and summing the condition vectors according to their weights. .

[0042] Step 2.4: Improved CLSTM Gated Calculation (1) Forget gate: controls the retention ratio of historical cell states, and is incorporated into the fusion condition vector V: =0 ⋅ ;𝑉+ ; in For subsequence of Time-standardized value, Here is the forget gate weight matrix. For bias terms, It is a sigmoid activation function with an output range of [0,1].

[0043] In this embodiment, under normal load scenarios, the distribution of the forget gate output value is statistically analyzed as follows: 85% of the time... The value ∈ [0.7, 0.9] indicates that the model can effectively preserve historical time series characteristics, which is consistent with the stable electricity price change characteristic of this scenario.

[0044] (2) Input gate: Determines the update ratio of information at the current moment: =0 ⋅ ;𝑉+ ; = ⋅ ;𝑉+ ; in, , This is the weight matrix; , For bias terms, These are candidate values ​​for cell state.

[0045] (3) Cell state renewal: = ⊙ + ⊙ ; Where ⊙ represents element-wise product operation. This represents the cell state at the previous moment.

[0046] (4) Output gate and hidden state update: =0 ⋅ ;𝑉+ ; = ⊙𝑡𝑎𝑛ℎ ; in, This is the output gate weight matrix. For bias terms, Hide the current state.

[0047] Step 2.5: Initial Prediction Output The initial predicted value of the original electricity price sequence is obtained by superimposing the CLSTM outputs of K stationary subsequences. : ; in , For the first The output layer weight matrix and bias terms corresponding to each subsequence For the first CLSTM subsequences The status is always hidden.

[0048] In this embodiment, step 3, the calculation of the residual error sequence, includes the following sub-steps: Step 3.1: Error Sequence Generation Calculate the residual error sequence between the initial predicted value and the actual electricity value: Where y(t) is the actual electricity value for half an hour at time t, t=1,2,...,T+H.

[0049] The statistical characteristics of the initial prediction residual sequences in the three scenarios (sample size = 1200) are shown in Table 8: Table 8 Statistical characteristics of the initial prediction residual sequence in three scenarios Step 3.2: Error sequence standardization The residual sequence is processed using the same Min-Max normalization method as the input sequence: That , These are the minimum and maximum values ​​of the residual sequence in the training set, respectively.

[0050] In this embodiment, step 4, the training and error compensation of the secondary VMD-ERCRF model, specifically includes the following steps: Step 4.1: Secondary VMD decomposition For the standardized residual sequence Perform a second VMD decomposition with the same parameter configuration as the initial VMD decomposition (scene adaptation) to obtain... A stationary subsequence of errors { },in = m= .

[0051] Sub-step 4.2: Error timing attention weighting Attention weight calculation: For each error subsequence E_m, calculate the attention weights for the features at each time step: in, The feature weight matrix, The time decay coefficient, For the normalized time step and , Let be the error value at time t of the m-th subsequence. The weight of the recent error characteristics is enhanced by introducing a time decay coefficient.

[0052] Step 4.3: ERCRF Model Training (1) Sample construction: using weighted error stationary subsequences { } represents the input features, and the original residual sequence. Construct a training sample set using labels. .

[0053] (2) Sample sampling: Samples are drawn from D using bootstrap sampling. training subset Each subset contains N samples (N is 70%-80% of the original number of samples).

[0054] (3) For each subset Random selection Features and Decision trees are constructed based on the principle of minimizing the Gini coefficient. The formula for calculating the Gini coefficient is: ; Where C is the number of error categories, Let be the proportion of the c-th type of error in the sample set D.

[0055] The impact of different numbers of decision trees on the performance of the ERCRF model (high penetration scenario of new energy) is shown in Table 9: Table 9. Impact of different numbers of decision trees on ERCRF model performance Considering both accuracy and efficiency, in a preferred embodiment, the present invention selects K=300 in high-penetration new energy scenarios, K=500 in extreme scenarios, and K=100 in conventional scenarios.

[0056] Step 4.4: Error Decomposition and Prediction (1) Systematic error extraction: The moving average method is used to extract systematic errors. The formula is as follows: Where S is the smooth window size (S=5 for normal scenarios, S=10 for extreme scenarios).

[0057] (2) Random error extraction: ; (3) Dual error prediction: The system error compensation value is predicted separately using the ERCRF model. and random error compensation value : in , These are the systematic error prediction branch and the random error prediction branch of the k-th decision tree, respectively.

[0058] Table 10 shows a comparison of the accuracy of dual-error prediction and single-error prediction (extreme weather peak scenario): Table 10. Accuracy Comparison of Double Error Prediction and Single Error Prediction (4) Calculation of initial error compensation value: in For system error weights ( =0.7, determined through validation set optimization).

[0059] Step 4.5: Deviation Calibration Calculate prediction bias using out-of-bag (OOB) data The formula is: in The number of samples outside the bag. Let x be the predicted value for the out-of-bag sample. The calibrated error compensation value is: The sign function (·) ensures that the deviation calibration direction is consistent with the error prediction value.

[0060] In this embodiment, step 5, the dynamic weighted fusion output, includes the following steps: Step 5.1: Determine the fusion weights The weights of the initial prediction value and the error compensation value are adaptively adjusted based on the core requirements of the scenario. Accuracy-first scenario (extreme weather peak scenario): w=0.75 (initial prediction value weight), 1-w=0.25 (error compensation value weight); Balanced scenario (high penetration of new energy): w=0.8, 1-w=0.2; Efficiency-first scenario (normal load scenario): w=0.9, 1-w=0.1.

[0061] In this embodiment, the prediction accuracy of different fusion weights under extreme weather peak scenarios is compared in Table 11: Table 11 Comparison of prediction accuracy with different fusion weights under extreme weather peak scenarios As shown above, Table 11 verifies that w=0.75 is the optimal weight configuration for this scenario.

[0062] Step 5.2: Calculation of final predicted value in Let t be the final predicted value of the half-hour electricity price at time t.

[0063] Step 5.3: Inverse standardization of results If the initial forecast values ​​have been standardized, then the final forecast values ​​are inversely standardized to restore the original electricity price scale: in , These are the maximum and minimum values ​​of the original electricity price sequence, respectively. This is the final predicted value for the actual electricity price.

[0064] In this embodiment, the correspondence between the three typical application scenarios and the key parameters of VMD decomposition (number of modes K, penalty factor α, convergence tolerance ε) is as follows: Figure 2 As shown, a multi-dimensional line chart is used to present the dynamic adaptation pattern of scenario types and parameter values. Three scenarios are clearly defined: "normal load scenario" (mainly urban residential electricity consumption, with new energy accounting for ≤20%), "high penetration of new energy scenario" (wind power / photovoltaic accounting for ≥30%), and "extreme weather peak scenario" (high temperature / cold wave causing sudden load changes). The optimal parameter range for each scenario is marked. This parameter adaptation scheme can improve the stationarity of the decomposed subsequence (measured by the stationarity test ADF statistic) by more than 40%, effectively reducing the training difficulty of subsequent models and improving feature extraction efficiency.

[0065] The accuracy metrics of different prediction models on the same test dataset (including three typical scenarios) are compared as follows: Figure 3 As shown, the data is presented in bar chart format, with the horizontal axis representing model type and the vertical axis representing accuracy evaluation metrics. Comparison models include the method of this invention, a single CLSTM model, a traditional ARIMA model, and a standard random forest model. Evaluation metrics include mean absolute error (MAE), root mean square error (RMSE), and coefficient of determination (R²). 2 ), where smaller MAE and RMSE values ​​indicate higher precision, R 2 The closer the value is to 1, the better the fit. Comparison results show that the method of this invention has MAE = 8.42, RMSE = 9.20, and R0 = 0.5%. 2=0.98, which is a significant improvement over the single CLSTM model (MAE=11.91, RMSE=14.94), the traditional ARIMA model (MAE=16.78, RMSE=19.35), and the ordinary random forest model (MAE=12.81, RMSE=15.62), especially in extreme peak scenarios.

[0066] This invention also provides the following specific embodiments and scenarios. The specific implementation process is based on the Python programming language, using the TensorFlow 2.8 deep learning framework to build the CLSTM model, using the Scikit-learn library to implement the ERCRF model, using the Pandas and NumPy libraries for data preprocessing, and using the Matplotlib library for visualization: Scenario 1: Conventional load scenario 1. Scenario adaptation conditions: Applicable to areas where urban residential electricity consumption is the main source, industrial electricity consumption accounts for ≤30%, and new energy (wind power + photovoltaic) accounts for ≤20%, such as the core urban areas of eastern coastal cities; 2. Core requirements: Balancing forecast accuracy and computational efficiency, adapting to the routine decision-making needs of daily power grid dispatching and cost accounting for electricity-consuming enterprises; 3. Specific parameter configuration: (1) Data preprocessing: missing values ​​were filled by linear interpolation, outliers were removed by the 3σ criterion, and Min-Max normalization was used to map to the [0,1] interval; (2) Scene adaptive VMD decomposition: number of modes K=3, penalty factor α=1000, convergence tolerance ε=1e-4, number of iterations ≤50; (3) CLSTM model: 1 convolutional layer (3×3 convolutional kernel, stride 1, padding="same"), 2 LSTM layers (64 hidden units per layer, activation function is tanh), 1 fully connected layer (1 output unit, activation function is linear), dropout rate 0.1, optimizer is Adam, learning rate 0.001, number of iterations 100; (4) Quadratic VMD decomposition: number of modes K=2, penalty factor α=800, convergence tolerance ε=1e-4; (5) ERCRF model: 100 decision trees, maximum tree depth 5, minimum number of samples for node splitting 2, feature sampling rate 0.8, sample sampling rate 0.7; (6) Dynamic weighted fusion: weight w = 0.9 (initial predicted value weight), 1 - w = 0.1 (error compensation value weight); 4. Implementation Results: Model training time ≤ 1 hour, prediction response time ≤ 0.5 seconds, MAE ≤ 0.04 yuan / kWh, RMSE ≤ 0.06 yuan / kWh, R2 ≥0.96, meeting the timeliness and accuracy requirements of daily scheduling.

[0067] Scenario 2: High penetration of new energy sources 1. Scenario compatibility conditions: Applicable to areas surrounding wind power / solar power bases, where renewable energy (wind power + solar power) accounts for ≥30%, and electricity prices are significantly affected by fluctuations in renewable energy output; 2. Core requirements: Improve the model's ability to adapt to the strong randomness of electricity prices, enhance prediction robustness, and reduce the impact of fluctuations in renewable energy output on prediction accuracy; 3. Specific parameter configuration: (1) Data preprocessing: In addition to routine processing, correlation analysis between the new energy output series and the electricity price series is added, and characteristic variables with a correlation coefficient ≥ 0.6 are retained; (2) Scene adaptive VMD decomposition: number of modes K=6, penalty factor α=2500, convergence tolerance ε=1e-5, number of iterations ≤100; (3) CLSTM model: 2 convolutional layers (5×5 convolutional kernel, stride 1, padding="same"), 3 LSTM layers (192 hidden units per layer, activation function is tanh), 1 fully connected layer (1 output unit, activation function is linear), dropout rate 0.25, optimizer is Adam, learning rate 0.0005, number of iterations 200; (4) Quadratic VMD decomposition: number of modes K=4, penalty factor α=2000, convergence tolerance ε=1e-5; (5) ERCRF model: 300 decision trees, maximum tree depth 12, minimum number of samples for node splitting 6, feature sampling rate 0.9, sample sampling rate 0.8; (6) Dynamic weighted fusion: weight w = 0.8 (initial predicted value weight), 1 - w = 0.2 (error compensation value weight); 4. Implementation Results: When the output of new energy sources fluctuates by ±30%, the prediction accuracy decreases by no more than 8%, MAE ≤ 0.06 yuan / kWh, RMSE ≤ 0.08 yuan / kWh, and R 2 ≥0.97, which improves robustness by 25% compared to the traditional model.

[0068] Scenario 3: Extreme Weather Peak Scenarios 1. Scenario compatibility: Applicable to areas where extreme weather such as high temperatures and cold waves cause a sudden increase / decrease in electricity load, and where there are obvious peak electricity price periods; 2. Core Requirements: Accurately capture the peak value and duration of peak electricity prices, reduce forecasting errors during peak periods, and support emergency dispatch and bidding risk management; 3. Specific parameter configuration: (1) Data preprocessing: Add time series correlation analysis between meteorological features (temperature, humidity, wind speed) and electricity price series, and use the sliding window method (window size = 24h) to extract peak period features; (2) Scene adaptive VMD decomposition: number of modes K=8, penalty factor α=3000, convergence tolerance ε=1e-6, number of iterations ≤150; (3) CLSTM model: 3 convolutional layers (5×5 convolutional kernel, stride 1, padding="same"), 4 LSTM layers (256 hidden units per layer, activation function is tanh), 1 fully connected layer (1 output unit, activation function is linear), dropout rate 0.3, optimizer is Adam, learning rate 0.0001, number of iterations 300; (4) Quadratic VMD decomposition: number of modes K=6, penalty factor α=2800, convergence tolerance ε=1e-6; (5) ERCRF model: 500 decision trees, maximum tree depth 15, minimum number of samples for node splitting 10, feature sampling rate 0.95, sample sampling rate 0.9; (6) Dynamic weighted fusion: weight w = 0.75 (initial prediction weight), 1 - w = 0.25 (error compensation weight); 4. Implementation results: Peak electricity price prediction deviation ≤5%, duration prediction error ≤1.5 hours, MAE ≤0.08 yuan / kWh, RMSE ≤0.10 yuan / kWh, which improves peak capture accuracy by more than 35% compared with traditional models. Specific implementation examples: Half-hourly data from a provincial electricity spot market from July 1, 2024 to July 31, 2024 were selected, totaling 31 days × 48 = 1488 samples. The first 25 days (1200 samples) were used as the training set, and the last 6 days (288 samples) were used as the test set, covering three scenarios: regular load, high penetration of new energy, and extreme high temperature peak (July 20-July 22 is the extreme high temperature peak scenario, with a daily maximum temperature ≥38℃).

[0070] The scene parameter configuration is shown in Table 12 below: Table 12 Scene Parameter Configuration The general parameters of the model are set as follows: The maximum number of VMD iterations is: 50 for normal scenarios, 100 for new energy scenarios, and 150 for extreme scenarios. CLSTM optimizer: Adam, learning rate: 0.001 for normal scenarios, 0.0005 for new energy scenarios, and 0.0001 for extreme scenarios; CLSTM batch size: 32, number of iterations: 100 for normal scenarios, 200 for new energy scenarios, and 300 for extreme scenarios; ERCRF feature sampling rate: 0.8 for normal scenarios, 0.9 for new energy scenarios, and 0.95 for extreme scenarios; ERCRF sample sampling rate: 0.7 for normal scenarios, 0.8 for new energy scenarios, and 0.9 for extreme scenarios; The parameters for the second-order VMD decomposition are the same as those for the initial VMD. ERCRF smoothing window S: 5 for normal scenarios, 8 for new energy scenarios, and 10 for extreme scenarios.

[0071] The input data is shown in Table 13. The training set consists of the last 7 days × 48 time periods, selecting typical periods of extreme high temperature peak scenarios: Table 13 Input Data Example The comparison between the prediction results and performance in this embodiment is as follows: (1) Single-period forecast results (forecast of electricity price during extreme peak period from 15:00 to 15:30 on July 25, 2024) Actual electricity price: 0.763 yuan / kWh; VMD-CLSTM initial prediction value: 0.728 yuan / kWh (error e(t) = 0.035 yuan / kWh); Error subsequence after secondary VMD decomposition: Focusing on the abrupt error change characteristics before and after 15:00 after attention weighting; ERCRF error prediction value: 0.033 yuan / degree (after deviation calibration); Final predicted value: 0.728 × 0.75 + 0.033 × 0.25 = 0.761 yuan / kWh; Prediction error: 0.002 yuan / degree, peak capture accuracy: 99.7%.

[0072] (2) The overall performance indicators of the test set are shown in Table 14 (H=48-step prediction, i.e., the electricity price at the half-hour level in the next 24 hours): Table 14 Overall Performance Metrics of the Test Set (3) Performance comparison in different scenarios is shown in Table 15 (test set statistics by scenario): Table 15 Performance Comparison in Different Scenarios Based on the above embodiments, it can be concluded that this method achieves accurate prediction of short-term electricity prices at the half-hour level through a complete chain of "scene-adaptive VMD decomposition → multi-dimensional conditional CLSTM initial prediction → secondary VMD decomposition → attention mechanism-guided ERCRF error compensation → dynamic weighted fusion". Especially in extreme high-temperature peak scenarios, the MAE is reduced by 70.4% compared to the single CLSTM model, and the peak capture accuracy is improved by 14.5 percentage points, fully validating the core advantage of the original patent: "enhancing prediction performance under extreme peak electricity price scenarios". (See attached data for the embodiments.) Figure 3 The performance comparison trend is consistent, and the core application scenario adaptability of the patent is highlighted by half-hour granular data. All indicators are better than the existing mainstream prediction methods, and the advanced nature and practicality of the technical solution are fully confirmed.

[0073] In the field of power grid dispatching, the half-hour-level accurate prediction results of the method of this invention can support power grid dispatching centers in formulating scientific power generation dispatching plans, reducing power grid reserve capacity, and improving the economy and security of power grid operation. Especially in extreme weather scenarios, it can reduce the risk of power outages caused by dispatching errors. In the field of power generator bidding: it can provide power generators with accurate electricity price prediction data, assisting them in formulating optimal bidding strategies, improving bidding success rates and profitability, and reducing bidding risks caused by electricity price prediction deviations. In the field of cost control for electricity-consuming enterprises: it helps electricity-consuming enterprises accurately predict electricity price fluctuation trends, rationally arrange production electricity consumption periods, and reduce electricity costs, especially suitable for optimizing electricity dispatching for high-energy-consuming enterprises. In the field of electricity market supervision: it can provide regulatory agencies with a basis for analyzing electricity price fluctuation patterns, assisting them in improving market supervision mechanisms and maintaining the stable operation of the electricity market.

[0074] For the foregoing embodiments, in order to simplify the description, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to this application.

[0075] The above embodiments describe the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Modifications and variations made by those skilled in the art without departing from the spirit and scope of the invention should be within the protection scope of the appended claims.

Claims

1. A two-step deep learning method for short-term electricity price prediction based on error compensation, characterized in that, Includes the following steps: Step S1: Collect historical electricity price data, load data, renewable energy output data, and meteorological data from the electricity spot market and preprocess them to obtain a standardized electricity price sequence; Step S2: Construct the VMD-CLSTM initial prediction model and output the initial prediction values. ; Step S3: Calculate the initial predicted value With actual electricity value residual error sequence and the residual error sequence Standardize and represent as , and These are the minimum and maximum values ​​of the residual sequence in the training set, respectively; Step S4: Construct a quadratic VMD-ERCRF prediction model and analyze the residual error sequence. Perform error compensation; Step S5: Dynamic weighted fusion output. Based on the current scenario requirements, determine the initial prediction value weight and the error compensation value weight, and calculate the final prediction value.

2. The two-step deep learning short-term electricity price prediction method based on error compensation as described in claim 1, characterized in that, The data preprocessing in step S1 includes missing value imputation, outlier removal and normalization, as well as correlation analysis or time series correlation analysis selected according to the scenario.

3. The two-step deep learning short-term electricity price prediction method based on error compensation as described in claim 1, characterized in that, The VMD-CLSTM initial prediction model specifically includes: Scenario-adaptive VMD decomposition unit: In the model preprocessing stage, based on typical electricity market scenarios, the number of modes K, penalty factor α, and convergence tolerance ε are dynamically adjusted to decompose the original non-stationary electricity price sequence into K stationary subsequences. Multi-dimensional conditional input layer: For each stationary subsequence after decomposition, four core correlation dimensions are integrated to form a multi-source conditional vector set {V1,V2,V3,V4}, where V1 is the time feature vector, V2 is the supply and demand feature vector, V3 is the new energy feature vector, and V4 is the environmental feature vector. Temporal Attention Fusion Unit: The internal optimization module of CLSTM adopts a two-stage attention mechanism. In the early stage, key condition variables are selected by feature importance, and in the later stage, the focus is on key time periods of temporal dependence, and the weights of each condition vector are dynamically allocated. Improved CLSTM computation unit: It integrates multi-dimensional conditional fusion vectors with stationary subsequences decomposed by scene-adaptive VMD decomposition unit as input, optimizes the computation logic of gating mechanism, and enhances the dual capture capability of long-term sequence dependence and local features; Output mapping layer: The hidden states of CLSTM are transformed into preliminary predicted values ​​of each stationary subsequence through a fully connected network. After superposition, the initial predicted value ŷ(t) of the original electricity price sequence is obtained.

4. The two-step deep learning short-term electricity price prediction method based on error compensation as described in claim 3, characterized in that, Step S2 specifically includes the following steps: Step S21: Determine the scenario type based on the current electricity market operation data; based on the scenario type, adopt a scenario-adaptive VMD parameter configuration strategy to perform VMD decomposition on the standardized electricity price series to obtain... a stationary subsequence ; Step S22: Multi-dimensional conditional vector fusion; for each stationary subsequence, extract the temporal feature vector. Supply and demand feature vectors New energy feature vectors and environmental feature vectors The weights of each conditional vector are calculated using a two-stage attention mechanism, as shown in the formula: ; Where i = 1, 2, 3, 4, , This is the weight matrix. , For bias terms, The previous hidden state of the CLSTM is represented by [;], which indicates vector concatenation. The softmax function ensures that the weights sum to 1. The fused condition vector is obtained by weighting and summing the condition vectors according to their weights. ; Step S23: The improved CLSTM computing unit performs gated computation, for The CLSTM outputs of the stationary subsequences are superimposed to obtain the initial predicted value of the original electricity price sequence. : ; in, , For the first The output layer weight matrix and bias terms corresponding to each subsequence For the first CLSTM subsequences The status is always hidden.

5. The two-step deep learning short-term electricity price prediction method based on error compensation as described in claim 4, characterized in that, The gated computation of the improved CLSTM computing unit includes: The forget gate controls the proportion of historical cell states retained, which is incorporated into the fusion condition vector. , represented as: =𝜎 ⋅ ;𝑉+ ; in For subsequence of Time-standardized value, Here is the forget gate weight matrix. For bias terms, It is a sigmoid activation function with an output range of [0,1]. The input gate determines the update ratio of the information at the current moment, expressed as: =𝜎 ⋅ ;𝑉+ ; = ⋅ ;𝑉+ ; in, , This is the weight matrix; , For bias terms, Candidate values ​​for cell state; Cell state update is represented as: = ⊙ + ⊙ ; Where ⊙ represents element-wise product operation. This represents the cell state at the previous moment. Output gate and hidden state update are represented as follows: =𝜎 ⋅ ;𝑉+ ; = ⊙𝑡𝑎𝑛ℎ ; in, This is the output gate weight matrix. For bias terms, Hide the current state.

6. The two-step deep learning short-term electricity price prediction method based on error compensation as described in claim 5, characterized in that, In step S4, the secondary VMD-ERCRF prediction model introduces an error temporal feature attention mechanism on the basis of traditional random forest, and integrates error hierarchical decomposition and bias calibration strategies, specifically including: Error sequence preprocessing unit: receives initial predicted values The residual sequence with respect to the actual electrical value y(t) After standardization, error-stationary subsequences are obtained through secondary VMD decomposition. Error Time-Series Attention Unit: Assigns differentiated weights to features at different time steps of the error-stationary subsequence, using an attention weight matrix. Focusing on error mutation points and periods of trend change, the weight calculation incorporates the temporal correlation of the error sequence; Random Forest Basic Prediction Unit: Based on the error features after attention weighting, bootstrap sampling is used to generate K training subsets to construct K decision trees. Each tree is completely split based on the principle of minimizing mean square error to ensure the model's ability to fit nonlinear errors. Error hierarchical compensation unit: decomposes the error into systematic errors. and randomness error Sub-prediction models are constructed separately, and preliminary error prediction values ​​are obtained through weighted fusion. Bias calibration unit: Estimates prediction bias using out-of-bag (OOB) data and calibrates the initial error prediction value using the unbiased sample variance correction formula.

7. The two-step deep learning short-term electricity price prediction method based on error compensation as described in claim 6, characterized in that, Step S4 specifically includes the following steps: Step S41: Process the standardized residual sequence Perform a second VMD decomposition with the same parameter configuration as the initial VMD decomposition, and obtain... A stationary subsequence of errors { },in = m= ; Step S42: Error temporal attention weighting, for each error subsequence Calculate the attention weights of the features at each time step, expressed as: ; in, The feature weight matrix, The time decay coefficient, For the normalized time step and , Let t be the error value of the m-th subsequence at time t. The weight of the recent error characteristics is enhanced by introducing a time decay coefficient. Step S43: Train the ERCRF model and perform error decomposition and prediction, using out-of-bag (OOB) data to calculate the prediction bias. The formula is: ; in, The number of samples outside the bag. Samples outside the bag The predicted value; the calibrated error compensation value is: ; in It is a symbolic function.

8. The two-step deep learning short-term electricity price prediction method based on error compensation as described in claim 7, characterized in that, The training of the ERCRF model in step S43 includes: Sample construction, using weighted error stationary subsequences { } represents the input features, and the original residual sequence. Construct a training sample set using labels. ; Sample sampling, drawing from D using bootstrap sampling. training subset Each subset contains N samples; Decision tree construction, for each subset Random selection Features and Decision trees are constructed based on the principle of minimizing the Gini coefficient. The formula for calculating the Gini coefficient is: ; Where C is the number of error categories, Let be the proportion of the c-th type of error in the sample set D.

9. The two-step deep learning short-term electricity price prediction method based on error compensation as described in claim 8, characterized in that, The error decomposition and prediction in step S43 includes: Systematic error extraction is performed using the moving average method, with the following formula: ; in, To smooth out window sizes; Random error extraction, the formula is: ; Dual error prediction: The system error compensation value is predicted separately using the ERCRF model. and random error compensation value : ; ; in , The first The decision tree has a systematic error prediction branch and a random error prediction branch.

10. The two-step deep learning short-term electricity price prediction method based on error compensation as described in claim 9, characterized in that, Step S5 specifically includes the following steps: Step S51: Adaptively adjust the weights of the initial prediction value and the error compensation value according to the core requirements of the scenario, including accuracy-first scenario, balanced scenario and efficiency-first scenario; Step S52: Calculate the final predicted value using the following formula: ; in for Final forecast of electricity price for half an hour at any given time; Step S53: Inverse standardization of results. If the initial predicted value has been standardized, inverse standardization is performed on the final predicted value to restore the original electricity price scale. ; in, , These are the maximum and minimum values ​​of the original electricity price sequence, respectively. This is the final predicted value for the actual electricity price.