Electric power spot price prediction method and device
By determining the window period in the power spot market and using prediction models and price calibration models, the problem of inaccurate prediction of power spot prices is solved, and the accuracy of transaction decisions and electricity cost management in the power market is improved.
Patent Information
- Application Number
- CN202510440290.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-07-18
AI Technical Summary
The existing technology is difficult to accurately predict the spot price of electricity, which affects trading decisions in the power market and electricity consumption costs of electricity consumers.
By determining the first and second window periods of the current period based on the demand and supply window periods of the historical period, the demand and supply prediction model are used to predict the residual power demand and supply, and the prediction accuracy is improved in combination with the price calibration model.
Improve the accuracy of electricity spot price forecasts and help market participants better make transaction decisions and risk management.
Smart Images

Figure CN120338853A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of energy, and particularly to a method and device for predicting electricity spot price. Background Art
[0002] Power trading, especially spot trading, has changed the way of power dispatching operation. The electricity spot market can effectively link the power dispatching operation situation and trading behaviors within the whole system, enabling the spot equilibrium price that changes almost in real time to reflect the supply and demand changes and energy cost fluctuations at different time periods and nodes. The electricity spot market constructs a market price mechanism of "rising and falling", which helps to improve the power security supply capacity and support energy security. For example, during the time period with high power demand load, through the short-term high electricity price signal in the spot market, it can guide thermal power enterprises to generate electricity at peak load and power users to reduce electricity demand.
[0003] The core of the electricity spot market is the electricity price, which reflects the real-time changes in the power supply and demand relationship and is the key basis for market participants to make trading decisions. The fluctuation of the electricity price not only affects the revenues of power generation enterprises and electricity retailers, but also is directly related to the electricity consumption costs of power consumers. Therefore, how to improve the accuracy of electricity spot price prediction and predict a relatively accurate electricity spot price has a great impact on electricity spot trading. Summary of the Invention
[0004] Based on this, it is necessary to provide a method and device for predicting electricity spot price to solve the above technical problems and improve the accuracy of electricity spot price prediction.
[0005] In a first aspect, the present application provides a method for predicting electricity spot price, including:
[0006] Determine a first time window and a second time window of the current time period according to the demand time window and supply time window of the corresponding historical same time period of the current time period; wherein, the electricity supply prediction result of the historical same time period predicted based on the supply time window satisfies the supply prediction condition with the actual value of the electricity supply of the historical same time period, and the electricity remaining demand prediction result of the historical same time period predicted based on the demand time window satisfies the demand prediction condition with the actual value of the electricity remaining demand of the historical same time period;
[0007] Obtain the historical demand parameters of the first time window and the historical supply parameters of the second time window;
[0008] Input the historical demand parameters into the demand prediction model to obtain the electricity remaining demand prediction result of the current time period, and determine the electricity supply prediction result of the current time period according to the historical supply parameters;
[0009] Based on the predicted results of the electricity surplus demand and the predicted results of the electricity supply in the current period, determine the target predicted result of the electricity spot price in the current period.
[0010] In one embodiment, the demand prediction model is trained as follows:
[0011] Obtain the demand parameters for each period within the historical time range before the historical same period, and the actual value of the electricity surplus demand in the historical same period;
[0012] Determine multiple first candidate window periods from the historical time range; wherein, each first candidate window period includes multiple consecutive periods, and the periods included in different first candidate window periods are not exactly the same;
[0013] Use the demand parameters of each first candidate window period as input, and the actual value of the electricity surplus demand in the historical same period as the label, and train a preset model to obtain the demand prediction model.
[0014] In one embodiment, the method further includes:
[0015] Adjust the model parameters of the demand prediction model to obtain an adjusted demand prediction model;
[0016] Input the demand parameters of the demand window period into the adjusted demand prediction model to obtain the predicted result of the electricity surplus demand in the historical same period as the adjustment result;
[0017] Based on the difference between the adjustment result and the actual value of the electricity surplus demand in the historical same period, determine whether the adjusted model parameters are the optimal parameters;
[0018] If so, obtain the adjusted completed demand prediction model;
[0019] Otherwise, return to execute the step of adjusting the model parameters of the demand prediction model;
[0020] Correspondingly, input the historical demand parameters into the demand prediction model to obtain the predicted result of the electricity surplus demand in the current period, including:
[0021] Input the historical demand parameters into the adjusted completed demand prediction model to obtain the predicted result of the electricity surplus demand in the current period.
[0022] In one embodiment, the method further includes:
[0023] For each candidate window period, input the demand parameters of the first candidate window period into the demand prediction model to obtain the predicted result of the first candidate window period;
[0024] Determine the demand prediction results for each first candidate window period respectively, and the root mean square error with the actual value of the remaining power demand in the historical same period;
[0025] Determine the demand window period of the historical same period as the first candidate window period corresponding to the smallest root mean square error.
[0026] In one embodiment, the method further includes:
[0027] Obtain the supply parameters of the historical same period, the supply parameters of each period within the historical time range before the historical same period, and the actual power supply value of the historical same period;
[0028] Determine multiple second candidate window periods from the historical time range; wherein, each second candidate window period includes multiple consecutive periods, and the periods included in different second candidate window periods are not completely the same;
[0029] According to the supply prediction formula, the supply parameters of each second candidate window period, and the supply parameters of the historical same period, determine the supply prediction results for each second candidate window period;
[0030] Determine the root mean square error between the supply prediction results for each second candidate window period and the actual power supply value of the historical same period respectively;
[0031] Determine the supply window period of the historical same period as the second candidate window period corresponding to the smallest root mean square error.
[0032] In one embodiment, according to the supply prediction formula, the supply parameters of each second candidate window period, and the supply parameters of the historical same period, determining the supply prediction results for each second candidate window period includes:
[0033] For each second candidate window period, solve the parameters of the supply prediction formula according to the supply parameters of the second candidate window period to obtain the prediction formula of the second candidate window period;
[0034] Use the supply parameters of the historical same period to assign values to the variables of the prediction formula of the second candidate window period to obtain the supply prediction results of the second candidate window period.
[0035] In one embodiment, according to the historical supply parameters, determining the power supply prediction result of the current period includes:
[0036] Solve the parameters of the supply prediction formula according to the historical supply parameters, and use the obtained parameter values to assign values to the parameters of the supply prediction formula to obtain the power supply prediction result of the current period.
[0037] In one embodiment, the method further includes:
[0038] Input the target prediction result, the demand parameters of the previous time period of the current time period, and the actual values of the electricity spot price within a set time period before the current time period into the price calibration model to obtain the final prediction result of the electricity spot price for the current time period.
[0039] In one embodiment, the price calibration model is trained as follows:
[0040] Determine the previous time period as the new current time period, and return to execute the step of determining the first time window and the second time window of the current time period according to the demand time window and the supply time window of the historical same - period time period corresponding to the current time period, so as to obtain the target prediction result of the electricity spot price of the previous time period;
[0041] Use the target prediction result of the electricity spot price of the previous time period, the demand parameters of the specified time period, and the actual values of the electricity spot price within a set time period before the previous time period as inputs, and use the actual value of the electricity spot price of the previous time period as a label to train the preset model to obtain the price calibration model; wherein, the specified time period is the time period before the previous time period.
[0042] In a second aspect, the present application also provides an electricity spot price prediction device, including:
[0043] A time determination module, configured to determine the first time window and the second time window of the current time period according to the demand time window and the supply time window of the historical same - period time period corresponding to the current time period; wherein, the electricity supply prediction result of the historical same - period time period predicted based on the supply time window satisfies the supply prediction condition with the actual value of the electricity supply of the historical same - period time period, and the electricity remaining demand prediction result of the historical same - period time period predicted based on the demand time window satisfies the demand prediction condition with the actual value of the electricity remaining demand of the historical same - period time period;
[0044] A parameter acquisition module, configured to acquire the historical demand parameters of the first time window and the historical supply parameters of the second time window;
[0045] A first prediction module, configured to input the historical demand parameters into the demand prediction model to obtain the electricity remaining demand prediction result of the current time period, and determine the electricity supply prediction result of the current time period according to the historical supply parameters;
[0046] A second prediction module, configured to determine the target prediction result of the electricity spot price of the current time period based on the electricity remaining demand prediction result and the electricity supply prediction result of the current time period.
[0047] In a third aspect, the present application also provides a computer device, including a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0048] Determine a first time window and a second time window for the current time period according to the demand time window and the supply time window of the historical same - period time period corresponding to the current time period; wherein, the power supply prediction result of the historical same - period time period predicted based on the supply time window satisfies the supply prediction condition with the actual power supply value of the historical same - period time period, and the power residual demand prediction result of the historical same - period time period predicted based on the demand time window satisfies the demand prediction condition with the actual power residual demand value of the historical same - period time period;
[0049] Obtain the historical demand parameters of the first time window and the historical supply parameters of the second time window;
[0050] Input the historical demand parameters into the demand prediction model to obtain the power residual demand prediction result for the current time period, and determine the power supply prediction result for the current time period according to the historical supply parameters;
[0051] Based on the power residual demand prediction result and the power supply prediction result for the current time period, determine the target prediction result of the power spot price for the current time period.
[0052] In a fourth aspect, the present application also provides a computer - readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0053] Determine a first time window and a second time window for the current time period according to the demand time window and the supply time window of the historical same - period time period corresponding to the current time period; wherein, the power supply prediction result of the historical same - period time period predicted based on the supply time window satisfies the supply prediction condition with the actual power supply value of the historical same - period time period, and the power residual demand prediction result of the historical same - period time period predicted based on the demand time window satisfies the demand prediction condition with the actual power residual demand value of the historical same - period time period;
[0054] Obtain the historical demand parameters of the first time window and the historical supply parameters of the second time window;
[0055] Input the historical demand parameters into the demand prediction model to obtain the power residual demand prediction result for the current time period, and determine the power supply prediction result for the current time period according to the historical supply parameters;
[0056] Based on the power residual demand prediction result and the power supply prediction result for the current time period, determine the target prediction result of the power spot price for the current time period.
[0057] In a fifth aspect, the present application also provides a computer program product, including a computer program. When the computer program is executed by a processor, the following steps are implemented:
[0058] Determine the first window period and the second window period of the current period according to the demand window period and the supply window period of the corresponding historical same period of the current period; wherein, the power supply prediction result of the historical same period predicted based on the supply window period and the actual value of the power supply in the historical same period meet the supply prediction condition, and the predicted result of the remaining power demand in the historical same period predicted based on the demand window period and the actual value of the remaining power demand in the historical same period meet the demand prediction condition;
[0059] Obtain the historical demand parameters of the first window period and the historical supply parameters of the second window period;
[0060] Input the historical demand parameters into the demand prediction model to obtain the predicted result of the remaining power demand in the current period, and determine the predicted result of the power supply in the current period according to the historical supply parameters;
[0061] Based on the predicted result of the remaining power demand and the predicted result of the power supply in the current period, determine the target predicted result of the spot power price in the current period.
[0062] The above-mentioned spot power price prediction method and device predict the remaining power demand in the current period through the historical demand parameters of the first window period of the current period and the demand prediction model, and predict the power supply in the current period through the historical supply parameters of the second window period of the current period. Furthermore, based on the predicted remaining power demand and power supply in the current period, determine the target predicted result of the spot power price in the current period. The above solution predicts the power supply and the remaining power demand in the current period for both the power supply and demand sides respectively, and thus derives the spot power price when the power supply and the remaining power demand are balanced as the predicted result of the spot power price in the current period. In this way, both the demand parameters and the supply parameters are taken into account when predicting the spot power price, realizing the relationship fitting between the demand parameters, the supply parameters and the prediction result, so that the present solution can obtain a larger explanation ratio and better extrapolation prediction ability, and improve the accuracy of the spot power price prediction. Description of the Drawings
[0063] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the following will briefly introduce the drawings required for the description in the embodiments of the present application or the related art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other related drawings can be obtained without creative efforts based on these drawings.
[0064] Figure 1 It is a schematic flowchart of a spot power price prediction method provided in an embodiment;
[0065] Figure 2Schematic diagram of a power spot price prediction process provided in an embodiment;
[0066] Figure 3 Schematic diagram of a process for predicting a training demand model provided in an embodiment;
[0067] Figure 4 Schematic diagram of a process for a power spot price prediction method provided in another embodiment;
[0068] Figure 5 Schematic diagram of a process for determining a demand window period provided in an embodiment;
[0069] Figure 6 Schematic diagram of a process for determining a supply window period provided in an embodiment;
[0070] Figure 7 Schematic diagram of the comparison between the power spot price predicted by the solution provided in this application and the actual power spot price at the monthly level;
[0071] Figure 8 Schematic diagram of the comparison between the power spot price predicted by the solution provided in this application and the actual power spot price at the time - of - use level;
[0072] Figure 9 Structural block diagram of a power spot price prediction device provided in an embodiment;
[0073] Figure 10 Internal structure diagram of a computer device provided in an embodiment. Detailed implementation manners
[0074] In order to make the purpose, technical solutions and advantages of this application clearer, the following further elaborates on this application in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit this application.
[0075] The core of the power spot market is the electricity price, which reflects the real - time changes in the power supply - demand relationship and is the key basis for market participants to make trading decisions. The fluctuation of the electricity price not only affects the revenues of power generation enterprises and power retailers, but also is directly related to the electricity consumption costs of power consumers. Therefore, how to improve the accuracy of power spot price prediction and predict a relatively accurate power spot price has a great impact on power spot trading.
[0076] The particularity of the power market lies in that the supply and demand must be balanced in real - time, and there are capacity limitations in the transmission network. Therefore, in addition to reflecting the supply - demand matching, the electricity price also needs to reflect the spatio - temporal value of the power generation capacity.
[0077] Among them, in the process of quotation and market clearing, first of all, the quotation curves of power generation units (i.e., power plants) form the total supply curve (i.e., the total power supply). All power generation units that are not preferentially absorbed (i.e., most thermal power units) submit quotation curves before the settlement date, describing the willing quotations corresponding to different power generation amounts. To ensure the existence of the market clearing result, the power dispatching center requires that the quotation curves of power generation units show a horizontal or stepped upward trend. The power dispatching center aggregates the quotation curves of all power generation units to obtain the market total supply curve (i.e., the total power supply). Secondly, after deducting the preferentially absorbed power from the electricity demand of electricity-consuming entities, the remaining electricity demand is formed. Specifically, the electricity retailer or electricity user declares the expected electricity consumption, and the power dispatching center deducts the power generation amounts of three types of preferentially absorbed power sources from the declared total demand, including: Type A power sources (such as non-dispatchable power sources like wind power, photovoltaic power, and biomass), power sources dispatched by the local power dispatching (power sources dispatched by the prefecture-level city power company), and power sources transmitted from the west to the east, and deducts the electricity transmitted to the designated area to calculate the remaining electricity demand (i.e., the B-type space capacity). Finally, the equilibrium price (i.e., the electricity spot price) is determined through market clearing. The power dispatching center aims to maximize social welfare, matches the market total supply curve and the remaining electricity demand, and determines the start-stop plans and power generation plans of each power generation unit.
[0078] Based on this, in an exemplary embodiment, as Figure 1 shown, a method for predicting the electricity spot price is provided. This method can be applied to computer devices, where the computer device can be a server or a terminal device. In this embodiment, the method includes the following steps:
[0079] S101, determine the first window period and the second window period of the current period according to the demand window period and the supply window period of the historical same period corresponding to the current period.
[0080] Among them, the power supply prediction result of the historical same period predicted based on the supply window period satisfies the supply prediction condition with the actual value of the power supply in the historical same period, and the remaining electricity demand prediction result of the historical same period predicted based on the demand window period satisfies the demand prediction condition with the actual value of the remaining electricity demand in the historical same period.
[0081] In this embodiment, the electricity spot price of the current period can be predicted by predicting the remaining electricity demand and power supply of the current period. Among them, in this embodiment, the predicted power supply of the current period refers to: in the power market, after deducting the power generation amounts of the above-mentioned preferentially absorbed power sources, the part of the power supply that competes among power plants, which can be understood as: the remaining electricity amount after deducting the power generation amounts of the above-mentioned preferentially absorbed power sources from the total power demand of electricity-consuming entities in the current period.
[0082] Generally, when making data predictions, historical data is used to predict future data. Thus, in this embodiment, the historical data within a certain time range before the current period can be used to predict the electricity spot price of the current period. Therefore, it is necessary to determine the time range that is before the current period and is used to predict the electricity spot price of the current period.
[0083] To determine this time range, first, the historical corresponding period of the current period can be determined. Among them, the so-called historical corresponding period refers to the period in the historical cycle of the current period's cycle that is the same as the current period. For example, if the current period is April 2025, the historical corresponding period of the current period can be April 2024, April 2023, or April 2022, etc.
[0084] In some alternative embodiments, the historical corresponding period of the current period in this application is the period in the previous historical cycle of the current period's cycle that is the same as the current period. That is, assuming the current period is April 2025, the historical corresponding period is April 2024.
[0085] After that, the supply window period and the demand window period of the above historical corresponding period can be determined. Among them, the above supply window period and demand window period are respectively the time ranges composed of multiple consecutive periods before the above historical corresponding period. For example, assuming the current period is April 2025 and the historical corresponding period is April 2024, the above supply window period and demand window period are respectively multiple consecutive months between April 2023 and March 2024. For example, the supply window period is from December 2023 to March 2024, and the demand window period is from January 2024 to March 2024.
[0086] It should be noted that in this embodiment, when predicting the electricity spot price of the current period, due to the lack of specific power unit quotation data and the difficulty in predicting the future quotations of power units, it is assumed that the power supply remains unchanged within each period. Thus, the above supply window period can be determined by using methods such as the grid search method with the help of the high-frequency equilibrium data of the day-ahead market. And because of the high rigidity of power demand, the remaining power demand can be directly regarded as the result of subtracting the preferentially absorbed electricity from the total power demand. Thus, the problem of "error accumulation" caused by the possible introduction of additional errors when estimating the total power demand and the preferentially absorbed electricity separately can be effectively avoided. In this embodiment, the above demand window period can also be determined by using methods such as the grid search method based on the high-frequency equilibrium data of the day-ahead market.
[0087] For example, it is possible to search within a time range that is before the above historical same - period time period, closest to the above historical same - period time period, and has the same cycle duration as the above historical same - period time period, in order to determine the supply window period and the demand window period of the above historical same - period time period.
[0088] It can be understood that the actual value of the power supply and the actual value of the remaining power demand during the above historical same - period time period are known, and the actual values of the supply parameters and the actual values of the demand parameters within the time range to which the above supply window period and demand window period belong are also known. Furthermore, based on the actual values of the supply parameters determined from within the above time range, the power supply during the above historical same - period time period can be predicted, and based on the actual values of the demand parameters determined from within the above time range, the remaining power demand during the above historical same - period time period can be predicted. Since the predicted results of the power supply and the predicted results of the remaining power demand obtained from different window periods can be different. Therefore, the supply window period can be determined according to the difference between the actual value of the power supply during the above historical same - period time period and the predicted result of the power supply during the above historical same - period time period, and the demand window period can be determined according to the difference between the actual value of the remaining power demand during the above historical same - period time period and the predicted result of the remaining power demand during the above historical same - period time period.
[0089] Optionally, the predicted result of the power supply during the historical same - period time period predicted based on the actual value of the supply parameters of the supply window period satisfies the supply prediction condition with the actual value of the power supply during the historical same - period time period. For example, the difference between the predicted result of the power supply during the above historical same - period time period and the actual value of the power supply is the smallest, etc. The predicted result of the remaining power demand during the historical same - period time period predicted based on the actual value of the demand parameters of the demand window period satisfies the demand prediction condition with the actual value of the remaining power demand during the historical same - period time period. For example, the difference between the predicted result of the remaining power demand during the above historical same - period time period and the actual value of the remaining power demand is the smallest, etc.
[0090] Since the current time period and the corresponding historical same - period time period are the same - period time periods within different cycles, the factors affecting power supply and remaining power demand, such as natural conditions, economic variables, and physical constraints, are relatively close between the two. Therefore, in the case where the supply window period and the demand window period of the above historical same - period time period are determined, the first window period and the second window period of the current time period can be determined according to the above demand window period and supply window period.
[0091] Among them, the above first window period and second window period are respectively time ranges composed of multiple consecutive time periods between the current time periods, and the first window period can be the same - period time period of the above demand window period. Correspondingly, the second window period can be the same - period time period of the above supply window period.
[0092] The first window period is used to predict the remaining power demand in the current period, and the second window period is used to predict the power supply in the current period.
[0093] Optionally, the first window period and the second window period of the current period can be determined in a time range that is located before the current period, is closest to the current period, and has the same cycle length as the current period. For example, assuming that the current period is April 2025, the historical period is April 2024, and the demand window period is December 2023 to March 2024 within the time range of April 2023 to March 2024, and the supply window period is January 2024 to March 2024 within the time range of April 2023 to March 2024. Then the first window period is December 2024 to March 2025 within the time range of April 2024 to March 2025, and the second window period is January 2025 to March 2025 within the time range of April 2024 to March 2025.
[0094] S102, obtaining historical demand parameters of a first window period and historical supply parameters of a second window period.
[0095] After determining the first window period and the second window period, the historical demand parameters of the first window period and the historical supply parameters of the second window period can be further obtained. Since the historical demand parameters of the first window period and the historical supply parameters of the second window period are known, the historical demand parameters and historical supply parameters can be obtained by network search, resource query, etc.
[0096] Among them, complex economic factors, climate factors, market factors, etc. will affect the surplus demand for electricity, so factors affecting the surplus demand for electricity can be selected as demand parameters. Optionally, as shown in Table 1 below, the specific content of the demand parameters.
[0097] Table 1 Specific content of demand parameters
[0098] Parameter type Specific parameter Physical constraint Unit maintenance, standby, must-run and must-stop, line maintenance, installed capacity Price data Balancing electricity price, natural gas price, national carbon market price, coal price Macroeconomy Year-on-year growth rate of industrial added value, CPI, M2 growth rate, fixed asset investment growth rate, balance of RMB loans, unemployment rate Natural conditions Temperature, wind speed, humidity Time variable Year, month, day of the week, hour, legal holiday, make-up holiday
[0099] Among them, the above-mentioned CPI is the abbreviation of Consumer Price Index, and M2 is the abbreviation of Broadmeasure of money supply.
[0100] Correspondingly, complex economic factors, climate factors, market factors, etc. will also affect the power supply, so factors affecting the power supply can be selected as supply parameters. Optionally, as shown in Table 2 below, the specific content of the supply parameters.
[0101] Table 2 Specific contents of supply parameters
[0102]
[0103]
[0104] Among them, UPS is the abbreviation of Unified Settlement Point (the unified settlement point on the user side).
[0105] S103, input the historical demand parameters into the demand forecasting model to obtain the predicted result of the remaining electricity demand in the current period, and, based on the historical supply parameters, determine the predicted result of the electricity supply in the current period.
[0106] After obtaining the historical demand parameters of the first window period and the historical supply parameters of the second window period, it is possible to predict the remaining electricity demand in the current period based on the historical demand parameters of the first window period, and predict the electricity supply in the current period based on the historical supply parameters of the second window period.
[0107] Among them, the demand forecasting model is trained with demand parameters as input and the remaining electricity demand as the label. Therefore, the above historical demand parameters can be input into the demand forecasting model to obtain the predicted result output by the demand forecasting model, and this predicted result is the predicted result of the remaining electricity demand in the current period.
[0108] And, based on the above historical supply parameters, determine the predicted result of the electricity supply in the current period. Among them, the essence of the above predicted result of the electricity supply in the current period is the corresponding relationship between the electricity supply volume and the electricity spot price in the current period.
[0109] Optionally, since the above predicted result of the electricity supply in the current period can be represented by a curve showing the corresponding relationship between the electricity supply volume and the electricity spot price in the current period, therefore, the above predicted result of the electricity supply in the current period can also be called the electricity supply curve in the current period.
[0110] For example, as Figure 2 shown, it is a schematic diagram of the electricity spot price forecasting process in an exemplary embodiment. Among them, Figure 2 the abscissa Q of the shown coordinate system represents the electricity supply volume, the ordinate P represents the electricity spot price, and Figure 2 the shown monthly total supply curve is the predicted result of the electricity supply in the current period when the current period duration is a natural month. Among them, according to the above electricity supply curve, the electricity spot price corresponding to different electricity supply volumes in the current period can be determined, and the changing trend of this electricity supply curve represents the changing trend of the electricity spot price with the change of the electricity supply volume in the current period.
[0111] S104, determining a target prediction result of the electricity spot price in the current period based on the electricity surplus demand prediction result and the electricity supply prediction result in the current period.
[0112] In this embodiment, when predicting the spot price of electricity in the current period, it is assumed that the electricity spot market is balanced, that is, the surplus electricity demand in the current period matches the electricity supply. Therefore, after obtaining the above-mentioned surplus electricity demand forecast result and the electricity supply forecast result for the current period, the above-mentioned surplus electricity demand forecast result and the electricity supply forecast result can be combined to solve the target forecast result of the electricity spot price in the current period, which can also be called the target forecast result of the equilibrium spot price of electricity in the current period.
[0113] Among them, the essence of the above-mentioned power supply forecast result for the current period is the corresponding relationship between the power supply and the power spot price in the current period, and the above-mentioned power surplus demand forecast result for the current period is a certain electricity value. Therefore, in the above-mentioned power supply forecast result for the current period, when the power supply is the power surplus demand forecast result, the power spot price corresponding to the power supply can be determined. Then the above-mentioned determined power spot price is the target forecast result of the power spot equilibrium price for the current period.
[0114] For example, Figure 2 The figure is a schematic diagram of the electricity spot price prediction process in an exemplary embodiment. The horizontal coordinate Q of the coordinate system represents the electricity supply, and the vertical coordinate P represents the electricity spot price. When the current period is a natural month, the intersection of the predicted monthly total supply curve (monthly electricity supply prediction result) and the predicted electricity surplus demand represents the equilibrium of the electricity spot market. The vertical coordinate P of the intersection represents the electricity spot market equilibrium. s That is, the target forecast result of the electricity spot price in the current period is finally determined. Among them, forecasting the surplus demand for electricity refers to forecasting the surplus demand for electricity on a monthly basis.
[0115] Based on this, the electricity spot market can effectively link the power dispatching operation and trading behaviors within the entire system, enabling the electricity spot equilibrium price that changes almost in real time to reflect the supply-demand changes and energy cost fluctuations at different time periods and nodes. Due to excessive fluctuations, the electricity spot market may also bring relatively large risk exposures to participants: First, since the elasticity of electricity demand is small and there are few economical energy storage options, the cyclical characteristics on the electricity consumption side will be transmitted to the electricity price through demand fluctuations, resulting in significant differences in electricity prices between peak and off-peak electricity consumption, different weather conditions, and different months. Second, the electricity spot market will immediately respond to emergencies such as extreme weather, natural disasters, and grid accidents, and it is difficult to avoid the tail risk of electricity spot prices. Finally, the electricity spot price may also be affected by other regulations or impacts. Against this background, predicting the supply-demand situation in the electricity spot market and the resulting market-clearing electricity price (the target prediction result of the electricity spot price) can enable the participants in the electricity spot market to effectively hedge risks.
[0116] In the above electricity spot price prediction method, the remaining electricity demand in the current period is predicted through the historical demand parameters and demand prediction model in the first window period of the current period, and the electricity supply demand in the current period is predicted through the historical supply parameters in the second window period of the current period and the current supply parameters in the current period. Furthermore, based on the remaining electricity demand and electricity supply in the current period obtained from the above predictions, the target prediction result of the electricity spot price in the current period is determined. In the above solution, the electricity supply and demand sides are predicted separately, and the electricity supply and the remaining electricity demand in the current period are estimated, so as to derive the electricity spot price when the electricity supply and the remaining electricity demand are in equilibrium, as the prediction result of the electricity spot price in the current period. In this way, both the demand parameters and the supply parameters are taken into account when predicting the electricity spot price, realizing the relationship fitting between the demand parameters, the supply parameters, and the prediction result, so that this solution can obtain a larger explanation ratio and better extrapolation prediction ability, and improve the accuracy of the electricity spot price prediction.
[0117] Moreover, based on the demand parameters shown in Table 1 and the supply parameters shown in Table 2 above, in some embodiments, machine learning technology can be fully utilized to take various factors in the demand parameters and the supply parameters, such as economic variables, natural conditions, and physical constraints, etc., into account when predicting the electricity spot price, realizing the non-linear relationship fitting between the demand parameters, the supply parameters, and the prediction result respectively, and a larger explanation ratio and better extrapolation prediction ability can be obtained, and the accuracy of the electricity spot price prediction can be improved.
[0118] The obtained target prediction result of the electricity spot price for the current period is an effective estimate of the true electricity spot price in the electricity spot market, but there are still some biases that have not been fully captured. For example, on the electricity supply side, the actual electricity supply curve is not fixed but fluctuates over time, and many factors are difficult to observe or quantify; on the electricity demand side, with the continuous increase in energy storage installed capacity and the gradual entry of new market players, the inelastic assumption of electricity demand is actually challenged, and the increasing proportion of renewable energy generation such as wind power and photovoltaic power generation also requires longer-term weather forecasts; at the market level, factors such as potential market power, collusive bidding and gaming behaviors between supply and demand sides, AI (Artificial Intelligence)-aided trading decisions, and enhanced price inertia caused by increased market maturity may also introduce biases to the estimation result (i.e., the target prediction result); in terms of institutional mechanisms, cross-market market power may lead to extreme price phenomena at certain special time points, which are often not fully captured by conventional estimation methods, further increasing the complexity of electricity spot price forecasting.
[0119] Based on this, in order to further improve the accuracy of the target prediction result of the electricity spot price for the current period obtained by prediction, the above target prediction result can be further "calibrated".
[0120] On the basis of the above embodiments, in an exemplary embodiment, after determining the target prediction result, the target prediction result, the demand parameters of the previous period of the current period, and the actual values of the electricity spot price within a set time period before the current period can also be input into the price calibration model to obtain the final prediction result of the electricity spot price for the current period.
[0121] Since the demand parameters and the electricity spot price before the current period are known, after obtaining the target prediction result of the electricity spot price for the current period, the demand parameters of the previous period and the actual values of the electricity spot price within a set time period before the current period can be further obtained. Then, the above target prediction result, the demand parameters of the previous period, and the actual values of the electricity spot price are input into the price calibration model, and the result output by the price calibration model is the final prediction result of the electricity spot price for the current period.
[0122] Among them, compared with the above demand prediction model, the input data of the price calibration model adds the actual values of the electricity spot price within a set time period before the current period, so that the latest change trend of the electricity spot price can be incorporated into the electricity spot price prediction process. For example, irrational characteristics such as "chasing the rise and selling on the fall" that may exist in the electricity spot market.
[0123] For example, the actual value of the electricity spot price within a set time period before the current time period described above can be the actual value of the electricity spot price that is before the current time period, closest to the current time period, and has a duration of 336 hours over 14 days. Among them, the selection of the 14-day time length is based on the experience and observation of the operation of the electricity spot market. It includes two complete electricity spot market pricing cycles (7 days), that is, it can better capture the short-term trend fluctuations of the electricity spot market without being misled by individual short-term fluctuations, and it will not weaken the sensitivity to the latest market dynamics.
[0124] Optionally, in this embodiment, when calibrating the target prediction result of the electricity spot price for the current time period using the above price calibration model, the model input data of the price calibration model can be as shown in Table 3 below.
[0125] Table 3 Model Input Data of the Price Calibration Model
[0126]
[0127] Based on this embodiment, optionally, as Figure 2 shown, when the current time period is a natural month, it is a schematic flowchart of a method for predicting the electricity spot price. Among them, the following steps are included:
[0128] The first step: Predict the monthly total supply curve. Among them, the optimal time window (supply window period) for prediction is locked through the grid search method, and the generalized method of moments is used to estimate the total supply curve.
[0129] The second step: Predict the electricity residual demand (type B space capacity competed by power generation units). Among them, the prediction of the electricity residual demand in the second step refers to the prediction of the monthly electricity residual demand. After the demand of electricity users is deducted from the preferentially absorbed electricity, the residual demand (electricity residual demand) is formed. Electricity users report quantities without reporting prices, and the demand is inelastic; the mutual influence of multi-dimensional factors is used in the machine learning step.
[0130] The third step: Market clearing to obtain the equilibrium spot market price prediction P s (the target prediction result of the electricity spot price for the current time period).
[0131] The fourth step: Calibrate potential biases. Among them, input the historical true electricity price (the actual value of the electricity spot price within a set time period before the previous time period of the current time period), and retrain the XGBoost (extreme gradient boosting algorithm) model to obtain the final electricity price prediction (determine the final prediction result of the electricity spot price for the current time period based on the actual value of the electricity spot price within a set time period before the current time period).
[0132] In this embodiment, calibrating the target prediction result of the electricity spot price in the current period using the price calibration model can fully consider the impact of the deviation that has not been fully captured in the prediction process of the above target prediction result on the prediction of the electricity spot price in the current period, and improve the accuracy of the final prediction result of the electricity spot price in the current period obtained.
[0133] Based on the above embodiment, in an exemplary embodiment, the training method of the price calibration model is refined. Optionally, the following steps may be included:
[0134] Step 1: Determine the previous period as the new current period, and return to execute the step of determining the first window period and the second window period of the current period according to the demand window period and the supply window period of the historical same-period period corresponding to the current period, so as to obtain the target prediction result of the electricity spot price in the previous period.
[0135] In this embodiment, the previous period of the current period can be determined as the new current period, and then the target prediction result of the electricity spot price in the previous period can be predicted using the electricity spot price prediction method in the above embodiment.
[0136] For example, if the current period is April 2025, then the previous period of the current period is March 2025. Thus, the target prediction result of the electricity spot price in March 2025 can be predicted using the electricity spot price prediction method in the above embodiment.
[0137] It should be noted that the prediction process of the target prediction result of the electricity spot price in the previous period of the current period is similar to the prediction process of the target prediction result of the electricity spot price in the current period, and will not be elaborated here.
[0138] Step 2: Use the target prediction result of the electricity spot price in the previous period, the demand parameters of the specified period, and the actual values of the electricity spot prices within the set duration before the previous period as inputs, and use the actual value of the electricity spot price in the previous period as the label to train the preset model to obtain the price calibration model. The specified period is the previous period of the previous period.
[0139] In this embodiment, for the convenience of description, the previous period of the previous period of the current period can be referred to as the specified period. For example, if the current period is April 2025, then the previous period of the current period is March 2025, and further, the specified period is February 2025.
[0140] In this way, after obtaining the target prediction result of the electricity spot price in the previous period of the current period, since the demand parameters and electricity spot price before the current period are known, the demand parameters for a specified period can be obtained, and the actual values of the electricity spot price within a set duration before the previous period, as well as the actual value of the electricity spot price in the previous period, can be obtained. Furthermore, the target prediction result of the electricity spot price in the previous period, the demand parameters for the specified period, and the actual values of the electricity spot price within the set duration before the previous period can be used as inputs, and the actual value of the electricity spot price in the previous period can be used as a label to train the preset model.
[0141] Among them, during the training process of the above-mentioned preset model, the preset model will learn the correspondence between the target prediction result of the electricity spot price in the previous period, the demand parameters for the specified period, and the actual values of the electricity spot price within the set duration before the previous period, and the actual value of the electricity spot price in the previous period, establish a calibration method for calibrating the target prediction result of the electricity spot price in the previous period based on the demand parameters for the specified period and the actual values of the electricity spot price within the set duration before the previous period, and through parameter adjustment, make the calibrated target prediction result of the electricity spot price in the previous period gradually approach the actual value of the electricity spot price in the previous period until the loss value between the two meets the preset loss value condition. For example, the loss value between the two is less than the preset threshold, and a price calibration model is obtained.
[0142] In this way, when using the price calibration model to calibrate the target prediction result of the electricity spot price in the current period, the price calibration model can calibrate the target prediction result of the electricity spot price in the current period based on the established calibration method, the demand parameters of the previous period of the current period, and the actual values of the electricity spot price within the set duration before the current period, so as to obtain the final prediction result of the electricity spot price in the current period, thereby improving the accuracy of the above-mentioned final prediction result.
[0143] Based on the above embodiments, in an exemplary embodiment, as Figure 3 shown, the training method of the demand prediction model in S103 above is further refined. Optionally, it may include the following steps:
[0144] S301, obtain the demand parameters for each period within the historical time range before the historical same-period period, and the actual value of the electricity remaining demand in the historical same-period period.
[0145] In this embodiment, since the demand parameters and the actual power surplus demand values for each period before the current period are known, the historical time range before the historical same - period can be determined first. Then, according to the period - division method of the current period, the above - mentioned historical time range can be divided into each period. After that, the demand parameters for each period within the above - mentioned historical time range and the actual power surplus demand value of the historical same - period can be obtained.
[0146] Optionally, the above - mentioned historical time range can be the time range that is before the above - mentioned historical same - period, closest to the above - mentioned historical same - period, and has the same cycle duration as the above - mentioned historical same - period.
[0147] For example, assume that the current period is April 2025 and the historical same - period is April 2024. Then the above - mentioned historical time range is from April 2023 to March 2024, and each period within the above - mentioned historical time range is a natural month.
[0148] Optionally, if the current period is one month, then each period within the historical time range before the historical same - period is: each month within the historical time range before the historical same - period.
[0149] S302. Determine multiple first candidate window periods from the historical time range.
[0150] Wherein, each first candidate window period includes multiple consecutive periods, and the periods included in different first candidate window periods are not completely the same.
[0151] As mentioned above, since the above - mentioned historical time range is divided into each period, multiple consecutive periods can be divided into a window period as a candidate window period for the demand window period. Thus, multiple first candidate window periods are obtained, and the periods included in different first candidate window periods are not completely the same. In this way, multiple first candidate window periods can be determined from the historical time range.
[0152] For example, if the above - mentioned historical time range is divided into N periods numbered 1 - N in ascending order of time, then the periods 1 - 2, 1 - 3... 1 - N, 2 - 3, 2 - 4... 2 - N, 3 - 4... (N - 1) - N can be respectively determined as a first candidate window period, obtaining first candidate window periods. Wherein, N is a positive integer not less than 2.
[0153] Of course, in some cases, at least two window periods can also be selected from the window periods that can be formed within the above - mentioned historical time range as the first candidate window periods.
[0154] S303. Use the demand parameters of each first candidate window period as input and the actual value of the remaining electricity demand in the historical same period as the label to train a preset model to obtain a demand prediction model.
[0155] The demand parameters of each first candidate window period are the demand parameters of each time period included in the first candidate window period. After determining multiple first candidate window periods, the preset model can be trained with the demand parameters of each first candidate window period as input and the actual value of the remaining electricity demand in the historical same period as the label.
[0156] Among them, in the training process of the above preset model, the preset model will learn the relationship between the demand parameters of each first candidate window period and the actual value of the remaining electricity demand in the historical same period, establish a prediction method for predicting the remaining electricity demand in the historical same period based on the demand parameters of each first candidate window period, and through parameter adjustment, make the predicted result of the remaining electricity demand in the historical same period gradually approach the actual value of the remaining electricity demand in the historical same period until the loss value between the two meets the preset loss value condition. For example, the loss value between the two is less than the preset threshold, and a demand prediction model is obtained.
[0157] In this way, in the above embodiments, the demand prediction model can, according to the prediction method for predicting the remaining electricity demand established above, predict the predicted result of the remaining electricity demand in the current period based on the demand parameters of the first window period, and improve the accuracy of the target prediction result of the spot electricity price in the current period predicted by using the predicted result of the remaining electricity demand in the current period.
[0158] Among them, the estimation of the remaining electricity demand involves complex economic factors, climate factors, market factors, etc. There may be complex non-linear and potential causal relationships among these factors. Machine learning models (such as random forest, extreme gradient boosting model, etc.) can automatically capture the mutual influence of these complex factors through a large amount of training data, break the limitations of the function forms (such as linear or log-linear models) artificially set by traditional econometric models, and generate more explanatory and higher-precision prediction models. Machine learning methods can also make full use of the rich high-frequency trading data in the electricity spot market, obtain good extrapolation prediction ability through the learning of a large number of samples and features, and avoid the problem of overfitting easily generated by traditional statistical methods under small samples.
[0159] Based on this, in this embodiment, when training the above demand prediction model, the model input data can be selected first, that is, the sample data (demand parameters) and labels (actual values of the remaining electricity demand) used for model training are selected. Then, the optimal machine learning method is selected, that is, the model type of the preset model is selected.
[0160] Optionally, the demand parameters shown in Table 1 above can be selected as sample data, and the actual value of the electricity residual demand in the same historical period can be selected as the label. Then, the model input data of the demand prediction model is shown in Table 4 below.
[0161] Table 4 Model Input Data of the Demand Prediction Model
[0162] Data type Specific data Power quantity data Actual value of electricity residual demand in the historical same period Physical constraint Unit maintenance, standby, must-run and must-stop, line maintenance, installed capacity Price data Balancing electricity price, natural gas price, national carbon market price, coal price Macroeconomy Year-on-year growth rate of industrial added value, CPI, M2 growth rate, fixed asset investment growth rate, balance of RMB loans, unemployment rate Natural conditions Temperature, wind speed, humidity Time variable Year, month, day of the week, hour, legal holiday, make-up holiday
[0163] Among them, the model input data in Table 4 above is available when predicting the electricity spot price in the current period. In the process of selecting the above model input data, more attention is paid to the correlation rather than the causality of the above model input data with the electricity residual demand. Thus, the demand prediction model can be constructed more flexibly, and at the same time, the strict requirements for the relationship between model input data in traditional statistical methods are avoided.
[0164] Optionally, the extreme gradient boosting model can be selected as the above preset model to train the above demand prediction model. Among them, the extreme gradient boosting model performs excellently in dealing with non-linear relationships, the efficiency when the data scale is large, and preventing overfitting, and is suitable for the prediction requirements of this embodiment.
[0165] Taking the current period as an example of month M in year Y, and the same historical period as month M in year Y - 1, assume that the historical time range before the same historical period is from month M in year Y - 2 to month M - 1 in year Y - 1. Then, the training process of the above demand prediction model includes:
[0166] 1) Obtain the demand parameters for each month from month M in year Y - 2 to month M - 1 in year Y - 1 to obtain the parameter set D Y-2 , and the actual value of the electricity residual demand in month M in year Y - 1.
[0167] 2) Construct a set containing all consecutive months from the i-th month to the j-th month in the period from month M in year Y - 2 to month M - 1 in year Y - 1 That is, from the historical time range, multiple first candidate windows are determined. Among them, refers to the first candidate window composed of the i-th month to the j-th month from month M in year Y - 2 to month M - 1 in year Y - 1. For example, when i = 1 and j = 2, refers to the first candidate window composed of two months from month M in year Y - 2 to month M + 1 in year Y - 2. Then, each element in the set is a first candidate window.
[0168] 3) Traverse the above set For each Using the demand parameters as input and the actual value of the remaining electricity demand in month M of year Y-1 as the label, the demand prediction model is trained using the Extreme Gradient Boosting model in combination with the cross-validation method.
[0169] Among them, the Extreme Gradient Boosting algorithm (XGBoost) is an enhanced algorithm based on the Gradient Boosting Decision Tree (GBDT). When training the XGBoost model, new weak learners (decision trees) are continuously constructed to correct the errors of the previous model. Its core idea is to minimize the loss function and optimize the prediction effect. When initializing the XGBoost model, key parameters need to be set, such as:
[0170] 1) Model structure parameters max_depth (maximum depth) and n_estimators (number of iterations). Among them, max_depth is used to control the maximum depth of each decision tree. A larger depth can learn complex relationships but may lead to overfitting; n_estimators is used to indicate the number of trees. A larger value can improve the fitting ability but has a higher computational cost.
[0171] 2) Learning rate parameter learning_rate, which is used to control the influence of each iteration on the model. A smaller value can improve the generalization ability of the model but requires more iterations.
[0172] 3) Regularization parameters subsample (subsample ratio) and colsample_bytree (feature sampling rate). Among them, subsample is used to randomly select part of the data during each training, which helps to reduce the risk of overfitting; colsample_bytree is used to control the number of features used when training each tree to avoid over-reliance on certain features.
[0173] When training an XGBoost model, cross-validation is required. The purpose of cross-validation is to improve the stability of the model and prevent overfitting or underfitting. Its basic idea is to split the training set and validation set multiple times to evaluate the average performance of the model. Among them, the commonly used cross-validation methods include K-fold cross-validation. The specific steps are as follows: First, perform data partitioning. Divide the training data set into K data subsets. Each time, select K-1 of these data subsets as the training set, and the remaining 1 data subset as the validation set. Then repeat the training K times, each time rotating a different data subset as the validation set, training and evaluating the model. Finally, calculate the average score, taking the average of the validation set performances of the K trainings as the final score of the model. To find the best parameter combination for the XGBoost model, hyperparameter tuning is required. Among them, through the grid search method, traverse multiple parameter combinations, calculate the cross-validation scores of each combination, and select the optimal parameter combination. After determining the optimal parameter combination, use the entire training set to train the final XGBoost model and evaluate its performance on the test set.
[0174] Optionally, the preset model used to train the demand prediction model described above can also be other machine learning methods such as the LASSO (Least Absolute Shrinkage and Selection Operator) model, the Random Forest (RF) model, etc.
[0175] To further improve the prediction accuracy of the above demand prediction model and thus improve the accuracy of the target prediction result of the electricity spot price predicted using the electricity surplus demand prediction result of the current period, after obtaining the demand prediction model, the above demand prediction model can be further adjusted in terms of parameters, with the aim of making the model parameters of the demand prediction model the optimal model parameters and improving its prediction accuracy.
[0176] Based on this, on the basis of the above embodiments, in an exemplary embodiment, as Figure 4 shown, the electricity spot price prediction method may include the following steps:
[0177] S401, adjust the model parameters of the demand prediction model to obtain an adjusted demand prediction model.
[0178] In this embodiment, after training the above demand prediction model, the model parameters of the above demand prediction model can be adjusted to obtain an adjusted demand prediction model.
[0179] Optionally, the adjusted model parameters may include one or more of the following: L1 regularization coefficient, L2 regularization coefficient, learning rate, maximum depth of the tree, minimum loss reduction required for splitting a node, sample sampling ratio during training of each tree, and feature ratio used during training of each tree.
[0180] Among them, the L1 regularization coefficient is used to control the model complexity and avoid overfitting; the L2 regularization coefficient is used to control large parameter updates and enhance the model robustness; the learning rate is used to adjust the step size of model updates; the maximum depth of the tree is used to control the model complexity and avoid overfitting; the minimum loss reduction required for splitting a node is used to ensure the effectiveness of tree node division; the sample sampling ratio during training of each tree is used to avoid overfitting; the feature ratio used during training of each tree is used to enhance the generalization ability of the model.
[0181] S402: Input the demand parameters in the demand window period into the adjusted demand prediction model to obtain the predicted result of the electricity surplus demand in the historical same period as the adjustment result.
[0182] As described above, the predicted result of the electricity surplus demand in the historical same period predicted based on the demand window period meets the demand prediction condition with the actual value of the electricity surplus demand in the historical same period. Moreover, the first window period for predicting the predicted result of the electricity surplus demand in the current period is determined based on the demand window period. Therefore, when adjusting the parameters of the above demand prediction model, the determined demand window period is not changed. Furthermore, the demand parameters in the demand window period can be input into the adjusted demand prediction model to obtain the predicted result output by the adjusted demand prediction model. This predicted result is the predicted result of the electricity surplus demand in the historical same period. Furthermore, the predicted result of the electricity surplus demand in the historical same period can be used as the adjustment result.
[0183] S403: Based on the difference between the adjustment result and the actual value of the electricity surplus demand in the historical same period, determine whether the adjusted model parameters are the optimal parameters; if so, execute S404; otherwise, return to execute S401.
[0184] S404: Obtain the demand prediction model with the adjustment completed.
[0185] The goal of adjusting the parameters of the above-trained demand prediction model is to improve the prediction accuracy of the adjusted demand prediction model. Therefore, it is expected that the above adjustment result is as close as possible to the actual value of the electricity surplus demand in the historical same period. Based on this, it is possible to determine whether the above-adjusted model parameters are the optimal parameters based on the difference between the adjustment result and the actual value of the electricity surplus demand in the historical same period.
[0186] Optionally, the root mean square error between the above adjustment result and the actual value of the electricity surplus demand in the historical same period can be determined. If the determined root mean square error is less than the preset root mean square error threshold, the above-adjusted model parameters can be determined as the optimal parameters; otherwise, it can be determined that the above-adjusted model parameters are not the optimal parameters.
[0187] Optionally, the difference between the above adjustment result and the actual value of the electricity surplus demand in the historical same period can be determined. If the determined difference is less than the preset difference threshold, the above-adjusted model parameters can be determined as the optimal parameters; otherwise, it can be determined that the above-adjusted model parameters are not the optimal parameters.
[0188] Among them, in the case where it is determined that the above-adjusted model parameters are the optimal parameters, it can be stated that the prediction accuracy of the above-adjusted demand prediction model meets the expected prediction requirements, and there is no need to continue parameter adjustment, and the adjusted demand prediction model is obtained.
[0189] Correspondingly, in the case where it is determined that the above-adjusted model parameters are not the optimal parameters, it can be stated that the prediction accuracy of the above-adjusted demand prediction model has not yet met the expected prediction requirements, and parameter adjustment needs to be continued. Then, return to execute S401 above to adjust the model parameters of the demand prediction model again.
[0190] In this way, through continuous iterative optimization of the model parameters of the demand prediction model, the final demand prediction model can be constructed, and the final demand prediction model has high prediction accuracy.
[0191] S405. Determine the first window period and the second window period of the current period according to the demand window period and the supply window period of the historical same period corresponding to the current period.
[0192] S406. Obtain the historical demand parameters of the first window period and the historical supply parameters of the second window period.
[0193] S407. Input the historical demand parameters into the adjusted demand prediction model to obtain the predicted result of the electricity surplus demand in the current period. And, determine the predicted result of the electricity supply in the current period according to the historical supply parameters and the current supply parameters in the current period.
[0194] In this embodiment, after obtaining the above-adjusted demand prediction model, when predicting the predicted result of the electricity surplus demand in the current period, the historical demand parameters of the above first window period can be input into the adjusted demand prediction model to obtain the predicted result output by the adjusted demand prediction model, and this predicted result is the predicted result of the electricity surplus demand in the current period.
[0195] S408. Based on the predicted results of the electricity surplus demand and the electricity supply for the current period, determine the target predicted result of the electricity spot price for the current period.
[0196] It can be understood that, compared with the above-mentioned demand prediction model obtained through training, the adjusted demand prediction model has higher prediction accuracy. Therefore, the accuracy of the predicted result of the electricity surplus demand for the current period finally obtained can be improved. Furthermore, the accuracy of the target predicted result of the electricity spot price for the current period predicted by using the predicted result of the electricity surplus demand for the current period can be improved.
[0197] Based on the above-mentioned embodiments, in an exemplary embodiment, the method for determining the demand window period in S101 is refined. Optionally, as Figure 5 shown, it may include the following steps:
[0198] S501. For each candidate window period, input the demand parameters of the first candidate window period into the demand prediction model to obtain the predicted result of the demand for the first candidate window period.
[0199] As described above, multiple first candidate window periods can be determined from the historical time range before the historical same period, and the demand parameters for each first candidate window period can be obtained.
[0200] In this embodiment, after training the above-mentioned demand prediction model, for each candidate window period, the demand parameters of the first candidate window period can be input into the above-mentioned demand prediction model, and the predicted result output by the above-mentioned demand prediction model can be obtained. Then, this predicted result is the predicted result of the electricity surplus demand for the historical same period predicted based on the demand parameters of the first candidate window period. Furthermore, this predicted result can be used as the predicted result of the demand for the first candidate window period.
[0201] S502. Respectively determine the root mean square error between the predicted result of the demand for each first candidate window period and the actual value of the electricity surplus demand for the historical same period.
[0202] Since the predicted result of the electricity surplus demand for the historical same period predicted based on the demand window period satisfies the demand prediction condition with the actual value of the electricity surplus demand for the historical same period, the root mean square error can be used as the judgment basis for whether the demand prediction condition is satisfied. Then, for each first candidate window period, the root mean square error (RMSE, Root Mean Squared Error) between the predicted result of the demand for the first candidate window period and the actual value of the electricity surplus demand for the historical same period can be determined, and the calculated above-mentioned root mean square error is used as the root mean square error corresponding to the first candidate window period.
[0203] S503. Determine the first candidate window period corresponding to the minimum root mean square error as the demand window period for the historical same period.
[0204] If the above demand prediction condition is preset to minimize the root mean square error, then the first candidate window period corresponding to the minimum root mean square error can be determined as the demand window period for the historical same period.
[0205] In this embodiment, since the root mean square error between the predicted result of the remaining power demand for the historical same period determined by the determined demand window period and the actual value of the remaining power demand for the historical same period is the smallest, among the above multiple first candidate window periods, the predicted result of the remaining power demand for the historical same period determined based on the demand parameters of the demand window period is closest to the actual value of the remaining power demand for the historical same period, that is, the accuracy of the predicted result of the remaining power demand for the historical same period determined based on the demand parameters of the demand window period is the highest. Therefore, the first candidate window period corresponding to the minimum root mean square error is determined as the demand window period for the historical same period, and the above first window period is determined according to the demand window period. Thus, the predicted result of the remaining power demand for the current period predicted based on the demand parameters of the above first window period can have a relatively high accuracy, and thus, the accuracy of the target predicted result of the current period's electricity spot price predicted using the predicted result of the remaining power demand for the current period can be improved.
[0206] Based on the above embodiments, in an exemplary embodiment, the determination method of the supply window period in S101 is refined. Optionally, as Figure 6 shown, the following steps may be included:
[0207] S601. Obtain the supply parameters for the historical same period, the supply parameters for each period within the historical time range before the historical same period, and the actual power supply value for the historical same period.
[0208] In this embodiment, since the supply parameters and the actual power supply values for each period before the current period are known, the historical time range before the historical same period can be determined first. Then, according to the time division method of the current period, the above historical time range can be divided into each period. After that, the supply parameters for the historical same period, the supply parameters for each period within the historical time range, and the actual power supply value for the historical same period can be obtained.
[0209] S602. Determine multiple second candidate window periods from the historical time range.
[0210] Wherein, each second candidate window period includes multiple consecutive periods, and the periods included in different second candidate window periods are not completely the same.
[0211] As described above, if the above historical time range is divided into various time periods, then multiple consecutive time periods can be divided into a window period, serving as a candidate window period for the supply window period. Thus, multiple second candidate window periods are obtained, and the time periods included in different second candidate window periods are not completely the same. In this way, multiple second candidate window periods can be determined from the historical time range.
[0212] For example, if the above historical time range is divided into N time periods from 1 to N in ascending order of time, then time periods 1 - 2, 1 - 3... 1 - N, 2 - 3, 2 - 4... 2 - N, 3 - 4... (N - 1) - N can be respectively determined as a second candidate window period, obtaining a second candidate window period. Among them, N is a positive integer not less than 2.
[0213] Of course, in some cases, at least two window periods can also be selected from the window periods that can be formed within the above historical time range as the second candidate window periods.
[0214] S603. Determine the supply prediction result of each second candidate window period according to the supply prediction formula, the supply parameters of each second candidate window period, and the supply parameters of the historical same - period time periods.
[0215] The supply parameters of each second candidate window period are the supply parameters of the time periods included in this second candidate window period. After determining multiple second candidate window periods, for each second candidate window period, the power supply prediction result of the historical same - period time periods can be determined according to the preset supply prediction formula, the supply parameters of this second candidate window period, and the supply parameters of the historical same - period time periods, serving as the supply prediction result of this second candidate window period.
[0216] Among them, for each second candidate window period, the power supply prediction result of the historical same - period time periods determined according to the preset supply prediction formula, the supply parameters of this second candidate window period, and the supply parameters of the historical same - period time periods is a specific power supply prediction value. That is, the supply prediction result of the second candidate window period is a specific numerical value.
[0217] In an exemplary embodiment, the determination method of the supply prediction result of each second candidate window period in the above S603 is refined. Optionally, it may include the following steps:
[0218] Step 1. For each second candidate window period, solve the parameters of the supply prediction formula according to the supply parameters of the second candidate window period to obtain the prediction formula of the second candidate window period.
[0219] In this embodiment, the preset supply prediction formula includes unknown parameters and variables. Therefore, for each second candidate window period, the supply prediction formula can be solved for parameters according to the supply parameters of the second candidate window period to obtain the parameter values of the unknown parameters in the supply prediction formula. Then, by assigning the parameter values to the supply prediction formula, the prediction formula for the above variables corresponding to the second candidate window period can be obtained as the prediction formula for the second candidate window period.
[0220] Step 2: Use the supply parameters of the historical same period to assign values to the variables in the prediction formula for the second candidate window period to obtain the supply prediction result for the second candidate window period.
[0221] After obtaining the prediction formula for each second candidate window period, for each second candidate window period, the supply parameters of the above historical same period can be used to assign values to the variables in the prediction formula for the second candidate window period, that is, the supply parameters of the historical same period are used as variables and substituted into the prediction formula for the second candidate window period to calculate the calculation result of the prediction formula for the second candidate window period. Then, this calculation result is the power supply prediction result for the historical same period predicted according to the prediction formula for the second candidate window period, and is used as the supply prediction result for the second candidate window period. Among them, the obtained supply prediction result for the second candidate window period is a specific supply prediction value.
[0222] S604: Respectively determine the root mean square error between the supply prediction result of each second candidate window period and the actual power supply value of the historical same period.
[0223] Since the power supply prediction result for the historical same period predicted based on the supply window period satisfies the supply prediction condition with the actual power supply value of the historical same period, the root mean square error can be used as the judgment basis for whether the supply prediction condition is satisfied. Therefore, for each second candidate window period, the root mean square error between the power supply of the second candidate window period and the actual power supply value of the historical same period can be determined, and the calculated root mean square error is used as the root mean square error corresponding to the second candidate window period.
[0224] S605: Determine the second candidate window period corresponding to the minimum root mean square error as the supply window period for the historical same period.
[0225] If the above demand prediction condition is preset as the minimum root mean square error, then the first candidate window period corresponding to the minimum root mean square error can be determined as the demand window period for the historical same period.
[0226] In this embodiment, since the root mean square error between the predicted power supply result of the historical same period determined by the determined supply window period and the actual value of the power supply in the historical same period is the smallest, among the above-mentioned multiple first and second candidate window periods, the predicted power supply result of the historical same period determined based on the supply parameters of the supply window period is closest to the actual value of the power supply in the historical same period. That is, the accuracy of the predicted power supply result of the historical same period determined based on the demand parameters of the supply window period is the highest. Therefore, the second candidate window period corresponding to the smallest root mean square error is determined as the supply window period of the historical same period, and the above-mentioned second window period is determined according to the supply window period. Thus, the predicted power supply result of the current period predicted based on the supply parameters of the above-mentioned second window period can have high accuracy, thereby improving the accuracy of the target prediction result of the current period spot electricity price predicted using the predicted power supply result of the current period.
[0227] In addition, the above-mentioned multiple first candidate window periods and the above-mentioned multiple second window periods may include the same multiple window periods, or may include multiple window periods that are not completely the same. For example, the above-mentioned multiple first candidate window periods and the above-mentioned multiple second window periods include completely different multiple window periods, or among the above-mentioned multiple first candidate window periods and the above-mentioned multiple second window periods, there are some identical window periods and some different window periods.
[0228] Based on this, the determined demand window period and supply window period may be the same or different.
[0229] On the basis of the above embodiment, in an exemplary embodiment, the determination method of the predicted power supply result of the current period in S103 may be to solve the parameters of the supply prediction formula according to the historical supply parameters to obtain the predicted power supply result of the current period.
[0230] Similar to the determination process of the predicted supply result of each of the above-mentioned second candidate window periods, in this implementation, the preset supply prediction formula includes unknown parameters and variables. Then, according to the historical supply parameters of the second window period of the current period, the parameters of the supply prediction formula can be solved to obtain the parameter values of the unknown parameters in the supply prediction formula. Then, using the above parameter values to assign parameters to the above supply prediction formula, the supply prediction formula corresponding to the current period regarding the above variables can be obtained as the predicted power supply result of the current period.
[0231] Thus, in the above embodiments, by adopting the above supply prediction method and combining the historical supply parameters of the second window period in the current period, the power supply in the current period can be predicted. Considering that the second window period in the current period is determined based on the supply window period of the corresponding historical same period in the current period, and the power supply prediction result of the above historical same period predicted based on the above supply window period meets the supply prediction condition with the actual value of the power supply in the above historical same period, therefore, by means of the above historical supply parameters, the accuracy of the obtained power supply prediction result in the current period can be improved. Furthermore, the accuracy of the target prediction result of the current period spot price of electricity predicted by using the power supply prediction result in the current period can be improved.
[0232] Based on the above embodiments, the embodiments of the present application can use the Generalized Method of Moments (GMM) to estimate the power supply curve, that is, use the Generalized Method of Moments to set the above supply prediction formula.
[0233] Among them, the supply prediction formula is shown as formula (1) below.
[0234] θ dh =α*p s,dh +β*cost d +γ*Z d +δ*E m +μ w +μ h +ε (1)
[0235] Among them, θ dh represents the day-ahead market power supply at hour h on day d; p s,dh represents the UPS price in the day-ahead market at hour h on day d; μ w represents the fixed effect of the day of the week, μ h represents the fixed effect of the hour of the day, μ w and μ h are used to match the periodic characteristics of the power supply; ε is a random disturbance term; α, β, γ, and δ are unknown parameters.
[0236] cost d represents the generation cost on day d, which can include at least one of the price of coal per kilowatt-hour and the price of natural gas per kilowatt-hour. Among them, the price of coal per kilowatt-hour represents the price of coal consumed per kilowatt-hour of electricity generation, and the price of natural gas per kilowatt-hour represents the price of natural gas consumed per kilowatt-hour of electricity generation.
[0237] Z dIt represents the clearing boundary control variables of the electricity spot market for d days, which may include at least one of the maintenance capacity of generating units, the positive reserve capacity of the market, the capacity of units that must be in operation, the capacity of units that must be shut down, and the number of congested lines.
[0238] E m It represents the macroeconomic variables in the current period or each second candidate window period, including at least one of the year-on-year growth rate of industrial added value, the consumer price index, the cumulative growth of the completed fixed asset investment, and the year-on-year growth rate of the M2 balance.
[0239] As mentioned above, the electricity spot price is jointly determined by electricity supply and electricity residual demand. Therefore, there is a reverse causality in the above formula (1), and there is an endogeneity problem. Therefore
[0240] Based on this, taking the electricity spot market in a certain region as an example, the temperature (T) and the carbon market quota price in this region (ets_gd) can be selected as instrumental variables. Among them, both the temperature and the carbon market quota price in this region are good instrumental variables, satisfying the independence and correlation assumptions.
[0241] There is a significant correlation between temperature and electricity residual demand, and thus it is also strongly correlated with the UPS price. Generally speaking, rising temperature will lead to an increase in cooling demand in summer and a decrease in heating demand in winter. Some studies have pointed out that after the temperature exceeds 25 degrees Celsius, for every 1-degree Celsius increase, the overall electricity consumption increases by 14.5%. For this region, affected by climate factors, the relationship between temperature and residual demand is mainly dominated by the change in summer cooling demand. According to empirical data, when the temperature in this region reaches above 35 degrees Celsius, for every 1-degree Celsius increase, the corresponding power load will increase by 3 million - 5 million kilowatts. Temperature and electricity supply are relatively independent. This is because temperature mainly affects new energy power generation methods such as photovoltaic power generation. However, in the electricity spot market of this region, the generating units forming the electricity supply curve are mainly thermal power units and gas turbine units, and the power generation capacity is less affected by temperature changes.
[0242] Taking this region as an example, there is also a strong correlation between the carbon market quota price in this region and electricity residual demand. Industrial production enterprises in this region need to participate in the carbon market in this region and purchase quotas, so the quota price has thus become a part of the enterprise production cost. An increase in the quota price will increase the production cost of enterprises and reduce their competitiveness. Therefore, enterprises may reduce production, thereby reducing electricity demand, which is manifested as a decrease in residual demand. The carbon market quota price in this region is relatively independent of electricity supply. The carbon market quota price in this region and electricity supply are independent. This is because thermal power plants participate in the purchase of quotas in the entire global carbon market, and there is no direct price transmission mechanism between the entire global carbon market and the carbon market in this region. Therefore, fluctuations in the quota price will not significantly affect the power generation cost and electricity supply.
[0243] Since the number of instrumental variables is greater than the endogenous variables, overfitting may occur; at the same time, there are potential violations of the spherical disturbance assumption between the observed values. Therefore, using GMM to set the above supply forecast formula can improve the reliability and accuracy of the forecast results of the supply forecast formula. Specifically:
[0244] Taking the current period as M month of Y year as an example, the historical period is M month of Y-1 year, and it is assumed that the historical time range before the historical period is M month of Y-2 year to M-1 month of Y-1 year.
[0245] 1) Obtain the current supply parameters of month M of year Y and the actual power supply value of month M of year Y-1, and obtain the supply parameters of each month from month M of year Y-2 to month M-1 of year Y-1, and obtain the parameter set D Y-2 .
[0246] 2) Construct a set of all consecutive months from month i to month j between month M of year Y-2 and month M-1 of year Y-1 That is, from the historical time range, determine multiple second candidate windows, and then set Each element in is a second candidate window period.
[0247] 3) Traverse the above collection According to each The supply parameters of the above formula (1) are estimated to obtain the parameter values of each parameter in formula (1) {α ij ,β ij ,γ ij ,δ ij} i,j=1,2,……12;i≤j , as each The equation parameters of . Among them, for each The Substituting the equation parameters into the above formula (1), we can get the The prediction formula.
[0248] 4) For each The explanatory variables, instrumental variables and control variables of month M of year Y-1, as well as the Substitute the equation parameters into the above formula (1) to obtain the power supply forecast result for month M of year Y-1. Supply forecast results.
[0249] In the above formula (1), θ dh is the explained variable, p s,dh is the explanatory variable, cost d , Z d and E mAs a control variable, the instrumental variable is an extra variable set to solve the endogeneity problem of the above formula (1). Taking the regional electricity spot market as an example, temperature and the carbon market quota price in this region can be selected as instrumental variables. Specifically, in the first step, a simple linear regression is performed on the explanatory variable using the instrumental variable (the first-stage regression), and the predicted value of the explanatory variable is estimated. In the second step, a simple linear regression is performed on the explained variable again using the predicted value of the explanatory variable (the second-stage regression), and the final estimated coefficient of the explanatory variable is obtained, that is, the final supply prediction result.
[0250] 5) Compare the supply prediction result of each with the actual value of the electricity supply in month M of year Y - 1, and calculate the corresponding root mean square error, denoted as RMSE ij .
[0251] 6) Select the ij one with the smallest RMSE as the supply window period, and denote the starting month and ending month of the supply window period as and By analogy, this is also the second window period for predicting the electricity supply prediction result in month M of year Y.
[0252] 7) According to the set of all consecutive months from month i to month j in month M of year Y - 1 to month M - 1 of year Y in, for the second window period corresponding to month to month estimate the above formula (1) using the supply parameters, and obtain the parameter values {α * , β * , γ * , δ *} of each parameter in formula (1). Furthermore, using the parameter values {α * , β * , γ * , δ *} calculated above, assign values to the parameters of the above formula (1), and then the supply prediction formula for month M of year Y can be obtained, which is used as the electricity supply prediction result for month M of year Y.
[0253] On the basis of the above embodiments, in order to ensure the accuracy of the predicted result of the current-period electricity spot price and make it closer to the real-time trading situation of the current period, when predicting the current-period electricity spot price each time, the demand window period and supply window period of the historical same-period of the current period can be re-determined, and the above demand prediction model and price calibration model can be re-trained.
[0254] Based on this, in an exemplary embodiment, optionally, the electricity spot price prediction method may include the following steps:
[0255] Step 1: Obtain the demand parameters for each time period within the historical time range before the historical same period corresponding to the current time period, and the actual value of the remaining electricity demand in the historical same period.
[0256] Step 2: Determine multiple first candidate window periods from the historical time range.
[0257] Step 3: Use the demand parameters of each first candidate window period as input and the actual value of the remaining electricity demand in the historical same period as the label to train a preset model to obtain a demand prediction model.
[0258] Step 4: For each candidate window period, input the demand parameters of the first candidate window period into the demand prediction model to obtain the demand prediction result of the first candidate window period.
[0259] Step 5: Determine the root mean square error between the demand prediction result of each first candidate window period and the actual value of the remaining electricity demand in the historical same period, respectively.
[0260] Step 6: Determine the first candidate window period corresponding to the minimum root mean square error as the demand window period of the historical same period.
[0261] Step 7: Adjust the model parameters of the demand prediction model to obtain an adjusted demand prediction model.
[0262] Step 8: Input the demand parameters of the demand window period into the adjusted demand prediction model to obtain the predicted result of the remaining electricity demand in the historical same period as the adjustment result.
[0263] Step 9: Based on the difference between the adjustment result and the actual value of the remaining electricity demand in the historical same period, determine whether the adjusted model parameters are the optimal parameters; if so, execute Step 10; otherwise, return to execute Step 7.
[0264] Step 10: Obtain the demand prediction model with the adjustment completed.
[0265] Step 11: Obtain the supply parameters of the historical same period, the supply parameters of each time period within the historical time range before the historical same period, and the actual electricity supply value in the historical same period.
[0266] Step 12: Determine multiple second candidate window periods from the historical time range.
[0267] Step 13: For each second candidate window period, solve the parameters of the supply prediction formula according to the supply parameters of the second candidate window period to obtain the prediction formula of the second candidate window period.
[0268] Step 14: Use the supply parameters of the same historical period to assign values to the variables in the prediction formula for the second candidate window period, and obtain the supply prediction result for the second candidate window period.
[0269] Step 15: Determine the root mean square error between the supply prediction result of each second candidate window period and the actual value of the electricity supply in the same historical period.
[0270] Step 16: Determine the second candidate window period corresponding to the smallest root mean square error as the supply window period of the same historical period.
[0271] Step 17: Determine the first window period and the second window period of the current period according to the demand window period and the supply window period of the same historical period corresponding to the current period.
[0272] Step 18: Obtain the historical demand parameters of the first window period and the historical supply parameters of the second window period.
[0273] Step 19: Input the historical demand parameters into the adjusted demand prediction model to obtain the predicted result of the remaining electricity demand for the current period.
[0274] Step 20: Solve the parameters of the supply prediction formula according to the historical supply parameters to obtain the supply prediction formula for the current period, which is used as the predicted result of the electricity supply for the current period.
[0275] Step 21: Determine the target predicted result of the electricity spot price for the current period based on the predicted result of the remaining electricity demand and the predicted result of the electricity supply for the current period.
[0276] Step 22: Set the previous period as the new current period, and return to execute Step 1 to obtain the target predicted result of the electricity spot price for the previous period.
[0277] Step 23: Use the target predicted result of the electricity spot price for the previous period, the demand parameters for the specified period, and the actual values of the electricity spot prices within the set duration before the previous period as inputs, and use the actual value of the electricity spot price for the previous period as the label to train the preset model to obtain the price calibration model.
[0278] Step 24: Input the target predicted result, the demand parameters of the previous period of the current period, and the actual values of the electricity spot prices within the set duration before the current period into the price calibration model to obtain the final predicted result of the electricity spot price for the current period.
[0279] Next, taking the electricity spot price data in December 2023 in the above regional electricity spot market as representative data, based on the above embodiments, an empirical analysis and numerical simulation are carried out on the solution provided by this application.
[0280] As Figure 7 shown, it is a comparison schematic diagram of the electricity spot price predicted by the solution provided by this application and the real electricity spot price at the monthly level. As Figure 8 shown, it is a comparison schematic diagram of the electricity spot price predicted by the solution provided by this application and the real electricity spot price at the time-of-use level.
[0281] Among them, using the solution provided by this application, the predicted mean result of the electricity spot price is good, showing the same change trend and peak-valley characteristics as the real electricity spot price at both the monthly and time-of-use levels. Analyzing from the monthly average, the predicted mean of 744 hourly electricity spot prices is 482.08 yuan / MWh. Compared with the average price of 503.33 yuan / MWh (megawatt-hour) of the real electricity spot price, there is a slight underestimation deviation of 21.25 yuan / MWh, and the error rate is only about 4.02%.
[0282] Furthermore, taking the monthly futures contract market in December 2023 in the above regional electricity spot market as an example, three scenarios are simulated:
[0283] Scenario 1: The electricity retailer does not sign any futures contracts at all and purchases electricity on demand entirely through the electricity spot market.
[0284] Scenario 2: The electricity retailer predicts the electricity spot market based on a simple ARIMA (Auto Regressive Integrated Moving Average) time series analysis model (not the model provided by this application) and fixedly signs futures contracts at 90.9% of the predicted value of the electricity remaining demand at each moment. The basis for this signing ratio is that in the above regional electricity spot market in 2023, the spot deviation electricity accounts for 9.1% of the total electricity purchased by the direct electricity purchasing users in the market (including electricity retailers with agency electricity purchases and a small number of industrial enterprises directly participating in the electricity spot market). The spot deviation electricity refers to the electricity quantity that needs to be traded in the electricity spot market due to the difference between the electricity quantity signed in the medium- and long-term contracts in the electricity futures market and the actual demand.
[0285] Scenario 3: The electricity retailer uses the solution proposed by this application to predict the electricity remaining demand and the electricity spot price, but still fixedly signs futures contracts at 90.9% of the predicted result of the electricity remaining demand at each moment.
[0286] Define the relative profitability as the profit increment amplitude of other scenarios compared to Scenario 1, that is
[0287]
[0288] Among them, Δπ i represents the definition of the relative profitability of scenario i, π1 represents the profit of scenario 1, and π i represents the profit of scenario i.
[0289] As shown in Table 5 below, the strategy performances of the above three scenarios. Among them, the solution provided by this application can significantly improve the overall profitability of electricity selling enterprises (electricity retailers) in the electricity market. Compared with scenario 1 that does not trade in futures duration, simply introducing the ARIMA time series analysis model to predict the remaining electricity demand can increase the monthly total profit of electricity selling enterprises (electricity retailers) by about 24% (375 million yuan), and the unit profit increases by 9.21 yuan / MWh; further applying the solution provided by this application can expand the monthly total profit increase of electricity selling enterprises (electricity retailers) to about 33% (510 million yuan), and the unit profit increase expands to 12.53 yuan / MWh.
[0290] Table 5 Strategy performances of the above scenarios 1 - 3
[0291]
[0292] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps do not necessarily execute in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily execute at the same moment, but can execute at different moments, and the execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least some of the steps or stages in other steps or other steps.
[0293] Based on the same inventive concept, the embodiments of this application also provide an electricity spot price prediction device for implementing the above-mentioned electricity spot price prediction method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the following electricity spot price prediction device can refer to the limitations on the electricity spot price prediction method in the above text, and will not be repeated here.
[0294] In an exemplary embodiment, as Figure 9As shown in the figure, a device for predicting the spot price of electricity is provided, including: a time determination module 910, a parameter acquisition module 920, a first prediction module 930, and a second prediction module 940, where:
[0295] The time determination module 910 is configured to determine a first window period and a second window period of the current period according to the demand window period and the supply window period of the corresponding historical same period of the current period; wherein, the power supply prediction result of the historical same period predicted based on the supply window period satisfies the supply prediction condition with the actual power supply value of the historical same period, and the predicted result of the remaining power demand of the historical same period predicted based on the demand window period satisfies the demand prediction condition with the actual value of the remaining power demand of the historical same period.
[0296] The parameter acquisition module 920 is configured to acquire the historical demand parameters of the first window period and the historical supply parameters of the second window period.
[0297] The first prediction module 930 is configured to input the historical demand parameters into a demand prediction model to obtain a predicted result of the remaining power demand of the current period, and determine a predicted result of the power supply of the current period according to the historical supply parameters.
[0298] The second prediction module 940 is configured to determine a target prediction result of the spot price of electricity of the current period based on the predicted result of the remaining power demand and the predicted result of the power supply of the current period.
[0299] In an exemplary embodiment, the device for predicting the spot price of electricity further includes: a first training module, configured to acquire the demand parameters of each period within a historical time range before the historical same period, and the actual value of the remaining power demand of the historical same period; determine a plurality of first candidate window periods from the historical time range; wherein, each first candidate window period includes a plurality of consecutive periods, and the periods included in different first candidate window periods are not completely the same; use the demand parameters of each first candidate window period as input, and use the actual value of the remaining power demand of the historical same period as a label to train a preset model to obtain the demand prediction model.
[0300] In an exemplary embodiment, the above device for predicting the spot price of electricity further includes:
[0301] A parameter adjustment module, configured to adjust the model parameters of the demand prediction model to obtain an adjusted demand prediction model;
[0302] A third prediction module, configured to input the demand parameters of the demand window period into the adjusted demand prediction model to obtain a predicted result of the remaining power demand of the historical same period as an adjustment result;
[0303] A parameter judgment module determines whether the adjusted model parameters are optimal parameters based on the difference between the adjustment result and the actual value of the remaining power demand in the same historical period; if so, a demand forecasting model with adjustment completed is obtained; otherwise, a parameter adjustment module is triggered.
[0304] Correspondingly, the first forecasting module 930 is specifically configured to:
[0305] Input the historical demand parameters into the demand forecasting model with adjustment completed to obtain the forecasting result of the remaining power demand in the current period.
[0306] In an exemplary embodiment, the above power spot price forecasting device further includes:
[0307] A fourth forecasting module, for each candidate window period, inputs the demand parameters of the first candidate window period into the demand forecasting model to obtain the demand forecasting result of the first candidate window period;
[0308] A first determination module is used to respectively determine the root mean square error between the demand forecasting result of each first candidate window period and the actual value of the remaining power demand in the same historical period;
[0309] A second determination module is used to determine the first candidate window period corresponding to the minimum root mean square error as the demand window period in the same historical period.
[0310] In an exemplary embodiment, the above power spot price forecasting device further includes:
[0311] A second acquisition module is used to acquire the supply parameters in the same historical period, the supply parameters of each period within the historical time range before the same historical period, and the actual power supply value in the same historical period;
[0312] A second partitioning module is used to determine a plurality of second candidate window periods from the historical time range; wherein, each second candidate window period includes a plurality of consecutive periods, and the periods included in different second candidate window periods are not completely the same;
[0313] A result determination module is used to determine the supply forecasting result of each second candidate window period according to the supply forecasting formula, the supply parameters of each second candidate window period, and the supply parameters in the same historical period;
[0314] A third determination module is used to respectively determine the root mean square error between the supply forecasting result of each second candidate window period and the actual power supply value in the same historical period;
[0315] A fourth determination module is used to determine the second candidate window period corresponding to the minimum root mean square error as the supply window period in the same historical period.
[0316] In an exemplary embodiment, the result determination module is specifically configured to: for each second candidate window period, solve the parameters of the supply prediction formula according to the supply parameters of the second candidate window period to obtain the prediction formula of the second candidate window period; use the supply parameters of the historical same period to assign values to the variables of the prediction formula of the second candidate window period to obtain the supply prediction result of the second candidate window period.
[0317] In an exemplary embodiment, the first prediction module 930 is specifically configured to: solve the parameters of the supply prediction formula according to the historical supply parameters to obtain the power supply prediction result of the current period.
[0318] In an exemplary embodiment, the above power spot price prediction device further includes:
[0319] A price calibration module, configured to input the target prediction result, the demand parameters of the previous period of the current period, and the actual values of the power spot price within a set time period before the current period into the price calibration model to obtain the final prediction result of the power spot price of the current period.
[0320] In an exemplary embodiment, the power spot price prediction device further includes: a second training module, configured to set the previous period as the new current period and trigger the time determination module; use the target prediction result of the power spot price of the previous period, the demand parameters of the specified period, and the actual values of the power spot price within a set time period before the previous period as inputs, and use the actual value of the power spot price of the previous period as a label to train the preset model to obtain the price calibration model; where the specified period is the period before the previous period.
[0321] Each module in the above power spot price prediction device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor in the computer device in the form of hardware or independent of the processor, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0322] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as Figure 10As shown in the figure. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as demand parameters and supply parameters. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a method for predicting electricity spot prices.
[0323] Those skilled in the art can understand that Figure 10 the structure shown in the figure is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0324] In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.
[0325] In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0326] In an embodiment, a computer program product is provided, including a computer program. When the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0327] It should be noted that the information (including but not limited to device information, market information, demand parameters, supply parameters, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0328] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include Read-Only Memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, Resistive Random Access Memory (ReRAM), Magnetoresistive Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene memory, etc. Volatile memory can include Random Access Memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, Artificial Intelligence (AI) processors, etc., without limitation.
[0329] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this application.
[0330] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A method for predicting electricity spot price, characterized in that, The method includes: Determining a first window period and a second window period of the current period according to a demand window period and a supply window period of a historical same-period corresponding to the current period; wherein, a power supply prediction result of the historical same-period predicted based on the supply window period satisfies a supply prediction condition with an actual power supply value of the historical same-period, and a predicted result of the remaining demand for electricity of the historical same-period predicted based on the demand window period satisfies a demand prediction condition with an actual remaining demand value of electricity of the historical same-period; Obtaining a historical demand parameter of the first window period and a historical supply parameter of the second window period; Inputting the historical demand parameter into a demand prediction model to obtain a predicted result of the remaining demand for electricity of the current period, and determining a predicted result of the power supply of the current period according to the historical supply parameter; Determining a target predicted result of the spot price of electricity of the current period based on the predicted result of the remaining demand for electricity and the predicted result of the power supply of the current period; 2. The method according to claim 1, wherein The demand prediction model is trained in the following manner: Obtaining demand parameters of each period within a historical time range before the historical same-period, and an actual value of the remaining demand for electricity of the historical same-period; Determining a plurality of first candidate window periods from the historical time range; wherein each first candidate window period includes a plurality of consecutive periods, and the periods included in different first candidate window periods are not completely the same; Using the demand parameter of each first candidate window period as an input and using the actual value of the remaining demand for electricity of the historical same-period as a label to train a preset model to obtain the demand prediction model; 3. The method according to claim 2, characterized in that, The method further includes: Adjusting model parameters of the demand prediction model to obtain an adjusted demand prediction model; Inputting the demand parameter of the demand window period into the adjusted demand prediction model to obtain a predicted result of the remaining demand for electricity of the historical same-period as an adjustment result; Judging whether the adjusted model parameters are optimal parameters based on a difference between the adjustment result and the actual value of the remaining demand for electricity of the historical same-period; If so, obtaining a demand prediction model with adjustment completed; Otherwise, returning to execute the step of adjusting the model parameters of the demand prediction model; Correspondingly, the step of inputting the historical demand parameter into the demand prediction model to obtain the predicted result of the remaining demand for electricity of the current period includes: Inputting the historical demand parameter into the demand prediction model with adjustment completed to obtain the predicted result of the remaining demand for electricity of the current period; 4. The method according to claim 2 or 3, characterized in that, The method further includes: For each candidate window period, inputting the demand parameter of the first candidate window period into the demand prediction model to obtain a demand prediction result of the first candidate window period; Respectively determining a root mean square error between the demand prediction result of each first candidate window period and the actual value of the remaining demand for electricity of the historical same-period; Determining the first candidate window period corresponding to the minimum root mean square error as the demand window period of the historical same-period; 5. The method according to claim 1, characterized in that, The method further includes: Obtain the supply parameters of the historical same period, the supply parameters of each period within the historical time range before the historical same period, and the actual value of power supply in the historical same period; Determine multiple second candidate window periods from the historical time range; wherein each second candidate window period includes multiple consecutive periods, and the periods included in different second candidate window periods are not completely the same; Determine the supply prediction result of each second candidate window period according to the supply prediction formula, the supply parameters of each second candidate window period, and the supply parameters of the historical same period; Determine the root mean square error between the supply prediction result of each second candidate window period and the actual value of power supply in the historical same period respectively; Determine the second candidate window period corresponding to the minimum root mean square error as the supply window period of the historical same period.
6. The method according to claim 5, characterized in that The determining the supply prediction result of each second candidate window period according to the supply prediction formula, the supply parameters of each second candidate window period, and the supply parameters of the historical same period includes: For each second candidate window period, solve the parameters of the supply prediction formula according to the supply parameters of the second candidate window period to obtain the prediction formula of the second candidate window period; Use the supply parameters of the historical same period to assign values to the variables of the prediction formula of the second candidate window period to obtain the supply prediction result of the second candidate window period.
7. The method according to claim 1, characterized in that, The determining the power supply prediction result of the current period according to the historical supply parameters includes: Solve the parameters of the supply prediction formula according to the historical supply parameters to obtain the power supply prediction result of the current period.
8. The method according to claim 1, wherein The method further includes: Input the target prediction result, the demand parameters of the previous period of the current period, and the actual value of the power spot price within the set duration before the current period into the price calibration model to obtain the final prediction result of the power spot price of the current period.
9. The method according to claim 8, wherein The price calibration model is trained in the following manner: Take the previous period as the new current period, and return to execute the step of determining the first window period and the second window period of the current period according to the demand window period and the supply window period of the historical same period corresponding to the current period, so as to obtain the target prediction result of the power spot price of the previous period; Use the target prediction result of the power spot price of the previous period, the demand parameters of the specified period, and the actual value of the power spot price within the set duration before the previous period as inputs, and use the actual value of the power spot price of the previous period as a label to train a preset model to obtain the price calibration model; wherein the specified period is the period before the previous period.
10. An electricity spot price prediction device, characterized in that, The device includes: A time determination module, configured to determine a first window period and a second window period of the current period according to a demand window period and a supply window period of a historical same-period corresponding to the current period; wherein, a power supply prediction result of the historical same-period predicted based on the supply window period satisfies a supply prediction condition with an actual power supply value of the historical same-period, and a power residual demand prediction result of the historical same-period predicted based on the demand window period satisfies a demand prediction condition with an actual power residual demand value of the historical same-period; A parameter acquisition module, configured to acquire a historical demand parameter of the first window period and a historical supply parameter of the second window period; A first prediction module, configured to input the historical demand parameter into a demand prediction model to obtain a power residual demand prediction result of the current period, and to determine a power supply prediction result of the current period according to the historical supply parameter; A second prediction module, configured to determine a target prediction result of the power spot price of the current period based on the power residual demand prediction result and the power supply prediction result of the current period.