Search

CN-122022898-A - LSTM and transducer-based electricity price prediction method and system

CN122022898ACN 122022898 ACN122022898 ACN 122022898ACN-122022898-A

Abstract

The embodiment of the invention provides an LSTM and transducer-based electricity price prediction method and system, and belongs to the technical field of electricity price prediction. The electricity price prediction method comprises the steps of obtaining multi-source historical data of an electric power system, carrying out type integration and division on the multi-source historical data to obtain cost time sequence data, weather time sequence data and economic index time sequence data, preprocessing the cost time sequence data, the weather time sequence data and the economic index time sequence data, constructing training sets according to any two of the cost time sequence data, the weather time sequence data and the economic index time sequence data to obtain three groups of cross training sets, and adopting a mode of constructing the training sets by crossing various time sequence data and obtaining real-time prediction sensitivity coefficients of each group of models, so that influence weight of time sequence data/models with large electricity price influence degree can be effectively enhanced, and prediction accuracy is improved.

Inventors

  • SUN HONGYAN
  • LIU JUN
  • WANG LILI
  • QI YURONG
  • ZHANG RUI
  • WANG PENGCHENG
  • WANG HUAN
  • ZHANG SHANRUI
  • ZHANG LANXI

Assignees

  • 四川中电启明星信息技术有限公司
  • 国网信息通信产业集团有限公司

Dates

Publication Date
20260512
Application Date
20260415

Claims (10)

  1. 1. An LSTM and transducer based electricity price prediction method, comprising: acquiring multi-source historical data of a power system; Performing type integration and division on the multi-source historical data to obtain cost time sequence data, weather time sequence data and economic index time sequence data; preprocessing the cost time sequence data, the weather time sequence data and the economic index time sequence data; Constructing training sets according to any two of the cost time sequence data, the weather time sequence data and the economic index time sequence data to obtain three groups of cross training sets; Constructing three LSTM-transducer models, and respectively training the corresponding LSTM-transducer models by adopting three sets of cross training sets; Acquiring multi-source real-time sequence data of a plurality of continuous preset time periods of the power system; acquiring corresponding predicted electricity prices according to the multisource real-time sequence data of a plurality of preset time periods and the trained three LSTM-transducer models; acquiring real-time prediction sensitivity coefficients of each group of LSTM-transducer models according to three groups of the prediction electricity prices and the corresponding real electricity prices; And acquiring a final electricity price predicted value according to the multi-source real-time sequence data of the current preset time period and the corresponding real-time prediction sensitivity coefficient.
  2. 2. The electricity price prediction method of claim 1, wherein acquiring the cost time series data, the weather time series data, and the economic indicator time series data includes: Acquiring cost time series data according to a formula (1), (1) Wherein, the Is that The cost data of the time period is calculated, Is that The fuel cost of the time period is set, Is that The new energy cost of the time period, Is that The fuel weight of the time period is determined, Is that The weight of the new energy source in the time period, Is a period of time.
  3. 3. The electricity price prediction method of claim 2, wherein acquiring the cost time series data, the weather time series data, and the economic indicator time series data further comprises: acquiring weather time sequence data according to a formula (2), (2) Wherein, the Is that The meteorological data of the period of time, Is that The temperature of the time period, Is that The temperature of the time period, Is a preset interval period.
  4. 4. A power rate prediction method according to claim 3, wherein acquiring the cost time series data, the weather time series data, and the economic indicator time series data further comprises: acquiring economic index time sequence data according to a formula (3), (3) Wherein, the Is that Economic index data of the time period, Is that The amount of electricity used in the time period, Is that The amount of electricity used in the time period, Is of a preset period and Is one year.
  5. 5. The electricity price prediction method according to claim 1, wherein preprocessing the cost time series data, the weather time series data, and the economic index time series data includes: performing data cleaning on the cost time sequence data, the weather time sequence data and the economic index time sequence data; Performing time stamp alignment on the cleaned cost time sequence data, the meteorological time sequence data and the economic index time sequence data; And normalizing the cost time sequence data, the weather time sequence data and the economic index time sequence data.
  6. 6. The electricity price prediction method according to claim 1, wherein obtaining real-time prediction sensitivity coefficients of each set of LSTM-fransformer models according to three sets of the predicted electricity price and corresponding real electricity price comprises: acquiring a real electricity price of each preset time period; Obtaining real-time prediction errors of each set of LSTM-transducer models according to a formula (4), (4) Wherein, the Is the first Group of the LSTM-transducer model Real-time prediction errors for a preset period of time, Is the first Group of the LSTM-transducer model The predicted electricity prices for a preset period of time, Is the first Group of the LSTM-transducer model The true electricity price for a preset period of time, 、 Numbering as integers; and acquiring real-time prediction sensitivity coefficients according to a plurality of real-time prediction errors of each group of LSTM-transducer models.
  7. 7. The electricity price prediction method of claim 6 wherein obtaining real-time prediction sensitivity coefficients from a plurality of real-time prediction errors of each set of LSTM-fransformer models comprises: Judging whether a plurality of real-time prediction errors of the LSTM-transducer model are larger than or equal to a preset error threshold value or not; under the condition that a plurality of real-time prediction errors of the LSTM-transducer model are larger than or equal to a preset error threshold value, acquiring real-time prediction sensitivity coefficients corresponding to the LSTM-transducer model according to a formula (5), (5) Wherein, the Is the first A first real-time predictive coefficient of sensitivity of the LSTM-transducer model, Is the first The largest real-time prediction error in the LSTM-transducer model is set, The preset error threshold value is set; Judging whether the real-time prediction errors of the LSTM-transducer model are unidirectionally increased or decreased under the condition that the real-time prediction errors of the LSTM-transducer model are not larger than or equal to a preset error threshold value; Under the condition that a plurality of real-time prediction errors of the LSTM-transducer model are judged to be increased or decreased in one direction, acquiring real-time prediction sensitivity coefficients of each group of LSTM-transducer models according to a formula (6), (6) Wherein, the Is the first A second real-time predictive sensitivity coefficient of the LSTM-transducer model, Is the first The LSTM-transducer model is grouped to increase or decrease in one way by a continuous number, For a number of consecutive ones of said preset time periods, For adjusting the coefficient; in the case that the plurality of real-time prediction errors of the LSTM-transducer model are judged not to be unidirectionally increased or decreased, acquiring a real-time prediction sensitivity coefficient of each group of the LSTM-transducer model according to a formula (7), (7) Wherein, the Is the first A third real-time predictive sensitivity coefficient of the LSTM-transducer model, Is the first Group of the LSTM-transducer model Real-time prediction errors for a predetermined period of time; And acquiring real-time prediction sensitivity coefficients of each group of LSTM-transducer models, and constructing a prediction sensitivity matrix.
  8. 8. The electricity price prediction method of claim 7, wherein obtaining a final electricity price prediction value according to the multi-source real-time sequential data of the current preset time period and the real-time prediction sensitivity coefficient comprises: Inputting the multi-source real-time sequence data of the current preset time period into the corresponding LSTM-transducer model to obtain a current predicted electricity price matrix; obtaining a final electricity price predicted value according to a formula (8), (8) Wherein, the As a result of the predicted value of the electricity prices, Is 1 x 3 of the prediction sensitivity matrix, The current predicted electricity price matrix is 3 x 1.
  9. 9. An LSTM and transducer based electricity price prediction system, comprising: the time sequence data acquisition module is connected with the power system and is used for acquiring multi-source time sequence data of the power system; and the controller is connected with the time sequence data acquisition module and is used for executing the electricity price prediction method according to any one of claims 1-8.
  10. 10. A computer-readable storage medium storing instructions for being read by a machine to cause the machine to perform the electricity price prediction method of any of claims 1-8.

Description

LSTM and transducer-based electricity price prediction method and system Technical Field The invention relates to the technical field of electricity price prediction, in particular to an LSTM and Transformer-based electricity price prediction method and system. Background With the continuous promotion of the national unified power market construction, the market environment is increasingly complex, the main scale is continuously enlarged, the proportion of new energy to the market trading is gradually increased, the decision difficulty of the market trading is increased due to uncertain factors existing in the power market environment, and the market fluctuation is difficult to respond quickly. Meanwhile, the factors influencing supply and demand trend and price fluctuation of medium and long-term market and spot market are various, and accurate prediction is difficult to realize by the existing model. In the prior art, models such as deep learning and the like are generally adopted for electricity price prediction, and all relevant influence factors are used as training input, so that a prediction model is obtained. However, the model contains factors with different influence degrees or has interaction, and fitting is easy to be performed, so that the prediction accuracy is low and the effect is poor. The inventor discovers that the scheme in the prior art has the defects of low prediction precision and poor effect in the process of realizing the method. Disclosure of Invention The embodiment of the invention aims to provide an LSTM and transducer-based electricity price prediction method and system equipment, which have the function of high prediction precision. In order to achieve the above object, an embodiment of the present invention provides an electricity price prediction method based on LSTM and Transformer, including: acquiring multi-source historical data of a power system; Performing type integration and division on the multi-source historical data to obtain cost time sequence data, weather time sequence data and economic index time sequence data; preprocessing the cost time sequence data, the weather time sequence data and the economic index time sequence data; Constructing training sets according to any two of the cost time sequence data, the weather time sequence data and the economic index time sequence data to obtain three groups of cross training sets; Constructing three LSTM-transducer models, and respectively training the corresponding LSTM-transducer models by adopting three sets of cross training sets; Acquiring multi-source real-time sequence data of a plurality of continuous preset time periods of the power system; acquiring corresponding predicted electricity prices according to the multisource real-time sequence data of a plurality of preset time periods and the trained three LSTM-transducer models; acquiring real-time prediction sensitivity coefficients of each group of LSTM-transducer models according to three groups of the prediction electricity prices and the corresponding real electricity prices; And acquiring a final electricity price predicted value according to the multi-source real-time sequence data of the current preset time period and the corresponding real-time prediction sensitivity coefficient. Optionally, acquiring the cost timing data, the weather timing data, and the economic indicator timing data includes: Acquiring cost time series data according to a formula (1), (1) Wherein, the Is thatThe cost data of the time period is calculated,Is thatThe fuel cost of the time period is set,Is thatThe new energy cost of the time period,Is thatThe fuel weight of the time period is determined,Is thatThe weight of the new energy source in the time period,Is a period of time. Optionally, acquiring the cost timing data, the weather timing data, and the economic indicator timing data further includes: acquiring weather time sequence data according to a formula (2), (2) Wherein, the Is thatThe meteorological data of the period of time,Is thatThe temperature of the time period,Is thatThe temperature of the time period,Is a preset interval period. Optionally, acquiring the cost timing data, the weather timing data, and the economic indicator timing data further includes: acquiring economic index time sequence data according to a formula (3), (3) Wherein, the Is thatEconomic index data of the time period,Is thatThe amount of electricity used in the time period,Is thatThe amount of electricity used in the time period,Is of a preset period andIs one year. Optionally, preprocessing the cost timing data, the weather timing data, and the economic indicator timing data includes: performing data cleaning on the cost time sequence data, the weather time sequence data and the economic index time sequence data; Performing time stamp alignment on the cleaned cost time sequence data, the meteorological time sequence data and the economic index time sequence data; And normalizing the cost time s