Long-period electricity price prediction method based on multi-dimensional fusion and adaptive updating

By employing a multidimensional fusion and adaptive update approach, a multidimensional feature matrix is ​​constructed and combined with an improved Transformer model and an econometric model. This addresses the accuracy and adaptability issues in long-term electricity price forecasting, enabling high-precision, interpretable electricity price forecasting and risk assessment.

CN121724677APending Publication Date: 2026-03-24BEIJING LIANSHAN NENGCE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511871637.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-12
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing long-term electricity price forecasting methods have shortcomings in terms of limited data dimensions, static and fixed models, lack of interpretability of results, and failure to quantify forecast risks, making it difficult to meet the comprehensive requirements of accuracy, adaptability, and decision support capabilities under the new power system.

Method used

A multidimensional fusion and adaptive update approach is adopted. By acquiring heterogeneous raw data from multiple sources, a multidimensional feature matrix is ​​constructed. An improved Transformer model and an econometric model are deeply fused to capture the complex linear and nonlinear relationships of electricity prices. Combined with STL decomposition and dynamic verification mechanisms, adaptive updates are achieved.

Benefits of technology

It improves the accuracy and robustness of long-term electricity price forecasting, provides reliable decision support information and quantified uncertainty prediction range, and enhances the model's adaptability and interpretability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121724677A_ABST
    Figure CN121724677A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to a long-period electricity price prediction method based on multi-dimensional fusion and adaptive updating. The method comprises the following steps: acquiring multi-source heterogeneous original data; the multi-source heterogeneous original data comprises a historical electricity price sequence, power system data, meteorological environment data, macroeconomic data and policy text data; processing the multi-source heterogeneous original data into a multi-dimensional feature matrix; the multi-dimensional feature matrix comprises historical electricity price features, power system features, meteorological environment features, macroeconomic features and policy features; sTL decomposition is carried out on the historical electricity price sequence, and trend item sequences, seasonal item sequences and residual item sequences of different time scales are extracted; and inputting the historical electricity price characteristics, the electric power system characteristics, the meteorological environment characteristics, the macroeconomic characteristics, the policy characteristics, the trend term sequence, the season term sequence and the residual term sequence into a preset hybrid model, and outputting to obtain electricity price predicted values at each time point in the future.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a long-term electricity price forecasting method based on multi-dimensional fusion and adaptive updating. Background Technology

[0002] In electricity market research, long-term electricity price forecasting methods have evolved from traditional statistical methods to manual methods. With the deepening of electricity market reforms and the large-scale integration of renewable energy, electricity price volatility has intensified. Market participants such as power generation companies and electricity retailers have an increasingly urgent need for long-term electricity price forecasts to support strategic decisions such as investment planning and risk management.

[0003] Current long-term electricity price forecasting methods mainly fall into four categories, each with its own limitations: (1) Statistical time series models, such as ARIMA and GARCH, rely on historical electricity price series for extrapolation and forecasting. They are difficult to incorporate external driving factors such as policies and energy structures, and cannot adapt to structural changes.

[0004] (2) Long-term equilibrium models based on econometrics, such as multiple linear regression and cointegration analysis (VECM), establish causal models using external variables such as macroeconomics and energy prices. The model parameters are usually fixed and difficult to adapt to the dynamic changes brought about by frequent adjustments in electricity market reforms and policies.

[0005] (3) Methods based on artificial intelligence and machine learning, such as neural networks (ANN), support vector machines (SVM), and deep learning (LSTM / GRU), are good at capturing nonlinear relationships. Drawbacks: Most of them are "black box" models with poor interpretability; and they lack the ability to directly model external factors such as policies.

[0006] (4) Hybrid and integrated models, such as ARIMA+ANN, econometrics+LSTM, etc., aim to combine the advantages of different models. The model structure is relatively loose, the weight allocation relies heavily on experience, and there is a lack of adaptive mechanism to dynamically adjust according to market conditions; and the quantification of prediction uncertainty is often ignored.

[0007] The existing methods mentioned above have shortcomings in terms of limited data dimensions, static and fixed models, lack of interpretability of results, and failure to quantify prediction risks. They are difficult to meet the comprehensive requirements of accuracy, adaptability, and decision support capabilities for long-term electricity price forecasting under the new power system. Summary of the Invention

[0008] The purpose of this invention is to address the shortcomings of existing technologies by providing a long-term electricity price forecasting method based on multi-dimensional fusion and adaptive updating, thereby solving the problems existing in the prior art. To achieve the above objectives, this invention provides a long-term electricity price forecasting method based on multi-dimensional fusion and adaptive updating, the method comprising: Acquire multi-source heterogeneous raw data; the multi-source heterogeneous raw data includes historical electricity price sequences, power system data, meteorological and environmental data, macroeconomic data, and policy text data; The multi-source heterogeneous raw data is processed into a multi-dimensional feature matrix; the multi-dimensional feature matrix includes historical electricity price features, power system features, meteorological environment features, macroeconomic features, and policy features; The historical electricity price series was decomposed using STL to extract the trend term series, seasonal term series, and residual term series at different time scales; The historical electricity price characteristics, power system characteristics, meteorological environment characteristics, macroeconomic characteristics, policy characteristics, trend term sequence, seasonal term sequence, and residual term sequence are input into a preset hybrid model to output the predicted electricity price values ​​for each future time point.

[0009] In one possible implementation, processing the multi-source heterogeneous raw data into a multi-dimensional feature matrix according to the feature type and data purpose specifically includes: Outlier detection and processing are performed on daily electricity price sequences in historical electricity price series. Abnormal price points are identified and corrected through statistical methods to form historical electricity price characteristics. The historical electricity price characteristics include lagged electricity prices, moving average electricity prices, and week-on-week year-on-year changes. The lagged electricity prices include electricity prices that are lagged by multiple days. The moving average electricity prices include moving average electricity prices with a preset duration, rolling standard deviation, and skewness. The week-on-week year-on-year changes include daily or weekly returns, whether it is a weekend, day of the week, and month encoded representations. The power system data includes load data, power structure data, and transmission constraint data. The load data is processed to determine basic load characteristics, load-derived characteristics, and load pattern characteristics. The basic load characteristics include the daily load level, daily peak load, daily valley load, and load factor. The load-derived characteristics include lagging load, pre-defined duration load variation, and week-on-week changes. The load pattern characteristics include the characteristics of the daily load curve decomposed into 24 time points and a seasonality index. The load factor is the ratio of average load to peak load, and the seasonality index is the ratio of current load to the historical average load for the same period. The power structure data is processed to determine the power generation capacity characteristics, output characteristics, and supply-demand balance characteristics. The power generation capacity characteristics include the proportion of thermal power installed capacity, the proportion of new energy installed capacity, and the proportion of hydropower installed capacity. The processed characteristics include the actual output of thermal power, the actual output of new energy, and the curtailment rate of new energy. The supply-demand balance characteristics include the reserve capacity rate and the total available capacity minus the predicted load, divided by the predicted load. The transmission constraint data is processed to determine congestion indicators and network topology characteristics; the congestion indicators include the degree of congestion at key sections and the net exchange power of the region; the network topology characteristics include the utilization rate of key lines and the N-1 security check status; wherein, the basic load characteristics, load-derived characteristics and load pattern characteristics, generation capacity characteristics, output characteristics and supply-demand balance characteristics, congestion indicators and network topology characteristics constitute the power system characteristics; The meteorological environmental data includes temperature, humidity, wind speed, and sunshine duration. The temperature, humidity, wind speed, and sunshine duration are processed to obtain temperature characteristics, humidity characteristics, wind speed characteristics, and sunshine duration characteristics. Then, meteorological derivative features are constructed. The temperature characteristics, humidity characteristics, wind speed and sunshine duration characteristics, and meteorological derivative features constitute the meteorological environmental features. When multi-site data exists, spatial aggregation processing is performed. The temperature characteristics include daily average temperature, daily maximum temperature, daily minimum temperature, and daily temperature range. The humidity characteristics include daily average relative humidity and daily maximum relative humidity. The wind speed and sunshine duration characteristics include daily average wind speed, sunshine duration, or solar radiation intensity. The meteorological derivative features include cumulative effect characteristics, fluctuation characteristics, and... Meteorological characteristics related to new energy sources; the cumulative effect characteristics include the cumulative temperature over the past 7 days, the cumulative degree-days when the temperature is higher than the benchmark temperature, and the cumulative degree-days when the temperature is lower than the benchmark temperature; the volatility characteristics include the standard deviation of temperature over the past 7 days and the weather stability index; the meteorological characteristics related to new energy sources include wind power output potential based on wind speed, photovoltaic power output potential based on sunshine duration, and a comprehensive index of new energy availability; the spatial aggregation processing includes regional averaging and weighted aggregation; the regional averaging includes calculating the average temperature of multiple meteorological stations within the region and the average wind speed of multiple meteorological stations within the region; the weighted aggregation is calculated as Σ(station wind speed × station wind power installed capacity) / total wind power installed capacity; Macroeconomic data of different frequencies are unified to a daily frequency. For monthly data, it is converted into daily data through forward filling, linear interpolation, or adjustment based on working days. Then, macroeconomic features are constructed, including fuel price features, economic growth features, and inflation and cost features. The fuel price features include absolute price, rate of change, and price spread. The economic growth features include GDP growth momentum and industrial activity index. The policy text data is cleaned and preprocessed to remove irrelevant characters, Chinese words are segmented and stop words are removed. Key information is extracted from the data to identify the policy type, field and intensity. A pre-trained natural language processing model is used to convert the policy text into a numerical vector representation to obtain policy features. The Pearson correlation coefficients between historical electricity price characteristics, power system characteristics, meteorological environment characteristics, macroeconomic characteristics, policy characteristics and target electricity price are calculated respectively to assess linear correlation, calculate the maximum information coefficient and capture nonlinear relationships; Multicollinearity detection is performed, the variance inflation factor between features is calculated, and highly correlated features are identified and processed. The optimal feature subset is determined by a recursive feature elimination method, and the optimal feature subset constitutes a multidimensional feature matrix.

[0010] In one possible implementation, the step of performing STL decomposition on the electricity price series to extract the trend term series, seasonal term series, and residual term series at different time scales specifically includes: The historical electricity price sequence is cleaned to obtain the original sequence; and seasonal cycle parameters are set according to the characteristics of the electricity market, including weekly cycle, monthly cycle and annual cycle. The original sequence is smoothed to obtain an initial trend estimate; Subtract the trend estimate from the original sequence to obtain the detrended sequence; For a preset seasonal cycle parameter, the detrended sequence is segmented according to the cycle length to obtain multiple groups; robust local smoothing is performed on each group to obtain periodic sub-patterns; and the periodic sub-patterns are reorganized into seasonal terms. Subtracting the seasonal term from the original sequence yields a deseasonal sequence. Smoothing the deseasonal sequence yields the trend term. Subtracting the trend term and the seasonal term from the original sequence yields the residual term; The adjusted weights are used for multiple iterations until the changes in the trend and seasonal terms converge, resulting in the trend term sequence, seasonal term sequence, and residual term sequence.

[0011] In one possible implementation, the method further includes the following preceding steps: Construct a hybrid model; the hybrid model includes an improved Transformer model and an econometric model; The improved Transformer model is used to generate a feature tensor based on the seasonal term sequence and the historical electricity price characteristics, power system characteristics, meteorological environment characteristics, macroeconomic characteristics, and policy characteristics; the econometric model is used to generate point predictions of future electricity prices based on the trend term sequence and the historical electricity price characteristics, power system characteristics, meteorological environment characteristics, macroeconomic characteristics, and policy characteristics.

[0012] In one possible implementation, the method further includes: Based on the characteristic type, the historical electricity price characteristics, power system characteristics, meteorological environment characteristics, macroeconomic characteristics, and policy characteristics are classified to obtain market state characteristics and external variable characteristics. The market state characteristics include the current load level, the real-time output ratio of new energy sources, the system reserve capacity rate, the degree of blockage at key sections, and the policy intensity index. The external variable characteristics include coal prices, GDP growth rate, and the policy intensity index.

[0013] In one possible implementation, the improved Transformer model is used for: Obtain the seasonal term sequence and multidimensional feature matrix; The seasonal term sequence and the multidimensional feature matrix are concatenated to obtain the input tensor; The input tensor is transformed by embedding representation to obtain a low-dimensional input tensor; Create a position encoding matrix whose dimensions match the maximum length and feature dimension of the low-dimensional input tensor; The position encoding matrix is ​​added to the input tensor to add learnable position information to each time step in the input tensor; During model training, the parameters of the location encoding matrix are automatically adjusted using gradient descent to learn the time dependence patterns of electricity market data, including weekend effects and monthly settlement cycles. In each attention layer of the improved Transformer encoder, two parallel attention computation paths are determined; the attention computation paths include a short-term attention path and a long-term attention path. In the short-term attention path, a local attention window is set; for each time point in the sequence tensor, only the attention weight between each time point and other time points within the local attention window is calculated to capture short-term fluctuations and intraday dependencies in the electricity price sequence. In the long-term attention path, a sparse attention pattern is adopted, and an attention mechanism is set up. The attention mechanism focuses on key nodes, including periodic key nodes and historical outliers. The periodic key nodes include the same day of the week and the same day of the month, thereby obtaining summary information of the entire sequence through a global attention head. The historical outliers capture the long-term trend, weekly / monthly periodicity and structural dependence in the electricity price sequence. The outputs of the short-term attention path and the long-term attention path are weighted and fused; this includes: assigning learnable weight parameters α and β to the two paths respectively, and linearly combining the outputs of the short-term attention path and the long-term attention path according to the weights to form the final attention output; the weight parameters α and β are automatically optimized during training so that the model can dynamically adjust the degree of attention to short-term and long-term information according to the characteristics of different time periods. The fused attention is output to a feedforward neural network layer; the feedforward neural network layer consists of two linear transformation layers and an activation function, which is used to further extract and transform feature representations; The attention mechanism and the feedforward neural network layer are combined into a complete encoder layer; Multiple encoder layers are stacked to form a deep encoder architecture; in the deep encoder architecture, the output of each encoder layer is used as the input of the next layer, and temporal features are extracted layer by layer. The output of the last encoder layer is used as the final hidden state of the improved Transformer model, and the attention weights of each layer are preserved.

[0014] In one possible implementation, the econometric model is used for: Obtain the trend term sequence and external variable characteristics; the external variables include coal price, GDP, and policy intensity. The external influence is mapped to the influence on the trend term through a linear layer using the formula: External Influence = W × [Coal Price, GDP, Policy Intensity...] + b; where W is the weight of each variable's influence on electricity price, and b is an empirical value. The influence of historical values ​​of the trend term on the current value is determined by the formula autoregressive term = Σ(φ_i×T_{ti}); where p is the lag order, φ_i is the coefficient, T_{ti} is the value of the trend term sequence T_t at the i-th historical time point before time t, and both p and φ_i can be learned, i=1 to p; When a long-term equilibrium relationship is detected between the trend term sequence and the external variable, the trend term sequence is corrected for error using the formula Error Correction = λ × (T_{t-1-equilibrium level); The learnable econometric equation is set as: Trend Prediction = External Variable Influence + Autoregressive Term + Error Correction Term; where the external variable coefficients, autoregressive coefficients, and error correction coefficients are all trainable parameters. The trainable parameters are optimized during training using gradient descent to output predicted values ​​for the trend term sequence.

[0015] In one possible implementation, the method further includes: Receive temporal features from the improved Transformer model; Receive predicted values ​​from the trend term sequence of the econometric model; The predicted values ​​of the trend term sequence are projected onto the same dimension as the improved Transformer model; The weights of the econometric model are determined based on the attention weights of each layer. The predicted value of the trend term sequence and the time series features are weighted and summed by using the attention weights of each layer and the weights of the econometric model. The weighted summation of the hidden state is passed through a fully connected layer to generate a point prediction value for the future electricity price and to generate a prediction interval.

[0016] In one possible implementation, the method further includes: Input the sequence of residual terms into the improved Transformer model; The prediction interval width is determined using the residual term sequence; The time prediction interval is corrected using the interval width. Analyze whether there are outliers in the residual term sequence; When an anomaly is found, the time point corresponding to the anomaly is obtained and stored.

[0017] In one possible implementation, the electricity price forecast includes a point forecast and a forecast interval.

[0018] By applying the long-term electricity price forecasting method based on multi-dimensional fusion and adaptive updating provided in this invention, a feature system integrating multi-dimensional data such as historical price patterns, energy supply and demand trends, and policy factors is constructed. The model adopts an architecture that deeply mixes an improved Transformer with an econometric model, which can more comprehensively and accurately capture the complex linear and nonlinear relationships affecting electricity prices, effectively improving the accuracy of long-term forecasts and enhancing robustness under different market environments.

[0019] The model possesses continuous adaptive capabilities. By introducing a closed-loop update mechanism based on online learning and dynamic verification, the model can automatically optimize its parameters and structure as the market environment, policies, and energy structure evolve. This solves the problem of performance degradation in long-term predictions of traditional static models, and achieves self-evolution and long-term effectiveness in predictive capabilities.

[0020] The decision support information is richer and more reliable. While predicting the output point, the model can generate a prediction interval (probability distribution) that quantifies uncertainty, providing users with a crucial basis for assessing risk and formulating resilient strategies. This output combines high information content with practicality.

[0021] The forecast results are highly interpretable. Through techniques such as attention mechanism analysis and econometric variable contribution decomposition, the model can clearly reveal the specific impact of different driving factors (such as load changes, policy shocks, and fuel costs) on the forecast results, thus meeting the needs of policymaking and market regulation for explaining causal relationships. Attached Figure Description

[0022] Figure 1 This is one of the flowcharts for the long-cycle electricity price prediction method based on multi-dimensional fusion and adaptive updating provided by the present invention; Figure 2 This is an architecture diagram of the long-cycle electricity price prediction method based on multi-dimensional fusion and adaptive updating provided by the present invention. Figure 3 Diagram of a multi-dimensional data fusion architecture; Figure 4 for Figure 1 Flowchart for step 130; Figure 5 This is an architecture diagram of the improved Transformer model; Figure 6 The second flowchart of the long-cycle electricity price prediction method based on multi-dimensional fusion and adaptive updating provided by the present invention; Figure 7 Flowchart for adaptive updates of hybrid models and dynamic verification mechanism; Figure 8(a) shows the long-term electricity price forecast for location a; Figure 8(b) shows the long-term electricity price forecast for location b. Figure 8(c) shows the long-term electricity price forecast for location c. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0024] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.

[0025] Figure 1 This is one of the long-cycle electricity price prediction methods based on multi-dimensional fusion and adaptive updating provided by the present invention. Figure 2 This is a diagram illustrating the architecture of the long-cycle electricity price forecasting method based on multi-dimensional fusion and adaptive updating provided by this invention. The following is in conjunction with... Figure 1 and Figure 2 This application will be described in detail below. This application includes the following steps: Step 110: Obtain multi-source heterogeneous raw data; the multi-source heterogeneous raw data includes historical electricity price sequences, power system data, meteorological and environmental data, macroeconomic data, and policy text data; The original data for the multi-source heterogeneous systems are shown in Table 1: Table 1 This can be achieved by obtaining raw data from power trading platforms, meteorological bureaus, and statistical bureaus through API interfaces. Data from different frequencies, such as 15-minute load, hourly meteorological data, and monthly GDP, can be unified to the basic time granularity required for forecasting, such as daily data, through linear interpolation or downsampling.

[0026] Step 120: Process the multi-source heterogeneous raw data into a multi-dimensional feature matrix; the multi-dimensional feature matrix includes historical electricity price features, power system features, meteorological environment features, macroeconomic features, and policy features; For details, see Figure 3 The system performs outlier detection and processing on daily electricity price sequences in historical electricity price series, identifies and corrects abnormal price points using statistical methods, and forms historical electricity price characteristics. These historical electricity price characteristics include lagged electricity prices, moving average electricity prices, and week-on-week year-on-year changes. The lagged electricity prices include prices that are lagged by multiple days, the moving average electricity prices include preset-duration moving average electricity prices, rolling standard deviation, and skewness, and the week-on-week year-on-year changes include encoded representations of daily or weekly returns, whether it is a weekend, day of the week, and month. The power system data includes load data, power structure data, and transmission constraint data. The load data is processed to determine basic load characteristics, load-derived characteristics, and load pattern characteristics. The basic load characteristics include the daily load level, daily peak load, daily valley load, and load factor. The load-derived characteristics include lagging load, pre-defined duration load variation, and week-on-week changes. The load pattern characteristics include the characteristics of the daily load curve decomposed into 24 time points and a seasonality index. The load factor is the ratio of average load to peak load, and the seasonality index is the ratio of current load to the historical average load for the same period. The power structure data is processed to determine the power generation capacity characteristics, output characteristics, and supply-demand balance characteristics. The power generation capacity characteristics include the proportion of thermal power installed capacity, the proportion of new energy installed capacity, and the proportion of hydropower installed capacity. The processed characteristics include the actual output of thermal power, the actual output of new energy, and the curtailment rate of new energy. The supply-demand balance characteristics include the reserve capacity rate and the total available capacity minus the predicted load, divided by the predicted load. The transmission constraint data is processed to determine congestion indicators and network topology characteristics; the congestion indicators include the degree of congestion at key sections and the net exchange power of the region; the network topology characteristics include the utilization rate of key lines and the N-1 security check status; wherein, the basic load characteristics, load-derived characteristics and load pattern characteristics, generation capacity characteristics, output characteristics and supply-demand balance characteristics, congestion indicators and network topology characteristics constitute the power system characteristics; The meteorological environmental data includes temperature, humidity, wind speed, and sunshine duration. The temperature, humidity, wind speed, and sunshine duration are processed to obtain temperature characteristics, humidity characteristics, wind speed characteristics, and sunshine duration characteristics. Then, meteorological derivative features are constructed. The temperature characteristics, humidity characteristics, wind speed and sunshine duration characteristics, and meteorological derivative features constitute the meteorological environmental features. When multi-site data exists, spatial aggregation processing is performed. The temperature characteristics include daily average temperature, daily maximum temperature, daily minimum temperature, and daily temperature range. The humidity characteristics include daily average relative humidity and daily maximum relative humidity. The wind speed and sunshine duration characteristics include daily average wind speed, sunshine duration, or solar radiation intensity. The meteorological derivative features include cumulative effect characteristics, fluctuation characteristics, and... Meteorological characteristics related to new energy sources; the cumulative effect characteristics include the cumulative temperature over the past 7 days, the cumulative degree-days when the temperature is higher than the benchmark temperature, and the cumulative degree-days when the temperature is lower than the benchmark temperature; the volatility characteristics include the standard deviation of temperature over the past 7 days and the weather stability index; the meteorological characteristics related to new energy sources include wind power output potential based on wind speed, photovoltaic power output potential based on sunshine duration, and a comprehensive index of new energy availability; the spatial aggregation processing includes regional averaging and weighted aggregation; the regional averaging includes calculating the average temperature of multiple meteorological stations within the region and the average wind speed of multiple meteorological stations within the region; the weighted aggregation is calculated as Σ(station wind speed × station wind power installed capacity) / total wind power installed capacity; Macroeconomic data of different frequencies are unified to a daily frequency. For monthly data, it is converted into daily data through forward filling, linear interpolation, or adjustment based on working days. Then, macroeconomic features are constructed, including fuel price features, economic growth features, and inflation and cost features. The fuel price features include absolute price, rate of change, and price spread. The economic growth features include GDP growth momentum and industrial activity index. The policy text data is cleaned and preprocessed to remove irrelevant characters, Chinese words are segmented and stop words are removed. Key information is extracted from the data to identify the policy type, field and intensity. A pre-trained natural language processing model is used to convert the policy text into a numerical vector representation to obtain policy features. The Pearson correlation coefficients between historical electricity price characteristics, power system characteristics, meteorological environment characteristics, macroeconomic characteristics, policy characteristics and target electricity price are calculated respectively to assess linear correlation, calculate the maximum information coefficient and capture nonlinear relationships; Multicollinearity detection is performed, the variance inflation factor between features is calculated, and highly correlated features are identified and processed. The optimal feature subset is determined by a recursive feature elimination method, and the optimal feature subset constitutes a multidimensional feature matrix.

[0027] Step 130: Perform STL decomposition on the historical electricity price series to extract the trend term series, seasonal term series and residual term series at different time scales; Specifically, such as Figure 4 As shown, step 130 includes the following: Step 1301: Clean the historical electricity price sequence to obtain the original sequence; and set seasonal cycle parameters according to the characteristics of the electricity market, including weekly cycle, monthly cycle and annual cycle. Step 1302: Smooth the original sequence to obtain an initial trend estimate; Step 1303: Subtract the trend estimate from the original sequence to obtain the detrended sequence; Step 1304: For the preset seasonal cycle parameters, the detrending sequence is segmented according to the cycle length to obtain multiple groups; robust local smoothing is performed on each group to obtain periodic sub-patterns; and the periodic sub-patterns are reorganized into seasonal terms. Step 1305: Subtract the seasonal term from the original sequence to obtain the deseasonal sequence. After smoothing the deseasonal sequence, the trend term is obtained. Step 1306: Subtract the trend term and the seasonal term from the original sequence to obtain the residual term; Step 1307: Use the adjusted weights to perform multiple iterations until the changes in the trend term and seasonal term converge, and obtain the trend term sequence, seasonal term sequence and residual term sequence.

[0028] Step 140: Input the historical electricity price characteristics, power system characteristics, meteorological environment characteristics, macroeconomic characteristics, policy characteristics, trend term sequence, seasonal term sequence and residual term sequence into a preset hybrid model, and output the predicted electricity price values ​​for each future time point.

[0029] Specifically, prior to step 140, a hybrid model needs to be constructed. This hybrid model includes an improved Transformer model and an econometric model. See the improved Transformer model. Figure 5The improved Transformer model is used to generate a feature tensor based on the seasonal term sequence and the historical electricity price characteristics, power system characteristics, meteorological environment characteristics, macroeconomic characteristics, and policy characteristics; the econometric model is used to generate point predictions of future electricity prices based on the trend term sequence and the historical electricity price characteristics, power system characteristics, meteorological environment characteristics, macroeconomic characteristics, and policy characteristics.

[0030] The improved Transformer model takes the seasonal term S_t and embedded multi-source features as input, and separates two parallel attention paths within the encoder to reflect the periodic fluctuation pattern.

[0031] After obtaining the feature matrix in step 120, this application may further include: classifying the historical electricity price features, power system features, meteorological environment features, macroeconomic features, and policy features according to the feature type to obtain market state features and external variable features; the market state features include current load level, real-time output ratio of new energy sources, system reserve capacity rate, degree of blockage at key sections, and policy intensity index; the external variable features include coal price, GDP growth rate, and policy intensity index.

[0032] Specifically, this mainly involves separating market state features and external variable features based on feature type, which are then used for training the hybrid model, and the trained hybrid model is used for price prediction.

[0033] The improved Transformer model is used for: The process involves: acquiring a seasonal term sequence and a multidimensional feature matrix; concatenating the seasonal term sequence and the multidimensional feature matrix to obtain an input tensor; performing an embedding representation transformation on the input tensor to obtain a low-dimensional input tensor; creating a location encoding matrix whose dimension matches the maximum length and feature dimension of the low-dimensional input tensor; adding the location encoding matrix to the input tensor to add learnable location information to each time step in the input tensor; and during model training, automatically adjusting the parameters of the location encoding matrix using gradient descent to learn the time dependency patterns of electricity market data, including weekend effects and monthly settlement cycles. In each attention layer of the improved Transformer encoder, two parallel attention computation paths are determined; these paths include a short-term attention path and a long-term attention path. In the short-term attention path, a local attention window is set; for each time point in the sequence tensor, the attention weights between each time point and other time points within the local attention window are calculated only to capture short-term fluctuations and intraday dependencies in the electricity price sequence. In the long-term attention path, a sparse attention pattern is adopted, and an attention mechanism is set that focuses on key nodes, including periodic key nodes and... Historical outliers; these periodic key nodes include the same day of the week and the same day of the month, thus providing summary information of the entire sequence through a global attention head; these historical outliers capture long-term trends, weekly / monthly periodicity, and structural dependencies in the electricity price sequence; weighted fusion of the outputs of short-term and long-term attention paths; including: assigning learnable weight parameters α and β to the two paths respectively, and linearly combining the outputs of the short-term and long-term attention paths according to their weights to form the final attention output; the weight parameters α and β are automatically optimized during training to enable the model to adapt to the characteristics of different time periods. The attention level is dynamically adjusted to focus on short-term and long-term information; the fused attention is output to a feedforward neural network layer; the feedforward neural network layer consists of two linear transformation layers and an activation function, used to further extract and transform feature representations; the attention mechanism and the feedforward neural network layer are combined into a complete encoder layer; multiple encoder layers are stacked to form a deep encoder architecture; in the deep encoder architecture, the output of each encoder layer is used as the input of the next layer to extract temporal features layer by layer; the output of the last encoder layer is used as the final hidden state of the improved Transformer model, and the attention weights of each layer are saved.

[0034] Specifically, the seasonal term S_t and other processed time-series features (such as load and temperature) are concatenated into a multi-dimensional feature vector, which serves as the input sequence for the encoder.

[0035] When setting up learnable positional encoding, instead of using fixed sine / cosine functions, a trainable positional encoding matrix E_pos is initialized, with a size matching the maximum sequence length and feature dimension. This matrix automatically learns time-dependent patterns specific to electricity market data (such as the difference between weekdays and weekends, and monthly settlement cycles) during training via gradient descent. Inside the encoder layer of the improved Transformer model, a dual-path attention model is implemented. Path 1 (short-term): Using a small attention window (e.g., window = 24, corresponding to one day), each time point focuses only on information within its immediate preceding and following time periods, capturing intraday fluctuations. Path 2 (long-term): Employing a sparse attention pattern. Instead of calculating pairwise attention between all time points, each time point focuses only on a few key nodes (e.g., the same day of the week, the same day of the month) and a small global attention head focusing on the summary information of the entire sequence. The outputs of the two paths are fused through a learnable weighted gating unit to obtain the final context representation H_transformer. The fused attention output is then fed into a feedforward neural network layer.

[0036] The feedforward network consists of two linear transformation layers and an activation function for further extraction and transformation of feature representations. Each encoder layer also includes residual connections and layer normalization operations to stabilize the training process and facilitate gradient flow. The attention mechanism and feedforward network described above are combined into a complete encoder layer. Multiple such encoder layers are stacked to form a deep encoder architecture. The output of each layer serves as the input to the next layer, progressively extracting more abstract and high-level temporal feature representations through multi-layer processing.

[0037] Furthermore, the econometric model is used for: Obtain the trend sequence and external variable characteristics; the external variables include coal price, GDP, and policy intensity; the external impact is expressed by the formula: External Impact = W × [Coal Price, GDP, Policy Intensity...] + b) The external variable features are mapped to their impact on the trend term through a linear layer; where W is the weight of each variable's impact on electricity price, and b is an empirical value; the impact of historical values ​​of the trend term on the current value is determined using the formula autoregressive term = Σ(φ_i × T_{ti}); where p is the lag order, φ_i is the coefficient, and T_{ti} is the value of the trend term sequence T_t at the i-th historical time point before time t. Both p and φ_i can be learned, and i = 1 to p; when a long-term equilibrium relationship is detected between the trend term sequence and the external variable, the trend term sequence is corrected using the formula error correction = λ × (T_{t-1 - equilibrium level); the learnable econometric equation is set as trend prediction = external variable impact + autoregressive term + error correction term; where the external variable coefficients, autoregressive coefficients, and error correction coefficients are all trainable parameters; the trainable parameters are optimized during training using gradient descent to output the predicted value of the trend term sequence.

[0038] Furthermore, the hybrid model continues to fuse the outputs of the improved Transformer model and the econometric model. Specifically, it receives time-series features from the improved Transformer model; receives predicted values ​​of the trend term sequence from the econometric model; projects the predicted values ​​of the trend term sequence onto the same dimension as the improved Transformer model; determines the weights of the econometric model based on the attention weights of each layer; and performs a weighted summation of the predicted values ​​of the trend term sequence and the time-series features using the attention weights of each layer and the weights of the econometric model. The weighted summation of the hidden state generates point predictions of future electricity prices through a fully connected layer, and generates a prediction interval.

[0039] In this model, the weights of the econometric model and the improved Transformer model are summed to 1. The final representation of the dynamically fused output is input into a fully connected layer. The fully connected layer maps the high-dimensional representation to the predicted electricity prices at various future time points. For multi-step prediction tasks, an autoregressive decoder structure can be designed, or multiple output layers can be used to directly predict prices at multiple future time steps. Two parallel branches are designed in the output layer: the first branch outputs the predicted point values, typically corresponding to the conditional mean or median, and the second branch outputs a measure of the uncertainty of the prediction.

[0040] Uncertainty quantification can be achieved using quantile regression or deep Bayesian neural networks. Specifically, in quantile regression, multiple output heads are set, each corresponding to a specific quantile, such as 10%, 50%, and 90%. These output heads are trained using a quantile loss function, ultimately outputting predicted values ​​corresponding to different quantiles, forming prediction intervals. In deep Bayesian neural networks, randomness is introduced into certain layers of the network, such as using Dropout as a Bayesian approximation. Multiple forward propagations are performed during prediction, and the distribution of multiple prediction results is statistically analyzed to obtain the prediction mean and prediction intervals. Regardless of the method used, a complete prediction result containing both the point prediction and the uncertainty interval can be output.

[0041] Furthermore, this application also includes: The residual term sequence is input into the improved Transformer model; the prediction interval width is determined using the residual term sequence; the prediction interval is corrected using the interval width; outliers in the residual term sequence are analyzed; when outliers are found, the corresponding time points are obtained and stored. Here, the prediction interval width refers to the numerical span between the upper and lower limits of the prediction interval, which quantifies the model's specific measure of the uncertainty of future electricity prices.

[0042] Outliers in the residual term sequence directly affect the determination of the prediction interval width. Outlier identification can use statistical methods (such as the 3σ criterion) to identify outliers in the residual term, or calculate the rolling statistic of the residual term to detect outliers that deviate from the normal range. When an outlier cluster is detected, the prediction interval width is automatically increased.

[0043] Figure 7 The flowchart illustrates the adaptive update and dynamic verification mechanism for the hybrid model. This flowchart reveals the self-optimization loop after model deployment, demonstrating the dynamic adaptability that distinguishes this invention from static models. The feedback loop shows the complete cycle from prediction output to performance monitoring, and then to triggering model updates. The conditional judgment mechanism clarifies the update triggering conditions based on prediction deviation thresholds (such as MAPE).

[0044] Figures 8(a)-8(c) visually demonstrate the richness of information and value in risk management of the long-term electricity price forecasts for selected regions. The probabilistic output expands from a single point prediction line to a prediction band including confidence intervals. The uncertainty visualization clearly expresses the potential range of electricity price fluctuations at different future points in time.

[0045] By applying the long-term electricity price forecasting method based on multi-dimensional fusion and adaptive updating provided in this invention, a feature system integrating multi-dimensional data such as historical price patterns, energy supply and demand trends, and policy factors is constructed. The model adopts an architecture that deeply mixes an improved Transformer with an econometric model, which can more comprehensively and accurately capture the complex linear and nonlinear relationships affecting electricity prices, effectively improving the accuracy of long-term forecasts and enhancing robustness under different market environments.

[0046] The model possesses continuous adaptive capabilities. By introducing a closed-loop update mechanism based on online learning and dynamic verification, the model can automatically optimize its parameters and structure as the market environment, policies, and energy structure evolve. This solves the problem of performance degradation in long-term predictions of traditional static models, and achieves self-evolution and long-term effectiveness in predictive capabilities.

[0047] The decision support information is richer and more reliable. While predicting the output point, the model can generate a prediction interval (probability distribution) that quantifies uncertainty, providing users with a crucial basis for assessing risk and formulating resilient strategies. This output combines high information content with practicality.

[0048] The forecast results are highly interpretable. Through techniques such as attention mechanism analysis and econometric variable contribution decomposition, the model can clearly reveal the specific impact of different driving factors (such as load changes, policy shocks, and fuel costs) on the forecast results, thus meeting the needs of policymaking and market regulation for explaining causal relationships.

[0049] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0050] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0051] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A long-cycle electricity price forecasting method based on multi-dimensional fusion and adaptive updating, characterized in that, The method includes: Acquire multi-source heterogeneous raw data; the multi-source heterogeneous raw data includes historical electricity price sequences, power system data, meteorological and environmental data, macroeconomic data, and policy text data; The multi-source heterogeneous raw data is processed into a multi-dimensional feature matrix; the multi-dimensional feature matrix includes historical electricity price features, power system features, meteorological environment features, macroeconomic features, and policy features; The historical electricity price series was decomposed using STL to extract the trend term series, seasonal term series, and residual term series at different time scales; The historical electricity price characteristics, power system characteristics, meteorological environment characteristics, macroeconomic characteristics, policy characteristics, trend term sequence, seasonal term sequence, and residual term sequence are input into a preset hybrid model to output the predicted electricity price values ​​for each future time point.

2. The method according to claim 1, characterized in that, The process of processing the multi-source heterogeneous raw data into a multi-dimensional feature matrix according to the feature type and data purpose specifically includes: Outlier detection and processing are performed on daily electricity price sequences in historical electricity price series. Abnormal price points are identified and corrected through statistical methods to form historical electricity price characteristics. The historical electricity price characteristics include lagged electricity prices, moving average electricity prices, and week-on-week year-on-year changes. The lagged electricity prices include electricity prices that are lagged by multiple days. The moving average electricity prices include moving average electricity prices with a preset duration, rolling standard deviation, and skewness. The week-on-week year-on-year changes include daily or weekly returns, whether it is a weekend, day of the week, and month encoded representations. The power system data includes load data, power structure data, and transmission constraint data. The load data is processed to determine basic load characteristics, load-derived characteristics, and load pattern characteristics. The basic load characteristics include the daily load level, daily peak load, daily valley load, and load factor. The load-derived characteristics include lagging load, pre-defined duration load variation, and week-on-week changes. The load pattern characteristics include the characteristics of the daily load curve decomposed into 24 time points and a seasonality index. The load factor is the ratio of average load to peak load, and the seasonality index is the ratio of current load to the historical average load for the same period. The power structure data is processed to determine the power generation capacity characteristics, output characteristics, and supply-demand balance characteristics. The power generation capacity characteristics include the proportion of thermal power installed capacity, the proportion of new energy installed capacity, and the proportion of hydropower installed capacity. The processed characteristics include the actual output of thermal power, the actual output of new energy, and the curtailment rate of new energy. The supply-demand balance characteristics include the reserve capacity rate and the total available capacity minus the predicted load, divided by the predicted load. The transmission constraint data is processed to determine congestion indicators and network topology characteristics; the congestion indicators include the degree of congestion at key sections and the net exchange power of the region; the network topology characteristics include the utilization rate of key lines and the N-1 security check status; wherein, the basic load characteristics, load-derived characteristics and load pattern characteristics, generation capacity characteristics, output characteristics and supply-demand balance characteristics, congestion indicators and network topology characteristics constitute the power system characteristics; The meteorological environmental data includes temperature, humidity, wind speed, and sunshine duration. The temperature, humidity, wind speed, and sunshine duration are processed to obtain temperature characteristics, humidity characteristics, wind speed characteristics, and sunshine duration characteristics. Then, meteorological derivative features are constructed. The temperature characteristics, humidity characteristics, wind speed and sunshine duration characteristics, and meteorological derivative features constitute the meteorological environmental features. When multi-site data exists, spatial aggregation processing is performed. The temperature characteristics include daily average temperature, daily maximum temperature, daily minimum temperature, and daily temperature range. The humidity characteristics include daily average relative humidity and daily maximum relative humidity. The wind speed and sunshine duration characteristics include daily average wind speed, sunshine duration, or solar radiation intensity. The meteorological derivative features include cumulative effect characteristics, fluctuation characteristics, and... Meteorological characteristics related to new energy sources; the cumulative effect characteristics include the cumulative temperature over the past 7 days, the cumulative degree-days when the temperature is higher than the benchmark temperature, and the cumulative degree-days when the temperature is lower than the benchmark temperature; the volatility characteristics include the standard deviation of temperature over the past 7 days and the weather stability index; the meteorological characteristics related to new energy sources include wind power output potential based on wind speed, photovoltaic power output potential based on sunshine duration, and a comprehensive index of new energy availability; the spatial aggregation processing includes regional averaging and weighted aggregation; the regional averaging includes calculating the average temperature of multiple meteorological stations within the region and the average wind speed of multiple meteorological stations within the region; the weighted aggregation is calculated as Σ(station wind speed × station wind power installed capacity) / total wind power installed capacity; Macroeconomic data of different frequencies are unified to a daily frequency. For monthly data, it is converted into daily data through forward filling, linear interpolation, or adjustment based on working days. Then, macroeconomic features are constructed, including fuel price features, economic growth features, and inflation and cost features. The fuel price features include absolute price, rate of change, and price spread. The economic growth features include GDP growth momentum and industrial activity index. The policy text data is cleaned and preprocessed to remove irrelevant characters, Chinese words are segmented and stop words are removed. Key information is extracted from the data to identify the policy type, field and intensity. A pre-trained natural language processing model is used to convert the policy text into a numerical vector representation to obtain policy features. The Pearson correlation coefficients between historical electricity price characteristics, power system characteristics, meteorological environment characteristics, macroeconomic characteristics, policy characteristics and target electricity price are calculated respectively to assess linear correlation, calculate the maximum information coefficient and capture nonlinear relationships; Multicollinearity detection is performed, the variance inflation factor between features is calculated, and highly correlated features are identified and processed. The optimal feature subset is determined by a recursive feature elimination method, and the optimal feature subset constitutes a multidimensional feature matrix.

3. The method according to claim 2, characterized in that, The step of performing STL decomposition on the electricity price series to extract the trend term series, seasonal term series, and residual term series at different time scales specifically includes: The historical electricity price sequence is cleaned to obtain the original sequence; and seasonal cycle parameters are set according to the characteristics of the electricity market, including weekly cycle, monthly cycle and annual cycle. The original sequence is smoothed to obtain an initial trend estimate; Subtract the trend estimate from the original sequence to obtain the detrended sequence; For a preset seasonal cycle parameter, the detrended sequence is segmented according to the cycle length to obtain multiple groups; robust local smoothing is performed on each group to obtain periodic sub-patterns; and the periodic sub-patterns are reorganized into seasonal terms. Subtracting the seasonal term from the original sequence yields a deseasonal sequence. Smoothing the deseasonal sequence yields the trend term. Subtracting the trend term and the seasonal term from the original sequence yields the residual term; The adjusted weights are used for multiple iterations until the changes in the trend and seasonal terms converge, resulting in the trend term sequence, seasonal term sequence, and residual term sequence.

4. The method according to claim 1, characterized in that, The method is preceded by: Construct a hybrid model; the hybrid model includes an improved Transformer model and an econometric model; The improved Transformer model is used to generate a feature tensor based on the seasonal term sequence and the historical electricity price characteristics, power system characteristics, meteorological environment characteristics, macroeconomic characteristics, and policy characteristics; the econometric model is used to generate point predictions of future electricity prices based on the trend term sequence and the historical electricity price characteristics, power system characteristics, meteorological environment characteristics, macroeconomic characteristics, and policy characteristics.

5. The method according to claim 4, characterized in that, The method further includes: Based on the characteristic type, the historical electricity price characteristics, power system characteristics, meteorological environment characteristics, macroeconomic characteristics, and policy characteristics are classified to obtain market state characteristics and external variable characteristics. The market state characteristics include the current load level, the real-time output ratio of new energy sources, the system reserve capacity rate, the degree of blockage at key sections, and the policy intensity index. The external variable characteristics include coal prices, GDP growth rate, and the policy intensity index.

6. The method according to claim 5, characterized in that, The improved Transformer model is used for: Obtain the seasonal term sequence and multidimensional feature matrix; The seasonal term sequence and the multidimensional feature matrix are concatenated to obtain the input tensor; The input tensor is transformed by embedding representation to obtain a low-dimensional input tensor; Create a position encoding matrix whose dimensions match the maximum length and feature dimension of the low-dimensional input tensor; The position encoding matrix is ​​added to the input tensor to add learnable position information to each time step in the input tensor; During model training, the parameters of the location encoding matrix are automatically adjusted using gradient descent to learn the time dependence patterns of electricity market data, including weekend effects and monthly settlement cycles. In each attention layer of the improved Transformer encoder, two parallel attention computation paths are determined; the attention computation paths include a short-term attention path and a long-term attention path. In the short-term attention path, a local attention window is set; for each time point in the sequence tensor, only the attention weight between each time point and other time points within the local attention window is calculated to capture short-term fluctuations and intraday dependencies in the electricity price sequence. In the long-term attention path, a sparse attention pattern is adopted, and an attention mechanism is set up. The attention mechanism focuses on key nodes, including periodic key nodes and historical outliers. The periodic key nodes include the same day of the week and the same day of the month, thereby obtaining summary information of the entire sequence through a global attention head. The historical outliers capture the long-term trend, weekly / monthly periodicity and structural dependence in the electricity price sequence. The outputs of the short-term attention path and the long-term attention path are weighted and fused; this includes: assigning learnable weight parameters α and β to the two paths respectively, and linearly combining the outputs of the short-term attention path and the long-term attention path according to the weights to form the final attention output; the weight parameters α and β are automatically optimized during training so that the model can dynamically adjust the degree of attention to short-term and long-term information according to the characteristics of different time periods. The fused attention is output to a feedforward neural network layer; the feedforward neural network layer consists of two linear transformation layers and an activation function, which is used to further extract and transform feature representations; The attention mechanism and the feedforward neural network layer are combined into a complete encoder layer; Multiple encoder layers are stacked to form a deep encoder architecture; in the deep encoder architecture, the output of each encoder layer is used as the input of the next layer, and temporal features are extracted layer by layer. The output of the last encoder layer is used as the final hidden state of the improved Transformer model, and the attention weights of each layer are preserved.

7. The method according to claim 5, characterized in that, The econometric model is used for: Obtain the trend term sequence and external variable characteristics; the external variables include coal price, GDP, and policy intensity. The external influence is mapped to the influence on the trend term through a linear layer using the formula: External Influence = W × [Coal Price, GDP, Policy Intensity...] + b; where W is the weight of each variable's influence on electricity price, and b is an empirical value. The influence of historical values ​​of the trend term on the current value is determined by the formula autoregressive term = Σ(φ_i×T_{ti}); where p is the lag order, φ_i is the coefficient, T_{ti} is the value of the trend term sequence T_t at the i-th historical time point before time t, and both p and φ_i can be learned, i=1 to p; When a long-term equilibrium relationship is detected between the trend term sequence and the external variable, the trend term sequence is corrected for error using the formula Error Correction = λ × (T_{t-1-equilibrium level); The learnable econometric equation is set as: Trend Prediction = External Variable Influence + Autoregressive Term + Error Correction Term; where the external variable coefficients, autoregressive coefficients, and error correction coefficients are all trainable parameters. The trainable parameters are optimized during training using gradient descent to output predicted values ​​for the trend term sequence.

8. The method according to claim 7, characterized in that, The method is followed by: Receive temporal features from the improved Transformer model; Receive predicted values ​​from the trend term sequence of the econometric model; The predicted values ​​of the trend term sequence are projected onto the same dimension as the improved Transformer model; The weights of the econometric model are determined based on the attention weights of each layer. The predicted value of the trend term sequence and the time series features are weighted and summed by using the attention weights of each layer and the weights of the econometric model. The weighted summation of the hidden state is passed through a fully connected layer to generate a point prediction value for the future electricity price and to generate a prediction interval.

9. The method according to claim 6, characterized in that, The method further includes: Input the sequence of residual terms into the improved Transformer model; The prediction interval width is determined using the residual term sequence; The time prediction interval is corrected using the interval width. Analyze whether there are outliers in the residual term sequence; When an anomaly is found, the time point corresponding to the anomaly is obtained and stored.

10. The method according to claim 1, characterized in that, The electricity price forecast includes point forecasts and forecast intervals.