Electricity price prediction method, device, equipment, medium and program product
By performing deviation correction and cluster analysis on the supply and demand data of electricity price prediction, and using classification and regression models to determine the range of electricity price fluctuations, the problem of low accuracy of electricity price prediction in the existing technology is solved, and more efficient electricity price prediction results are achieved.
Patent Information
- Application Number
- CN202410830974.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-11-19
AI Technical Summary
When the existing electricity price prediction methods build a composite model, the mechanism differences between the sub-models are large and the overall modeling complexity is high, resulting in low accuracy of the final electricity price prediction results.
By obtaining predicted supply and demand data, making deviation corrections and inputting them into the pre-trained electricity price prediction classification model and regression model, using cluster analysis to divide price ranges, training the classification and regression models respectively to determine the electricity price fluctuation range and specific prediction results, and increasing the electricity price Accuracy of prediction.
It improves the accuracy of the electricity price prediction results, reduces the complexity during the model training process, and makes the electricity price prediction more in line with the actual internal formation mechanism.
Smart Images

Figure CN118982367A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of electrical engineering technology, and in particular to an electricity price prediction method, device, equipment, medium and program product. Background Art
[0002] The spot electricity price is a core indicator that reflects the operation of the power market, evaluates the efficiency of market competition and the degree of market maturity, and is also the basic basis for market members to make business decisions. Therefore, it is very important to conduct statistical analysis and forecasting of the spot electricity price in the power market.
[0003] In the related art, the spot electricity price is mainly predicted as follows: construct a combined electricity price prediction model, each sub-model performs electricity price prediction separately to obtain the corresponding sub-sequence results, and the sub-sequence results are summed or averaged as the final electricity price prediction result.
[0004] However, when constructing a combined model, each sub-model needs to have a large mechanism difference, and the overall modeling complexity is high and difficult to achieve. In addition, recombining the results predicted by the sub-models is likely to reduce the accuracy of the final electricity price prediction results. Summary of the invention
[0005] The embodiments of the present application provide a method, device, equipment, medium and program product for predicting electricity prices, which can improve the accuracy of electricity price prediction results. The technical solution is as follows:
[0006] In one aspect, a method for predicting electricity prices is provided, the method comprising:
[0007] Obtaining forecasted supply and demand data, wherein the forecasted supply and demand data is data obtained by forecasting the supply and demand of electricity in a future time period;
[0008] Performing deviation correction on the forecasted supply and demand data to obtain corrected forecasted supply and demand data;
[0009] Determining predicted electricity price impact data corresponding to the revised predicted supply and demand data, wherein the predicted electricity price impact data includes the type of impact parameter that affects the electricity price;
[0010] The corrected predicted supply and demand data and the predicted electricity price impact data are input into a pre-trained electricity price prediction classification model to obtain a target electricity price range label, and there is a corresponding relationship between the target electricity price range label and a plurality of pre-trained electricity price prediction regression models; wherein the electricity price prediction classification model is obtained by clustering the electricity prices in a historical time period, taking the centers of the plurality of clusters obtained as a plurality of electricity price range labels, dividing the supply and demand data in the historical time period into a plurality of subsets based on the plurality of electricity price range labels, and training the models based on the plurality of subsets; the electricity price prediction classification model is used to determine the price range based on input parameters; the plurality of electricity price prediction regression models are models trained based on the plurality of subsets respectively; the plurality of electricity price prediction regression models are used to predict the electricity price based on input parameters, and the input parameters include the supply electricity and the demand electricity;
[0011] Determining a target electricity price prediction regression model from the plurality of electricity price prediction regression models based on the target electricity price interval mark;
[0012] The corrected forecasted supply and demand data and the forecasted electricity price impact data are input into the target electricity price forecast regression model to obtain the electricity price forecast result within the future time period.
[0013] In another aspect, a device for predicting electricity prices is provided, the device comprising:
[0014] An acquisition module is used to acquire forecast supply and demand data, wherein the forecast supply and demand data is data obtained by forecasting the supply and demand of electricity in a future time period;
[0015] A deviation correction module, used to correct the deviation of the forecast supply and demand data to obtain the corrected forecast supply and demand data;
[0016] A determination module, used to determine the predicted electricity price impact data corresponding to the revised predicted supply and demand data, wherein the predicted electricity price impact data includes the type of impact parameter that affects the electricity price;
[0017] An interval mark acquisition module is used to input the corrected predicted supply and demand data and the predicted electricity price impact data into a pre-trained electricity price prediction classification model to obtain a target electricity price interval mark, and there is a corresponding relationship between the target electricity price interval mark and a plurality of pre-trained electricity price prediction regression models; wherein the electricity price prediction classification model is a model obtained by clustering the electricity prices in a historical time period, taking the centers of the plurality of clusters obtained as a plurality of electricity price interval marks, dividing the supply and demand data in the historical time period based on the plurality of electricity price interval marks to obtain a plurality of subsets, and training the models based on the plurality of subsets; the electricity price prediction classification model is used to determine the price interval based on input parameters; the plurality of electricity price prediction regression models are models trained based on the plurality of subsets respectively; the plurality of electricity price prediction regression models are used to predict the electricity price based on input parameters, and the input parameters include the supply electricity and the demand electricity;
[0018] The determination module is further configured to determine a target electricity price prediction regression model from the multiple electricity price prediction regression models based on the target electricity price interval mark;
[0019] The electricity price prediction module is used to input the revised predicted supply and demand data and the predicted electricity price impact data into the target electricity price prediction regression model to obtain the electricity price prediction result in the future time period.
[0020] On the other hand, a computer device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the electricity price prediction method as described in any of the above-mentioned embodiments of the present application.
[0021] On the other hand, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a code set or an instruction set is stored. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the electricity price prediction method as described in any of the above-mentioned embodiments of the present application.
[0022] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the electricity price prediction method described in any of the above embodiments.
[0023] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0024] Obtain the forecasted supply and demand data obtained by forecasting the supply and demand electricity in the future time period, and input the forecasted supply and demand data as input parameters into the pre-trained electricity price forecast classification model and electricity price forecast regression model, so as to obtain the electricity price forecast results for the future time period. Among them, the electricity price forecast classification model can determine the price range to which the forecasted electricity price belongs based on the input parameters, and determine the possible fluctuation range of the electricity price. The electricity price forecast regression model can further determine the specific electricity price forecast results based on the input parameters, thereby improving the accuracy of the electricity price forecast results. Correcting the deviation of the forecasted supply and demand data can improve the accuracy of the forecasted supply and demand data, and further improve the accuracy of the electricity price forecast results. Based on the corrected forecasted supply and demand data, determine the type of influencing parameters that can affect the electricity price, and use the influencing parameter type and the forecasted supply and demand data as input parameters for electricity price forecasting, which is more in line with the internal formation mechanism of the electricity price, making the electricity price forecast results more in line with reality. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0026] Figure 1 is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;
[0027] Figure 2 is a flow chart of an electricity price prediction method provided by an exemplary embodiment of the present application;
[0028] Figure 3 is a flow chart of a method for training an electricity price prediction model provided by an exemplary embodiment of the present application;
[0029] Figure 4 is based on Figure 3 A flowchart of another method for training an electricity price prediction model is shown;
[0030] Figure 5 is a structural block diagram of an electricity price prediction device provided by an exemplary embodiment of the present application;
[0031] Figure 6 is a structural block diagram of an electricity price prediction device provided by another exemplary embodiment of the present application;
[0032] Figure 7 It is a structural block diagram of a computer device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0034] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0035] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0036] It should be noted that the information (including but not limited to information on pre-trained models, etc.) and data (including but not limited to supply and demand data, electricity price data, electricity price impact data, etc.) involved in this 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 must comply with relevant laws, regulations and standards of relevant countries and regions.
[0037] It should be understood that, although the terms first, second, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first parameter may also be referred to as the second parameter, and similarly, the second parameter may also be referred to as the first parameter. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0038] The spot electricity price is a core indicator that reflects the operation of the power market, evaluates the efficiency of market competition and the degree of market maturity, and is also the basic basis for market members to make business decisions. Therefore, it is very important to conduct statistical analysis and forecasting of spot electricity prices in the power market. The fluctuation of electricity prices affects the flow and allocation of various resources in the power market and has a strong economic leverage effect. In the power spot market environment, accurate spot electricity price forecasts are of great significance to market participants, especially new energy power generation companies.
[0039] In the related technology, the methods for predicting the spot electricity price are mainly as follows: constructing a combined electricity price prediction model based on methods such as Ensemble Empirical Mode Decomposition (EEMD), Support Vector Machine (SVM), Auto-Regressive and Moving Average Model (ARMA), etc. Each sub-model constituting the combined electricity price prediction model will output its own prediction result, called a sub-sequence. The prediction results of each sub-sequence are summed or averaged as the final electricity price prediction result.
[0040] However, the above method has high requirements for each sub-model. It requires a single sub-model to have a high prediction accuracy, and multiple sub-models need to have large mechanism differences, and the overall modeling complexity is high. In addition, when the prediction results of the sub-models are combined again, it is likely that the prediction results of a single sub-model are more accurate, but the combined prediction results are less accurate, resulting in a lower accuracy of the final electricity price prediction results.
[0041] The present application provides an electricity price prediction method, which obtains data obtained by predicting the supply and demand of electricity in a future time period, inputs the data as input parameters into a pre-trained electricity price prediction classification model, obtains interval marks that can reflect the electricity price fluctuation range in the future time period, and determines a target electricity price prediction regression model for predicting electricity prices from multiple pre-trained electricity price prediction regression models based on the interval marks, inputs the input parameters into the target electricity price prediction regression model, and obtains an electricity price prediction result with higher accuracy.
[0042] Among them, the training process of the electricity price prediction classification model and the electricity price prediction regression model is as follows: by obtaining the supply and demand data and electricity price data in the historical time period, using the above data to train different pre-trained models respectively, to obtain the electricity price prediction classification model and multiple electricity price prediction regression models. Among them, the electricity price prediction classification model is used to determine the price fluctuation range of the predicted electricity price results, and the electricity price prediction regression model is used to further determine the specific electricity price prediction results after determining the price fluctuation range. The method provided in the present application only needs to use the same data to train the two pre-trained models separately, without the need for overall modeling. The electricity price prediction regression model is used to narrow the electricity price range, and then the electricity price prediction regression model outputs a higher precision electricity price prediction result, which can improve the accuracy of electricity price prediction and reduce the complexity of the model training process.
[0043] In some embodiments, in order to better explore the factors that affect electricity prices, find the patterns of electricity price fluctuations, and improve the accuracy of electricity price forecast results, after obtaining the supply and demand data within the historical time period, the supply and demand data can continue to be mined and analyzed to determine other types of influencing parameters that affect electricity prices.
[0044] The historical time period includes multiple sub-time periods, each of which corresponds to supply and demand data, electricity price data and influencing parameter types. All data in each sub-time period are formed into a data group, and the model is trained with at least one data group as a unit.
[0045] Based on the electricity prices corresponding to multiple sub-time periods in the historical time period, cluster analysis is performed to obtain multiple cluster clusters, each of which includes its own cluster center electricity price. Optionally, the number of cluster center electricity prices is k, and the price range of the electricity price is divided based on the k cluster center electricity prices to obtain multiple sub-ranges, each of which contains an electricity price corresponding to at least one sub-time period. Based on the divided price ranges, the data groups corresponding to the multiple sub-time periods are divided to obtain data subsets corresponding to each price sub-range.
[0046] The first pre-trained model is trained based on the above multiple data subsets to obtain an electricity price prediction classification model. The input parameters of the electricity price prediction classification model are supply and demand data and influencing parameter types, and the output result is an interval mark, which corresponds to the sub-interval in the above price interval.
[0047] The first pre-trained model is trained based on the above multiple data subsets to obtain multiple electricity price prediction regression models, the input parameters of the electricity price prediction regression model are supply and demand data and influencing parameter types, and the output result is the electricity price prediction result. There is a corresponding relationship between each electricity price prediction regression model and the interval mark.
[0048] That is, the data subset corresponding to the i-th sub-interval is input into the electricity price prediction classification model for training, so that its output result is i, which means that the i-th electricity price prediction regression model among multiple electricity price prediction regression models is used to predict the electricity price, and the data subset corresponding to the i-th sub-interval is input into the i-th electricity price prediction regression model, and the electricity price prediction result is output.
[0049] In summary, the electricity price forecasting classification model can determine the price range to which the predicted electricity price belongs based on the input parameters and determine the possible fluctuation range of the electricity price. The electricity price forecasting regression model can further determine the specific electricity price forecast results based on the input parameters and improve the accuracy of the electricity price forecast results.
[0050] The implementation environment involved in the embodiments of the present application is described, for illustration, please refer to Figure 1The implementation environment involves a terminal 100 and a server 120 , and the terminal 100 and the server 120 are connected via a communication network 110 .
[0051] When predicting electricity prices for future time periods, first obtain predicted supply and demand data, which includes predicted supply and demand electricity in the future time period. The terminal 100 sends the predicted supply and demand data to the server 120 via the communication network 110, and the server 120 predicts the electricity price in the future time period based on the supply and demand prediction data, and sends the electricity price prediction result to the terminal 100 via the communication network 110.
[0052] In some embodiments, the server 120 includes an electricity price prediction model, which includes an electricity price prediction classification model and multiple electricity price prediction regression models, wherein the electricity price prediction classification model is used to determine the price range of electricity prices (that is, the electricity price fluctuation range) based on the predicted supply and demand data, and the electricity price prediction regression model is used to determine the electricity price prediction results based on the predicted supply and demand data.
[0053] The training process of the electricity price prediction model includes the following parts.
[0054] 1. Obtain a first data set, the first data set including supply and demand data and electricity price data corresponding to multiple sub-time periods in a historical time period; cluster the electricity prices corresponding to the multiple sub-time periods in the first data set to obtain k cluster clusters, each cluster cluster containing the corresponding cluster center electricity price; divide the price ranges of the electricity price data corresponding to the multiple sub-time periods based on the k cluster center electricity prices to obtain k+1 gridded sub-ranges, and divide the first data set based on the price range division method to obtain k+1 first subsets, wherein each first subset contains supply and demand data and electricity price data corresponding to at least one sub-time period.
[0055] 2. Input the k+1 first subsets into the first pre-training model in sequence for training to obtain an electricity price prediction classification model.
[0056] 3. Input the k+1 first subsets into the k+1 second pre-trained models for training respectively, and obtain k+1 electricity price prediction regression models.
[0057] The above-mentioned terminal can be a mobile phone, a tablet computer, a desktop computer, a portable laptop computer, a smart TV, a car terminal, a smart home device and other terminal devices in various forms, which is not limited in the embodiments of the present application.
[0058] It is worth noting that the above-mentioned servers can be independent physical servers, or they can be server clusters or distributed systems composed of multiple physical servers. They can also be cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.
[0059] Among them, cloud technology refers to a hosting technology that unifies hardware, software, network and other resources in a wide area network or local area network to realize data computing, storage, processing and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which is used on demand and flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data require strong system backing support, which can only be achieved through cloud computing.
[0060] In some embodiments, the above server can also be implemented as a node in a blockchain system.
[0061] In combination with the above-mentioned noun introduction and application scenarios, the electricity price prediction method provided by the present application is described. The method can be executed by a server or a terminal, or can be executed by a server and a terminal together. In the embodiment of the present application, the method is described by taking the execution of the server as an example. Figure 2 As shown, Figure 2 1 is a flow chart of an electricity price prediction method provided by an exemplary embodiment of the present application. The method comprises the following steps.
[0062] Step 210, obtaining forecast supply and demand data.
[0063] Among them, the predicted supply and demand data is the data obtained by predicting the supply and demand of electricity in a future time period.
[0064] Exemplarily, if the current date is December 1, the forecasted supply and demand data includes data obtained by forecasting the supply and demand of electricity on December 2.
[0065] Exemplarily, the units of the supplied electricity and the demanded electricity are megawatts (MW), and the unit of the electricity price is yuan / MW.
[0066] Optionally, the supply and demand data also include multiple sub-items of electricity, including but not limited to centralized load, interconnection line electricity, new energy power generation, hydropower generation, thermal power generation, etc.
[0067] Step 220, performing deviation correction on the forecasted supply and demand data to obtain corrected forecasted supply and demand data.
[0068] Acquire adjacent supply and demand data, where the adjacent supply and demand data includes the supply and demand electricity in a historical time period adjacent to the future time period.
[0069] Exemplarily, the adjacent supply and demand data include the supply electricity and demand electricity on November 28, November 29, November 30, and December 1.
[0070] Deviation anomaly detection is performed on the forecasted supply and demand data and the adjacent supply and demand data to obtain deviation anomaly results, which are used to indicate situations where the forecasted supply and demand data needs to be corrected.
[0071] In response to the abnormal deviation result indicating that the predicted supply and demand data needs to be corrected, the predicted supply and demand data is corrected based on adjacent supply and demand data to obtain corrected predicted supply and demand data.
[0072] For example, based on the changes in the forecasted supply and demand data and the adjacent supply and demand data relative to the daily average (i.e., the daily average of the supply and demand data from November 28 to December 2), the Chebyshev inequality is used for deviation anomaly detection. The Chebyshev inequality means that in any data set, the proportion of data that is more than A times the standard deviation from the mean is at most 1 / A^2.
[0073] Optionally, when the deviation abnormal result reaches 75%, it means that the forecast supply and demand data needs to be revised.
[0074] For example, if the deviation is 78%, it means that the forecast supply and demand data needs to be revised. Since the forecast supply and demand data corresponds to December 2, the historical real data of the day before the forecast supply and demand data is used for revision, that is, the supply and demand data of December 1 is used to revise the forecast supply and demand data. For example, the supply and demand data of December 1 is used as the revised forecast supply and demand data.
[0075] If the deviation result does not reach 75%, it means that the forecast supply and demand data does not need to be corrected and the forecast supply and demand data can be used directly for electricity price forecasting.
[0076] For example, if the deviation abnormal result is 20%, it means that the forecast supply and demand data does not need to be corrected.
[0077] It is worth noting that the above-mentioned method of detecting deviation anomalies of the forecasted supply and demand data based on Chebyshev's inequality is only used as an example. In some embodiments, the forecasted supply and demand data can also be detected based on other methods. The method of using the previous day's historical real data to forecast the supply and demand data can be any method, including but not limited to the above-mentioned method of using the previous day's supply and demand data as the forecasted supply and demand data for example, and the corrected forecasted supply and demand data can also be obtained by weighted calculation of the historical supply and demand data and the forecasted supply and demand data, which is not limited in this embodiment.
[0078] Step 230, determining the predicted electricity price impact data corresponding to the revised predicted supply and demand data.
[0079] In some embodiments, in order to better explore the factors that affect electricity prices and find the patterns of electricity price fluctuations to improve the accuracy of electricity price prediction results, before dividing the first data set to obtain multiple first subsets, the supply and demand data can also be mined and analyzed to obtain more parameters that affect electricity prices.
[0080] The predicted electricity price impact data includes the types of impact parameters that affect the electricity price.
[0081] Exemplarily, the revised forecast supply and demand data includes data obtained by forecasting the supply and demand of electricity on December 2. The revised forecast supply and demand data is mined and analyzed to determine the forecast electricity price impact data, which includes the types of impact parameters that affect the electricity price on December 2.
[0082] Optionally, the influencing parameter types include but are not limited to market supply electricity, market demand electricity, deviation electricity, proportion of new energy electricity, etc.
[0083] Step 240 , input the revised forecast supply and demand data and forecast electricity price impact data into the electricity price forecast classification model to obtain the target electricity price range mark.
[0084] The electricity price forecast classification model is a model obtained by clustering the electricity prices in the historical time period, using the centers of the obtained multiple clusters as multiple electricity price interval labels, dividing the supply and demand data in the historical time period into multiple subsets based on the multiple electricity price interval labels, and training the model based on the multiple subsets. The electricity price forecast classification model is used to determine the price range based on the input parameters.
[0085] The multiple electricity price prediction regression models are models obtained by training the multiple subsets respectively. The multiple electricity price prediction regression models are used to predict the electricity price based on input parameters, and the input parameters include the supply power and the demand power.
[0086] Step 250 : determining a target electricity price prediction regression model from a plurality of electricity price prediction regression models based on the target electricity price interval mark.
[0087] In response to the target electricity price interval being marked as i, the i-th electricity price prediction regression model among the multiple electricity price prediction regression models is determined as the target electricity price prediction regression model, where i is a positive integer.
[0088] Exemplarily, there are k+1 electricity price prediction regression models, each of which corresponds to its own electricity price interval mark. For example, the electricity price interval mark of the first electricity price prediction regression model is 1, indicating that it is suitable for predicting input parameters whose electricity price fluctuation range belongs to the first sub-interval in the price interval.
[0089] Step 260, input the revised forecast supply and demand data and the forecast electricity price impact data into the target electricity price forecast regression model to obtain the electricity price forecast result in the future time period.
[0090] Exemplarily, the corrected predicted supply and demand data and predicted electricity price impact data are input into the electricity price forecasting classification model, and the target electricity price range is marked as 3. This means that the third electricity price forecasting regression model can be used to forecast the predicted supply and demand data and the predicted electricity price impact data for electricity price forecasting, and the obtained electricity price forecast results are used to indicate the electricity price on December 2.
[0091] In summary, the method provided by the present application obtains the predicted supply and demand data obtained by predicting the supply and demand electricity in the future time period, and inputs the predicted supply and demand data as input parameters into the pre-trained electricity price prediction classification model and electricity price prediction regression model, so as to obtain the electricity price prediction results for the future time period. Among them, the electricity price prediction classification model can determine the price range to which the predicted electricity price belongs based on the input parameters, and determine the possible fluctuation range of the electricity price. The electricity price prediction regression model can further determine the specific electricity price prediction results based on the input parameters, and improve the accuracy of the electricity price prediction results. Correcting the deviation of the predicted supply and demand data can improve the accuracy of the predicted supply and demand data, and further improve the accuracy of the electricity price prediction results. Based on the corrected predicted supply and demand data, the type of influencing parameters that can affect the electricity price is determined, and the influencing parameter type and the predicted supply and demand data are used as input parameters at the same time to predict the electricity price, which is more in line with the internal formation mechanism of the electricity price, so that the electricity price prediction results are more in line with reality.
[0092] The method provided in this embodiment determines the fluctuation range of electricity prices in future time periods through an electricity price prediction classification model, and determines an electricity price prediction regression model suitable for predicting supply and demand data and influencing parameter types corresponding to future time periods based on the output results of the electricity price prediction classification model, which can improve the accuracy of electricity price prediction results.
[0093] The method provided in this embodiment can determine whether the supply and demand data needs to be corrected by detecting deviations in the supply data and demand data corresponding to the future time period, and promptly correct the supply and demand data with large deviations to obtain more accurate supply and demand forecast data. Using the supply and demand forecast data with higher accuracy to predict electricity prices in the future time period can simply improve the accuracy of the electricity price forecast results.
[0094] Figure 3 The present invention is a flowchart of a method for training an electricity price prediction model, wherein the electricity price prediction model includes a pre-trained electricity price prediction classification model and multiple electricity price prediction regression models, and the method includes the following steps.
[0095] Step 310: Acquire first supply and demand data and first electricity price data.
[0096] The first supply and demand data include supply and demand electricity corresponding to a plurality of sub-time periods in a historical time period, and the first electricity price data include electricity prices corresponding to a plurality of sub-time periods.
[0097] Exemplarily, the historical time period is the past week, and each sub-time period is a day within the historical time period. The first supply and demand data includes the supply and demand electricity corresponding to each day in the past week; the first electricity price data includes the electricity price corresponding to each day in the past week.
[0098] That is, there are supply power, demand power and electricity price corresponding to each day in the past week. For example, the units of supply power and demand power are megawatts (MW), and the unit of electricity price is yuan / MW.
[0099] Optionally, the supply and demand data also include multiple sub-items of electricity, including but not limited to centralized load, interconnection line electricity, new energy power generation, hydropower generation, thermal power generation, etc.
[0100] Step 320 , performing cluster analysis on the electricity prices corresponding to the multiple sub-time periods to obtain multiple clusters.
[0101] The clusters include the electricity prices at the cluster centers.
[0102] Exemplarily, the historical time period includes 7 sub-time periods, each sub-time period corresponds to an electricity price, and the electricity prices of the 7 sub-time periods are clustered to obtain 4 clusters, each of which includes an electricity price corresponding to at least one sub-time period.
[0103] Exemplarily, the first cluster includes electricity prices corresponding to the first sub-time period and the second sub-time period; the second cluster includes electricity prices corresponding to the third sub-time period and the fifth sub-time period; the third cluster includes electricity prices corresponding to the fourth sub-time period and the seventh sub-time period; and the fourth cluster includes electricity prices corresponding to the sixth sub-time period.
[0104] Optionally, types of cluster center electricity prices include but are not limited to the following.
[0105] (1) The electricity price corresponding to the center of each cluster is the cluster center electricity price;
[0106] (2) Calculate the distance between each electricity price and the center position in the cluster respectively, and take the electricity price with the closest distance as the cluster center electricity price.
[0107] Step 330 , dividing the first data set into price ranges based on the cluster center electricity price divisions to obtain a plurality of first subsets.
[0108] That is, cluster analysis can dynamically identify the step boundaries of spot electricity prices. The cluster center electricity prices corresponding to the multiple clusters obtained by cluster analysis are the electricity price boundaries. By dividing the price range of spot electricity prices by the cluster price centers, multiple price sub-ranges can be obtained. Each sub-range is used to represent a different range of electricity price fluctuations.
[0109] The first data set includes first data groups corresponding to multiple sub-time periods respectively, the first data group includes the supply power, demand power and electricity price corresponding to the sub-time period, and the first subset includes the first data group corresponding to at least one sub-time period.
[0110] Exemplarily, the first sub-time period is the first day in the historical time period, and the first data group of the first sub-time period includes the supply power, demand power, and electricity price corresponding to the first sub-time period. The second sub-time period is the second day in the historical time period, and the first data group of the second sub-time period includes the supply power, demand power, and electricity price corresponding to the second sub-time period.
[0111] Exemplarily, there is a target first subset among multiple first subsets, and the target first subset includes first data groups corresponding to the first sub-time period and the second sub-time period respectively. Then the first subset includes the supply power, demand power, and electricity price corresponding to the first sub-time period, and the supply power, demand power, and electricity price corresponding to the second sub-time period.
[0112] Optionally, the number of the plurality of clusters is k, where k is a positive integer; then, the number of cluster center electricity prices is also k.
[0113] The electricity prices corresponding to the multiple sub-time periods are divided based on the k cluster center electricity prices to obtain a price interval, wherein the price interval includes k+1 sub-intervals. The first data set is divided based on the k+1 sub-intervals to obtain k+1 first subsets, wherein the sub-interval corresponding to the i-th first subset is marked as i, and i is a positive integer.
[0114] In some embodiments, there may be a situation where the electricity prices corresponding to some sub-time periods are significantly different from the electricity prices of other sub-time periods, or, in the cluster clusters obtained after cluster analysis of the electricity prices corresponding to multiple sub-time periods, there are cluster clusters where the number of electricity prices does not meet the preset quantity requirement. After the clustering is completed, based on the silhouette coefficient of each cluster cluster, k cluster clusters are retained, and the first data set is divided based on the cluster center electricity prices corresponding to these k cluster clusters.
[0115] Exemplarily, the range of the silhouette coefficient is (-1, 1). The lower the silhouette coefficient, the worse the clustering effect of the cluster. Therefore, k clusters with the highest silhouette coefficients are selected as the boundary values for dividing the price range, and k is a preset value.
[0116] For example, after cluster analysis of electricity prices, 5 clusters are obtained, and the silhouette coefficients of the 5 clusters are 0.9, 0.8, 0, -0.7 and 0.6 respectively. k is 3, and the cluster center electricity prices corresponding to the clusters with silhouette coefficients of 0.9, 0.8 and 0.6 are used as the boundary values for dividing the price range.
[0117] Optionally, the cluster center electricity prices are 10, 15, and 20 respectively. Then, the price interval divided by the cluster center electricity price includes 4 sub-intervals, which are x≤10, 10 <x≤15、15<x≤20、x> 20, where x is the electricity price.
[0118] Optionally, the first data set is divided based on the above price range to obtain four first subsets corresponding to the four sub-ranges respectively.
[0119] For example, the historical time period is the past week, and each sub-time period is a day within the historical time period. The electricity prices corresponding to the first sub-time period to the seventh sub-time period are: 8, 12, 13, 14, 16, 18, 21 respectively.
[0120] Among them, the electricity price corresponding to the first sub-time period is 8, which belongs to the electricity price of the first sub-interval, and the first data group corresponding to the first sub-time period belongs to the first first subset.
[0121] In some embodiments, in order to better explore the factors that affect electricity prices and find the patterns of electricity price fluctuations to improve the accuracy of electricity price prediction results, before dividing the first data set to obtain multiple first subsets, the supply and demand data can also be mined and analyzed to obtain more parameters that affect electricity prices.
[0122] Optionally, first electricity price influencing data corresponding to the first supply and demand data is determined, and the first electricity price influencing data includes the type of influencing parameters that have an impact on the electricity price.
[0123] Exemplarily, the influencing parameter types include but are not limited to market supply electricity, market demand electricity, deviation electricity, proportion of new energy electricity, etc. The first electricity price impact data also includes the influencing parameter types corresponding to multiple sub-time periods in the historical time period.
[0124] The first data group also includes the influencing parameter type corresponding to the sub-time period.
[0125] Step 340: training the first pre-trained model based on the multiple first subsets to obtain an electricity price prediction classification model, and training the second pre-trained model based on the multiple first subsets to obtain an electricity price prediction regression model corresponding to the multiple price ranges.
[0126] Among them, the electricity price prediction classification model is used to determine the price range based on input parameters, and multiple electricity price prediction regression models are used to predict electricity prices based on input parameters, which include supply electricity and demand electricity.
[0127] In summary, the method provided by the present application obtains the predicted supply and demand data obtained by predicting the supply and demand electricity in the future time period, and inputs the predicted supply and demand data as input parameters into the pre-trained electricity price prediction classification model and electricity price prediction regression model, so as to obtain the electricity price prediction results for the future time period. Among them, the electricity price prediction classification model can determine the price range to which the predicted electricity price belongs based on the input parameters, and determine the possible fluctuation range of the electricity price. The electricity price prediction regression model can further determine the specific electricity price prediction results based on the input parameters, and improve the accuracy of the electricity price prediction results. Correcting the deviation of the predicted supply and demand data can improve the accuracy of the predicted supply and demand data, and further improve the accuracy of the electricity price prediction results. Based on the corrected predicted supply and demand data, the type of influencing parameters that can affect the electricity price is determined, and the influencing parameter type and the predicted supply and demand data are used as input parameters at the same time to predict the electricity price, which is more in line with the internal formation mechanism of the electricity price, so that the electricity price prediction results are more in line with reality.
[0128] The method provided in this embodiment performs cluster analysis on electricity prices corresponding to multiple sub-time periods in a historical time period to obtain multiple cluster center electricity prices, and obtains different price ranges according to the cluster center electricity prices. The price ranges can reflect the distribution of electricity prices in the historical time period. Based on the price ranges, the supply and demand data and electricity price data corresponding to the multiple sub-time periods are divided into multiple subsets, and the pre-trained models are trained separately using the multiple subsets to obtain an electricity price prediction classification model and multiple electricity price prediction regression models.
[0129] The method provided in this embodiment divides the price range based on the cluster center electricity price, and further divides the first data set to obtain multiple first subsets that can be used to train the electricity price prediction model. Each first subset corresponds to a sub-range in the price range, which can reflect the fluctuation range of electricity prices in the historical time period.
[0130] The method provided in this embodiment mines and analyzes the first supply and demand data, which can expand more types of influencing parameters that affect electricity prices, make the analysis of electricity price changes more in line with actual conditions, and improve the accuracy of electricity price prediction results.
[0131] Figure 4 is based on Figure 3 Another flow chart of the electricity price prediction method is shown, wherein the above step 340 can also be implemented as the following steps.
[0132] Step 341 , input the supply and demand data and influencing parameter types in the k+1 first subsets into a classification model for training to obtain an electricity price prediction classification model.
[0133] The first pre-trained model includes a classification model, and the second pre-trained model includes multiple regression models.
[0134] Optionally, the first pre-trained model is a deep forest classification model, and the second pre-trained model is a deep forest regression model.
[0135] The output result of the electricity price prediction classification model is used as a sub-interval mark. The sub-interval mark is used to indicate each sub-interval in the price range. For example, the price range is divided into 4 sub-intervals, which are the 1st sub-interval, the 2nd sub-interval, the 3rd sub-interval and the 4th sub-interval in the order of increasing electricity price range. Then, the sub-interval marks of these sub-intervals are 1, 2, 3, and 4 respectively.
[0136] Optionally, k is 3, and there are 4 first subsets in total, and each first subset corresponds to one of the sub-ranges according to the price range to which the electricity price belongs.
[0137] Exemplarily, the first first subset corresponds to the first sub-interval, the second first subset corresponds to the second sub-interval, the third first subset corresponds to the third sub-interval, and the fourth first subset corresponds to the fourth sub-interval.
[0138] The supply and demand data and the influencing parameter types in the i-th first subset are input into the classification model to obtain the i-th classification result.
[0139] The classification model is trained based on the difference between the sub-interval label corresponding to the i-th first subset and the i-th classification result to obtain an electricity price prediction classification model, wherein when the input parameters of the electricity price prediction classification model are the supply and demand data and the influencing parameter type in the i-th first subset, the output result of the electricity price prediction classification model is i.
[0140] For example, the classification model is trained using the first subset as an example, and the supply power, demand power and influencing parameter type in the first subset are input into the classification model to obtain the first classification result. The first classification result may be any one from 1 to k+1. If it is 1, it means that the classification result is correct. If it is not 1, the classification model is further trained based on the subinterval mark (1) corresponding to the first subset.
[0141] Each time the classification model is trained, a first subset is used as an input parameter. When all first subsets are used to train the classification model and the output result of the classification model is the same as the sub-interval mark corresponding to each input parameter, the training is stopped to obtain a trained electricity price prediction classification model.
[0142] Step 342: Input the supply and demand data and the influencing parameter types in the i-th first subset into the i-th regression model for training to obtain the i-th electricity price prediction regression model.
[0143] Among them, the i-th electricity price prediction regression model is used to predict the electricity price of the data set whose sub-interval label belongs to i.
[0144] Optionally, the number of regression models is the same as the number of first subsets. For example, the first data set is divided into price ranges based on the electricity prices of k cluster centers to obtain k+1 first subsets, then the number of regression models is also k+1, wherein each first subset corresponds to a regression model.
[0145] The supply and demand data and the influencing parameter types in the ith first subset are input into the ith regression model to obtain the ith electricity price prediction result. The ith regression model is trained based on the difference between the electricity price in the ith first subset and the ith electricity price prediction result to obtain the ith electricity price prediction regression model, wherein when the input parameters of the ith electricity price prediction regression model are the supply and demand data and the influencing parameter types in the ith first subset, the difference between the output result of the ith electricity price prediction regression model and the electricity price in the ith first subset meets the preset electricity price error requirement.
[0146] Exemplarily, taking the example of using the first subset to train the first regression model, the supply power, demand power and influencing parameter type in the first subset are input into the first regression model to obtain the first electricity price prediction result, which can be any electricity price value.
[0147] Optionally, the preset electricity price error requirement is not more than 0.5, that is, when the error between the i-th electricity price prediction result and the corresponding electricity price in the i-th first subset does not exceed 0.5, it means that the i-th electricity price prediction result is accurate; if it exceeds 0.5, the i-th regression model continues to be trained based on the corresponding electricity price in the i-th first subset.
[0148] When training each regression model, one of the first subsets is used as an input parameter. When all the first subsets are used to train all the classification models respectively, and the output result of each classification model meets the preset electricity price error requirement with the electricity price corresponding to each input parameter, the training is stopped to obtain the trained k+1 electricity price prediction regression models.
[0149] It is worth noting that when training the model, the order between step 241 and step 242 can be arbitrary. That is, step 241 can be performed first, and then step 242; step 242 can be performed first, and then step 241; or step 241 and step 242 can be performed at the same time.
[0150] In summary, the method provided by the present application obtains the predicted supply and demand data obtained by predicting the supply and demand electricity in the future time period, and inputs the predicted supply and demand data as input parameters into the pre-trained electricity price prediction classification model and electricity price prediction regression model, so as to obtain the electricity price prediction results for the future time period. Among them, the electricity price prediction classification model can determine the price range to which the predicted electricity price belongs based on the input parameters, and determine the possible fluctuation range of the electricity price. The electricity price prediction regression model can further determine the specific electricity price prediction results based on the input parameters, and improve the accuracy of the electricity price prediction results. Correcting the deviation of the predicted supply and demand data can improve the accuracy of the predicted supply and demand data, and further improve the accuracy of the electricity price prediction results. Based on the corrected predicted supply and demand data, the type of influencing parameters that can affect the electricity price is determined, and the influencing parameter type and the predicted supply and demand data are used as input parameters at the same time to predict the electricity price, which is more in line with the internal formation mechanism of the electricity price, so that the electricity price prediction results are more in line with reality.
[0151] The method provided in this embodiment performs cluster analysis on electricity prices corresponding to multiple sub-time periods in a historical time period to obtain multiple cluster center electricity prices, and obtains different price ranges according to the cluster center electricity prices. The price ranges can reflect the distribution of electricity prices in the historical time period. Based on the price ranges, the supply and demand data and electricity price data corresponding to the multiple sub-time periods are divided into multiple subsets, and the pre-trained models are trained separately using the multiple subsets to obtain an electricity price prediction classification model and multiple electricity price prediction regression models.
[0152] The method provided in this embodiment trains different pre-trained models separately with the first subset as the unit of each training model. The obtained electricity price prediction classification model can determine the price fluctuation range of the predicted electricity price, and the electricity price prediction regression model can determine the result of the predicted electricity price. There is no need to combine multiple models for modeling, which reduces the complexity of the model building process and the training process and improves the training efficiency.
[0153] Figure 5 is a structural block diagram of an electricity price prediction device provided by an exemplary embodiment of the present application, such as Figure 5 As shown, the device includes the following parts.
[0154] An acquisition module 510 is used to acquire forecast supply and demand data, where the forecast supply and demand data is data obtained by forecasting the supply and demand of electricity in a future time period;
[0155] A deviation correction module 520, configured to correct the deviation of the forecast supply and demand data to obtain corrected forecast supply and demand data;
[0156] A determination module 530 is used to determine the predicted electricity price impact data corresponding to the revised predicted supply and demand data, wherein the predicted electricity price impact data includes the type of impact parameter that affects the electricity price;
[0157] The interval mark acquisition module 540 is used to input the corrected predicted supply and demand data and the predicted electricity price impact data into the pre-trained electricity price prediction classification model to obtain a target electricity price interval mark, and there is a corresponding relationship between the target electricity price interval mark and the pre-trained multiple electricity price prediction regression models; wherein the electricity price prediction classification model is a model obtained by clustering the electricity prices in the historical time period, taking the centers of the multiple clusters obtained as multiple electricity price interval marks, dividing the supply and demand data in the historical time period based on the multiple electricity price interval marks to obtain multiple subsets, and training the models based on the multiple subsets; the electricity price prediction classification model is used to determine the price range based on the input parameters; the multiple electricity price prediction regression models are models trained based on the multiple subsets respectively; the multiple electricity price prediction regression models are used to predict the electricity price based on the input parameters, and the input parameters include the supply electricity and the demand electricity;
[0158] The determination module 530 is further configured to determine a target electricity price prediction regression model from the multiple electricity price prediction regression models based on the target electricity price interval mark;
[0159] The electricity price prediction module 550 is used to input the corrected predicted supply and demand data and the predicted electricity price impact data into the target electricity price prediction regression model to obtain the electricity price prediction result in the future time period.
[0160] In an optional embodiment, the determination module 530 is further used to determine the i-th electricity price prediction regression model among the multiple electricity price prediction regression models as the target electricity price prediction regression model in response to the target electricity price interval being marked as i, where i is a positive integer.
[0161] In an optional embodiment, the deviation correction module 520 is also used to obtain adjacent supply and demand data, wherein the adjacent supply and demand data include the supply and demand electricity in a historical time period adjacent to the future time period; perform deviation anomaly detection on the predicted supply and demand data and the adjacent supply and demand data to obtain a deviation anomaly result, wherein the deviation anomaly result is used to indicate a situation where the predicted supply and demand data needs to be corrected; in response to the deviation anomaly result indicating that the predicted supply and demand data needs to be corrected, the predicted supply and demand data is corrected based on the adjacent supply and demand data to obtain the corrected predicted supply and demand data.
[0162] In an optional embodiment, before the interval mark acquisition module 540, as Figure 6 As shown, the device also includes:
[0163] The acquisition module 510 is further configured to acquire first supply and demand data and first electricity price data, wherein the first supply and demand data includes supply and demand electricity corresponding to a plurality of sub-time periods in a historical time period, and the first electricity price data includes electricity prices corresponding to the plurality of sub-time periods;
[0164] A cluster analysis module 560 is used to perform cluster analysis on the electricity prices corresponding to the multiple sub-time periods to obtain multiple clusters, wherein the clusters include cluster center electricity prices;
[0165] The electricity price division module 570 is used to divide the first data set based on the price range divided by the cluster center electricity price to obtain multiple first subsets, wherein the first data set includes first data groups corresponding to the multiple sub-time periods respectively, the first data group includes the supply power, demand power, and electricity price corresponding to the sub-time period, and the first subset includes at least one first data group corresponding to the sub-time period;
[0166] The model training module 580 is used to train the first pre-trained model based on the multiple first subsets to obtain the electricity price prediction classification model, and to train the second pre-trained model based on the multiple first subsets to obtain the multiple electricity price prediction regression models corresponding to the price ranges respectively.
[0167] In an optional embodiment, the number of the plurality of clusters is k, where k is a positive integer;
[0168] The electricity price division module 570 is also used to divide the electricity prices corresponding to the multiple sub-time periods based on the k cluster center electricity prices to obtain the price range, wherein the price range includes k+1 sub-ranges; based on the k+1 sub-ranges, the first data set is divided to obtain k+1 first subsets, wherein the sub-range corresponding to the i-th first subset is marked as i, and i is a positive integer.
[0169] In an optional embodiment, before the electricity price classification module 570, the determination module 530 is further used to determine first electricity price impact data corresponding to the first supply and demand data, where the first electricity price impact data includes the type of impact parameter that affects the electricity price;
[0170] The first data group also includes the influencing parameter type corresponding to the sub-time period.
[0171] In an optional embodiment, the first pre-trained model includes a classification model, and the second pre-trained model includes a plurality of regression models;
[0172] The model training module 580 is also used to input the supply and demand data and the influencing parameter types in the k+1 first subsets into the classification model for training to obtain the electricity price prediction classification model, wherein the output result of the electricity price prediction classification model is used as the sub-interval label; and to input the supply and demand data and the influencing parameter types in the i-th first subset into the i-th regression model for training to obtain the i-th electricity price prediction regression model, wherein the i-th electricity price prediction regression model is used to predict the electricity price for the data set whose sub-interval label belongs to i.
[0173] In an optional embodiment, the model training module 580 is also used to input the supply and demand data and the influencing parameter type in the i-th first subset into the classification model to obtain the i-th classification result; the classification model is trained based on the difference between the sub-interval mark corresponding to the i-th first subset and the i-th classification result to obtain the electricity price prediction classification model, wherein, when the input parameters of the electricity price prediction classification model are the supply and demand data and the influencing parameter type in the i-th first subset, the output result of the electricity price prediction classification model is i.
[0174] In an optional embodiment, the model training module 580 is also used to input the supply and demand data and the influencing parameter type in the i-th first subset into the i-th regression model to obtain the i-th electricity price prediction result; train the i-th regression model based on the difference between the electricity price in the i-th first subset and the i-th electricity price prediction result to obtain the i-th electricity price prediction regression model, wherein, when the input parameters of the i-th electricity price prediction regression model are the supply and demand data and the influencing parameter type in the i-th first subset, the difference between the output result of the i-th electricity price prediction regression model and the electricity price in the i-th first subset meets the preset electricity price error requirement.
[0175] In summary, the electricity price prediction device provided by the present application obtains the predicted supply and demand data obtained by predicting the supply and demand electricity in the future time period, and inputs the predicted supply and demand data as input parameters into the pre-trained electricity price prediction classification model and electricity price prediction regression model, so as to obtain the electricity price prediction results for the future time period. Among them, the electricity price prediction classification model can determine the price range to which the predicted electricity price belongs based on the input parameters, and determine the possible fluctuation range of the electricity price. The electricity price prediction regression model can further determine the specific electricity price prediction results based on the input parameters, and improve the accuracy of the electricity price prediction results. Correcting the deviation of the predicted supply and demand data can improve the accuracy of the predicted supply and demand data, and further improve the accuracy of the electricity price prediction results. Based on the corrected predicted supply and demand data, the type of influencing parameters that can affect the electricity price is determined, and the influencing parameter type and the predicted supply and demand data are used as input parameters at the same time to predict the electricity price, which is more in line with the internal formation mechanism of the electricity price, so that the electricity price prediction results are more in line with reality.
[0176] It should be noted that the electricity price prediction device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the electricity price prediction device provided in the above embodiment and the electricity price prediction method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0177] Figure 7The block diagram of the structure of a computer device 700 provided by an exemplary embodiment of the present application is shown. The computer device 700 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Group Audio Layer 3), an MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Group Audio Layer 4) player, a laptop computer or a desktop computer. The computer device 700 may also be called a user device, a portable terminal, a laptop terminal, a desktop terminal or other names.
[0178] Typically, the computer device 700 includes a processor 701 and a memory 702 .
[0179] The processor 701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 701 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 701 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 701 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 701 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0180] The memory 702 may include one or more computer-readable storage media, which may be non-transitory. The memory 702 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 702 is used to store at least one instruction, which is used to be executed by the processor 701 to implement the electricity price prediction method provided in the method embodiment of the present application.
[0181] In some embodiments, the computer device 700 further includes other components, which can be understood by those skilled in the art. Figure 7 The structure shown in the figure does not constitute a limitation on the computer device 700, and the computer device 700 may include more or less components than shown in the figure, or combine some components, or adopt a different arrangement of components.
[0182] Optionally, the computer readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a solid state drive (SSD), or an optical disk. Among them, the random access memory may include a resistance random access memory (ReRAM) and a dynamic random access memory (DRAM). The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.
[0183] An embodiment of the present application also provides a computer device, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the electricity price prediction method as described in any of the above embodiments of the present application.
[0184] An embodiment of the present application also provides a computer-readable storage medium, in which at least one instruction, at least one program, a code set or an instruction set is stored. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the electricity price prediction method as described in any of the above embodiments of the present application.
[0185] The embodiment of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the electricity price prediction method described in any of the above embodiments.
[0186] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0187] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for predicting electricity prices, characterized in that: The method comprises: Obtaining forecasted supply and demand data, wherein the forecasted supply and demand data is data obtained by forecasting the supply and demand of electricity in a future time period; Performing deviation correction on the forecasted supply and demand data to obtain corrected forecasted supply and demand data; Determine the predicted electricity price impact data corresponding to the revised predicted supply and demand data, wherein the predicted electricity price impact data includes the type of impact parameter that affects the electricity price; The corrected predicted supply and demand data and the predicted electricity price impact data are input into a pre-trained electricity price prediction classification model to obtain a target electricity price interval label, and there is a corresponding relationship between the target electricity price interval label and a plurality of pre-trained electricity price prediction regression models; wherein the electricity price prediction classification model is obtained by clustering the electricity prices in a historical time period, taking the centers of the plurality of clusters obtained as a plurality of electricity price interval labels, dividing the supply and demand data in the historical time period into a plurality of subsets based on the plurality of electricity price interval labels, and training the models based on the plurality of subsets; the electricity price prediction classification model is used to determine the price range based on input parameters; the plurality of electricity price prediction regression models are models trained based on the plurality of subsets respectively; the plurality of electricity price prediction regression models are used to predict the electricity price based on input parameters, and the input parameters include the supply electricity and the demand electricity; Determining a target electricity price prediction regression model from the plurality of electricity price prediction regression models based on the target electricity price interval mark; The corrected forecasted supply and demand data and the forecasted electricity price impact data are input into the target electricity price forecast regression model to obtain the electricity price forecast result in the future time period.
2. The method according to claim 1, characterized in that The step of determining the target electricity price prediction regression model from the plurality of electricity price prediction regression models based on the target electricity price interval mark includes: In response to the target electricity price interval being marked as i, the i-th electricity price prediction regression model among the multiple electricity price prediction regression models is determined as the target electricity price prediction regression model, where i is a positive integer.
3. The method according to claim 1, characterized in that The step of performing deviation correction on the forecasted supply and demand data to obtain corrected forecasted supply and demand data includes: Acquire adjacent supply and demand data, wherein the adjacent supply and demand data includes supply power and demand power in a historical time period adjacent to the future time period; Performing deviation anomaly detection on the predicted supply and demand data and the adjacent supply and demand data to obtain a deviation anomaly result, wherein the deviation anomaly result is used to indicate a situation where the predicted supply and demand data needs to be corrected; In response to the abnormal deviation result indicating that the predicted supply and demand data needs to be corrected, the predicted supply and demand data is corrected based on the adjacent supply and demand data to obtain the corrected predicted supply and demand data.
4. The method according to any one of claims 1 to 3, characterized in that: Before inputting the revised forecast supply and demand data and the forecast electricity price impact data into the pre-trained electricity price forecast classification model to obtain the target electricity price range mark, the method further includes: Acquire first supply and demand data and first electricity price data, wherein the first supply and demand data include supply and demand electricity corresponding to a plurality of sub-time periods in a historical time period, and the first electricity price data include electricity prices corresponding to the plurality of sub-time periods; Performing cluster analysis on the electricity prices corresponding to the multiple sub-time periods to obtain multiple clusters, wherein the clusters include cluster center electricity prices; Divide the first data set based on the price range divided by the cluster center electricity price to obtain multiple first subsets, wherein the first data set includes first data groups corresponding to the multiple sub-time periods respectively, the first data group includes the supply power, demand power, and electricity price corresponding to the sub-time period, and the first subset includes at least one first data group corresponding to the sub-time period; The first pre-trained model is trained based on the multiple first subsets to obtain the electricity price prediction classification model, and the second pre-trained model is trained based on the multiple first subsets to obtain the multiple electricity price prediction regression models corresponding to the price ranges respectively.
5. The method according to claim 4, characterized in that The number of the plurality of clusters is k, where k is a positive integer; The first data set is divided into price ranges based on the cluster center electricity price to obtain multiple first subsets, including: Based on the k cluster center electricity prices, the electricity prices corresponding to the multiple sub-time periods are divided to obtain the price interval, wherein the price interval includes k+1 sub-intervals; The first data set is divided based on the k+1 sub-intervals to obtain k+1 first subsets, wherein the sub-interval corresponding to the i-th first subset is marked as i, where i is a positive integer.
6. The method according to claim 5, characterized in that Before dividing the first data set into the price ranges divided based on the cluster center electricity price to obtain a plurality of first subsets, the method further includes: Determine first electricity price impact data corresponding to the first supply and demand data, wherein the first electricity price impact data includes a type of impact parameter that affects the electricity price; The first data group also includes the influencing parameter type corresponding to the sub-time period.
7. The method according to claim 6, characterized in that The first pre-trained model includes a classification model, and the second pre-trained model includes a plurality of regression models; The step of training the first pre-trained model based on the multiple first subsets to obtain the electricity price prediction classification model, and the step of training the second pre-trained model based on the multiple first subsets to obtain the multiple electricity price prediction regression models corresponding to the price ranges, respectively, includes: Input the supply and demand data and the influencing parameter types in the k+1 first subsets into the classification model for training to obtain the electricity price prediction classification model, wherein the output result of the electricity price prediction classification model is used as a sub-interval label; and The supply and demand data and the influencing parameter types in the i-th first subset are input into the i-th regression model for training to obtain the i-th electricity price prediction regression model, wherein the i-th electricity price prediction regression model is used to predict the electricity price for the data set whose sub-interval label belongs to i.
8. The method according to claim 7, characterized in that The supply and demand data and the influencing parameter types in the k+1 first subsets are input into the classification model for training to obtain the electricity price prediction classification model, including: Inputting the supply and demand data and the influencing parameter types in the i-th first subset into the classification model to obtain the i-th classification result; The classification model is trained based on the difference between the sub-interval mark corresponding to the i-th first subset and the i-th classification result to obtain the electricity price prediction classification model, wherein when the input parameters of the electricity price prediction classification model are the supply and demand data and the influencing parameter type in the i-th first subset, the output result of the electricity price prediction classification model is i.
9. The method according to claim 7, characterized in that: The supply and demand data and the influencing parameter types in the i-th first subset are input into the i-th regression model for training to obtain the i-th electricity price prediction regression model, including: Inputting the supply and demand data and the influencing parameter types in the i-th first subset into the i-th regression model to obtain the i-th electricity price prediction result; The i-th regression model is trained based on the difference between the electricity price in the i-th first subset and the i-th electricity price prediction result to obtain the i-th electricity price prediction regression model, wherein, when the input parameters of the i-th electricity price prediction regression model are the supply and demand data and the influencing parameter type in the i-th first subset, the difference between the output result of the i-th electricity price prediction regression model and the electricity price in the i-th first subset meets the preset electricity price error requirement.
10. An electricity price prediction device, characterized in that: The device comprises: An acquisition module is used to acquire forecast supply and demand data, wherein the forecast supply and demand data is data obtained by forecasting the supply and demand of electricity in a future time period; A deviation correction module, used to correct the deviation of the forecast supply and demand data to obtain the corrected forecast supply and demand data; A determination module, used to determine the predicted electricity price impact data corresponding to the revised predicted supply and demand data, wherein the predicted electricity price impact data includes the type of impact parameter that affects the electricity price; An interval mark acquisition module is used to input the corrected predicted supply and demand data and the predicted electricity price impact data into a pre-trained electricity price prediction classification model to obtain a target electricity price interval mark, and there is a corresponding relationship between the target electricity price interval mark and a plurality of pre-trained electricity price prediction regression models; wherein the electricity price prediction classification model is a model obtained by clustering the electricity prices in a historical time period, taking the centers of the plurality of clusters obtained as a plurality of electricity price interval marks, dividing the supply and demand data in the historical time period based on the plurality of electricity price interval marks to obtain a plurality of subsets, and training the models based on the plurality of subsets; the electricity price prediction classification model is used to determine the price interval based on input parameters; the plurality of electricity price prediction regression models are models trained based on the plurality of subsets respectively; the plurality of electricity price prediction regression models are used to predict the electricity price based on input parameters, and the input parameters include the supply electricity and the demand electricity; The determination module is further configured to determine a target electricity price prediction regression model from the multiple electricity price prediction regression models based on the target electricity price interval mark; The electricity price prediction module is used to input the revised predicted supply and demand data and the predicted electricity price impact data into the target electricity price prediction regression model to obtain the electricity price prediction result in the future time period.
11. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the electricity price prediction method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The storage medium stores at least one program, and the at least one program is loaded and executed by a processor to implement the electricity price prediction method according to any one of claims 1 to 9.
13. A computer program product, characterized in that It comprises a computer program, which, when executed by a processor, implements the electricity price prediction method as claimed in any one of claims 1 to 9.
Citation Information
Cited By
Short-term electricity price prediction method and device and computer readable storage medium
CN121212488A
