Electric power spot electricity price prediction method and device, electronic equipment and storage medium

By combining the framework of long short-term memory networks and attention networks, and integrating multi-dimensional features for electricity spot price forecasting, this method solves the problem of insufficient accuracy in electricity price forecasting in traditional methods, and achieves higher accuracy in electricity price forecasting and market risk management.

CN121328801APending Publication Date: 2026-01-13BANG DAO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511334213.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-18
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

Traditional electricity spot price forecasting methods struggle to effectively capture the nonlinear changes and time-series characteristics caused by complex factors, while deep learning-based models struggle to handle the impact of different market styles, resulting in insufficient forecast accuracy.

Method used

A framework based on long short-term memory networks combined with attention networks is adopted to construct day-ahead and real-time electricity price forecasting models. Multi-dimensional features such as multi-timescale statistical features, price elasticity features and meteorological features are integrated. The time series is processed by LSTM and key information is dynamically focused by the attention mechanism.

Benefits of technology

It significantly improves the accuracy of electricity spot price forecasts, better captures the long-term dependence and short-term volatility characteristics of electricity price fluctuations, provides powerful nonlinear modeling capabilities, and supports trading decisions and risk management for electricity market participants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121328801A_ABST
    Figure CN121328801A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence, and provides an electric power spot electricity price prediction method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining multi-dimensional features related to the electric power spot electricity price; inputting the multi-dimensional features into a day-ahead electricity price prediction model, and outputting a day-ahead electricity price prediction value; inputting the multi-dimensional features into a real-time electricity price prediction model, and outputting a real-time electricity price prediction value; wherein the day-ahead electricity price prediction model and the real-time electricity price prediction model are constructed on the basis of a framework of combining a long short-term memory network with an attention network. According to the electric power spot electricity price prediction method provided by the invention, the long-term and short-term memory network and the attention mechanism are combined, the long-term dependency relationship and short-term fluctuation characteristics of electricity price fluctuation in the electric power market can be effectively captured, and the strong nonlinear modeling capability is fully utilized, so that the accuracy of electric power spot electricity price prediction is remarkably improved; and powerful technical support is provided for transaction decision making and risk management and control of electricity market participants.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method, apparatus, electronic device, and storage medium for predicting spot electricity prices. Background Technology

[0002] With the deepening of power system reform, the electricity market has experienced vigorous development. Among them, the electricity spot market, due to its ability to reflect market supply and demand in real time and promote the efficient allocation of resources, is playing an increasingly prominent role in electricity trading. However, the rapid increase in the proportion of renewable energy has led to increased volatility in electricity prices, placing higher demands on spot market price forecasting.

[0003] Traditional electricity price forecasting methods often struggle to fully capture the nonlinear changes and time-series characteristics caused by these complex factors. While statistical model-based forecasting methods can be effective in certain situations, they are generally ineffective in dealing with market environments characterized by high electricity price volatility and numerous influencing factors. Meanwhile, data-driven deep learning models, such as Long Short-Term Memory (LSTM) networks, can learn complex time-series patterns from historical data, but they struggle to adequately handle the impact of different market styles (such as short-term fluctuations versus long-term trends) and have limited predictive effectiveness when dealing with nonlinear relationships. Therefore, improving the accuracy of spot electricity price forecasting has become a pressing technical challenge. Summary of the Invention

[0004] This invention provides a method, apparatus, electronic device, and storage medium for predicting spot electricity prices, in order to solve the problem of insufficient accuracy in existing spot electricity price prediction technologies.

[0005] In a first aspect, the present invention provides a method for predicting spot electricity prices, comprising: Obtain multi-dimensional features related to spot electricity prices; The multi-dimensional features are input into the day-ahead electricity price forecasting model to obtain the day-ahead electricity price forecasting value output by the day-ahead electricity price forecasting model; The multi-dimensional features are input into the real-time electricity price prediction model to obtain the real-time electricity price prediction value output by the real-time electricity price prediction model. The day-ahead electricity price prediction model and the real-time electricity price prediction model are built on a framework based on long short-term memory networks combined with attention networks.

[0006] In one embodiment, the multidimensional features include at least one of multi-timescale statistical features, price elasticity features, and meteorological features.

[0007] In one embodiment, the multi-timescale statistical feature includes a first statistical feature and a second statistical feature, wherein the time scale of the first statistical feature is greater than the time scale of the second statistical feature. The first statistical characteristic was determined in the following way: Acquire forecast and measured data of various loads, day-ahead electricity price data, and real-time electricity price data for historical time periods; Based on the forecast data for various types of loads, a first forecast baseline for each type of load is determined; Based on the measured data of various loads, the first measured baseline for each type of load is determined; Based on the aforementioned day-ahead electricity price data, a second forecast baseline for electricity prices is determined; Based on the real-time electricity price data, a second measured baseline for the electricity price is determined; Based on the first predicted baseline and the first measured baseline for various types of loads, the first error baseline for various types of loads is determined; Based on the second predicted baseline and the second measured baseline of the electricity price, a second error baseline of the electricity price is determined; The first predicted value baseline, the first measured value baseline, the second predicted value baseline, the second measured value baseline, the first error value baseline, and the second error value baseline are determined as the first statistical feature.

[0008] In one embodiment, the price elasticity characteristic is determined by the following method: Determine the bidding space for multiple traditional energy units within a historical time period; The bidding space for each of the aforementioned traditional energy units is divided into corresponding bidding space sub-bins; For each bidding space sub-box, the electricity price statistics are determined based on the real-time electricity price data corresponding to the bidding space of the traditional energy unit allocated to it; Each of the aforementioned electricity price statistics is defined as the price elasticity characteristic.

[0009] In one embodiment, the meteorological characteristics are determined by the following method: Acquire multi-dimensional meteorological data for multiple cities at the current moment; For each dimension of meteorological data, meteorological statistics are determined based on the current meteorological data of that dimension for each city. Meteorological statistics of each dimension are defined as the meteorological characteristics.

[0010] In one embodiment, inputting the multi-dimensional features into the day-ahead electricity price forecasting model to obtain the day-ahead electricity price forecast value output by the day-ahead electricity price forecasting model includes: The multi-dimensional features are input into the long short-term memory network to obtain the hidden state vectors of each time step output by the long short-term memory network. The hidden state vectors at each time step are input into the attention network to obtain the weighted and fused day-ahead electricity price prediction output by the attention network.

[0011] In one embodiment, the day-ahead electricity price forecasting model is trained in the following manner: Obtain multi-dimensional feature samples related to spot electricity prices; The multi-dimensional feature samples are normalized to obtain a normalized dataset; The normalized dataset is input into a preset network model, and the model is trained using the day-ahead electricity price data as the training label to obtain the day-ahead electricity price prediction model. The preset network model is built on the framework of the long short-term memory network combined with the attention network.

[0012] Secondly, the present invention also provides an electricity spot price forecasting device, comprising: The feature acquisition module is used to acquire multi-dimensional features related to spot electricity prices. The day-ahead electricity price forecasting module is used to input the multi-dimensional features into the day-ahead electricity price forecasting model to obtain the day-ahead electricity price forecasting value output by the day-ahead electricity price forecasting model; The real-time electricity price prediction module is used to input the multi-dimensional features into the real-time electricity price prediction model to obtain the real-time electricity price prediction value output by the real-time electricity price prediction model. The day-ahead electricity price prediction model and the real-time electricity price prediction model are built on a framework based on long short-term memory networks combined with attention networks.

[0013] Thirdly, the present invention provides an electronic device, the electronic device including a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the above-described methods for predicting spot electricity prices.

[0014] Fourthly, the present invention also provides a non-transitory computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the above-described methods for predicting spot electricity prices.

[0015] The present invention provides a method, apparatus, electronic device, and storage medium for predicting spot electricity prices. By integrating multi-dimensional relevant features and utilizing a framework combining long short-term memory networks (LSM) and attention networks, it constructs day-ahead and real-time electricity price prediction models, respectively. The LSM network can capture the long-term dependence of spot electricity prices over time, while the attention mechanism can dynamically focus on key influencing factors. Combining the LSM network and the attention mechanism can effectively capture the long-term dependence and short-term fluctuation characteristics of electricity price fluctuations in the electricity market. At the same time, it fully utilizes its powerful nonlinear modeling capabilities, significantly improving the accuracy of spot electricity price prediction and providing strong technical support for the trading decisions and risk management of electricity market participants. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in this 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 some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0017] Figure 1 This is one of the flowcharts illustrating the electricity spot price prediction method provided by the present invention.

[0018] Figure 2 This is the second flowchart of the electricity spot price prediction method provided by the present invention.

[0019] Figure 3 This is one of the test results of the existing spot electricity price prediction method provided by this invention.

[0020] Figure 4 This is the second test result diagram of the existing spot electricity price prediction method provided by this invention.

[0021] Figure 5 This is a schematic diagram of the electricity spot price prediction device provided by the present invention.

[0022] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

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

[0024] The terms "first," "second," etc., used in this invention are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention can be implemented in orders other than those illustrated or described herein.

[0025] The following is combined Figures 1-6 The present invention describes the method, apparatus, electronic device, and storage medium for predicting spot electricity prices.

[0026] The electricity spot price prediction method provided in this embodiment of the invention can be implemented based on an electricity spot price prediction device. Therefore, this embodiment of the invention uses an electricity spot price prediction device as the execution subject to describe the electricity spot price prediction method.

[0027] Figure 1 This is a flowchart illustrating the electricity spot price prediction method provided by the present invention.

[0028] like Figure 1 As shown, the method for predicting spot electricity prices includes the following steps: Step 101: Obtain multi-dimensional features related to spot electricity prices.

[0029] Specifically, the power trading platform is the "digital cornerstone" of power market reform. By integrating functions such as trading, information, settlement, and supervision, it promotes the transformation of power resources from "planned allocation" to "market allocation." Electricity price data and load data are both fundamental to the core functions of the power trading platform. Load data (i.e., electricity demand data) is a prerequisite for power trading, directly affecting the design of trading products, matching rules, and market supply and demand balance; the platform needs to integrate and apply this type of data. Electricity price data is the direct result of power trading and a key indicator of market operation; the power trading platform needs to handle and manage this type of data throughout the entire process.

[0030] Therefore, the power trading platform is an important source of information, from which various load data disclosed by the platform can be obtained, such as overall load, tie line load, and renewable energy output load. Overall load refers to the total electricity demand of all power users in a certain area during a specific period; tie line load refers to the power value on the transmission lines connecting different regional power grids; renewable energy output load refers to the actual power generation of renewable energy power generation equipment such as wind power and photovoltaic power during a specific period.

[0031] At the same time, various electricity price data disclosed by the platform can be obtained, such as day-ahead electricity price data and real-time electricity price data. Day-ahead electricity price data refers to the predicted electricity price published by the power trading platform the day before the trading day, providing market participants with a reference for the electricity price of the next day's trading and helping them to formulate trading strategies in advance. Real-time electricity price data refers to the electricity price information updated in real time during the power trading process, which can accurately reflect the current supply and demand situation and price fluctuations in the power market, providing market participants with timely electricity price signals so that they can adjust their trading behavior according to market changes.

[0032] It should be noted that the various load data and electricity price data obtained from the power trading platform can be either daily or hourly data. This invention does not limit the historical time period and can obtain data according to the actual situation.

[0033] Besides obtaining data from electricity trading platforms, data related to spot electricity prices can also be collected through other channels. For example, meteorological data from multiple major cities within a province can be obtained through meteorological data service platforms. Meteorological data also has a significant impact on spot electricity prices. Different meteorological conditions, such as temperature, sunshine, precipitation, and air pressure, will change electricity demand, thereby affecting electricity prices. For instance, in hot weather, the electricity consumption of cooling equipment such as air conditioners will increase, thus driving up power demand and affecting electricity prices.

[0034] The collected disclosed data undergoes data preprocessing, specifically including but not limited to using interpolation to fill in missing values, ensuring data integrity and continuity. Simultaneously, outlier detection methods are used to identify and process outliers, eliminating potential interference and biases that these outliers may cause to subsequent data analysis. These preprocessing steps aim to improve data quality and reliability, laying a solid foundation for subsequent data analysis and mining.

[0035] Feature extraction is performed on the preprocessed data to obtain multi-dimensional features. Features extracted from various load and electricity price data can reflect supply and demand levels, while features extracted from meteorological data can directly influence supply and demand levels. Therefore, multi-dimensional features can comprehensively reflect the supply and demand situation and its changing trends in the electricity spot market. Combining these multi-dimensional features can provide a richer and more accurate information foundation for predicting electricity spot prices.

[0036] Step 102: Input the multi-dimensional features into the day-ahead electricity price prediction model to obtain the day-ahead electricity price prediction value output by the day-ahead electricity price prediction model; Step 103: Input the multi-dimensional features into the real-time electricity price prediction model to obtain the real-time electricity price prediction value output by the real-time electricity price prediction model.

[0037] Specifically, an LSTM+Attention (attention network) hybrid framework is used to construct day-ahead electricity price prediction models and real-time electricity price prediction models, respectively.

[0038] LSTM, as the base network layer, processes multi-dimensional time-series features through recurrent neurons and gating mechanisms, effectively capturing the long-term dependencies and nonlinear patterns in electricity price data. The attention mechanism, as an enhancement layer, calculates the weight distribution at different time steps in the feature sequence, enabling the model to focus on the key information that has the greatest impact on electricity prices.

[0039] By incorporating an attention mechanism, LSTM can fully leverage its powerful nonlinear modeling capabilities when capturing the short-term and long-term dependencies of electricity price fluctuations. Specifically, for short-term dependencies: it models real-time electricity price fluctuations using short-period features to reflect immediate market changes; for long-term dependencies: it models trend changes in electricity prices using long-period features and an attention mechanism to adapt to policy adjustments and seasonal fluctuations.

[0040] In the actual reasoning process, multi-dimensional features are input into the day-ahead electricity price forecasting model. The day-ahead electricity price forecasting model analyzes and processes the multi-dimensional features and then outputs the day-ahead electricity price forecast. This forecast can provide an important reference for electricity market participants to make trading decisions in the day-ahead market.

[0041] Similarly, by inputting multi-dimensional features into the real-time electricity price prediction model, the model analyzes and processes these features to output a real-time electricity price prediction. This prediction can provide an important reference for electricity market participants in their trading operations and adjustments in the real-time market.

[0042] The electricity spot price forecasting method provided by this invention integrates multi-dimensional relevant features and utilizes a framework combining long short-term memory networks (LSM) and attention networks to construct day-ahead and real-time electricity price forecasting models, respectively. The LSM network can capture the long-term dependencies of electricity spot prices over time, while the attention mechanism can dynamically focus on key influencing factors. Combining the LSM network and the attention mechanism effectively captures the long-term dependencies and short-term fluctuation characteristics of electricity price volatility in the electricity market. Simultaneously, it fully leverages its powerful nonlinear modeling capabilities, significantly improving the accuracy of electricity spot price forecasting and providing strong technical support for electricity market participants' trading decisions and risk management.

[0043] In one embodiment, the multidimensional features include at least one of multi-timescale statistical features, price elasticity features, and meteorological features.

[0044] Specifically, existing methods typically use basic features (such as historical electricity price data) and statistical or deep learning models to predict electricity prices. However, these basic features fail to adequately consider the guiding role of policies on market prices, such as reference prices and restrictions on price fluctuation ranges, resulting in poor adaptability of the prediction results under policy regulation.

[0045] Therefore, this invention introduces multi-dimensional features, which include at least one of multi-timescale statistical features, price elasticity features, and meteorological features. Multi-timescale statistical features encompass statistical information on load and electricity prices over different time periods, reflecting the patterns and trends of load and electricity prices at different time scales. Price elasticity features consider the sensitivity of electricity demand to price changes; by analyzing the relationship between price and demand in historical data, features that quantify this elasticity are extracted, helping to more accurately predict the impact of electricity price changes on market demand. Meteorological features include meteorological factors such as temperature, sunshine, precipitation, and air pressure, which have a significant impact on both electricity demand and supply.

[0046] By introducing statistical features at different scales, this invention enables the model to better adapt to market style shifts and policy guidance, and output accurate prediction results.

[0047] In one embodiment, the multi-timescale statistical feature includes a first statistical feature and a second statistical feature, wherein the time scale of the first statistical feature is larger than the time scale of the second statistical feature. The first statistical characteristic was determined in the following way: Acquire forecast and measured data of various loads, day-ahead electricity price data, and real-time electricity price data for historical time periods; Based on the forecast data for various types of loads, a first forecast baseline for each type of load is determined; Based on the measured data of various loads, the first measured baseline for each type of load is determined; Based on the aforementioned day-ahead electricity price data, a second forecast baseline for electricity prices is determined; Based on the real-time electricity price data, a second measured baseline for the electricity price is determined; Based on the first predicted baseline and the first measured baseline for various types of loads, the first error baseline for various types of loads is determined; Based on the second predicted baseline and the second measured baseline of the electricity price, a second error baseline of the electricity price is determined; The first predicted value baseline, the first measured value baseline, the second predicted value baseline, the second measured value baseline, the first error value baseline, and the second error value baseline are determined as the first statistical feature.

[0048] Specifically, the various load data obtained include forecast data and measured data for various loads, and the various electricity price data include day-ahead electricity price data and real-time electricity price data. Among them, day-ahead electricity price data serves as forecast data for real-time electricity prices, and real-time electricity price data serves as measured data for real-time electricity prices.

[0049] Based on the acquired forecast and measured data of various loads, and the forecast and measured data of real-time electricity prices, statistical characteristics are calculated for long and short periods. Optionally, the long period is 45 days and the short period is 7 days.

[0050] For long-term statistical characteristic calculations, baseline values ​​are calculated based on the predicted and measured data of various load types within the historical time period to obtain the first predicted baseline and the first measured baseline for each type of load. Similarly, baseline values ​​are calculated based on the predicted (i.e., day-ahead price data) and measured (i.e., real-time price data) data of real-time electricity prices within the historical time period to obtain the second predicted baseline and the second measured baseline for electricity prices. Various statistical methods can be used for baseline value calculation, such as the arithmetic mean method, the median method, or the weighted average method, and no restrictions are imposed here.

[0051] Furthermore, the difference between the first predicted baseline and the first measured baseline for each type of load is calculated to obtain the first error baseline for each type of load. Similarly, the difference between the second predicted baseline and the second measured baseline for electricity price is calculated to obtain the second error baseline for electricity price.

[0052] Furthermore, the first predicted baseline, the first measured baseline, the second predicted baseline, the second measured baseline, the first error baseline, and the second error baseline are integrated into the first statistical feature.

[0053] The calculation of statistical features for short periods is the same as described above, except that the historical time period is different, but the feature extraction method is the same. Therefore, the calculation method of the second statistical feature can be deduced based on the above process, which will not be elaborated here.

[0054] By introducing multi-timescale statistical features, this invention can more comprehensively capture the price fluctuation patterns of the electricity spot market across different time dimensions. Long-term statistical features help identify long-term trends and cyclical changes in the market, providing a stable foundation for the prediction model, while short-term statistical features can promptly reflect short-term fluctuations and emergencies in the market, enhancing the flexibility and response speed of the prediction model.

[0055] In one embodiment, the price elasticity characteristic is determined by the following method: Determine the bidding space for multiple traditional energy units within a historical time period; The bidding space for each of the aforementioned traditional energy units is divided into corresponding bidding space sub-bins; For each bidding space sub-box, the electricity price statistics are determined based on the real-time electricity price data corresponding to the bidding space of the traditional energy unit allocated to it; Each of the aforementioned electricity price statistics is defined as the price elasticity characteristic.

[0056] Specifically, the bidding space for traditional energy generating units refers to the capacity range within which traditional energy generating units can participate in bidding in the electricity spot market. For more effective analysis, the bidding space is divided into multiple bidding space bins according to certain rules. The bidding space for traditional energy generating units is then assigned to the corresponding bidding space bins. This division facilitates more detailed electricity price data analysis within each bin, thus providing an accurate basis for determining price elasticity characteristics.

[0057] First, obtain the load data for centrally dispatched units, renewable energy output load, tie-line load, and non-market-based generating units. Based on this load data, calculate the bidding space for traditional energy generating units. The calculation method is: Bidding space for traditional energy generating units = Centrally dispatched load - Renewable energy output load - Tie-line load - Non-market-based generating unit load.

[0058] Then, the calculated bidding space for each traditional energy unit within the historical time period is divided into corresponding bidding space sub-bins.

[0059] For each bidding space sub-box, based on the real-time electricity price data corresponding to the bidding space of the traditional energy units allocated to it, the electricity price statistics are determined, including but not limited to the maximum value, minimum value, mean and median, to obtain the electricity price statistics within each bidding space sub-box.

[0060] Furthermore, the electricity price statistics within each bidding space sub-box are integrated into a price elasticity feature.

[0061] In one example, suppose that within a certain historical period, by acquiring data on centrally dispatched load, renewable energy output load, tie-line load, and non-market-based unit load, the bidding space for traditional energy units is calculated. The bidding spaces for multiple traditional energy units within this period are then divided into different bidding space bins according to predetermined rules, for example, into three bins: bin A, bin B, and bin C. For container A, the real-time electricity price data corresponding to the bidding space of the traditional energy units contained therein, after statistical calculation, yields a maximum price of 500 yuan / MWh, a minimum price of 300 yuan / MWh, an average price of 400 yuan / MWh, and a median price of 380 yuan / MWh. For container B, the corresponding maximum price is 480 yuan / MWh, a minimum price of 320 yuan / MWh, an average price of 410 yuan / MWh, and a median price of 390 yuan / MWh. For container C, the corresponding maximum price is 520 yuan / MWh, a minimum price of 310 yuan / MWh, an average price of 420 yuan / MWh, and a median price of 400 yuan / MWh. Then, by integrating these electricity price statistics from each container, a price elasticity characteristic that reflects the impact of traditional energy unit bids on the final electricity price is formed.

[0062] This invention, through the operation of dividing the bidding space into bins, discretizes the continuous bidding space data, which can effectively capture the distribution pattern and fluctuation characteristics of electricity prices in different bidding intervals. The electricity price statistics calculated based on the binning results are used as price elasticity features, which can reflect a certain output load gap, enabling the prediction model to better understand the impact of the corresponding bids of traditional energy units on the final electricity price.

[0063] In one embodiment, the meteorological characteristics are determined by the following method: Acquire multi-dimensional meteorological data for multiple cities at the current moment; For each dimension of meteorological data, meteorological statistics are determined based on the current meteorological data of that dimension for each city. Meteorological statistics of each dimension are defined as the meteorological characteristics.

[0064] Specifically, it acquires multi-dimensional meteorological data of multiple cities within the province at the current moment, including but not limited to key meteorological indicators such as temperature, sunshine, precipitation, and air pressure.

[0065] For each dimension of meteorological data, statistical methods, such as calculating the average, maximum, minimum, and standard deviation, are used to determine the corresponding meteorological statistics for that dimension based on the current meteorological data for each city. For example, for temperature data, the average, maximum, and minimum temperatures for all cities at the current moment can be calculated; for wind speed data, the average and maximum wind speeds can be calculated. Using statistical algorithms to calculate meteorological statistics for each dimension enables dimensionality reduction of meteorological data based on feature dimensions, significantly reducing the number of features and improving computational efficiency and model generalization ability.

[0066] Furthermore, the meteorological statistics calculated from each dimension are integrated into meteorological features.

[0067] The embodiments of the present invention comprehensively consider meteorological data from multiple cities and multiple dimensions, avoiding the limitations of a single location or a single meteorological indicator, making meteorological characteristics more representative and reliable, and enabling the prediction model to more accurately capture the impact of meteorological factors on spot electricity prices.

[0068] In one embodiment, the step of inputting the multi-dimensional features into the day-ahead electricity price forecasting model to obtain the day-ahead electricity price forecast value output by the day-ahead electricity price forecasting model includes: The multi-dimensional features are input into the long short-term memory network to obtain the hidden state vectors of each time step output by the long short-term memory network. The hidden state vectors at each time step are input into the attention network to obtain the weighted and fused day-ahead electricity price prediction output by the attention network.

[0069] Specifically, multi-dimensional features are input into the LSTM, which processes the input features step by step using its unique gating mechanism. At each time step, the network updates the current hidden state and cell state based on the current input and the hidden state and cell state of the previous time step, thus obtaining the hidden state vector for each time step. These hidden state vectors contain dynamic information about the impact of multi-dimensional features on day-ahead electricity prices at different time steps.

[0070] Furthermore, the hidden state vectors at each time step are input into the Attention mechanism. The Attention mechanism assigns different weights to the output of each time step to determine the importance of information from different time steps to the final day-ahead electricity price forecast. Information from time steps with larger weights receives more attention and plays a more crucial role in the weighted fusion process. Finally, the hidden state vectors from each time step are weighted and fused according to their corresponding weights to output the day-ahead electricity price forecast.

[0071] The reasoning process of the real-time electricity price forecasting model is the same as that of the day-ahead electricity price forecasting model, only the forecasting objectives are different, so it will not be elaborated here.

[0072] This invention employs an LSTM module to process time series decomposition, better revealing the changing trends of electricity price health status. It also fully utilizes the Attention mechanism to capture the nonlinear relationships and long-distance dependencies in electricity price data. By combining the advantages of both networks, the accuracy of electricity spot price forecasting is significantly improved, providing strong technical support for the trading decisions and risk management of electricity market participants.

[0073] In one embodiment, the day-ahead electricity price forecasting model is trained in the following manner: Obtain multi-dimensional feature samples related to spot electricity prices; The multi-dimensional feature samples are normalized to obtain a normalized dataset; The normalized dataset is input into a preset network model, and the model is trained using the day-ahead electricity price data as the training label to obtain the day-ahead electricity price prediction model. The preset network model is built on the framework of the long short-term memory network combined with the attention network.

[0074] Specifically, a multi-dimensional feature sample dataset related to spot electricity prices is obtained through the above method. The multi-dimensional feature sample dataset is then normalized by the maximum-minimum value to obtain a normalized dataset. The normalized dataset is then divided into a training set and a test set according to a preset ratio, such as a 7:3 ratio.

[0075] A pre-defined network model is built according to the LSTM-Attention framework. The training samples in the normalized dataset are input into the pre-defined network model, and the model is trained using the day-ahead electricity price data as the training label.

[0076] After obtaining the trained model, the test set in the normalized dataset is input into the trained model to obtain a set of day-ahead electricity price predictions. Then, the loss value between the predicted value and the actual value is calculated using a preset loss function (such as root mean square error) to judge the model's prediction effect. If the preset requirements are not met, the model parameters are tuned based on the loss value. The above steps are repeated until the model's prediction effect meets the preset requirements, and the day-ahead electricity price prediction model is obtained.

[0077] The construction method of the real-time electricity price prediction model is the same as that of the day-ahead electricity price prediction model. The only difference is that the real-time electricity price prediction model is trained using real-time electricity price data as training labels. The specific construction method will not be elaborated here.

[0078] This invention constructs a day-ahead electricity price prediction model and a real-time electricity price prediction model based on the LSTM-Attention framework, and uses multi-dimensional feature samples for training and optimization. This enables the model to more accurately capture the price fluctuation patterns of the electricity spot market, allowing it to adapt to complex and ever-changing market environments, thereby effectively improving the accuracy and reliability of electricity spot price prediction.

[0079] This invention proposes a method for predicting spot electricity prices by combining multi-dimensional features and an LSTM-Attention model. A dedicated module is designed to process time series decomposition, which better reveals the trend of changes in the health status of electricity prices. Furthermore, the self-attention mechanism of the model is fully utilized to capture the nonlinear relationships and long-distance dependencies of battery data. Comparison with existing solutions demonstrates that this invention effectively improves the accuracy of prediction.

[0080] Combination Figure 3 and Figure 4 , Figure 3 This is one of the test results of the existing electricity spot price prediction method provided by this invention. Figure 4 This is the second test result diagram of the existing spot electricity price forecasting method provided by this invention. Taking the day-ahead electricity price forecast of Province A as an example, further evaluation was conducted on a randomly selected week in the test set. The RMSE error of the model of this invention in this period was 55.68%. Figure 3 In the comparison test_1 shown, keeping the existing features unchanged, the LSTM-Attention model was changed to a basic LSTM model, and the RMSE error of test_1 was 65.31; in the case of... Figure 4 In the comparative test_2 shown, keeping the LSTM-Attention model unchanged, removing multi-dimensional features and retaining only the basic features, the RMSE error of test_2 is 73.02, which shows that the two core improvements of this invention have brought about a significant improvement in prediction accuracy.

[0081] Figure 5 This is a schematic diagram of the electricity spot price prediction device provided by the present invention.

[0082] like Figure 5 As shown, the electricity spot price forecasting device includes: The feature acquisition module 510 is used to acquire multi-dimensional features related to spot electricity prices. The day-ahead electricity price forecasting module 520 is used to input the multi-dimensional features into the day-ahead electricity price forecasting model to obtain the day-ahead electricity price forecasting value output by the day-ahead electricity price forecasting model; The real-time electricity price prediction module 530 is used to input the multi-dimensional features into the real-time electricity price prediction model to obtain the real-time electricity price prediction value output by the real-time electricity price prediction model. The day-ahead electricity price prediction model and the real-time electricity price prediction model are built on a framework based on long short-term memory networks combined with attention networks.

[0083] The electricity spot price forecasting device provided by this invention integrates multi-dimensional relevant features and utilizes a framework combining long short-term memory networks (LSM) and attention networks to construct day-ahead and real-time electricity price forecasting models, respectively. The LSM network can capture the long-term dependence of electricity spot prices over time, while the attention mechanism can dynamically focus on key influencing factors. Combining the LSM network and the attention mechanism can effectively capture the long-term dependence and short-term fluctuation characteristics of electricity price fluctuations in the electricity market. At the same time, it fully utilizes its powerful nonlinear modeling capabilities to significantly improve the accuracy of electricity spot price forecasting, providing strong technical support for the trading decisions and risk management of electricity market participants.

[0084] In one embodiment, the multidimensional features include at least one of multi-timescale statistical features, price elasticity features, and meteorological features.

[0085] In one embodiment, the multi-time-scale statistical features include a first statistical feature and a second statistical feature, wherein the time scale of the first statistical feature is larger than the time scale of the second statistical feature; the electricity spot price forecasting device is further used for: Acquire forecast and measured data of various loads, day-ahead electricity price data, and real-time electricity price data for historical time periods; Based on the forecast data for various types of loads, a first forecast baseline for each type of load is determined; Based on the measured data of various loads, the first measured baseline for each type of load is determined; Based on the aforementioned day-ahead electricity price data, a second forecast baseline for electricity prices is determined; Based on the real-time electricity price data, a second measured baseline for the electricity price is determined; Based on the first predicted baseline and the first measured baseline for various types of loads, the first error baseline for various types of loads is determined; Based on the second predicted baseline and the second measured baseline of the electricity price, a second error baseline of the electricity price is determined; The first predicted value baseline, the first measured value baseline, the second predicted value baseline, the second measured value baseline, the first error value baseline, and the second error value baseline are determined as the first statistical feature.

[0086] In one embodiment, the electricity spot price forecasting device is further used for: Determine the bidding space for multiple traditional energy units within a historical time period; The bidding space for each of the aforementioned traditional energy units is divided into corresponding bidding space sub-bins; For each bidding space sub-box, the electricity price statistics are determined based on the real-time electricity price data corresponding to the bidding space of the traditional energy unit allocated to it; Each of the aforementioned electricity price statistics is defined as the price elasticity characteristic.

[0087] In one embodiment, the electricity spot price forecasting device is further used for: Acquire multi-dimensional meteorological data for multiple cities at the current moment; For each dimension of meteorological data, meteorological statistics are determined based on the current meteorological data of that dimension for each city. Meteorological statistics of each dimension are defined as the meteorological characteristics.

[0088] In one embodiment, the day-ahead electricity price forecasting module 520 is further configured to: The multi-dimensional features are input into the long short-term memory network to obtain the hidden state vectors of each time step output by the long short-term memory network. The hidden state vectors at each time step are input into the attention network to obtain the weighted and fused day-ahead electricity price prediction output by the attention network.

[0089] In one embodiment, the electricity spot price forecasting device is further used for: Obtain multi-dimensional feature samples related to spot electricity prices; The multi-dimensional feature samples are normalized to obtain a normalized dataset; The normalized dataset is input into a preset network model, and the model is trained using the day-ahead electricity price data as the training label to obtain the day-ahead electricity price prediction model. The preset network model is built on the framework of the long short-term memory network combined with the attention network.

[0090] It should be noted that the electricity spot price prediction device provided by the present invention can execute the electricity spot price prediction method described in any of the above embodiments during specific operation, which will not be elaborated in this embodiment.

[0091] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 6As shown, the electronic device may include a processor 610, a communications interface 620, a memory 630, and a communication bus 640. The processor 610, communications interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions in the memory 630 to execute a spot electricity price prediction method. This method includes: acquiring multi-dimensional features related to the spot electricity price; inputting the multi-dimensional features into a day-ahead electricity price prediction model to obtain a day-ahead electricity price prediction value output by the day-ahead electricity price prediction model; and inputting the multi-dimensional features into a real-time electricity price prediction model to obtain a real-time electricity price prediction value output by the real-time electricity price prediction model. The day-ahead electricity price prediction model and the real-time electricity price prediction model are built on a framework based on a long short-term memory network combined with an attention network.

[0092] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0093] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions, when the program instructions are executed by a computer, the computer is able to execute the electricity spot price prediction method provided in the above embodiments, the method including: acquiring multi-dimensional features related to electricity spot prices; inputting the multi-dimensional features into a day-ahead electricity price prediction model to obtain a day-ahead electricity price prediction value output by the day-ahead electricity price prediction model; inputting the multi-dimensional features into a real-time electricity price prediction model to obtain a real-time electricity price prediction value output by the real-time electricity price prediction model; wherein, the day-ahead electricity price prediction model and the real-time electricity price prediction model are built on a framework based on a long short-term memory network combined with an attention network.

[0094] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program is implemented to perform the electricity spot price prediction method provided in the above embodiments. The method includes: acquiring multi-dimensional features related to the electricity spot price; inputting the multi-dimensional features into a day-ahead price prediction model to obtain a day-ahead price prediction value output by the day-ahead price prediction model; and inputting the multi-dimensional features into a real-time price prediction model to obtain a real-time price prediction value output by the real-time price prediction model. The day-ahead price prediction model and the real-time price prediction model are constructed based on a framework combining a long short-term memory network and an attention network.

[0095] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0096] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0097] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for predicting spot electricity prices, characterized in that, The method for predicting spot electricity prices includes: Obtain multi-dimensional features related to spot electricity prices; The multi-dimensional features are input into the day-ahead electricity price forecasting model to obtain the day-ahead electricity price forecasting value output by the day-ahead electricity price forecasting model; The multi-dimensional features are input into the real-time electricity price prediction model to obtain the real-time electricity price prediction value output by the real-time electricity price prediction model. The day-ahead electricity price prediction model and the real-time electricity price prediction model are built on a framework based on long short-term memory networks combined with attention networks.

2. The method for predicting spot electricity prices according to claim 1, characterized in that, The multidimensional features include at least one of the following: multi-timescale statistical features, price elasticity features, and meteorological features.

3. The method for predicting spot electricity prices according to claim 2, characterized in that, The multi-timescale statistical features include a first statistical feature and a second statistical feature, wherein the time scale of the first statistical feature is greater than the time scale of the second statistical feature. The first statistical characteristic was determined in the following way: Acquire forecast and measured data of various loads, day-ahead electricity price data, and real-time electricity price data for historical time periods; Based on the forecast data for various types of loads, a first forecast baseline for each type of load is determined; Based on the measured data of various loads, the first measured baseline for each type of load is determined; Based on the aforementioned day-ahead electricity price data, a second forecast baseline for electricity prices is determined; Based on the real-time electricity price data, a second measured baseline for the electricity price is determined; Based on the first predicted baseline and the first measured baseline for various types of loads, the first error baseline for various types of loads is determined; Based on the second predicted baseline and the second measured baseline of the electricity price, a second error baseline of the electricity price is determined; The first predicted value baseline, the first measured value baseline, the second predicted value baseline, the second measured value baseline, the first error value baseline, and the second error value baseline are determined as the first statistical feature.

4. The method for predicting spot electricity prices according to claim 2, characterized in that, The price elasticity characteristic is determined in the following way: Determine the bidding space for multiple traditional energy units within a historical time period; The bidding space for each of the aforementioned traditional energy units is divided into corresponding bidding space sub-bins; For each bidding space sub-box, the electricity price statistics are determined based on the real-time electricity price data corresponding to the bidding space of the traditional energy unit allocated to it; Each of the aforementioned electricity price statistics is defined as the price elasticity characteristic.

5. The method for predicting spot electricity prices according to claim 2, characterized in that, The meteorological characteristics were determined in the following ways: Acquire multi-dimensional meteorological data for multiple cities at the current moment; For each dimension of meteorological data, meteorological statistics are determined based on the current meteorological data of that dimension for each city. Meteorological statistics of each dimension are defined as the meteorological characteristics.

6. The method for predicting spot electricity prices according to claim 1, characterized in that, The step of inputting the multi-dimensional features into the day-ahead electricity price forecasting model to obtain the day-ahead electricity price forecast value output by the day-ahead electricity price forecasting model includes: The multi-dimensional features are input into the long short-term memory network to obtain the hidden state vectors of each time step output by the long short-term memory network. The hidden state vectors at each time step are input into the attention network to obtain the weighted and fused day-ahead electricity price prediction output by the attention network.

7. The method for predicting spot electricity prices according to any one of claims 1 to 6, characterized in that, The day-ahead electricity price forecasting model was trained in the following way: Obtain multi-dimensional feature samples related to spot electricity prices; The multi-dimensional feature samples are normalized to obtain a normalized dataset; The normalized dataset is input into a preset network model, and the model is trained using the day-ahead electricity price data as the training label to obtain the day-ahead electricity price prediction model. The preset network model is built on the framework of the long short-term memory network combined with the attention network.

8. A device for predicting spot electricity prices, characterized in that, The electricity spot price forecasting device includes: The feature acquisition module is used to acquire multi-dimensional features related to spot electricity prices. The day-ahead electricity price forecasting module is used to input the multi-dimensional features into the day-ahead electricity price forecasting model to obtain the day-ahead electricity price forecasting value output by the day-ahead electricity price forecasting model; The real-time electricity price prediction module is used to input the multi-dimensional features into the real-time electricity price prediction model to obtain the real-time electricity price prediction value output by the real-time electricity price prediction model. The day-ahead electricity price prediction model and the real-time electricity price prediction model are built on a framework based on long short-term memory networks combined with attention networks.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the electricity spot price prediction method as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium, wherein a computer program is stored on the non-transitory computer-readable storage medium, characterized in that, When the computer program is executed by the processor, it implements the steps of the electricity spot price prediction method as described in any one of claims 1 to 7.