Power grid spot market clearing price prediction method and system, and electronic equipment

By using a combination method of neural network and random forest algorithm in the power spot market, clearing price prediction is performed based on historical data, and the problem of cumbersome and low accuracy in the prediction methods in the existing technology is solved, and more efficient and accurate prediction results are achieved.

CN119831638APending Publication Date: 2025-04-15TAIYUAN CITY FENGXING MEASUREMENT & CONTROL TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411903862.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

In the prior art, the training process of the electric spot market clearing price prediction method is cumbersome and the accuracy is not high.

Method used

A neural network model and random forest algorithm are used to establish a clear price prediction model based on historical clearance price and market boundary data, and preliminary prediction is made through neural networks, and secondary prediction is performed in combination with random forest algorithm to improve accuracy.

Benefits of technology

The data demand and model training process are simplified, the accuracy of clearance price prediction is improved, and accurate prediction of clearance price in the power grid spot market is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119831638A_ABST
    Figure CN119831638A_ABST
Patent Text Reader

Abstract

The invention relates to the field of power grids, and provides a power grid spot market clearing price prediction method and system, and an electronic device, and the method comprises the steps: obtaining the historical clearing price data and historical market boundary data of a power grid spot market; establishing a corresponding relationship between the historical clearing price data and the historical market boundary data; based on the corresponding relationship, establishing a clearing price prediction model, and inputting the market boundary data of the to-be-predicted day into the clearing price prediction model to obtain a first prediction result; taking the first prediction result and the corresponding relation as input, and applying a random forest algorithm to determine a second prediction result; and predicting the spot market clearing price of the power grid based on the first prediction result and the second prediction result. The method and the device are used for solving the defects of tedious training process and low precision of a clearing price prediction method in related technologies, the prediction precision is improved based on a neural network model and a random forest algorithm, and the model training process is also simple and convenient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power grids, and in particular to a method and system for predicting spot market clearing prices of power grids, and electronic equipment. Background Art

[0002] The electricity spot market mainly includes the day-ahead, intraday and real-time markets. The market clearing price is the actual reflection of the quotation results in the spot market, which directly affects the market interests of market players. Therefore, how to more accurately and effectively predict the clearing price of the electricity spot market is of great significance for various types of market players on both sides of the generation and use to formulate application decision-making plans and stabilize market returns.

[0003] In related technologies, when predicting the clearing price of the electricity spot market, the clearing price of the spot market is generally determined by first predicting the demand relationship in the electricity market, and then deriving and calculating the clearing price of the spot market based on the demand for electricity. However, this method requires a large amount of data support, the training process is extremely cumbersome, and the prediction accuracy is not ideal, so it is not very practical. Summary of the invention

[0004] The present invention provides a method and system for predicting the spot market clearing price of a power grid, and an electronic device, so as to solve the defects of the related art that the training process of the clearing price prediction method is cumbersome and the accuracy is not high. The scheme of the present application improves the prediction accuracy based on a neural network model and a random forest algorithm, and the data required for the prediction is relatively small, only the historical clearing price and the historical market boundary data are needed, and the model training process is also simple.

[0005] The present invention provides a method for predicting spot market clearing prices of a power grid, comprising:

[0006] Obtain historical clearing price data and historical market boundary data of the power grid's spot market;

[0007] Establishing a correspondence between the historical clearing price data and the historical market boundary data;

[0008] Based on the corresponding relationship, a clearing price prediction model is established, and the market boundary data of the day to be predicted is input into the clearing price prediction model to obtain a first prediction result, wherein the clearing price prediction model is a neural network model;

[0009] Taking the first prediction result and the corresponding relationship as input, applying a random forest algorithm to determine a second prediction result;

[0010] Based on the first prediction result and the second prediction result, a spot market clearing price of the power grid is predicted.

[0011] According to the method for predicting spot market clearing prices of a power grid provided by the present invention, the establishing of the correspondence between the historical clearing price data and the historical market boundary data comprises:

[0012] Dividing the historical clearing price data into a number of subsequences according to time periods;

[0013] A corresponding relationship between each of the subsequences and the historical market boundary data within the same time period is established respectively.

[0014] According to the method for predicting the spot market clearing price of a power grid provided by the present invention, the historical clearing price data is divided into a plurality of subsequences according to time periods, including:

[0015] The historical clearing price data is decomposed into a number of subsequences by using a variational mode decomposition method, and the decomposed historical clearing price data is in units of days.

[0016] According to the method for predicting the spot market clearing price of a power grid provided by the present invention, the method uses the first prediction result and the corresponding relationship as input and applies a random forest algorithm to determine a second prediction result, including:

[0017] Taking the first prediction result and the corresponding relationship of each of the subsequences as input, a random forest algorithm is applied to determine a plurality of second prediction results corresponding to the subsequences.

[0018] According to the method for predicting the spot market clearing price of a power grid provided by the present invention, predicting the spot market clearing price of the power grid based on the first prediction result and the second prediction result includes:

[0019] Based on the first prediction result and the plurality of the second prediction results, forecast the spot market clearing price of the power grid a plurality of times;

[0020] The results of several forecasts are combined to determine the spot market clearing price of the power grid.

[0021] According to the method for predicting the spot market clearing price of a power grid provided by the present invention, after predicting the spot market clearing price of the power grid several times, the method further includes:

[0022] Performing an error assessment on the spot market clearing prices of the power grid predicted several times, wherein the error assessment method comprises calculating the average absolute error of the spot market clearing prices of the power grid predicted several times;

[0023] If the errors of the spot market clearing prices of the power grid predicted several times exceed a preset error range, the clearing price prediction model is retrained.

[0024] According to the method for predicting the spot market clearing price of a power grid provided by the present invention, if the error of the spot market clearing price of the power grid predicted several times exceeds a preset error range, retraining the clearing price prediction model comprises:

[0025] constructing a training set and a test set based on several predicted spot market clearing prices of the power grid;

[0026] Performing normalization and linear transformation on the training set and the test set;

[0027] Using a particle swarm algorithm to construct a combined model of a neural network and a random forest algorithm, and training the combined model based on the training set;

[0028] The test set is input into the combined model, and when the output value of the combined model falls within the preset error range, the model training is stopped.

[0029] According to the method for predicting the spot market clearing price of a power grid provided by the present invention, after obtaining the historical clearing price data and historical market boundary data of the spot market of the power grid, the method further includes:

[0030] A multivariate adjacent value algorithm is used to fill in the historical clearing price data and the historical market boundary data.

[0031] The present invention also provides a spot market clearing price forecasting system for a power grid, comprising:

[0032] A data acquisition unit, used to acquire historical clearing price data and historical market boundary data of the spot market of the power grid;

[0033] A corresponding relationship establishing unit, used to establish a corresponding relationship between the historical clearing price data and the historical market boundary data;

[0034] A first prediction unit is used to establish a clearing price prediction model based on the corresponding relationship, input the market boundary data of the day to be predicted into the clearing price prediction model, and obtain a first prediction result, wherein the clearing price prediction model is a neural network model;

[0035] A second prediction unit, configured to use the first prediction result and the corresponding relationship as input and apply a random forest algorithm to determine a second prediction result;

[0036] The third prediction unit is used to predict the spot market clearing price of the power grid based on the first prediction result and the second prediction result.

[0037] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a spot market clearing price prediction method for a power grid as described above is implemented.

[0038] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for predicting the spot market clearing price of any power grid as described above is implemented.

[0039] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-mentioned methods for predicting spot market clearing prices of power grids.

[0040] In the method for predicting the spot market clearing price of the power grid provided by the present invention, it is only necessary to obtain the historical clearing prices and historical market boundary data of the spot market. The neural network model can be easily trained through the correspondence between the two data. The clearing price can be predicted for the first time based on the neural network. Further, the clearing price can be predicted for the second time in combination with the random forest algorithm and the constructed correspondence. The solution of the present invention improves the prediction accuracy by combining the prediction results of the two prediction methods, and accurately predicts the spot market clearing price of the power grid. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0042] Figure 1 This is one of the flow charts of the method for predicting the spot market clearing price of a power grid provided by an embodiment of the present invention;

[0043] Figure 2 This is a second flow chart of a method for predicting spot market clearing prices of a power grid provided by an embodiment of the present invention;

[0044] Figure 3 It is a schematic diagram of the structure of a spot market clearing price prediction system for a power grid provided by an embodiment of the present invention;

[0045] Figure 4 It is a schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0047] At present, the relevant technology mainly uses indirect prediction through market simulation when predicting the clearing price of the electricity spot market. The market simulation indirect prediction method refers to predicting the electricity supply and demand situation in the market and using simulated market transactions to obtain the market clearing price. However, the basic data of this method must be sufficient, detailed and accurate. However, the data scale of the actual provincial power grid power market is huge and the system wiring is complex. The simulation indirect prediction method is difficult to apply due to a large number of data cleaning errors.

[0048] At present, there are also some methods of direct prediction based on data analysis. Specifically, a large amount of historical data is used to analyze and mine the law of the day-ahead clearing price in the electricity spot market. Mathematical modeling is performed based on the data connection of relevant factors to obtain a clearing price prediction model. The different mathematical modeling methods mainly include time series analysis, multiple regression method, artificial neural network, wavelet analysis, support vector machine, combination method, etc. However, each of the above methods has its own problems. For example, the time series analysis method cannot fully consider the impact of the supply and demand relationship in the market on the electricity price, and the model is difficult to select. The multiple regression method has the problem of difficulty in selecting influencing factors and difficulty in quantifying some factors as input, and it is difficult to obtain stable and good prediction accuracy. Artificial neural networks have problems such as difficulty in determining the network structure, slow learning speed, and easy to fall into local minima. Wavelet analysis is mainly used for preprocessing of sequences and is rarely used alone for electricity price prediction. Support vector machines are difficult to train large-scale samples and difficult to match with large-scale data and operating performance conditions in the electricity market in practical applications.

[0049] Based on this, this application provides a new idea to predict the clearing price in the spot market of the power grid with high accuracy. The specific implementation method is as follows.

[0050] Figure 1 This is one of the flow charts of the method for predicting the spot market clearing price of a power grid provided in an embodiment of the present invention.

[0051] Figure 2 This is the second flow chart of the method for predicting the spot market clearing price of the power grid provided in the embodiment of the present invention.

[0052] like Figure 1 As shown, this embodiment provides a method for predicting spot market clearing prices of a power grid, including:

[0053] Step 101, obtaining historical clearing price data and historical market boundary data of the spot market of the power grid;

[0054] The clearing price refers to the price formed when the market supply and demand reach a balance under a specific market environment. When the supply and demand in the market are equal, this price is the clearing price. At this time, there is no excess supply or excess demand in the market. In the spot market of the power grid, the clearing price refers to the price that makes the supply of electricity equal to the demand for electricity.

[0055] Market boundaries refer in a broad sense to the scope or limits of a specific market. In this embodiment, market boundaries can be used to refer to data on various forms of electricity generation and various forms of electricity consumption in a power grid within a specific area. In implementation, it can be a provincial power grid or a municipal power grid, etc. For example, the total value of electricity generated by photovoltaics, the total value of electricity generated by wind power, the total value of electricity generated by thermal power, the total value of electricity consumed by the power grid in the region, and the total value of electricity exported to the power grid outside the region. In this embodiment, the market boundary data can reflect the scale of the power grid's spot market and information on potential demand.

[0056] Step 102, establishing a corresponding relationship between the historical clearing price data and the historical market boundary data;

[0057] In this embodiment, a corresponding relationship between the clearing price and the market boundary is established. For example, when the market boundary expands, it means that the market clearing price may rise. After that, the clearing price data can be directly predicted and determined based on the market boundary data of the forecast day.

[0058] Step 103, based on the corresponding relationship, establish a clearing price prediction model, input the market boundary data of the day to be predicted into the clearing price prediction model, and obtain a first prediction result, wherein the clearing price prediction model is a neural network model;

[0059] In practical applications, the clearing price prediction model can be composed of three layers: input layer, hidden layer and output layer. The hidden layer is the feature extraction layer, which is mainly composed of convolution layer, pooling layer and fully connected layer. The core of the clearing price prediction model is the convolution layer, in which the convolution kernel C j As a filter to extract local features of data, the specific calculation is:

[0060]

[0061] Where σ1 is a nonlinear activation function; A i Is the input of the convolutional layer; is the convolution operation; w i is the weight matrix; bi is the bias matrix; the pooling layer can be used to compress data and delete unnecessary information to prevent overfitting problems. In this embodiment, the maximum pooling layer is selected. In the fully connected layer, the feature information extracted from the convolution layer is aggregated to obtain the final prediction data.

[0062] Step 104, using the first prediction result and the corresponding relationship as input, applying a random forest algorithm to determine a second prediction result;

[0063] The random forest algorithm is an integrated learning algorithm that learns by building multiple decision trees and obtains the final prediction results based on multiple learning results. Since this algorithm has multiple decision trees, it can achieve better performance based on a simpler data set, and at the same time has better processing efficiency for complex data with a large number of features such as market boundaries.

[0064] In practical applications, the prediction results and input samples of step 103 can be randomly extracted by using the Bootstrap sampling method. The optimal parameters of the random forest regression model can be obtained by using oob_score as the standard for model parameter adjustment. The evaluation result is represented by oob_score, and oob_score returns R2, which is expressed as follows:

[0065]

[0066] Where: u is the residual sum of squares; v is the total sum of squares; N is the number of samples; i is the sample number; f i is the model regression value; y i is the true numerical label of the sample point; is the average of the true value labels.

[0067] Step 105: predicting the spot market clearing price of the power grid based on the first prediction result and the second prediction result.

[0068] The first prediction result is determined based on the correspondence between the clearing price and the market boundary and the neural network model, and the second prediction result is determined based on the correspondence between the clearing price and the market boundary and the random forest algorithm. In the above step 105, by combining the first prediction result and the second prediction result, it is equivalent to combining the neural network model with the random forest algorithm. By combining two different algorithms, the advantages of the two algorithms can be combined to achieve better prediction results.

[0069] In practical applications, there are many ways to combine the first prediction result and the second prediction result. For example, the two data may be averaged, or the two data may be comprehensively calculated based on some specific algorithms.

[0070] In the method for predicting the spot market clearing price of the power grid provided in this embodiment, it is only necessary to obtain the historical clearing prices and historical market boundary data of the spot market. The neural network model can be easily trained through the correspondence between the two data. The clearing price can be predicted for the first time based on the neural network. Furthermore, the clearing price can be predicted for the second time in combination with the random forest algorithm and the constructed correspondence. The solution of the present invention improves the prediction accuracy by combining the prediction results of the two prediction methods, and accurately predicts the spot market clearing price of the power grid.

[0071] In an exemplary embodiment, in addition to obtaining historical clearing price data and historical market boundary data of the spot market of the power grid, historical meteorological data can also be obtained, and a relationship between the meteorological data and the clearing price data can be established at the same time.

[0072] Furthermore, based on the correspondence between the clearing price and the market boundary data, and the correspondence between the clearing price and the meteorological data, a clearing price prediction model is established.

[0073] In an exemplary embodiment, the establishing of the correspondence between the historical clearing price data and the historical market boundary data includes:

[0074] Dividing the historical clearing price data into a number of subsequences according to time periods;

[0075] A corresponding relationship between each of the subsequences and the historical market boundary data within the same time period is established respectively.

[0076] In practical applications, when dividing historical clearing data into subsequences, the variational mode decomposition (VMD) method can be used. This method is a signal decomposition estimation method. In the process of obtaining decomposition components, the frequency center and bandwidth of each component can be determined by iteratively searching for the optimal solution of the variational model, so that the frequency domain decomposition of the signal and the effective separation of each component can be adaptively achieved. Specifically, the variational mode decomposition method can decompose the real-valued input signal into a discrete number of sub-signals. Such sub-signals have a specific sparsity when reproducing the input signal. The sparsity is mainly reflected in the bandwidth of the spectral domain. In other words, assuming that each decomposed sub-signal is mainly around the center frequency, the center frequency will be determined with the decomposition.

[0077] In the scheme of this embodiment, the historical clearing price data can be divided from a whole data into sub-sequence data with days as the time unit, that is, with days as the time unit, the historical clearing prices are converted into multiple consecutive time periods, and each time period has a corresponding clearing price.

[0078] In practical applications, time periods can be divided according to changes in clearing prices. For example, the clearing prices from April 3 to April 4 of a certain year are consistent as the first clearing prices, the clearing prices from April 5 to April 9 are consistent as the second clearing prices, and the clearing prices from April 10 to April 12 are consistent as the third clearing prices. At this time, the clearing prices during this period can be divided into three subsequences: April 3 to April 4, April 5 to April 9, and April 10 to April 12.

[0079] In practical applications, historical clearing prices can also be divided into several subsequences with equal time spans. For example, the clearing prices from April 3 to April 4 are divided into a subsequence, the clearing prices from April 4 to April 5 are divided into a subsequence, the clearing prices from April 5 to April 6 are divided into a subsequence, the clearing prices from April 6 to April 7 are divided into a subsequence, and so on.

[0080] The scheme for dividing the historical clearing prices into subsequences can be divided into different time spans according to actual conditions, and this application does not impose any restrictions on this.

[0081] Compared to establishing a corresponding relationship between historical clearing prices and historical market boundary data as a whole, in this embodiment, the overall historical clearing prices are divided into several sub-sequences, and the corresponding relationship between each sub-sequence and the corresponding historical market boundary data is established. This method can shorten the time span of the historical clearing prices, and then establish a corresponding relationship between each sub-sequence and the market boundary data. When predicting the clearing price based on the corresponding relationship, at least one sub-sequence can have a higher similarity with the time period to be predicted. In this way, based on this at least one sub-sequence, the clearing price of the time period to be predicted can be more realistically reflected, that is, the first prediction result obtained by the prediction can be made more accurate, and then when the second prediction result is determined based on the more accurate first prediction result, the predicted second prediction result can also be made more accurate. Furthermore, based on the more accurate first prediction result and the more accurate second prediction result, the clearing price of the spot market of the power grid can also be more accurately predicted.

[0082] In practice, the correspondence between historical clearing price data and historical market boundary data can be established through the following formula:

[0083]

[0084] Among them, x t,mi , They represent the values ​​and mean values ​​of n vector matrices, including temperature, humidity, cloud cover, light amplitude, wind speed, new energy power, provincial load, external power, online unit capacity, unit load rate, external power, and external power price, at t=1, 2, 3...24. and They are the value and mean of the decomposition subsequence of the spot clearing price at the previous day corresponding to time t; is the correlation coefficient. Its value is between -1 and +1. It indicates that the two variables are positively correlated; if This indicates that the two variables are negatively correlated. The larger the absolute value of This indicates that there is no linear relationship between the two. The absolute value of 0.4-0.6 indicates moderate correlation, 0.6-0.8 indicates strong correlation, and 0.8-1 indicates extremely strong correlation.

[0085] In an exemplary embodiment, the historical clearing price data is divided into several subsequences according to time periods, including:

[0086] The historical clearing price data is decomposed into a number of subsequences by using a variational mode decomposition method, and the decomposed historical clearing price data is in units of days.

[0087] In practical applications, the specific steps of variational mode decomposition applied in this embodiment are described below with a specific embodiment:

[0088] Step 1: Define input data. Define {u k}=k=1,2,…,K is the price subsequence IMF set of price data decomposition, then the input clearing price data X(t)=[x1(t),x2(t),…,x V (t)] can be expressed as:

[0089]

[0090] Step 2: Construct the model. MVMD requires that the sum of the bandwidths of the extracted modes is minimal and the extracted price subsequence IMF can accurately reconstruct the original signal. The optimal constrained variational problem for the actual sequence is:

[0091]

[0092] In the formula, {u k,j} and {ω k} respectively correspond to the set of subsequences after the decomposition of the day-ahead spot clearing price and the central frequency of each subsequence component; is the partial derivative of t; δ tis the Dirac function; * is the convolution operator; {x v} is the price data information set; V is the input original signal data.

[0093] Step 3: Solve the variational problem. Use the Lagrangian function to unconstrain the constrained variational problem:

[0094]

[0095] Where: {λ v} is the Lagrange factor; α is the penalty factor; <·> is the inner product operation.

[0096] Step 4: Use the alternating direction multiplier iteration algorithm to solve the unconstrained problem in step 2 and iteratively update {u k,v} and {ω k}, and obtain the IMF components of the price subsequence with the specified number of decompositions. The new modal components can be expressed as:

[0097]

[0098] Where: x v (t),u k,v (t), λ v (t) The estimated value after Fourier transformation. The parameter estimation process can be expressed as:

[0099]

[0100] In an exemplary embodiment, the method of using the first prediction result and the corresponding relationship as input and applying a random forest algorithm to determine the second prediction result includes:

[0101] Taking the first prediction result and the corresponding relationship of each of the subsequences as input, a random forest algorithm is applied to determine a plurality of second prediction results corresponding to the subsequences.

[0102] In practical applications, the historical clearing price data can be divided into several subsequences, and a separate calculation is required for each subsequence. Therefore, the scheme of the present application determines the application of the random forest algorithm, and several decision trees of the random forest algorithm correspond to several subsequences, and each decision tree processes a subsequence. Specifically, the first prediction result and the corresponding relationship corresponding to the first subsequence of the historical clearing data are used as input to the first decision tree generated by the random forest algorithm, the first prediction result and the corresponding relationship corresponding to the second subsequence of the historical clearing data are used as input to the second decision tree generated by the random forest algorithm, the first prediction result and the corresponding relationship corresponding to the third subsequence of the historical clearing data are used as input to the third decision tree generated by the random forest algorithm, and so on. Each decision tree of the random forest algorithm outputs exactly one second prediction result.

[0103] In an exemplary embodiment, predicting the spot market clearing price of the power grid based on the first prediction result and the second prediction result includes:

[0104] Based on the first prediction result and the plurality of the second prediction results, forecast the spot market clearing price of the power grid a plurality of times;

[0105] The results of several forecasts are combined to determine the spot market clearing price of the power grid.

[0106] In practical applications, after determining the first prediction result based on the neural network algorithm and determining several second prediction results based on the random forest algorithm, predictions can be made separately based on the first prediction result and the second prediction results corresponding to each subsequence, and several prediction results of the spot market clearing price of the power grid can be obtained. At this time, several prediction results can be merged to obtain a final prediction result. There can be many ways to merge. For example, the average of multiple prediction results can be taken, or other specific algorithms can be used to merge several prediction results.

[0107] In an exemplary embodiment, after predicting the spot market clearing price of the power grid for several times, the method further includes:

[0108] Performing an error assessment on the spot market clearing prices of the power grid predicted several times, wherein the error assessment method comprises calculating the average absolute error of the spot market clearing prices of the power grid predicted several times;

[0109] If the errors of the spot market clearing prices of the power grid predicted several times exceed a preset error range, the clearing price prediction model is retrained.

[0110] In practical applications, not only can the error be evaluated by calculating the mean absolute error (MAE), but also the root mean square error (RMSE) and the coefficient of determination R of several clearing prices can be calculated. 2 Through a variety of indicators, the errors between the predicted clearing prices are comprehensively determined. The accuracy of the clearing price prediction can also be improved by calculating the error value and retraining the prediction model.

[0111] In implementation, the root mean square error, mean absolute error and coefficient of determination R are calculated. 2 The expression conforms to the following formula:

[0112]

[0113]

[0114] Among them, y i is the true value of the clearing price; is the forecast value of the clearing price; is the average value of the actual value of the clearing price; m is the number of points in the clearing price forecast period.

[0115] In an exemplary embodiment, if the error of the spot market clearing price of the power grid predicted several times exceeds a preset error range, retraining the clearing price prediction model includes:

[0116] constructing a training set and a test set based on several predicted spot market clearing prices of the power grid;

[0117] Performing normalization and linear transformation on the training set and the test set;

[0118] Using a particle swarm algorithm to construct a combined model of a neural network and a random forest algorithm, and training the combined model based on the training set;

[0119] The test set is input into the combined model, and when the output value of the combined model falls within the preset error range, the model training is stopped.

[0120] like Figure 2As shown in the figure, RF refers to the random forest algorithm, CNN refers to the convolutional neural network model, and the particle swarm optimization (PSO) is applied in the process of retraining the clearing price prediction model. The particle swarm optimization is an evolutionary computing technology derived from the study of bird flock predation behavior. The basic idea of ​​the particle swarm optimization algorithm is to find the optimal solution through collaboration and information sharing between individuals in the group. The particle swarm algorithm simulates the birds in the flock by designing a massless particle. The particle has only two properties, speed and position. The speed represents the speed of movement, and the position represents the direction of movement. Each particle searches for the optimal solution separately in the search space, that is, the optimal solution is found through an iterative process. In each iteration, the particle updates its own speed and position parameters.

[0121] The particle swarm algorithm optimization process provided by this embodiment is described below in a specific method:

[0122] Step 1: Build a price prediction dataset.

[0123] Step 2: Normalize the price data and use the deviation standardization method to perform linear transformation on the price data and map it to the range of [0, 1] to improve the price prediction accuracy and speed up the gradient descent of the model to find the optimal solution.

[0124] Step 3: Divide the normalized data into training set and test set, and then divide them into input data and data labels respectively.

[0125] Step 4: Initialize the particle swarm and build a neural network and random forest nested model, i.e., RF&&CNN model, with the corresponding parameters of each particle. Train the model using the training data and use the root mean square error (RMSE) of the prediction results as the error value of each particle.

[0126] Step 5: The particle swarm optimization algorithm updates particles according to the error threshold of the neural network and random forest nested model and determines the global optimal position of particles to build a price prediction combination model.

[0127] Step 6: Put the test set input data into the trained prediction model, compare the output data with the test set test results, and calculate the price prediction model error based on the root mean square error.

[0128] Step 7: Take the error value reaching the standard as the termination condition. If the termination condition is met, stop training; otherwise, return to step 4.

[0129] In an exemplary embodiment, the step of obtaining the historical clearing price data and historical market boundary data of the spot market of the power grid further includes:

[0130] A multivariate adjacent value algorithm is used to fill in the historical clearing price data and the historical market boundary data.

[0131] In practical applications, the process of filling data using the multivariate adjacent value algorithm conforms to the following formula:

[0132]

[0133] Among them, X a,j and X b,j It represents the Euclidean distance between the i-th element of vector a and vector b in N-dimensional space. When one or both of the elements in the two vectors are missing, The value of N is zero, md It represents the number of distances zero.

[0134] The spot market clearing price forecasting system for a power grid provided by the present invention is described below. The spot market clearing price forecasting system for a power grid described below and the spot market clearing price forecasting method for a power grid described above can be referred to each other.

[0135] Figure 3 It is a structural diagram of a spot market clearing price forecasting system for a power grid provided by an embodiment of the present invention.

[0136] like Figure 3 As shown, the spot market clearing price forecasting system of the power grid provided in this embodiment includes:

[0137] A data acquisition unit 301 is used to acquire historical clearing price data and historical market boundary data of the spot market of the power grid;

[0138] A corresponding relationship establishing unit 302, used to establish a corresponding relationship between the historical clearing price data and the historical market boundary data;

[0139] A first prediction unit 303 is used to establish a clearing price prediction model based on the corresponding relationship, input the market boundary data of the day to be predicted into the clearing price prediction model, and obtain a first prediction result, wherein the clearing price prediction model is a neural network model;

[0140] A second prediction unit 304 is configured to use the first prediction result and the corresponding relationship as input and apply a random forest algorithm to determine a second prediction result;

[0141] The third prediction unit 305 is used to predict the spot market clearing price of the power grid based on the first prediction result and the second prediction result.

[0142] In an exemplary embodiment, the correspondence establishing unit 302 is further configured to:

[0143] Dividing the historical clearing price data into a number of subsequences according to time periods;

[0144] A corresponding relationship between each of the subsequences and the historical market boundary data within the same time period is established respectively.

[0145] In an exemplary embodiment, the correspondence establishing unit 302 is further configured to:

[0146] The historical clearing price data is decomposed by variational mode decomposition method, and the decomposed historical clearing price data takes day as the time unit.

[0147] In an exemplary embodiment, the second prediction unit 304 is further configured to:

[0148] Taking the first prediction result and the corresponding relationship of each of the subsequences as input, a random forest algorithm is applied to determine a plurality of second prediction results corresponding to the subsequences.

[0149] In an exemplary embodiment, the third prediction unit 305 is further configured to:

[0150] Based on the first prediction result and the plurality of the second prediction results, forecast the spot market clearing price of the power grid a plurality of times;

[0151] The results of several forecasts are combined to determine the spot market clearing price of the power grid.

[0152] In an exemplary embodiment, an error evaluation module is further included, and the error evaluation module is used to:

[0153] Performing an error assessment on the spot market clearing prices of the power grid predicted several times, wherein the error assessment method comprises calculating the average absolute error of the spot market clearing prices of the power grid predicted several times;

[0154] If the errors of the spot market clearing prices of the power grid predicted several times exceed a preset error range, the clearing price prediction model is retrained.

[0155] In an exemplary embodiment, the error evaluation module is further configured to:

[0156] constructing a training set and a test set based on several predicted spot market clearing prices of the power grid;

[0157] Performing normalization and linear transformation on the training set and the test set;

[0158] Using a particle swarm algorithm to construct a combined model of a neural network and a random forest algorithm, and training the combined model based on the training set;

[0159] The test set is input into the combined model, and when the output value of the combined model falls within the preset error range, the model training is stopped.

[0160] In an exemplary embodiment, a data filling module is also included, and the data filling module is specifically used to:

[0161] A multivariate adjacent value algorithm is used to fill in the historical clearing price data and the historical market boundary data.

[0162] The specific implementation method of the spot market clearing price prediction system for the power grid provided in this embodiment can be implemented with reference to the above-mentioned embodiments, which will not be described in detail here.

[0163] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the spot market clearing price prediction method of the power grid, and the method includes:

[0164] Obtain historical clearing price data and historical market boundary data of the power grid's spot market;

[0165] Establishing a correspondence between the historical clearing price data and the historical market boundary data;

[0166] Based on the corresponding relationship, a clearing price prediction model is established, and the market boundary data of the day to be predicted is input into the clearing price prediction model to obtain a first prediction result, wherein the clearing price prediction model is a neural network model;

[0167] Taking the first prediction result and the corresponding relationship as input, applying a random forest algorithm to determine a second prediction result;

[0168] Based on the first prediction result and the second prediction result, a spot market clearing price of the power grid is predicted.

[0169] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk, etc. Various media that can store program codes.

[0170] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the method for predicting the spot market clearing price of the power grid provided by the above methods, the method comprising:

[0171] Obtain historical clearing price data and historical market boundary data of the power grid's spot market;

[0172] Establishing a correspondence between the historical clearing price data and the historical market boundary data;

[0173] Based on the corresponding relationship, a clearing price prediction model is established, and the market boundary data of the day to be predicted is input into the clearing price prediction model to obtain a first prediction result, wherein the clearing price prediction model is a neural network model;

[0174] Taking the first prediction result and the corresponding relationship as input, applying a random forest algorithm to determine a second prediction result;

[0175] Based on the first prediction result and the second prediction result, a spot market clearing price of the power grid is predicted.

[0176] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for predicting the spot market clearing price of a power grid provided by the above methods is implemented, and the method comprises:

[0177] Obtain historical clearing price data and historical market boundary data of the power grid's spot market;

[0178] Establishing a correspondence between the historical clearing price data and the historical market boundary data;

[0179] Based on the corresponding relationship, a clearing price prediction model is established, and the market boundary data of the day to be predicted is input into the clearing price prediction model to obtain a first prediction result, wherein the clearing price prediction model is a neural network model;

[0180] Taking the first prediction result and the corresponding relationship as input, applying a random forest algorithm to determine a second prediction result;

[0181] Based on the first prediction result and the second prediction result, a spot market clearing price of the power grid is predicted.

[0182] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0183] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.

[0184] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for predicting the spot market clearing price of a power grid, characterized in that: include: Obtain historical clearing price data and historical market boundary data of the power grid's spot market; Establishing a correspondence between the historical clearing price data and the historical market boundary data; Based on the corresponding relationship, a clearing price prediction model is established, and the market boundary data of the day to be predicted is input into the clearing price prediction model to obtain a first prediction result, wherein the clearing price prediction model is a neural network model; Taking the first prediction result and the corresponding relationship as input, applying a random forest algorithm to determine a second prediction result; Based on the first prediction result and the second prediction result, a spot market clearing price of the power grid is predicted.

2. The method for predicting the spot market clearing price of a power grid according to claim 1, characterized in that: The establishing of the correspondence between the historical clearing price data and the historical market boundary data includes: Dividing the historical clearing price data into a number of subsequences according to time periods; A corresponding relationship between each of the subsequences and the historical market boundary data within the same time period is established respectively.

3. The method for predicting the spot market clearing price of a power grid according to claim 2, characterized in that: The historical clearing price data is divided into several subsequences according to time periods, including: The historical clearing price data is decomposed into a number of subsequences by using a variational mode decomposition method, and the decomposed historical clearing price data is in units of days.

4. The method for predicting the spot market clearing price of a power grid according to claim 2, characterized in that: The step of using the first prediction result and the corresponding relationship as input and applying a random forest algorithm to determine a second prediction result includes: Taking the first prediction result and the corresponding relationship of each of the subsequences as input, a random forest algorithm is applied to determine a plurality of second prediction results corresponding to the subsequences.

5. The method for predicting the spot market clearing price of a power grid according to claim 4, characterized in that: The step of predicting a spot market clearing price of a power grid based on the first prediction result and the second prediction result includes: Based on the first prediction result and the plurality of the second prediction results, forecast the spot market clearing price of the power grid a plurality of times; The results of several forecasts are combined to determine the spot market clearing price of the power grid.

6. The method for predicting the spot market clearing price of a power grid according to claim 5, characterized in that: The method further includes: after making several predictions of the spot market clearing price of the power grid: Performing an error assessment on the spot market clearing prices of the power grid predicted several times, wherein the error assessment method comprises calculating the average absolute error of the spot market clearing prices of the power grid predicted several times; If the errors of the spot market clearing prices of the power grid predicted several times exceed a preset error range, the clearing price prediction model is retrained.

7. The method for predicting the spot market clearing price of a power grid according to claim 6, characterized in that: If the error of the spot market clearing price of the power grid predicted several times exceeds a preset error range, retraining the clearing price prediction model comprises: constructing a training set and a test set based on several predicted spot market clearing prices of the power grid; Performing normalization and linear transformation on the training set and the test set; Using a particle swarm algorithm to construct a combined model of a neural network and a random forest algorithm, and training the combined model based on the training set; The test set is input into the combined model, and when the output value of the combined model falls within the preset error range, the model training is stopped.

8. The method for predicting spot market clearing prices of a power grid according to claim 1, characterized in that: The step of obtaining the historical clearing price data and historical market boundary data of the spot market of the power grid further includes: A multivariate adjacent value algorithm is used to fill in the historical clearing price data and the historical market boundary data.

9. A spot market clearing price forecasting system for a power grid, characterized in that: include: A data acquisition unit, used to acquire historical clearing price data and historical market boundary data of the spot market of the power grid; A corresponding relationship establishing unit, used to establish a corresponding relationship between the historical clearing price data and the historical market boundary data; A first prediction unit is used to establish a clearing price prediction model based on the corresponding relationship, input the market boundary data of the day to be predicted into the clearing price prediction model, and obtain a first prediction result, wherein the clearing price prediction model is a neural network model; A second prediction unit, configured to use the first prediction result and the corresponding relationship as input and apply a random forest algorithm to determine a second prediction result; The third prediction unit is used to predict the spot market clearing price of the power grid based on the first prediction result and the second prediction result.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, a spot market clearing price prediction method for a power grid as described in any one of claims 1 to 8 is implemented.