Method and device for predicting electricity price, electronic equipment and computer program product

By selecting the corresponding regression model according to the type of electricity price fluctuation for electricity price prediction and fusing the prediction results of multiple models, the problem of inaccurate prediction of traditional electricity price prediction methods under complex electricity price fluctuation types is solved, and the accuracy of prediction is improved.

CN119990448AInactive Publication Date: 2025-05-13HUANENG CLEAN ENERGY RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510111596.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-05-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional electricity price prediction methods are mostly used for a single electricity price fluctuation type, and cannot effectively deal with complex electricity price fluctuation types, resulting in inaccurate predictions.

Method used

The type of electricity price fluctuation is determined based on the electricity price information on the target date, and the corresponding electricity price prediction regression model is selected based on the type to make predictions. When the electricity price fluctuation type is the first electricity price fluctuation type, the first regression model is used for prediction; when the fluctuation types are inconsistent, the second regression model is used for prediction, and the prediction results of the two models are fused to obtain the final predicted electricity price.

Benefits of technology

Improve the accuracy of electricity price prediction, especially in the case of complex electricity price fluctuations, and reduce prediction errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119990448A_ABST
    Figure CN119990448A_ABST
Patent Text Reader

Abstract

The invention discloses an electricity price prediction method and device, electronic equipment and a computer program product, and relates to the field of electric power engineering, and the electricity price prediction method comprises the steps: determining the electricity price fluctuation type of a target date according to the electricity price information of the target date, and determining a corresponding electricity price prediction regression model according to the electricity price fluctuation type; under the condition that the electricity price fluctuation type is a first electricity price fluctuation type, performing periodic electricity price prediction on the target date through a first regression model corresponding to the first electricity price fluctuation type to obtain a plurality of first predicted electricity prices, and determining a first fluctuation trend corresponding to the plurality of first predicted electricity prices; and under the condition that the fluctuation type corresponding to the first fluctuation trend is inconsistent with the first electricity price fluctuation type, performing periodic electricity price prediction on the target date through a second regression model corresponding to the second electricity price fluctuation type to obtain a plurality of second predicted electricity prices, and fusing the plurality of first predicted electricity prices and the plurality of second predicted electricity prices to obtain a plurality of second predicted electricity prices. And obtaining the target predicted electricity price of the target date.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electric power engineering, and more specifically, to a method and device for predicting electricity prices, electronic equipment, and computer program products. Background Art

[0002] At present, most electricity price forecasting methods are not sensitive enough to changes in market conditions and lack effective distinction between types of electricity price fluctuations, which results in the accuracy of forecast results often failing to meet actual needs when dealing with complex market scenarios. For example, when electricity price characteristics differ significantly between stable and fluctuating periods, the forecasting effect of a single model is easily adversely affected, especially during the fluctuating period, when a single model may produce large forecasting errors due to insufficient handling of nonlinearity and complexity.

[0003] Regarding the related technologies, traditional electricity price forecasting methods are mostly used for a single type of electricity price fluctuation. When used for complex electricity price fluctuation types, they are prone to inaccurate forecasting problems, and no effective solution has been proposed so far.

[0004] Therefore, it is necessary to improve the related technology to overcome the above-mentioned defects in the related technology. Summary of the invention

[0005] The embodiments of the present application provide a method and device for predicting electricity prices, an electronic device, and a computer program product to at least solve the problem in the related art that traditional electricity price prediction methods are mostly used for a single type of electricity price fluctuation, which easily leads to inaccurate predictions when complex electricity price fluctuations are used.

[0006] According to one aspect of an embodiment of the present application, a method for predicting electricity price is provided, comprising: determining an electricity price fluctuation type of a target date according to electricity price information of the target date, and determining a corresponding electricity price prediction regression model according to the electricity price fluctuation type, wherein the electricity price fluctuation type comprises: a first electricity price fluctuation type and a second electricity price fluctuation type; in a case where the electricity price fluctuation type is the first electricity price fluctuation type, performing periodic electricity price prediction on the target date through a first regression model corresponding to the first electricity price fluctuation type to obtain a plurality of first predicted electricity prices, and determining a first fluctuation trend corresponding to the plurality of first predicted electricity prices, wherein the electricity price prediction regression model comprises the first regression model; in a case where the fluctuation type corresponding to the first fluctuation trend is inconsistent with the first electricity price fluctuation type, performing periodic electricity price prediction on the target date through a second regression model corresponding to the second electricity price fluctuation type to obtain a plurality of second predicted electricity prices, and fusing the plurality of first predicted electricity prices and the plurality of second predicted electricity prices to obtain a target predicted electricity price for the target date, wherein the electricity price prediction regression model comprises the second regression model.

[0007] In an exemplary embodiment, after determining the first fluctuation trend corresponding to the multiple first predicted electricity prices, the method further includes: when the fluctuation type corresponding to the first fluctuation trend is consistent with the first electricity price fluctuation type, determining the multiple first predicted electricity prices as the target predicted electricity price.

[0008] In an exemplary embodiment, determining the electricity price fluctuation type of the target date according to the electricity price information of the target date includes: periodically acquiring electricity price characteristic data of the target time period, and acquiring the maximum and minimum electricity prices of the target time period, wherein the target time period is the time period before the target date; determining the electricity price fluctuation range R of the target time period according to the following formula: R = |P max -P min |, where P max is the maximum value of the electricity price, P min is the minimum electricity price; the electricity price fluctuation type of the target time period is determined according to the electricity price fluctuation amplitude and a first preset value, wherein the electricity price fluctuation amplitude corresponding to the first electricity price fluctuation type is smaller than the first preset value, and the electricity price fluctuation amplitude corresponding to the second electricity price fluctuation type is larger than the first preset value, the first electricity price fluctuation type is a stable type, and the second electricity price fluctuation type is a fluctuating type; a classification model is trained through the electricity price characteristic data of the target time period and the electricity price fluctuation type of the target time period; the electricity price information is input into the trained classification model, and the electricity price fluctuation type of the target date is determined according to the obtained classification result, wherein the classification result includes the classification probability of different electricity price fluctuation types.

[0009] In an exemplary embodiment, determining a first fluctuation trend corresponding to the multiple first predicted electricity prices includes: determining the range and standard deviation of the multiple first predicted electricity prices; when the range and the standard deviation are both smaller than a second preset value, determining that the fluctuation type corresponding to the first fluctuation trend is the stable type; when the range and the standard deviation are both larger than a second preset value, determining that the fluctuation type corresponding to the first fluctuation trend is the fluctuating type.

[0010] In an exemplary embodiment, the target predicted electricity price on the target date is obtained by fusing the plurality of first predicted electricity prices and the plurality of second predicted electricity prices, including: determining the target predicted electricity price according to the following formula: in, is the first predicted electricity price, is the second predicted electricity price, and α is the classification probability of the first electricity price fluctuation type in the classification result.

[0011] In an exemplary embodiment, before performing periodic electricity price forecasting on the target date through the first regression model corresponding to the first electricity price fluctuation type to obtain multiple first predicted electricity prices, the method also includes: preprocessing the electricity price characteristic data of the target time period to obtain preprocessed electricity price characteristic data, wherein the preprocessed electricity price characteristic data is used to predict the multiple first predicted electricity prices and the multiple second predicted electricity prices, and the preprocessing includes at least one of the following: removing abnormal values ​​in the electricity price characteristic data, filling missing values ​​in the electricity price characteristic data, and performing feature scaling on the electricity price characteristic data.

[0012] According to another aspect of an embodiment of the present application, there is also provided an electricity price prediction device, comprising: a first determination module, for determining the electricity price fluctuation type of the target date according to the electricity price information of the target date, and determining the corresponding electricity price prediction regression model according to the electricity price fluctuation type, wherein the electricity price fluctuation type comprises: a first electricity price fluctuation type and a second electricity price fluctuation type; a second determination module, for performing periodic electricity price prediction on the target date by using a first regression model corresponding to the first electricity price fluctuation type when the electricity price fluctuation type is the first electricity price fluctuation type, obtaining a plurality of first predicted electricity prices, and determining a first fluctuation trend corresponding to the plurality of first predicted electricity prices, wherein the electricity price prediction regression model comprises the first regression model; a fusion module, for performing periodic electricity price prediction on the target date by using a second regression model corresponding to the second electricity price fluctuation type when the fluctuation type corresponding to the first fluctuation trend is inconsistent with the first electricity price fluctuation type, obtaining a plurality of second predicted electricity prices, and fusing the plurality of first predicted electricity prices with the plurality of second predicted electricity prices to obtain a target predicted electricity price for the target date, wherein the electricity price prediction regression model comprises the second regression model.

[0013] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned electricity price prediction method when running.

[0014] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the electricity price prediction method through the computer program.

[0015] According to another aspect of the embodiments of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.

[0016] Through this application, the electricity price fluctuation type of the target date is determined according to the electricity price information of the target date, and the corresponding electricity price prediction regression model is determined according to the electricity price fluctuation type; when the electricity price fluctuation type is the first electricity price fluctuation type, the target date is periodically predicted by the first regression model corresponding to the first electricity price fluctuation type, multiple first predicted electricity prices are obtained, and the first fluctuation trend corresponding to the multiple first predicted electricity prices is determined; when the fluctuation type corresponding to the first fluctuation trend is inconsistent with the first electricity price fluctuation type, the target date is periodically predicted by the second regression model corresponding to the second electricity price fluctuation type, multiple second predicted electricity prices are obtained, and the target predicted electricity price of the target date is obtained by fusing the multiple first predicted electricity prices and the multiple second predicted electricity prices. This solves the problem in the related art that the traditional electricity price prediction method is mostly used for a single electricity price fluctuation type, which is prone to inaccurate prediction when performing complex electricity price fluctuation types. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0019] Figure 1 It is a hardware structure block diagram of a computer terminal of an electricity price prediction method according to an embodiment of the present application;

[0020] Figure 2 is a flow chart of a method for predicting electricity price according to an embodiment of the present application;

[0021] Figure 3 is a first schematic diagram of a method for predicting electricity price according to an embodiment of the present application;

[0022] Figure 4 is a second schematic diagram of a method for predicting electricity price according to an embodiment of the present application;

[0023] Figure 5 It is a structural block diagram of an electricity price prediction device according to an embodiment of the present application. DETAILED DESCRIPTION

[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0026] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal or a similar computing device. Taking running on a computer terminal as an example, Figure 1 1 is a hardware structure block diagram of a computer terminal for predicting an electricity price according to an embodiment of the present application. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor (Central Processing Unit, MCU) or a programmable logic device (Field Programmable Gate Array, FPGA)) and a memory 104 for storing data, wherein the above-mentioned computer terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0027] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for predicting electricity prices in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0028] A wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0029] In this embodiment, a method for predicting electricity prices is provided, which is applied to the above-mentioned computer terminal. Figure 2 is a flow chart of a method for predicting electricity prices according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0030] Step S202, determining the electricity price fluctuation type of the target date according to the electricity price information of the target date, and determining the corresponding electricity price prediction regression model according to the electricity price fluctuation type, wherein the electricity price fluctuation type includes: a first electricity price fluctuation type and a second electricity price fluctuation type;

[0031] Step S204, when the electricity price fluctuation type is the first electricity price fluctuation type, periodic electricity price forecasting is performed on the target date by using a first regression model corresponding to the first electricity price fluctuation type to obtain a plurality of first forecast electricity prices, and determining a first fluctuation trend corresponding to the plurality of first forecast electricity prices, wherein the electricity price forecasting regression model includes the first regression model;

[0032] Step S206: When the fluctuation type corresponding to the first fluctuation trend is inconsistent with the first electricity price fluctuation type, a second regression model corresponding to the second electricity price fluctuation type is used to perform periodic electricity price forecasting on the target date to obtain multiple second predicted electricity prices, and the multiple first predicted electricity prices and the multiple second predicted electricity prices are integrated to obtain the target predicted electricity price for the target date, wherein the electricity price forecasting regression model includes the second regression model.

[0033] Through the above steps, the electricity price fluctuation type of the target date is determined according to the electricity price information of the target date, and the corresponding electricity price prediction regression model is determined according to the electricity price fluctuation type, wherein the electricity price fluctuation type includes: a first electricity price fluctuation type and a second electricity price fluctuation type; when the electricity price fluctuation type is the first electricity price fluctuation type, the target date is periodically predicted by the first regression model corresponding to the first electricity price fluctuation type, a plurality of first predicted electricity prices are obtained, and the first fluctuation trend corresponding to the plurality of first predicted electricity prices is determined, wherein the electricity price prediction regression model includes the first regression model; when the fluctuation type corresponding to the first fluctuation trend is inconsistent with the first electricity price fluctuation type, the target date is periodically predicted by the second regression model corresponding to the second electricity price fluctuation type, a plurality of second predicted electricity prices are obtained, and the plurality of first predicted electricity prices and the plurality of second predicted electricity prices are integrated to obtain the target predicted electricity price of the target date, wherein the electricity price prediction regression model includes the second regression model. Thus, the problem that the traditional electricity price prediction method in the related art is mostly used for a single electricity price fluctuation type, which is easy to cause inaccurate prediction when performing complex electricity price fluctuation types, is solved.

[0034] In an exemplary embodiment, after determining the first fluctuation trend corresponding to the multiple first predicted electricity prices, the method further includes: when the fluctuation type corresponding to the first fluctuation trend is consistent with the first electricity price fluctuation type, determining the multiple first predicted electricity prices as the target predicted electricity price.

[0035] Optionally, when the fluctuation type corresponding to the first fluctuation trend is stable and the first electricity price fluctuation type is also stable, or when the fluctuation type corresponding to the first fluctuation trend is fluctuating and the first electricity price fluctuation type is also fluctuating, it is determined to perform periodic electricity price forecasting on the target date through a first regression model (for example, a random forest model) corresponding to the first electricity price fluctuation type, and the multiple first predicted electricity prices obtained are the target predicted electricity prices.

[0036] In an exemplary embodiment, determining the electricity price fluctuation type of the target date according to the electricity price information of the target date includes: periodically obtaining electricity price characteristic data of the target time period, and obtaining the maximum and minimum electricity prices of the target time period, wherein the target time period is the time period before the target date; determining the electricity price fluctuation range R of the target time period according to the following formula: R=P max -P min , where P max is the maximum value of the electricity price, P min is the minimum electricity price; the electricity price fluctuation type of the target time period is determined according to the electricity price fluctuation amplitude and a first preset value, wherein the electricity price fluctuation amplitude corresponding to the first electricity price fluctuation type is smaller than the first preset value, and the electricity price fluctuation amplitude corresponding to the second electricity price fluctuation type is larger than the first preset value, the first electricity price fluctuation type is a stable type, and the second electricity price fluctuation type is a fluctuating type; a classification model is trained through the electricity price characteristic data of the target time period and the electricity price fluctuation type of the target time period; the electricity price information is input into the trained classification model, and the electricity price fluctuation type of the target date is determined according to the obtained classification result, wherein the classification result includes the classification probability of different electricity price fluctuation types.

[0037] Optionally, obtain the electricity price characteristic data of the 30 days before the target date every 15 minutes, and determine the electricity price fluctuation range for 30 days based on the maximum and minimum electricity prices of each day in these 30 days. For example, the maximum electricity price of a certain day in 30 days is 1,200 yuan / MWh, and the minimum electricity price is 300 yuan / MWh. According to the formula, the electricity price fluctuation range of this day is 900 yuan / MWh. Assuming that the first preset value is 800 yuan / MWh, this day is marked as a fluctuation type (i.e., the second fluctuation type). Similarly, when the electricity price fluctuation range of another day is 750 yuan / MWh, which is less than the preset value of 800 yuan / MWh, it is marked as a stable type. After collecting 30 days of data, a training set containing electricity price characteristic data and labels (stable type / fluctuation type) can be obtained for training the classification model. Input the electricity price characteristic data of the target date into the trained classification model. Assuming that the classification model outputs that the probability of the target date being stable is 0.7 and the probability of being fluctuating is 0.3, it is determined that the electricity price fluctuation type on the target date is stable.

[0038] In order to better understand the process of the above-mentioned electricity price prediction method, the above-mentioned electricity price prediction method is described below in combination with an optional embodiment.

[0039] In the case where the electricity price fluctuation type is the second electricity price fluctuation type, a periodic electricity price forecast is performed on the target date through the second regression model corresponding to the second electricity price fluctuation type to obtain multiple second predicted electricity prices, and the second fluctuation trend corresponding to the multiple second predicted electricity prices is determined. In the case where the fluctuation type corresponding to the second fluctuation trend is inconsistent with the second electricity price fluctuation type, a periodic electricity price forecast is performed on the target date through the first regression model corresponding to the first electricity price fluctuation type to obtain multiple first predicted electricity prices, and the multiple first predicted electricity prices and the multiple second predicted electricity prices are integrated to obtain the target predicted electricity price for the target date. In the case where the fluctuation type corresponding to the second fluctuation trend is consistent with the second electricity price fluctuation type, the multiple second predicted electricity prices are determined as the target predicted electricity price.

[0040] Optionally, in the case where the electricity price fluctuation type is a fluctuating type, a periodic electricity price forecast is performed on the target date through a second regression model corresponding to the fluctuation type (e.g., a Timesnet model), a plurality of second predicted electricity prices are obtained, and a second fluctuation trend corresponding to the plurality of second predicted electricity prices is determined. Assuming that the fluctuation type corresponding to the second fluctuation trend is a stable type, it is inconsistent with the second fluctuation type (fluctuating type). At this time, a periodic electricity price forecast is performed on the target date through a first regression model (e.g., a random forest model) corresponding to the first electricity price fluctuation type (i.e., stable type), a plurality of first predicted electricity prices are obtained, and the plurality of first predicted electricity prices and the plurality of second predicted electricity prices are integrated to obtain a target predicted electricity price for the target date. Assuming that the fluctuation type corresponding to the second fluctuation trend is a fluctuating type, it is consistent with the second electricity price fluctuation type (fluctuating type). At this time, the plurality of second predicted electricity prices are determined as the target predicted electricity prices.

[0041] In an exemplary embodiment, determining a first fluctuation trend corresponding to the multiple first predicted electricity prices includes: determining the range and standard deviation of the multiple first predicted electricity prices; when the range and the standard deviation are both smaller than a second preset value, determining that the fluctuation type corresponding to the first fluctuation trend is the stable type; when the range and the standard deviation are both larger than a second preset value, determining that the fluctuation type corresponding to the first fluctuation trend is the fluctuating type.

[0042] Optionally, assuming that the first electricity price fluctuation type is a stable type, a random forest model corresponding to the stable type is used to perform periodic electricity price forecasting on the target date to obtain multiple first predicted electricity prices. The maximum and minimum values ​​of the multiple first predicted electricity prices are obtained, and the range of the multiple first predicted electricity prices is determined according to the difference between the maximum and minimum electricity prices. At the same time, the standard deviation of the multiple first predicted electricity prices is determined according to the number of all multiple first predicted electricity prices and multiple first predicted electricity prices. Assuming that the second preset value is 700 yuan / MWh, when the range and standard deviation are both less than the second preset value, the fluctuation type corresponding to the first fluctuation trend is determined to be a stable type. At this time, the fluctuation type corresponding to the first fluctuation trend is consistent with the first electricity price fluctuation type, and the multiple first predicted electricity prices are the target predicted electricity prices. When the range and standard deviation are both greater than the second preset value, the fluctuation type corresponding to the first fluctuation trend is determined to be a fluctuation type. At this time, the fluctuation type corresponding to the first fluctuation trend is inconsistent with the first electricity price fluctuation type, and it is necessary to perform periodic electricity price forecasting on the target date through the Timesnet model corresponding to the second fluctuation type (fluctuation type) to obtain multiple second predicted electricity prices. The plurality of first predicted electricity prices and the plurality of second predicted electricity prices are merged to obtain a target predicted electricity price.

[0043] In an exemplary embodiment, the target predicted electricity price on the target date is obtained by fusing the plurality of first predicted electricity prices and the plurality of second predicted electricity prices, including: determining the target predicted electricity price according to the following formula: in, is the first predicted electricity price, is the second predicted electricity price, and α is the classification probability of the first electricity price fluctuation type in the classification result.

[0044] Optionally, assuming that the fluctuation type corresponding to the first fluctuation trend is stable, and the first electricity price fluctuation type is stable, then the fluctuation type corresponding to the first fluctuation trend is consistent with the first electricity price fluctuation type. At this time, multiple first predicted electricity prices are target predicted electricity prices. When the fluctuation type corresponding to the first fluctuation trend is fluctuating, the fluctuation type corresponding to the first fluctuation trend is inconsistent with the first electricity price fluctuation type, then it is necessary to use the Timesnet model corresponding to the second fluctuation type (fluctuating type) to perform periodic electricity price forecasting on the target date to obtain multiple second predicted electricity prices. Multiple first predicted electricity prices and multiple second predicted electricity prices are combined according to the formula The target predicted electricity price is obtained by fusion. It should be clear that α is the classification probability of the first electricity price fluctuation type in the classification result. Optionally, assuming that the probability of the stable type in the classification result output by the classification model is 70%, α is 70%.

[0045] In an exemplary embodiment, before performing periodic electricity price forecasting on the target date through the first regression model corresponding to the first electricity price fluctuation type to obtain multiple first predicted electricity prices, the method also includes: preprocessing the electricity price characteristic data of the target time period to obtain preprocessed electricity price characteristic data, wherein the preprocessed electricity price characteristic data is used to predict the multiple first predicted electricity prices and the multiple second predicted electricity prices, and the preprocessing includes at least one of the following: removing abnormal values ​​in the electricity price characteristic data, filling missing values ​​in the electricity price characteristic data, and performing feature scaling on the electricity price characteristic data.

[0046] In this embodiment, removing outliers can eliminate the interference of extreme observations on the model; filling missing values ​​can maintain the continuity of the time series and ensure that the model can process data at all time points; feature scaling can ensure that when the regression model processes features of different scales, the contribution of each feature to the prediction result can be treated fairly. These preprocessing measures together improve the prediction performance of the regression model, allowing the regression model to more accurately capture the fluctuation pattern of electricity prices, and provide more stable and accurate prediction results regardless of whether it is under stable or volatile market conditions.

[0047] In order to better understand the process of the above-mentioned electricity price prediction method, the above-mentioned electricity price prediction method is described below in combination with an optional embodiment, but is not used to limit the technical solution of the embodiment of the present application.

[0048] Figure 3 is a first schematic diagram of a method for predicting electricity price according to an embodiment of the present application, such as Figure 3 As shown, specifically including the following:

[0049] The electricity price characteristic data of the target date (equivalent to the characteristics of the predicted day in the figure) is input into the trained UniTS classification model, and the electricity price fluctuation type of the target date is determined according to the obtained classification result, wherein the classification result includes the classification probability of different electricity price fluctuation types. Optionally, in the case where the electricity price fluctuation type is a stable type (equivalent to the stable day in the figure), a first regression model corresponding to the stable type (such as a random forest model) is used to perform periodic electricity price forecasts on the target date to obtain multiple first predicted electricity prices (equivalent to prediction result 1 in the figure). In the case where the electricity price fluctuation type is a fluctuating type (equivalent to the fluctuating day in the figure), a second regression model corresponding to the fluctuating type (such as a Timesnet model) is used to perform periodic electricity price forecasts on the target date to obtain multiple second predicted electricity prices (equivalent to prediction result 2 in the figure).

[0050] Assume that the electricity price fluctuation type of the target date is determined to be stable through the UniTS classification model, and multiple first predicted electricity prices are obtained, and the first fluctuation trend corresponding to the first predicted electricity price is determined according to the first predicted electricity price. When the fluctuation type corresponding to the first fluctuation trend is stable, multiple first predicted electricity prices are determined as target predicted electricity prices (equivalent to the final prediction result in the figure). When the fluctuation type corresponding to the first fluctuation trend is fluctuating, multiple first predicted electricity prices and multiple second predicted electricity prices are merged to obtain the target predicted electricity price for the target date.

[0051] Obviously, the above-described embodiments are only part of the embodiments of the present application, not all of the embodiments. In order to better understand the above-mentioned electricity price prediction method, the above-mentioned process is described below in conjunction with the embodiments, but it is not intended to limit the technical solutions of the embodiments of the present application, specifically:

[0052] In an optional embodiment, in combination Figure 4 The electricity price prediction method of this application is further described. Figure 4 As shown, including the following:

[0053] Optionally, when the UniTS classification model determines that the electricity price fluctuation type of the target date is a stable type (i.e., the first fluctuation type), the random forest model corresponding to the stable type is used to perform periodic electricity price forecasting on the target date to obtain multiple first predicted electricity prices. The maximum and minimum values ​​of the multiple first predicted electricity prices are obtained, and the range of the multiple first predicted electricity prices is determined according to the difference between the maximum and minimum electricity prices. At the same time, the standard deviation of the multiple first predicted electricity prices is determined according to the number of all multiple first predicted electricity prices and multiple first predicted electricity prices. When the range and standard deviation are both less than the second preset value, the fluctuation type corresponding to the first fluctuation trend is determined to be a stable type. At this time, the fluctuation type corresponding to the first fluctuation trend is consistent with the first electricity price fluctuation type, and multiple first predicted electricity prices are determined to be target predicted electricity prices. When the range and standard deviation are both greater than the second preset value, the fluctuation type corresponding to the first fluctuation trend is determined to be a fluctuation type. At this time, the fluctuation type corresponding to the first fluctuation trend is inconsistent with the first electricity price fluctuation type, and it is necessary to perform periodic electricity price forecasting on the target date through the Timesnet model corresponding to the second fluctuation type (fluctuation type) to obtain multiple second predicted electricity prices. The multiple first predicted electricity prices and the multiple second predicted electricity prices are calculated according to the formula Fusion is performed to obtain the target predicted electricity price, where: For the first predicted electricity price, is the second predicted electricity price, and α is the classification probability of the first electricity price fluctuation type in the classification result.

[0054] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0055] In this embodiment, a device for predicting electricity prices is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. As used below, the term "module" may be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0056] Figure 5 : is a structural block diagram of a device for predicting electricity prices according to an embodiment of the present application, the device comprising:

[0057] A first determination module 50 is used to determine the electricity price fluctuation type of the target date according to the electricity price information of the target date, and determine the corresponding electricity price prediction regression model according to the electricity price fluctuation type, wherein the electricity price fluctuation type includes: a first electricity price fluctuation type and a second electricity price fluctuation type;

[0058] A second determining module 52 is configured to, when the electricity price fluctuation type is the first electricity price fluctuation type, perform periodic electricity price forecasting on the target date by using a first regression model corresponding to the first electricity price fluctuation type to obtain a plurality of first forecast electricity prices, and determine a first fluctuation trend corresponding to the plurality of first forecast electricity prices, wherein the electricity price forecasting regression model includes the first regression model;

[0059] A fusion module 54 is used to perform periodic electricity price forecasting on the target date by using a second regression model corresponding to the second electricity price fluctuation type when the fluctuation type corresponding to the first fluctuation trend is inconsistent with the first electricity price fluctuation type, to obtain multiple second predicted electricity prices, and to fuse the multiple first predicted electricity prices with the multiple second predicted electricity prices to obtain a target predicted electricity price for the target date, wherein the electricity price forecasting regression model includes the second regression model.

[0060] Through the above device, the electricity price fluctuation type of the target date is determined according to the electricity price information of the target date, and the corresponding electricity price prediction regression model is determined according to the electricity price fluctuation type, wherein the electricity price fluctuation type includes: a first electricity price fluctuation type and a second electricity price fluctuation type; when the electricity price fluctuation type is the first electricity price fluctuation type, the target date is periodically predicted by the first regression model corresponding to the first electricity price fluctuation type, a plurality of first predicted electricity prices are obtained, and the first fluctuation trend corresponding to the plurality of first predicted electricity prices is determined, wherein the electricity price prediction regression model includes the first regression model; when the fluctuation type corresponding to the first fluctuation trend is inconsistent with the first electricity price fluctuation type, the target date is periodically predicted by the second regression model corresponding to the second electricity price fluctuation type, a plurality of second predicted electricity prices are obtained, and the plurality of first predicted electricity prices and the plurality of second predicted electricity prices are integrated to obtain the target predicted electricity price of the target date, wherein the electricity price prediction regression model includes the second regression model. Thus, the problem that the traditional electricity price prediction method in the related art is mostly used for a single electricity price fluctuation type, which is easy to cause inaccurate prediction when performing complex electricity price fluctuation types, is solved.

[0061] In an exemplary embodiment, the second determination module 52 is further configured to determine the plurality of first predicted electricity prices as the target predicted electricity prices when the fluctuation type corresponding to the first fluctuation trend is consistent with the first electricity price fluctuation type.

[0062] In an exemplary embodiment, the first determination module 50 is further used to periodically obtain electricity price characteristic data of a target time period, and obtain the maximum and minimum electricity prices of the target time period, wherein the target time period is the time period before the target date; and determine the electricity price fluctuation range R of the target time period according to the following formula: R=P max -P min , where P max is the maximum value of the electricity price, P min is the minimum electricity price; the electricity price fluctuation type of the target time period is determined according to the electricity price fluctuation amplitude and a first preset value, wherein the electricity price fluctuation amplitude corresponding to the first electricity price fluctuation type is smaller than the first preset value, and the electricity price fluctuation amplitude corresponding to the second electricity price fluctuation type is larger than the first preset value, the first electricity price fluctuation type is a stable type, and the second electricity price fluctuation type is a fluctuating type; a classification model is trained through the electricity price characteristic data of the target time period and the electricity price fluctuation type of the target time period; the electricity price information is input into the trained classification model, and the electricity price fluctuation type of the target date is determined according to the obtained classification result, wherein the classification result includes the classification probability of different electricity price fluctuation types.

[0063] In an exemplary embodiment, the second determination module 52 is also used to determine the range and standard deviation of the multiple first predicted electricity prices; when the range and the standard deviation are both smaller than a second preset value, the fluctuation type corresponding to the first fluctuation trend is determined to be the stable type; when the range and the standard deviation are both greater than a second preset value, the fluctuation type corresponding to the first fluctuation trend is determined to be the fluctuation type.

[0064] In an exemplary embodiment, the fusion module 54 is further configured to determine the target predicted electricity price according to the following formula: in, is the first predicted electricity price, is the second predicted electricity price, and α is the classification probability of the first electricity price fluctuation type in the classification result.

[0065] In an exemplary embodiment, the second determination module 52 is further used to preprocess the electricity price characteristic data of the target time period to obtain preprocessed electricity price characteristic data, wherein the preprocessed electricity price characteristic data is used to predict the multiple first predicted electricity prices and the multiple second predicted electricity prices, and the preprocessing includes at least one of the following: removing abnormal values ​​in the electricity price characteristic data, filling missing values ​​in the electricity price characteristic data, and performing feature scaling on the electricity price characteristic data.

[0066] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0067] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0068] S1, determining the electricity price fluctuation type of the target date according to the electricity price information of the target date, and determining the corresponding electricity price prediction regression model according to the electricity price fluctuation type, wherein the electricity price fluctuation type includes: a first electricity price fluctuation type and a second electricity price fluctuation type;

[0069] S2, when the electricity price fluctuation type is the first electricity price fluctuation type, performing periodic electricity price forecasting on the target date by using a first regression model corresponding to the first electricity price fluctuation type to obtain a plurality of first forecast electricity prices, and determining a first fluctuation trend corresponding to the plurality of first forecast electricity prices, wherein the electricity price forecasting regression model includes the first regression model;

[0070] S3. When the fluctuation type corresponding to the first fluctuation trend is inconsistent with the first electricity price fluctuation type, a second regression model corresponding to the second electricity price fluctuation type is used to perform periodic electricity price forecasting on the target date to obtain multiple second forecast electricity prices, and the multiple first forecast electricity prices and the multiple second forecast electricity prices are integrated to obtain the target forecast electricity price for the target date, wherein the electricity price forecasting regression model includes the second regression model.

[0071] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0072] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0073] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0074] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0075] S1, determining the electricity price fluctuation type of the target date according to the electricity price information of the target date, and determining the corresponding electricity price prediction regression model according to the electricity price fluctuation type, wherein the electricity price fluctuation type includes: a first electricity price fluctuation type and a second electricity price fluctuation type;

[0076] S2, when the electricity price fluctuation type is the first electricity price fluctuation type, performing periodic electricity price forecasting on the target date by using a first regression model corresponding to the first electricity price fluctuation type to obtain a plurality of first forecast electricity prices, and determining a first fluctuation trend corresponding to the plurality of first forecast electricity prices, wherein the electricity price forecasting regression model includes the first regression model;

[0077] S3. When the fluctuation type corresponding to the first fluctuation trend is inconsistent with the first electricity price fluctuation type, a second regression model corresponding to the second electricity price fluctuation type is used to perform periodic electricity price forecasting on the target date to obtain multiple second forecast electricity prices, and the multiple first forecast electricity prices and the multiple second forecast electricity prices are integrated to obtain the target forecast electricity price for the target date, wherein the electricity price forecasting regression model includes the second regression model.

[0078] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0079] An embodiment of the present application further provides a computer program product, comprising a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program product, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.

[0080] Optionally, in this embodiment, the above computer program may be configured to implement the following steps when executed by a processor:

[0081] S1, determining the electricity price fluctuation type of the target date according to the electricity price information of the target date, and determining the corresponding electricity price prediction regression model according to the electricity price fluctuation type, wherein the electricity price fluctuation type includes: a first electricity price fluctuation type and a second electricity price fluctuation type;

[0082] S2, when the electricity price fluctuation type is the first electricity price fluctuation type, performing periodic electricity price forecasting on the target date by using a first regression model corresponding to the first electricity price fluctuation type to obtain a plurality of first forecast electricity prices, and determining a first fluctuation trend corresponding to the plurality of first forecast electricity prices, wherein the electricity price forecasting regression model includes the first regression model;

[0083] S3. When the fluctuation type corresponding to the first fluctuation trend is inconsistent with the first electricity price fluctuation type, a second regression model corresponding to the second electricity price fluctuation type is used to perform periodic electricity price forecasting on the target date to obtain multiple second forecast electricity prices, and the multiple first forecast electricity prices and the multiple second forecast electricity prices are integrated to obtain the target forecast electricity price for the target date, wherein the electricity price forecasting regression model includes the second regression model.

[0084] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0085] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0086] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for predicting electricity prices, characterized in that: include: Determine the electricity price fluctuation type of the target date according to the electricity price information of the target date, and determine the corresponding electricity price prediction regression model according to the electricity price fluctuation type, wherein the electricity price fluctuation type includes: a first electricity price fluctuation type and a second electricity price fluctuation type; In the case where the electricity price fluctuation type is the first electricity price fluctuation type, a periodic electricity price forecast is performed on the target date by using a first regression model corresponding to the first electricity price fluctuation type to obtain a plurality of first predicted electricity prices, and a first fluctuation trend corresponding to the plurality of first predicted electricity prices is determined, wherein the electricity price forecast regression model includes the first regression model; When the fluctuation type corresponding to the first fluctuation trend is inconsistent with the first electricity price fluctuation type, a second regression model corresponding to the second electricity price fluctuation type is used to perform periodic electricity price forecasting on the target date to obtain multiple second forecast electricity prices, and the multiple first forecast electricity prices and the multiple second forecast electricity prices are integrated to obtain the target forecast electricity price for the target date, wherein the electricity price forecasting regression model includes the second regression model.

2. The method for predicting electricity prices according to claim 1, characterized in that: After determining the first fluctuation trends corresponding to the plurality of first predicted electricity prices, the method further includes: When the fluctuation type corresponding to the first fluctuation trend is consistent with the first electricity price fluctuation type, the plurality of first predicted electricity prices are determined to be the target predicted electricity prices.

3. The method for predicting electricity prices according to claim 1, characterized in that: The electricity price fluctuation type of the target date is determined according to the electricity price information of the target date, including: Periodically acquiring electricity price characteristic data of a target time period, and acquiring a maximum electricity price and a minimum electricity price of the target time period, wherein the target time period is a time period before the target date; The electricity price fluctuation range R of the target time period is determined according to the following formula: R = |P max -P min |, where P max is the maximum value of the electricity price, P min is the minimum value of the electricity price; Determine the electricity price fluctuation type of the target time period according to the electricity price fluctuation amplitude and a first preset value, wherein the electricity price fluctuation amplitude corresponding to the first electricity price fluctuation type is less than the first preset value, and the electricity price fluctuation amplitude corresponding to the second electricity price fluctuation type is greater than the first preset value, the first electricity price fluctuation type is a stable type, and the second electricity price fluctuation type is a fluctuating type; Training a classification model using the electricity price characteristic data of the target time period and the electricity price fluctuation type of the target time period; The electricity price information is input into a trained classification model, and the electricity price fluctuation type on the target date is determined according to the obtained classification result, wherein the classification result includes the classification probabilities of different electricity price fluctuation types.

4. The method for predicting electricity prices according to claim 3, characterized in that: Determining a first fluctuation trend corresponding to the plurality of first predicted electricity prices includes: determining a range and a standard deviation of the plurality of first predicted electricity prices; When the range and the standard deviation are both smaller than a second preset value, determining that the fluctuation type corresponding to the first fluctuation trend is the stable type; When the range and the standard deviation are both greater than a second preset value, it is determined that the fluctuation type corresponding to the first fluctuation trend is the fluctuation type.

5. The method for predicting electricity prices according to claim 3, characterized in that: The multiple first predicted electricity prices and the multiple second predicted electricity prices are integrated to obtain the target predicted electricity price for the target date, including: The target predicted electricity price is determined according to the following formula in, is the first predicted electricity price, is the second predicted electricity price, and α is the classification probability of the first electricity price fluctuation type in the classification result.

6. The method for predicting electricity prices according to claim 3, characterized in that: Before performing periodic electricity price forecasting on the target date by using a first regression model corresponding to the first electricity price fluctuation type to obtain a plurality of first forecast electricity prices, the method further includes: The electricity price characteristic data of the target time period is preprocessed to obtain preprocessed electricity price characteristic data, wherein the preprocessed electricity price characteristic data is used to predict the multiple first predicted electricity prices and the multiple second predicted electricity prices, and the preprocessing includes at least one of the following: removing abnormal values ​​in the electricity price characteristic data, filling missing values ​​in the electricity price characteristic data, and performing feature scaling on the electricity price characteristic data.

7. A device for predicting electricity prices, characterized in that: include: A first determination module is used to determine the electricity price fluctuation type of the target date according to the electricity price information of the target date, and determine the corresponding electricity price prediction regression model according to the electricity price fluctuation type, wherein the electricity price fluctuation type includes: a first electricity price fluctuation type and a second electricity price fluctuation type; a second determining module, configured to, when the electricity price fluctuation type is the first electricity price fluctuation type, perform periodic electricity price forecasting on the target date by using a first regression model corresponding to the first electricity price fluctuation type to obtain a plurality of first forecast electricity prices, and determine a first fluctuation trend corresponding to the plurality of first forecast electricity prices, wherein the electricity price forecasting regression model includes the first regression model; A fusion module is used to perform periodic electricity price forecasting on the target date by using a second regression model corresponding to the second electricity price fluctuation type when the fluctuation type corresponding to the first fluctuation trend is inconsistent with the first electricity price fluctuation type, to obtain multiple second predicted electricity prices, and to fuse the multiple first predicted electricity prices with the multiple second predicted electricity prices to obtain a target predicted electricity price for the target date, wherein the electricity price forecasting regression model includes the second regression model.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 6 when executed.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.