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

By obtaining historical electricity price and meteorological data, using linear and nonlinear models to predict electricity prices, and improving prediction accuracy through weighted summing, the problem of low electricity price prediction accuracy in the prior art is solved.

CN119558905APending Publication Date: 2025-03-04SHENZHEN GUORUIXIE CHUANG ENERGY STORAGE TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510124530.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-26
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

In the prior art, the accuracy of electricity price prediction value is low, making it difficult to accurately predict the spot price of electricity.

Method used

By obtaining the historical price actual value sequence and the meteorological data sequence, the trained linear model and nonlinear model are input respectively, the first electricity price prediction value and the second electricity price prediction value are obtained, and the final electricity price prediction value Z is determined through weighted sum.

Benefits of technology

The accuracy of electricity price prediction value is improved, and by combining the prediction results of linear and nonlinear models, the prediction error caused by different focus points is minimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119558905A_ABST
    Figure CN119558905A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of energy, and discloses an electric power spot price prediction method, device and equipment and a storage medium, and the method comprises the steps: obtaining a historical electricity price actual value sequence and a meteorological data sequence, and enabling the historical electricity price actual value sequence to comprise electricity price actual values at a plurality of historical moments, the meteorological data sequence comprises meteorological data of a plurality of historical moments, and the interval duration of two adjacent moments in the plurality of historical moments is t; inputting a historical electricity price actual value sequence into the trained linear model to obtain a first electricity price predicted value X output by the trained linear model; inputting the historical electricity price actual value sequence and the meteorological data sequence into the trained nonlinear model to obtain a second electricity price predicted value Y output by the trained nonlinear model; and according to # imgabs0 #, determining an electricity price prediction value Z at a moment at an interval t with the last moment in the plurality of historical moments, A and B being preset coefficients, A + B = 1, A > = 0, and B > = 0. The accuracy of electricity price prediction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of energy technology, and specifically to a method, device, equipment and storage medium for predicting spot electricity prices. Background Art

[0002] Power trading, especially spot trading, has changed the way power is dispatched, from the previous way in which dispatching agencies arrange power production and operation by themselves to the market way in which power operation is organized according to the results of market transactions. The power spot market has established a market price mechanism that can "rise and fall", which helps to improve the ability to ensure safe power supply and support energy security. For example, during periods of high power demand, short-term high electricity price signals in the spot market can guide thermal power companies to generate power at peak times and power users to reduce their power demand.

[0003] The core of the electricity spot market is the electricity price, which reflects the real-time changes in electricity supply and demand and is the key basis for market participants to make trading decisions. The fluctuation of electricity prices not only affects the profits of power generation companies, but is also directly related to the electricity costs of consumers. Therefore, how to improve the accuracy of electricity price forecasts and obtain a more accurate forecast electricity price has a huge impact on electricity spot transactions. Summary of the invention

[0004] In view of the above problems, the embodiments of the present application provide a method, device, equipment and storage medium for predicting electricity spot prices, which are used to solve the problem of low accuracy of electricity price prediction values ​​obtained by predicting electricity prices in the prior art.

[0005] According to one aspect of an embodiment of the present application, a method for predicting spot electricity prices is provided, the method comprising: obtaining a sequence of historical actual electricity prices and a sequence of meteorological data, wherein the sequence of historical actual electricity prices includes actual electricity prices at multiple historical moments, the sequence of meteorological data includes meteorological data at the multiple historical moments, and the interval between two adjacent moments in the multiple historical moments is t; inputting the sequence of historical actual electricity prices into a trained linear model to obtain a first electricity price prediction value X output by the trained linear model; inputting the sequence of historical actual electricity prices and the sequence of meteorological data into a trained nonlinear model to obtain a second electricity price prediction value Y output by the trained nonlinear model; according to Determine a predicted electricity price value Z at a moment t apart from the last moment among the multiple historical moments, wherein A and B are both preset coefficients, and A+B=1, A≥0, and B≥0.

[0006] In an optional manner, before inputting the historical electricity price actual value sequence and the meteorological data sequence into the trained nonlinear model, the method also includes: obtaining the total demand response load and the corresponding demand response time period, wherein the total demand response load is the total load that needs to be reduced on the electricity demand side within the demand response time period, and the historical time period formed by the first moment and the last moment of the multiple historical moments overlaps with at least part of the time period in the demand response time period; determining a demand response load sequence and a demand response time series according to the total demand response load and the demand response time period, wherein the demand response load sequence includes the demand response load data corresponding to the multiple historical moments, and the demand response time series includes the response data corresponding to the multiple historical moments; inputting the historical electricity price actual value sequence and the meteorological data sequence into the trained nonlinear model to obtain a second electricity price prediction value Y output by the trained nonlinear model, includes: inputting the historical electricity price actual value sequence, the meteorological data sequence, the demand response load sequence and the demand response time series into the trained nonlinear model to obtain a second electricity price prediction value Y output by the trained nonlinear model.

[0007] In an optional manner, determining a demand response load sequence and a demand response time sequence based on the total demand response load and the demand response time period includes: determining the number n of demand response historical moments, wherein the demand response historical moment is a historical moment among the multiple historical moments included in the demand response time period; determining the ratio of the total demand response load to n-1; determining the demand response loads corresponding to the remaining demand response historical moments except the demand response historical moment farthest from the current moment among the n demand response historical moments as the ratio; determining the demand response loads corresponding to the other historical moments except the remaining demand response historical moments among the multiple historical moments as a first value, wherein the first value is less than the ratio; normalizing the sequence composed of the demand response loads corresponding to the multiple historical moments to obtain the demand response load sequence; determining the response data corresponding to the remaining demand response historical moments as a second value; determining the response data corresponding to the other historical moments to obtain the demand response time series, wherein the response data corresponding to the other historical moments are all less than the second value.

[0008] In an optional manner, the preset coefficient A and the preset coefficient B are determined by the following steps: obtaining multiple historical electricity price prediction value sequences, wherein each of the historical electricity price prediction value sequences includes the electricity price prediction values ​​of the multiple historical moments, and the electricity price prediction value of the jth historical moment in the i-th historical electricity price prediction value sequence is , C iand D i are the parameters corresponding to the i-th historical electricity price forecast value sequence, X j and Y j The linear electricity price prediction value and the nonlinear electricity price prediction value of the j-th historical moment are respectively predicted by the trained linear model and the trained nonlinear model; the sum values ​​corresponding to each of the historical electricity price prediction value sequences are respectively determined, and the preset coefficient A and the preset coefficient B are determined according to the parameters C and D corresponding to each of the sum values ​​and the corresponding historical electricity price prediction value sequences; wherein the sum value corresponding to the i-th historical electricity price prediction value sequence is determined by the following steps: determining the absolute value of the difference between the electricity price prediction value and the actual electricity price value at the multiple historical moments, and obtaining the The absolute values ​​of differences corresponding to multiple historical moments; dividing the multiple historical moments into k historical moments in chronological order and determining k coefficients, wherein the k historical moments correspond to the k coefficients one-to-one, and the coefficient corresponding to the historical moment closest to the current moment is the largest, and k≥2; determining the sum of the absolute values ​​of differences corresponding to each of the k historical moments; determining the product of the sum of the absolute values ​​of differences corresponding to each historical moment and the coefficient corresponding to the historical moment, to obtain k products; determining the sum of the k products, to obtain the total value corresponding to the i-th historical electricity price forecast value sequence.

[0009] In an optional manner, the preset coefficient A and the preset coefficient B are determined based on the parameters C and D corresponding to each of the sum values ​​and the corresponding historical electricity price prediction value sequence, including: respectively determining the parameters C and D corresponding to the historical electricity price prediction value sequence corresponding to the minimum sum value among all the sum values ​​as the preset coefficient A and the preset coefficient B.

[0010] In an optional manner, the plurality of historical electricity price prediction value sequences are determined by the following steps: determining an initial value C' of parameter C and an initial value D' of parameter D; determining a historical electricity price prediction value sequence according to C', D', the linear electricity price prediction values ​​and the nonlinear electricity price prediction values ​​at each historical moment, wherein the electricity price prediction value at the kth historical moment in the historical electricity price prediction value sequence is , X k and Y kThe linear electricity price prediction value and the nonlinear electricity price prediction value of the kth historical moment are predicted by the trained linear model and the trained nonlinear model respectively; determining whether a preset condition is met; if the preset condition is not met, adjusting the size of C' and / or the size of D', and turning to the step of determining a historical electricity price prediction value sequence according to C', D', the linear electricity price prediction value and the nonlinear electricity price prediction value of each historical moment; if the preset condition is met, obtaining the multiple historical electricity price prediction value sequences, wherein C'≥0, D'≥0.

[0011] In an optional manner, the adjustment of the size of C' includes: increasing C' by a preset amplitude or decreasing C' by the preset amplitude; the adjustment of the size of D' includes: increasing D' by the preset amplitude or decreasing D' by the preset amplitude; the preset condition includes: the number of times the step of determining a sequence of historical electricity price prediction values ​​based on C', D', the linear electricity price prediction values ​​at the various historical moments and the nonlinear electricity price prediction values ​​reaches a preset threshold.

[0012] According to another aspect of an embodiment of the present application, there is provided an electricity spot price prediction device, comprising: an acquisition module, used to acquire a sequence of historical actual electricity prices and a sequence of meteorological data, wherein the sequence of historical actual electricity prices includes actual electricity prices at multiple historical moments, the sequence of meteorological data includes meteorological data at the multiple historical moments, and the interval between two adjacent moments in the multiple historical moments is t; a first input module, used to input the sequence of historical actual electricity prices into a trained linear model to obtain a first electricity price prediction value X output by the trained linear model; a second input module, used to input the sequence of historical actual electricity prices and the sequence of meteorological data into a trained nonlinear model to obtain a second electricity price prediction value Y output by the trained nonlinear model; a determination module, used to determine the prediction value according to Determine a predicted electricity price value Z at a moment t apart from the last moment among the multiple historical moments, wherein A and B are both preset coefficients, and A+B=1, A≥0, and B≥0.

[0013] According to another aspect of an embodiment of the present application, there is provided an electricity spot price forecasting device, comprising a memory, a processor and a computer program stored on the memory, wherein the processor executes the computer program to implement the electricity spot price forecasting method as described above.

[0014] According to another aspect of the embodiments of the present application, there is provided a computer-readable storage medium having a computer program stored thereon, which implements the electricity spot price prediction method as described above when executed by a processor.

[0015] In the embodiment of the present application, the actual value sequence of historical electricity prices is input into the linear model so that the linear model learns the data law of the electricity price itself, thereby obtaining the first electricity price prediction value X. Although meteorological data will affect the electricity price, since the relationship between meteorological data and electricity price is not a linear relationship, in the embodiment of the present application, the actual value sequence of historical electricity prices and the meteorological data sequence are input into the nonlinear model so that the nonlinear model can fully learn the data affecting the electricity price, thereby obtaining the second electricity price prediction value Y output by the nonlinear model. Since the sequences input into the linear model and the nonlinear model are different, the contents learned by the linear model and the nonlinear model when predicting the electricity price are different, that is, the prediction results obtained by the prediction of the two models are obtained by learning the different characteristics and factors affecting the electricity price by the respective models. Since the electricity price prediction values ​​predicted by the linear model and the nonlinear model will have certain errors, in the implementation of the present application, the electricity price prediction value Z is determined by using the weighted summation form of the first electricity price prediction value X and the second electricity price prediction value Y, which can minimize the prediction error caused by the different focus points of the two models, thereby improving the accuracy of the final electricity price prediction value Z.

[0016] The above description is only an overview of the technical solution of the embodiment of the present application. In order to more clearly understand the technical means of the embodiment of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present application. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings: Figure 1 A schematic diagram of a process flow of a method for predicting electricity spot prices provided in an embodiment of the present application is shown; Figure 2 A schematic diagram of the structure of a long short-term memory network is shown; Figure 3 A schematic diagram showing a flow chart of a method for predicting electricity spot prices provided in another embodiment of the present application is shown; Figure 4 Shows Figure 3 A schematic flow chart of sub-steps of step 240; Figure 5 A schematic diagram showing a flow chart of a method for determining multiple historical electricity price prediction value sequences provided in an embodiment of the present application; Figure 6 A schematic diagram of the structure of an electricity spot price prediction device provided in an embodiment of the present application is shown; Figure 7A schematic diagram of the structure of an electricity spot price prediction device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0018] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein.

[0019] Power trading, especially spot trading, has brought about fundamental changes to the power operation and dispatching model. In the past, the dispatching agency dominated the planning of power production and operation. Today, market trading results have become the core mechanism for organizing power operations. For example, during peak periods of power demand, the spot market effectively guides thermal power generation companies to generate peak power through short-term high electricity price signals. Under the new power system model, a dynamic interactive relationship is formed between power generation and electricity prices. Changes in electricity prices will affect power generation; at the same time, changes in power generation will in turn affect electricity prices. This two-way interactive relationship makes electricity price forecasting more complicated.

[0020] In order to determine which types of data will affect electricity prices, and to use the data that affect electricity prices to predict electricity prices, thereby improving the accuracy of the obtained electricity price prediction value, the Pearson correlation coefficient can be used to determine the correlation between various types of parameters and electricity prices. Determine the correlation between two variables. For variables With variables The Pearson coefficient between , its value range is [-1,1]; For variables With variables The covariance between Variables With variables The standard deviation of is the sample size, The Pearson correlation coefficient determines the correlation between two variables as shown in Table 1.

[0021] Table 1: Pearson correlation coefficient

[0022] Through the above findings, historical electricity prices, meteorological data, etc. will affect electricity prices. Based on the above considerations, this application proposes a method for predicting electricity spot prices, which uses electricity prices at multiple historical moments to linearly predict electricity prices at future moments to obtain a first electricity price prediction value; uses electricity prices at multiple historical moments and meteorological data to nonlinearly predict electricity prices at future moments to obtain a second electricity price prediction value, and finally performs a weighted summation of the first electricity price prediction value and the second electricity price prediction value to obtain the electricity price prediction value at the future moment. Because a variety of factors that affect electricity prices are fully considered when predicting electricity prices, the accuracy of the obtained electricity price prediction value is improved.

[0023] Figure 1 A flow chart of the method for predicting the spot price of electricity provided in an embodiment of the present application is shown, and the method is executed by a terminal device, which may be a terminal device including one or more processors, such as a touch-screen phone, a smart phone, a tablet computer, a portable electronic device or other electronic device. The processor may be a central processing unit CPU, or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement an embodiment of the present invention, which is not limited here. The one or more processors included in the terminal device may be processors of the same type, such as one or more CPUs; or may be processors of different types, such as one or more CPUs and one or more ASICs, which is not limited here. Figure 1 As shown, the method comprises the following steps: Step 110: Obtain a historical electricity price actual value sequence and a meteorological data sequence.

[0024] The actual value sequence of historical electricity prices includes the actual value of electricity prices at each of the r historical moments, and the interval between two adjacent moments in the r historical moments is t (e.g., 15 minutes), where r is a positive integer greater than 1. The meteorological data sequence includes meteorological data at each of the r historical moments (i.e., the historical moments of the data in the two sequences correspond one to one), where the meteorological data at a certain moment includes meteorological data such as temperature and wind force at that moment that affect the power generation of the power generation system.

[0025] In order to improve the accuracy of the electricity price forecast value obtained by using the historical electricity price actual value series and the meteorological data series, in some embodiments, preferably, the r historical moments are the r historical moments closest to the current moment.

[0026] Step 120: Input the actual value sequence of historical electricity prices into the trained linear model to obtain the first electricity price prediction value X output by the trained linear model.

[0027] Among them, the linear model can be an autoregressive integrated moving average (ARIMA) model. In the embodiment of the present application, the linear model will be introduced as an ARIMA model as an example. The ARIMA model performs a stationarity test by drawing a power price series to observe whether the series is stationary. If the series is a stationary series, it does not need to be processed. If the series is a non-stationary time series, it is necessary to first perform a d-order difference on the series and convert it into a stationary time series. The autocorrelation coefficient (ACF) and partial autocorrelation coefficient (PACF) of the stationary time series are obtained respectively, and the optimal order p and q are obtained by analyzing the autocorrelation graph and the partial autocorrelation graph. The parameters d, q and p of the ARIMA model are determined by the above method, that is, the trained ARIMA model is obtained. The actual value sequence of the historical electricity price is input into the trained ARIMA model, and the first electricity price forecast value X output by the model at the time interval t from the last moment of the r historical moments can be obtained. If the last moment of the r historical moments is T, the model output is the first electricity price forecast value X at the moment of T+t.

[0028] In some embodiments, in order to improve the accuracy of the electricity price forecast value obtained by using the historical electricity price actual value sequence and the meteorological data sequence, before executing step 120, the historical electricity price actual value sequence and the meteorological data sequence are preprocessed, for example, the data in these two sequences are normalized and / or outliers are removed.

[0029] Step 130: Input the historical electricity price actual value sequence and the meteorological data sequence into the trained nonlinear model to obtain the second electricity price prediction value Y output by the trained nonlinear model.

[0030] Traditional neural networks have the problem of ignoring earlier information. Recurrent Neural Network (RNN) can use earlier information as prediction reference data during the learning and training process. Therefore, RNN can avoid the above problem to a certain extent through its loop structure. However, if you want to keep predicting electricity prices, as the time when the electricity price needs to be predicted gradually moves backward, the data in the historical electricity price actual value sequence will increase, and RNN will lose the ability to learn information from the historical electricity price actual value sequence, that is, the gradient disappearance problem will occur. The emergence of Long Short-Term Memory (LSTM) neural network solves this problem well. The reason why LSTM can solve the problem of small gradient of ordinary RNN is because of the different unit structure of LSTM. Among them, the unit structure of LSTM mainly consists of three parts: forget gate, input gate and output gate.

[0031] Figure 2 Figure 2 shows a schematic diagram of the structure of a long short-term memory network. Figure 2 As shown, the forget gate Decide what kind of information should be forgotten, indicating that the previous layer Used for calculation The characteristics of the forget gate For the activation function, The output is a value between 0 and 1. If the input is 0, it means that the information is completely forgotten; if the input is 1, it means that the information is completely retained. The formula is shown in formula (1).

[0032]

[0033] Input Gate Similar to the forget gate, it is used to control how much of the current new input information can be added to the memory unit. is the activation function, and the calculation formula is shown in formula (2).

[0034]

[0035] is the candidate value of cell state information, As its activation function, the calculation formula is shown in formula (3).

[0036]

[0037] The output gate determines the content and form of the output. is the activation function, and the calculation formula is shown in formula (4).

[0038]

[0039] Used in output gate The function reduces the neuron state to between [-1, 1], and then multiplies it with the initial output pair by pair to obtain the output of the model. The calculation formula is shown in formula (5).

[0040]

[0041] The updated neuron state is divided into two steps: first, forgetting the past state, and then adding new information. The formula of the process is shown in (6).

[0042]

[0043] in, , , , is the weight; , , , is the offset.

[0044] By inputting the actual value sequence of historical electricity prices and the meteorological data sequence into the trained LSTM, the second electricity price forecast value Y output by the model at the moment t apart from the last moment of the r historical moments can be obtained.

[0045] It should be noted that the execution order of step 120 and step 130 can be set as needed, for example, executing step 120 first and then step 130, or executing step 130 first and then step 120, or executing step 120 and step 130 simultaneously.

[0046] Step 140: According to Determine a predicted electricity price value Z at a time t apart from a last time among a plurality of historical times.

[0047] Wherein, A and B are both preset coefficients, and A+B=1, A≥0, B≥0. For example, A is 0.5, B is 0.5, or A is 0.7, B is 0.3.

[0048] In the embodiment of the present application, the actual value sequence of historical electricity prices is input into the linear model so that the linear model learns the data law of the electricity price itself, thereby obtaining the first electricity price prediction value X. Although meteorological data will affect the electricity price, since the relationship between meteorological data and electricity price is not a linear relationship, in the embodiment of the present application, the actual value sequence of historical electricity prices and the meteorological data sequence are input into the nonlinear model so that the nonlinear model can fully learn the data affecting the electricity price, thereby obtaining the second electricity price prediction value Y output by the nonlinear model. Since the sequences input into the linear model and the nonlinear model are different, the contents learned by the linear model and the nonlinear model when predicting the electricity price are different, that is, the prediction results obtained by the prediction of the two models are obtained by learning the different characteristics and factors affecting the electricity price by the respective models. Since the electricity price prediction values ​​predicted by the linear model and the nonlinear model will have certain errors, in the implementation of the present application, the electricity price prediction value Z is determined by using the weighted summation form of the first electricity price prediction value X and the second electricity price prediction value Y, which can minimize the prediction error caused by the different focus points of the two models, thereby improving the accuracy of the final electricity price prediction value Z.

[0049] Figure 3 FIG. 2 is a flow chart of a method for predicting electricity spot prices provided by another embodiment of the present application. Figure 3 As shown, the method comprises the following steps: Step 210: Obtain a historical electricity price actual value sequence and a meteorological data sequence.

[0050] Step 220: Input the actual value sequence of historical electricity prices into the trained linear model to obtain the first electricity price prediction value X output by the trained linear model.

[0051] Among them, step 210 to step 220 are the same as step 110 to step 120, so the principle and implementation method of step 210 to step 220 can refer to step 110 to step 120.

[0052] Step 230: Obtain the total demand response load and the corresponding demand response time period.

[0053] Among them, the total load of demand response is the total load that the electricity demand side needs to reduce during the demand response time period. The total load of demand response is the total load determined based on the power gap in the power supply, the risk of heavy overload in the power grid section or equipment, the spare capacity of the power system and / or the situation of local load overload. If the total load of the electricity demand side reducing electricity during the demand response time period is the total load of demand response, the power system can avoid the above problems. It should be noted that the historical period composed of the first moment and the last moment of the r historical moments overlaps with at least part of the time period in the demand response time period. For example, if the historical period composed of the first moment and the last moment is 0:00~24:00 on a certain day, and the interval between the two adjacent moments is t=15min, the demand response time period is the 0:30~1:00 period of the same day, then the overlapping period of the historical period and the demand response period is the 0:30~1:00 period.

[0054] Since the above-mentioned demand response indicates that the power consumption is much greater than the power generation, which usually leads to an increase in electricity prices, the total demand response load will also affect the electricity price. In this step, the total demand response load and the demand response time period are obtained so that the electricity price can be predicted based on the total demand response load and the demand response time period.

[0055] Step 240: Determine a demand response load sequence and a demand response time sequence according to the demand response total load and the demand response time period.

[0056] The demand response load sequence includes the demand response load data corresponding to the r historical moments, and the demand response time sequence includes the response data corresponding to the r historical moments. The following will further introduce the method for determining the demand response load sequence and the demand response time sequence.

[0057] Step 250: Input the historical electricity price actual value sequence, the meteorological data sequence, the demand response load sequence and the demand response time sequence into the trained nonlinear model to obtain the second electricity price prediction value Y output by the trained nonlinear model.

[0058] Among them, this step is similar to step 130, so the principle and specific implementation of this step can refer to step 130. The main difference between this step and step 130 is that the sequence of inputting the nonlinear model is different. Compared with step 130, the sequence of inputting the nonlinear model in this step also includes the demand response load sequence and the demand response time sequence. In other words, the nonlinear model in this step learns more relevant data affecting the electricity price, so the second electricity price prediction value Y obtained in this step is more accurate.

[0059] Step 260: According to Determine a predicted electricity price value Z at a time t apart from a last time among a plurality of historical times.

[0060] Among them, this step is similar to step 140, so the principle and specific implementation method of this step can refer to step 140.

[0061] Since the total demand response load is also a key factor affecting electricity prices, in the implementation of this application, the demand response load sequence and the demand response time series are determined based on the total demand response load and the demand response time period, and these two sequences are used to perform nonlinear prediction of electricity prices, thereby improving the accuracy of the second electricity price prediction value Y obtained, and further improving the accuracy of the final electricity price prediction value Z.

[0062] Figure 4 Shows Figure 3 Schematic diagram of the sub-step flow chart of step 240. Figure 4 As shown, step 240 includes: Step 241: Determine the number n of demand response historical moments.

[0063] The demand response historical moment is a historical moment in the r historical moments included in the demand response time period. For example, if the historical period formed by the first moment and the last moment in the r historical moments is from 0:00 to 24:00 on a certain day, and the interval between two adjacent moments is t=15min, there are 96 historical moments in total, and the demand response time period is from 0:30 to 1:00 on the same day, then the demand response time period includes the three moments of 0:30, 0:45 and 1:00 in the r historical moments, so n is 3.

[0064] It should be noted that, as described in step 230, the historical period formed by the first moment and the last moment of the r historical moments overlaps at least part of the time period in the demand response time period. Therefore, n is a positive integer greater than or equal to 2.

[0065] Step 242: Determine the ratio of the total demand response load to n-1.

[0066] For example, if the total demand response load is 100 kWh and n is 3, the ratio determined in this step is 100 / (3-1)=50 kW.

[0067] Step 243: Determine the demand response loads corresponding to the remaining demand response historical moments, except the demand response historical moment farthest from the current moment, among the n demand response historical moments as the ratio.

[0068] For example, the demand response time period includes the three moments of 0:30, 0:45 and 1:00 in the r historical moments, and in this step, the demand response loads corresponding to the two moments of 0:45 and 1:00 are both determined to be 50 kilowatts. Since the demand response load corresponding to the time period of 0:30-1:00 is the total demand response load of 100 kilowatts, it is explained in this way that the demand response load corresponding to the time period of 0:30-0:45 is 50 kilowatts, and the demand response load corresponding to the time period of 0:45-1:00 is 50 kilowatts.

[0069] Step 244: Determine the demand response loads corresponding to the other historical moments among the multiple historical moments except the remaining demand response historical moments as the first value.

[0070] In this step, the demand response loads corresponding to the other historical moments except the demand response loads determined in step 243 are all determined as the first value. For example, in step 243, the demand response loads corresponding to the two moments 0:45 and 1:00 are both determined to be 50 kilowatts, then in this step, the demand response loads corresponding to the other moments except the two moments 0:45 and 1:00 in the 96 historical moments are all determined as the first value. The first value is less than the ratio determined in step 242, for example, the first value can be 0 or the difference obtained by subtracting the preset value from the ratio.

[0071] Step 245: Normalize the sequence consisting of the demand response loads corresponding to multiple historical moments to obtain a demand response load sequence.

[0072] Among them, the maximum total demand response load within one year from the current moment can be determined first, and then the demand response loads corresponding to each historical moment determined in steps 243 to 244 are divided by the maximum total demand response load to obtain a normalized demand response load sequence.

[0073] Step 246: Determine the response data corresponding to the remaining demand response historical moments as the second value.

[0074] Among them, in this step, the response data corresponding to the historical moment when the demand response load is determined in step 243 to be the ratio determined in step 242 is the second value. For example, in step 243, the demand response loads corresponding to the two moments 0:45 and 1:00 are both determined as the ratio determined in step 242, and in this step, the response data corresponding to the two moments 0:45 and 1:00 are both determined as the second value. The second value can be set as needed, for example, the second value can be 1.

[0075] Step 247: Determine the response data corresponding to the other historical moments to obtain a demand response time series.

[0076] For example, in this step, the response data corresponding to the other historical moments except the two moments of 0:45 and 1:00 among the 96 historical moments are determined, and the response data corresponding to the other historical moments determined in this step are all less than the second value. For example, if the second value is 1, in this step, the response data corresponding to the moments of 0:30 and 1:15 can be determined as 0.75, the response data corresponding to the moments of 0:15 and 1:30 can be determined as 0.5, the response data corresponding to the moments of 0:00 and 1:45 can be determined as 0.25, and the response data corresponding to the remaining other historical moments can be determined as 0.

[0077] In the embodiment of the present application, the above method can be used to quickly determine the normalized demand response load sequence and demand response time sequence according to the total demand response load and the corresponding demand response time period.

[0078] In some embodiments, the preset coefficient A and the preset coefficient B are determined through the following steps a1 to a2.

[0079] Step a1: Obtain multiple historical electricity price forecast value sequences.

[0080] Each historical electricity price forecast value sequence includes the electricity price forecast values ​​of the r historical moments, and the electricity price forecast value of the jth historical moment in the i-th historical electricity price forecast value sequence is , C i and D i are the parameters corresponding to the i-th historical electricity price forecast value sequence, X j and Y j Through Figure 1 The linear electricity price prediction value and nonlinear electricity price prediction value at the jth historical moment predicted by the trained linear model and the trained nonlinear model in the provided embodiment. The electricity price prediction values ​​output by the linear model and the nonlinear model corresponding to the same moment in different historical electricity price prediction value sequences are respectively the same.

[0081] Step a2: respectively determine the sum values ​​corresponding to each historical electricity price forecast value sequence, and determine the preset coefficient A and the preset coefficient B according to the parameters C and D corresponding to each sum value and the corresponding historical electricity price forecast value sequence.

[0082] Among them, the sum value corresponding to the i-th historical electricity price forecast value sequence is determined by the following steps a21 to a25.

[0083] Step a21: Determine the absolute value of the difference between the electricity price forecast value and the actual electricity price value at the multiple historical moments, and obtain the absolute value of the difference corresponding to the multiple historical moments.

[0084] Among them, if the historical electricity price prediction value sequence includes the electricity price prediction values ​​of r historical moments, and the historical electricity price actual value sequence correspondingly includes the electricity price actual values ​​of the r historical moments, then in this step, the absolute value of the difference between the electricity price prediction value and the actual electricity price value at each of the r historical moments is determined respectively to obtain r absolute values ​​of the difference.

[0085] Step a22: Divide multiple historical moments into k historical moments in chronological order and determine k coefficients, wherein the k historical moments correspond one-to-one to the k coefficients, and the coefficient corresponding to the historical moment closest to the current moment is the largest, k≥2.

[0086] Among them, in this step, the r historical moments are divided into k historical moments. For example, if r is 16, the 16 historical moments can be divided into 4 historical moments, each of which includes 4 historical moments. The k coefficients can be determined as needed, as long as the coefficient corresponding to the historical moment closest to the current moment is the largest. For example, if among the 4 historical moments, the first historical moment is closest to the current moment and the fourth historical moment is farthest from the current moment, the coefficient corresponding to the first historical moment is determined to be 1, the coefficient corresponding to the second historical moment is determined to be 0.75, the coefficient corresponding to the third historical moment is determined to be 0.5, and the coefficient corresponding to the fourth historical moment is determined to be 0.25.

[0087] Since the electricity price at a moment closer to the current moment has a greater impact on the electricity price at future moments, in this step, the k coefficients corresponding to k historical moments are determined in the above manner, so that the weights that can better reflect the impact of historical electricity price data on future electricity price forecasts can be determined.

[0088] Step a23: Determine the sum of the absolute values ​​of the differences corresponding to each of the k historical moments.

[0089] For example, if k is 4, and each historical moment includes 4 historical moments, then in this step, the absolute values ​​of the differences corresponding to the 4 historical moments in each historical moment are summed up, so as to obtain 4 sum values ​​corresponding to the 4 historical moments respectively.

[0090] Step a24: Determine the product of the sum of the absolute values ​​of the differences corresponding to each historical moment and the coefficient corresponding to the historical moment, and obtain k products.

[0091] Step a25: Determine the sum of k products to obtain the total value corresponding to the i-th historical electricity price forecast value sequence.

[0092] In some embodiments, the parameters C and D corresponding to the historical electricity price prediction value sequence corresponding to the minimum sum value among all the sum values ​​are determined as the preset coefficient A and the preset coefficient B respectively.

[0093] In the embodiment of the present application, when the total value is the smallest, it means that the historical electricity price prediction value is closest to the actual value of the historical electricity price. Therefore, the parameters C and D corresponding to the historical electricity price prediction value sequence corresponding to the minimum total value are determined as the preset coefficient A and the preset coefficient B respectively, which can improve the accuracy of the electricity price prediction value Z determined in step 140.

[0094] Figure 5 The flowchart of the method for determining multiple historical electricity price prediction value sequences provided by the embodiment of the present application is shown. Figure 5 As shown, the method includes: Step 310: Determine an initial value C′ of parameter C and an initial value D′ of parameter D.

[0095] The initial values ​​C' and D' can be determined as needed. For example, the predicted value X output by the linear model at two historical moments, the predicted value Y output by the nonlinear model, and the actual value Z of the electricity price can be substituted into the formula , thereby determining the initial values ​​C' and D'.

[0096] Step 320: Determine a historical electricity price prediction value sequence based on C', D', the linear electricity price prediction values ​​at each historical moment, and the nonlinear electricity price prediction values.

[0097] Among them, the electricity price forecast value Z at the kth historical moment in the historical electricity price forecast value sequence is k 'You can use the formula OK, X k and Y k They are the linear electricity price prediction value and nonlinear electricity price prediction value at the kth historical moment predicted by the trained linear model and the trained nonlinear model respectively.

[0098] Step 330: Determine whether the preset condition is met. If not, go to step 340; if yes, end this process.

[0099] In some embodiments, the preset condition is that the number of times step 320 is performed reaches a preset threshold. The preset threshold can be set as needed, such as 2000 or 3000.

[0100] In other embodiments, the preset conditions are that the number of times step 320 is executed reaches a preset threshold, C' is less than 0, D' is less than 0, C' is greater than 1 and / or D' is greater than 1.

[0101] Step 340 : Adjust the size of C′ and / or the size of D′, and go to step 320 .

[0102] In some embodiments, adjusting the size of C' includes: increasing C' by a preset amplitude or decreasing C' by a preset amplitude. Adjusting the size of D' includes: increasing D' by a preset amplitude or decreasing D' by a preset amplitude. The preset amplitude can be set as needed, for example, the preset amplitude is 0.0001, 0.0002, etc.

[0103] In an embodiment of the present application, multiple historical electricity price prediction value sequences can be quickly determined through the above method, so that the preset coefficient A and preset coefficient B can be efficiently determined through multiple historical electricity price prediction value sequences in the subsequent process, and the accuracy of the preset coefficient A and preset coefficient B finally determined is also improved.

[0104] Figure 6 The schematic diagram of the structure of the power spot price prediction device provided by the embodiment of the present application is shown. Figure 6 As shown, the electricity spot price prediction device 400 includes: an acquisition module 401 , a first input module 402 , a second input module 403 and a determination module 404 .

[0105] The acquisition module 401 is used to acquire a sequence of actual values ​​of historical electricity prices and a sequence of meteorological data, wherein the sequence of actual values ​​of historical electricity prices includes actual values ​​of electricity prices at multiple historical moments, the sequence of meteorological data includes meteorological data at multiple historical moments, and the interval between two adjacent moments in the multiple historical moments is t. The first input module 402 is used to input the sequence of actual values ​​of historical electricity prices into a trained linear model to obtain a first electricity price prediction value X output by the trained linear model. The second input module 403 is used to input the sequence of actual values ​​of historical electricity prices and a sequence of meteorological data into a trained nonlinear model to obtain a second electricity price prediction value Y output by the trained nonlinear model. The determination module 404 is used to determine the value of the actual value of historical electricity prices according to the training linear model. Determine a predicted electricity price value Z at a moment t apart from a last moment among a plurality of historical moments, wherein A and B are both preset coefficients, and A+B=1, A≥0, and B≥0.

[0106] The power spot price prediction device provided in this embodiment is used to execute the technical solution of the power spot price prediction method in the aforementioned method embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0107] It is worth noting that the electricity spot price forecasting device provided in this embodiment also includes other modules for executing the various steps of the above-mentioned electricity spot price forecasting method embodiment, which will not be described one by one here.

[0108] Figure 7 A schematic diagram of the structure of the electricity spot price prediction device provided in an embodiment of the present application is shown. The specific embodiment of the present application does not limit the specific implementation of the electricity spot price prediction device.

[0109] like Figure 7 As shown, the electricity spot price prediction device 500 may include: a processor (processor) 502 and a memory (memory) 504.

[0110] The memory 504 is used to store a computer program 506. The memory 504 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. The computer program 506 may include computer executable instructions.

[0111] The processor 502 is configured to execute the computer program 506 to implement the above-mentioned electricity spot price prediction method embodiment.

[0112] The processor 502 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the power spot price prediction device may be processors of the same type, such as one or more CPUs; or may be processors of different types, such as one or more CPUs and one or more ASICs.

[0113] An embodiment of the present application provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned electricity spot price prediction method embodiment is implemented.

[0114] An embodiment of the present application provides a computer program, which can be executed by a processor to implement the above-mentioned electricity spot price prediction method embodiment.

[0115] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned electricity spot price prediction method embodiment is implemented.

[0116] In several embodiments provided in the present application, if any function is implemented in the form of a software function module / unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the technical solution of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, server or other electronic device) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (RandomAccess Memory, RAM), disk or optical disk and other media that can store computer program codes.

[0117] The algorithm or display provided here are not inherently related to any specific computer, virtual system or other equipment. Various general systems can also be used together with the teaching based on this. According to the above description, it is obvious to construct the structure required for this type of system. In addition, the present application embodiment is not directed to any specific programming language yet. It should be understood that various programming languages ​​can be utilized to realize the content of the present application described here, and the above description of specific languages ​​is to disclose the best mode of implementation of the present application.

[0118] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be constructed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The present application may be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In the claims that list several devices, several units or modules in these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.

[0119] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for predicting spot electricity prices, characterized in that: The method comprises: Acquire a historical electricity price actual value sequence and a meteorological data sequence, wherein the historical electricity price actual value sequence includes the actual values ​​of electricity prices at multiple historical moments, the meteorological data sequence includes the meteorological data at the multiple historical moments, and the interval between two adjacent moments in the multiple historical moments is t; Inputting the actual value sequence of the historical electricity price into the trained linear model to obtain the first electricity price prediction value X output by the trained linear model; Inputting the historical electricity price actual value sequence and the meteorological data sequence into a trained nonlinear model to obtain a second electricity price prediction value Y output by the trained nonlinear model; according to Determine a predicted electricity price value Z at a moment t apart from the last moment among the multiple historical moments, wherein A and B are both preset coefficients, and A+B=1, A≥0, and B≥0.

2. The method according to claim 1, characterized in that Before inputting the historical electricity price actual value sequence and the meteorological data sequence into the trained nonlinear model, the method further includes: Obtaining a total demand response load and a corresponding demand response time period, wherein the total demand response load is the total load that needs to be reduced on the electricity demand side within the demand response time period, and the historical time period formed by the first moment and the last moment of the multiple historical moments overlaps with at least a portion of the time period in the demand response time period; Determining a demand response load sequence and a demand response time sequence according to the demand response total load and the demand response time period, wherein the demand response load sequence includes demand response load data corresponding to the multiple historical moments, and the demand response time sequence includes response data corresponding to the multiple historical moments; The step of inputting the historical electricity price actual value sequence and the meteorological data sequence into a trained nonlinear model to obtain a second electricity price prediction value Y output by the trained nonlinear model includes: The historical electricity price actual value sequence, the meteorological data sequence, the demand response load sequence and the demand response time sequence are input into the trained nonlinear model to obtain a second electricity price prediction value Y output by the trained nonlinear model.

3. The method according to claim 2, characterized in that The determining of the demand response load sequence and the demand response time sequence according to the demand response total load and the demand response time period includes: Determining the number n of demand response historical moments, wherein the demand response historical moments are historical moments among the plurality of historical moments included in the demand response time period; Determining a ratio of the total demand response load to n-1; Determine the demand response loads corresponding to the remaining demand response historical moments except the demand response historical moment farthest from the current moment among the n demand response historical moments as the ratio; Determine the demand response loads corresponding to the other historical moments among the multiple historical moments except the remaining demand response historical moments as a first value, wherein the first value is less than the ratio; Normalizing a sequence consisting of the demand response loads corresponding to the multiple historical moments to obtain the demand response load sequence; Determine the response data corresponding to the remaining demand response historical moments as second values; The response data corresponding to the other historical moments are determined to obtain the demand response time series, wherein the response data corresponding to each other historical moment are all smaller than the second value.

4. The method according to claim 1, characterized in that Determine the preset coefficient A and preset coefficient B by the following steps: Acquire multiple historical electricity price forecast value sequences, wherein each of the historical electricity price forecast value sequences includes the electricity price forecast values ​​of the multiple historical moments, and the electricity price forecast value of the jth historical moment in the i-th historical electricity price forecast value sequence , C i and D i are the parameters corresponding to the i-th historical electricity price forecast value sequence, X j and Y j are the linear electricity price prediction value and the nonlinear electricity price prediction value at the j-th historical moment predicted by the trained linear model and the trained nonlinear model respectively; Determine the sum values ​​corresponding to each of the historical electricity price prediction value sequences respectively, and determine the preset coefficient A and the preset coefficient B according to the parameters C and D corresponding to each of the sum values ​​and the corresponding historical electricity price prediction value sequences; The sum value corresponding to the i-th historical electricity price forecast value sequence is determined by the following steps: Determine the absolute value of the difference between the electricity price prediction value and the actual value of the electricity price at the multiple historical moments, and obtain the absolute value of the difference corresponding to the multiple historical moments; Divide the multiple historical moments into k historical moments in chronological order and determine k coefficients, wherein the k historical moments correspond to the k coefficients one by one, and the coefficient corresponding to the historical moment closest to the current moment is the largest, and k≥2; Determine the sum of the absolute values ​​of the differences corresponding to each of the k historical moments; Determine the product of the sum of the absolute values ​​of the differences corresponding to each historical moment and the coefficient corresponding to the historical moment, and obtain k products; Determine the sum of the k products to obtain the total value corresponding to the i-th historical electricity price forecast value sequence.

5. The method according to claim 4, characterized in that The step of determining the preset coefficient A and the preset coefficient B according to the parameters C and D corresponding to the sum values ​​and the corresponding historical electricity price forecast value sequence comprises: The parameters C and D corresponding to the historical electricity price forecast value sequence corresponding to the minimum sum value among all the sum values ​​are determined as the preset coefficient A and the preset coefficient B respectively.

6. The method according to claim 4, characterized in that The multiple historical electricity price forecast value sequences are determined by the following steps: Determine an initial value C' of parameter C and an initial value D' of parameter D; A historical electricity price prediction value sequence is determined based on C', D', the linear electricity price prediction value and the nonlinear electricity price prediction value at each historical moment, wherein the electricity price prediction value at the kth historical moment in the historical electricity price prediction value sequence is , X k and Y k are the linear electricity price prediction value and the nonlinear electricity price prediction value at the k-th historical moment predicted by the trained linear model and the trained nonlinear model respectively; Determine whether the preset conditions are met; If the preset condition is not met, adjust the size of C' and / or the size of D', and go to the step of determining a historical electricity price prediction value sequence according to C', D', the linear electricity price prediction values ​​at each historical moment, and the nonlinear electricity price prediction values; If the preset conditions are met, the plurality of historical electricity price forecast value sequences are obtained, wherein C'≥0, D'≥0.

7. The method according to claim 6, characterized in that The adjusting the size of C' includes: increasing C' by a preset amplitude or decreasing C' by the preset amplitude; The adjusting the size of D' includes: increasing D' by the preset amplitude or decreasing D' by the preset amplitude; The preset condition includes: the number of times the step of determining a historical electricity price prediction value sequence based on C', D', the linear electricity price prediction values ​​at each historical moment and the nonlinear electricity price prediction values ​​is executed reaches a preset threshold.

8. An electricity spot price forecasting device, characterized in that: The device comprises: An acquisition module, used to acquire a sequence of actual values ​​of historical electricity prices and a sequence of meteorological data, wherein the sequence of actual values ​​of historical electricity prices includes actual values ​​of electricity prices at multiple historical moments, the sequence of meteorological data includes meteorological data at the multiple historical moments, and the interval between two adjacent moments in the multiple historical moments is t; A first input module, used for inputting the actual value sequence of the historical electricity price into the trained linear model to obtain the first electricity price prediction value X output by the trained linear model; A second input module, used for inputting the historical electricity price actual value sequence and the meteorological data sequence into a trained nonlinear model to obtain a second electricity price prediction value Y output by the trained nonlinear model; Determine the module for Determine a predicted electricity price value Z at a moment t apart from the last moment among the multiple historical moments, wherein A and B are both preset coefficients, and A+B=1, A≥0, and B≥0.

9. An electricity spot price forecasting device, comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the electricity spot price forecasting method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for predicting the spot price of electricity described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Electricity consumption prediction method and system based on user portrait

    CN120804520A