Electricity price prediction method and device, electronic equipment, storage medium and program product

By using the BP neural network model in the recent electricity price prediction, combining environmental parameters, real-time price and power production data, the problem of low prediction accuracy in the existing technology is solved, and more efficient and accurate electricity price prediction is achieved.

CN119648264APending Publication Date: 2025-03-18DIANKE NEW ENERGY TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411807393.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The prior art is difficult to ensure high accuracy in recent electricity price predictions, and is inefficient and cost-effective.

Method used

The electricity price prediction method based on the BP neural network model is adopted to screen and analyze the characteristics of electricity price historical data and generate a sample data set of electricity price historical data, and use this model to predict the environmental parameters, real-time prices and power production data at the current moment.

Benefits of technology

It improves the accuracy of electricity price prediction a few days ago, reduces the model training time, meets actual production needs, and is closer to the actual production application process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119648264A_ABST
    Figure CN119648264A_ABST
Patent Text Reader

Abstract

The invention discloses an electricity price prediction method and device, electronic equipment, a nonvolatile storage medium and a computer program product which are applied to the technical field of information processing. The method comprises the steps that a BP neural network model is trained based on an electricity price historical data sample data set, and an electricity price prediction model is obtained; the electricity price historical data sample data set comprises historical price features, environment features, bidding space prediction features and power production features; and inputting the obtained current environment parameters, the current real-time price and the current power production data at the current moment into an electricity price prediction model, and taking an output result of the electricity price prediction model as a day-ahead electricity price. The method can solve the problem that the prediction accuracy is difficult to achieve the expected effect because the day-ahead electricity price prediction in the related technology is limited by production factors, and can effectively improve the prediction accuracy of the day-ahead electricity price.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information processing technology, and in particular to an electricity price prediction method, device, electronic device, non-volatile storage medium and computer program product. Background Art

[0002] The day-ahead electricity price is the electricity price within a certain range of future dates. In order to balance the electricity load and the total amount of power generation, it is inevitable to predict the day-ahead electricity price. The traditional method of predicting the day-ahead electricity price is to use experienced manual work. It is difficult to guarantee high accuracy when relying on manual prediction, and it is inefficient and costly. In order to solve the drawbacks of manual prediction, related technologies use high-precision and complex artificial intelligence models to predict the day-ahead electricity price. However, in actual production, due to production factors, it is difficult to achieve the expected results.

[0003] In view of this, effectively improving the prediction accuracy of the day-ahead electricity price is a technical problem that technical personnel in this field need to solve.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The present application provides an electricity price forecasting method, device, electronic device, non-volatile storage medium and computer program product, which effectively improve the forecast accuracy of the day-ahead electricity price.

[0006] In order to solve the above technical problems, this application provides the following technical solutions: On the one hand, the present application provides a method for predicting electricity prices, including: A BP neural network model is pre-trained based on a sample data set of electricity price historical data to obtain an electricity price prediction model; the sample data set of electricity price historical data includes historical price characteristics, environmental characteristics, bidding space prediction characteristics and power production characteristics; the current environmental parameters, current real-time prices and current power production data at the current moment are obtained and input into the electricity price prediction model, and the output result of the electricity price prediction model is used as the day-ahead electricity price.

[0007] Exemplarily, the method of pre-training the BP neural network model based on the electricity price historical data sample data set to obtain the electricity price prediction model also includes: obtaining a historical electricity price raw data sample data set; each historical electricity price raw data of the historical electricity price raw data sample data set includes at least historical time characteristics, point sequence data characteristics, bidding space prediction characteristics, predicted load characteristics, historical day-ahead price characteristics for the same period, historical operation day-2 real-time prices, historical operation day-1 day-ahead prices, historical operation day-2 load data characteristics, interconnection line characteristics, new energy output prediction characteristics, non-marketized unit output characteristics, environmental characteristics, and average values ​​of real-time and day-ahead prices for the same period; for each historical electricity price raw data, determining the importance value of each feature of the historical electricity price raw data by calculating the average value of the accuracy reduction of each feature of the current historical electricity price raw data on all decision trees; selecting target features that meet the prediction feature screening conditions for each historical electricity price raw data according to the prediction feature screening conditions and the feature importance values; and generating an electricity price historical data sample data set according to the target features of each historical electricity price raw data.

[0008] Exemplarily, according to the prediction feature screening conditions and feature importance values, target features that meet the prediction feature screening conditions are selected for each historical electricity price original data, including: for each historical electricity price original data, historical operation day-2 bidding space prediction features, historical operation day-2 predicted new energy features, the average value of real-time prices in the previous two days during the same period, visibility features, and wind speed features are used as target features.

[0009] Exemplarily, the training of the BP neural network model based on the electricity price historical data sample data set to obtain the electricity price prediction model includes: in the process of training the BP neural network model, calling the weight relationship formula to update the model parameters of each network layer of the BP neural network model; the weight relationship formula is: ; In the formula, w ij represents the weight between the i-th node of the input layer and the j-th hidden layer after the current iteration is completed, w (ij-0) represents the weight between the i-th node of the input layer and the j-th hidden layer obtained in the previous iteration, n represents the total number of nodes in the input layer, l represents the total number of hidden layers, and w jk represents the bias between the jth hidden layer and the kth node of the output layer, m represents the total number of nodes in the output layer, and b k represents the bias from the hidden layer to the kth node of the output layer, a j represents the bias from the input layer to the jth hidden layer, x i represents the input data of the i-th node in the input layer, g is the activation function, η represents the learning rate, and Y k represents the true value of the day-ahead electricity price, O kRepresents the day-ahead electricity price forecast output by the kth node in the output layer.

[0010] Exemplarily, the training of the BP neural network model based on the electricity price historical data sample data set to obtain the electricity price prediction model includes: in the process of training the BP neural network model, calling the bias relation to update the model parameters of each network layer of the BP neural network model; the bias relation is: ; In the formula, a j represents the bias from the input layer to the jth hidden layer after the current iteration is completed, a (j-0) represents the bias from the input layer to the jth hidden layer obtained in the previous iteration, n represents the total number of nodes in the input layer, l represents the total number of hidden layers, and w jk represents the bias between the jth hidden layer and the kth node of the output layer, m represents the total number of nodes in the output layer, and b j represents the bias a from the jth hidden layer to the kth node of the output layer j represents the bias from the input layer to the jth hidden layer, x i represents the input data of the i-th node in the input layer, g is the activation function, η represents the learning rate, and Y k represents the true value of the day-ahead electricity price, O k Represents the day-ahead electricity price forecast output by the kth node in the output layer.

[0011] Exemplarily, the using the output result of the electricity price prediction model as the day-ahead electricity price includes: the electricity price prediction model calls a date electricity price prediction relationship to obtain the day-ahead electricity price; wherein the date electricity price prediction relationship is: ; Where O is the day-ahead electricity price, l represents the total number of hidden layers, and w jk represents the bias between the jth hidden layer and the kth node of the output layer, b k represents the bias from the hidden layer to the kth node of the output layer, w ij represents the weight between the i-th node of the input layer and the j-th hidden layer, n represents the total number of nodes in the input layer, a j represents the bias from the input layer to the jth hidden layer, x i represents the input data of the i-th node in the input layer, and g is the activation function.

[0012] On the other hand, the present application provides an electricity price prediction device, comprising: The model prediction module is used to pre-train the BP neural network model based on the electricity price historical data sample data set to obtain the electricity price prediction model; the electricity price historical data sample data set includes historical price characteristics, environmental characteristics, bidding space prediction characteristics and power production characteristics.

[0013] The electricity price prediction module is used to input the current environmental parameters, current real-time prices and current electricity production data acquired at the current moment into the electricity price prediction model, and use the output result of the electricity price prediction model as the day-ahead electricity price.

[0014] The present application also provides an electronic device, comprising a processor, wherein the processor is configured to implement the steps of the electricity price prediction method as described in any of the preceding items when executing a computer program stored in a memory.

[0015] The present application also provides a non-volatile storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the electricity price prediction method as described in any of the preceding items are implemented.

[0016] Finally, the present application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the electricity price prediction method as described in any of the preceding items.

[0017] The advantage of the technical solution provided in the present application is that the electricity price prediction model takes into account the impact of environmental characteristics, bidding space and power production characteristics on electricity prices during the process of predicting the day-ahead electricity price, which is closer to the actual production application process. The predicted day-ahead electricity price is also close to the actual value, which effectively improves the accuracy of the day-ahead electricity price prediction. In addition, the electricity price prediction based on a simple BP neural network model reduces the model training time while retaining a high electricity price prediction accuracy to meet actual production needs.

[0018] In addition, the present application also provides corresponding implementation devices, electronic devices, non-volatile storage media and computer program products for the electricity price prediction method, which further makes the method more practical, and the devices, electronic devices, non-volatile storage media and computer program products have corresponding advantages.

[0019] The technical features mentioned above, the technical features to be mentioned below, and the technical features shown separately in the drawings can be combined with each other arbitrarily, as long as the combined technical features are not contradictory. All feasible feature combinations are technical contents clearly recorded in this application. Any of the multiple sub-features contained in the same sentence can be applied independently, and does not have to be applied together with other sub-features.

[0020] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. 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.

[0022] Figure 1 A flow chart of an electricity price prediction method provided for this application; Figure 2 A schematic diagram of the electricity price prediction model process provided for this application; Figure 3 Schematic diagram of the BP neural network model structure provided for this application; Figure 4 Schematic diagram of feature importance distribution provided for this application; Figure 5 A schematic diagram of a day-ahead price prediction result in an exemplary application scenario provided by this application; Figure 6 A structural diagram of a specific implementation of the electricity price prediction device provided in this application; Figure 7 A structural diagram of a specific implementation of the electronic device provided in this application. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Among them, the terms "first", "second", "third", "fourth", etc. in the specification and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations of the two are intended to cover non-exclusive inclusions. The term "exemplary" means "used as an example, embodiment or illustrative". Any embodiment described here as "exemplary" is not necessarily interpreted as being superior or better than other embodiments.

[0024] The operation day is also the actual power generation and access day. On the operation day - 1 day, the power generation side and the power consumption side report their power generation (consumption) plans on the operation day to the dispatching center by reporting the quantity and quoting or reporting the quantity without quoting. The dispatching center generates the day-ahead electricity price based on the clearing principle. On the operation day, the dispatching center generates the real-time electricity price based on the ultra-short-term output (load) forecast of the entire network. In order to solve the drawbacks of relying on manual methods to predict the day-ahead electricity price, related technologies use high-precision and complex artificial intelligence models to predict the day-ahead electricity price. For example, a related technology predicts short-term prices based on the CNN-LSTM of the attention mechanism. This method analyzes the correlation between load factors and electricity prices, uses the attention mechanism to adaptively allocate weights, and inputs samples into the CNN-LSTM network for feature extraction and training, and finally obtains the prediction results. However, this method does not consider the impact of the power generation side in the electricity price correlation factor, resulting in inaccurate prediction results, which is not practical in actual production. There is also a related technology that predicts electricity prices based on the optimal model selection strategy. This method uses the idea of ​​integrated data to divide the electricity price map into multiple sub-graph sets, uses a graph convolutional network to complete the learning task, and finally constructs a price prediction model. However, this method requires greater computing resources, takes a long time to iterate, and cannot guarantee the timeliness and effectiveness of price prediction. Another related technology is a combined electricity price prediction model based on LSTM-XGBoots, which uses a combination of models to improve prediction accuracy. However, it is only applicable to sample data in Euclidean space, and it is difficult to effectively express the correlation information between data, so it is not practical in actual production.

[0025] As can be seen from the above, the relevant technology predicts electricity prices by optimizing the prediction model, but in actual production, it is difficult to achieve the expected results due to production factors. In order to improve the accuracy of the day-ahead electricity price forecast, the present application predicts electricity prices based on the BP neural network model, while taking into account the impact of environmental characteristics, bidding space and power production characteristics on electricity prices, while reducing the model training time while retaining a high accuracy of electricity price forecasts to meet actual production needs. After introducing the technical solution of the present application, various non-limiting implementation methods of the present application are described in detail below. In order to better illustrate the present application, many specific details are given in the specific implementation methods below. Those skilled in the art should understand that the present application can also be implemented without these specific details. In other examples, the methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present application.

[0026] First see Figure 1 , Figure 1 A flow chart of an electricity price prediction method provided in this application, which may include the following contents: S101: Pre-training a BP neural network model based on a sample data set of electricity price historical data to obtain an electricity price prediction model.

[0027] The training process of the electricity price prediction model is as follows: Figure 2 As shown, an exemplary three-layer BP neural network model is as follows Figure 3 As shown in the figure, the original data set is the sample data set of electricity price history data. The sample data set of electricity price history data includes historical price characteristics, environmental characteristics, bidding space prediction characteristics and power production characteristics. The historical price characteristics may include real-time prices, day-ahead prices, price averages, etc. in different months, different years, months, days and hours; environmental characteristics may include meteorological data such as temperature, humidity, and wind speed; and power production characteristics may include new energy output data, load data, tie lines, and non-market units output. The BP neural network model is based on a feedforward structure, and learns the sample data set of electricity price history data through the transmission of forward signals and the reverse adjustment of errors, so that it has the ability to predict electricity prices on the day of the day. First, the sample data set of electricity price history data is sent to the BP neural network model and generates outputs. Then, the difference between the output and the expected target is compared to generate errors. This error will flow back through the network, resulting in the adjustment of weights. Through multiple positive feedback iterations, the model parameters of the BP neural network model are optimized, so that the BP neural network model gradually approaches the target. When the preset error limit or training times are reached, the model training of the BP neural network model is terminated, and the electricity price prediction model is obtained.

[0028] S102: Input the current environmental parameters, current real-time prices and current electricity production data acquired at the current moment into an electricity price prediction model, and use the output result of the electricity price prediction model as the day-ahead electricity price.

[0029] The data characteristics corresponding to the environmental parameters and power production data in this step are consistent with the environmental characteristics and power production characteristics of the electricity price historical data sample data set in S101.

[0030] In the technical solution provided in the present application, the electricity price prediction model takes into account the impact of environmental characteristics, bidding space and power production characteristics on electricity prices during the day-ahead electricity price prediction process, which is closer to the actual production application process. The predicted day-ahead electricity price is also close to the actual value, which effectively improves the accuracy of the day-ahead electricity price prediction. In addition, the electricity price prediction based on a simple BP neural network model reduces the model training time while retaining a high electricity price prediction accuracy to meet actual production needs.

[0031] In order to further improve the efficiency and accuracy of electricity price prediction, based on the above embodiments, the present invention can also filter the data, that is, filter the features of the BP neural network model input into the electricity price prediction model or the training process, reduce the data dimension, effectively shorten the model training time and prediction time, and finally achieve the expected prediction effect, which may include the following contents:

[0032] Obtain a sample data set of historical electricity price raw data; for each historical electricity price raw data, determine the importance value of each feature of the historical electricity price raw data by calculating the average value of the accuracy reduction of each feature of the current historical electricity price raw data on all decision trees; select target features that meet the prediction feature screening conditions for each historical electricity price raw data according to the prediction feature screening conditions and feature importance values; generate a sample data set of electricity price historical data according to the target features of each historical electricity price raw data. Among them, the target feature selection method can be: for each historical electricity price raw data, use the historical operation day-2 bidding space prediction feature, the historical operation day-2 prediction new energy feature, the average value of the real-time price over the same period of the previous two days, the visibility feature, and the wind speed feature as the target feature.

[0033] In this embodiment, considering that the electricity price has the characteristics of large volatility, many influencing factors, and strong nonlinearity, in order to further improve the accuracy of electricity price prediction, this embodiment also processes the acquired raw data into a process that better reflects the essence of the problem, such as cleaning and conversion, which can effectively solve the prediction accuracy of the model for invisible data. Each historical electricity price raw data of the historical electricity price raw data sample data set includes at least historical time characteristics, point sequence data characteristics, bidding space prediction characteristics, predicted load characteristics, historical same period day-ahead price characteristics, historical operation day-2 real-time price, historical operation day-1 day-ahead price, historical operation day-2 load data characteristics, tie line characteristics, new energy output prediction characteristics, non-marketized unit output characteristics, environmental characteristics, and the average value of real-time and day-ahead prices in the same period. Exemplarily, this embodiment can select the historical electricity price raw data containing 30 influencing factors such as month, number of days in a month, bidding space, predicted load within the preset town range, and historical same period day-ahead price. Therefore, it is necessary to select the features contained in the historical electricity price raw data to reduce the impact of irrelevant features on the prediction accuracy. Common methods for feature selection include Pearson coefficient, Spearman coefficient, importance analysis, etc. For example, importance analysis can be used to use random forest to screen out influencing factors with high importance and reduce input complexity. The random forest algorithm consists of multiple decision trees. During the construction process, each decision tree uses self-service sampling to extract samples with replacement from the original data of each historical electricity price to form different subsets of the original data set of historical electricity price samples. For each decision tree, when dividing the node, a feature subset is randomly selected to find the best division. The importance of a feature in a random forest can be measured by observing the decrease in accuracy when the feature is used for node division in each decision tree. Based on this method, importance ranking analysis is completed to screen features. For example, the original data sample data set of historical electricity prices uses data related to the power market in a certain place. The data set ranges from January 1, 2023 to June 30, 2023, including month, point sequence, year, month, day, D-2 real-time price, D-1 day-ahead price, D-2 provincial load, interconnection line, and new energy output forecast, where D is the real-time market operation day. 28 types of data including non-market unit output, wind speed, temperature and humidity, and average real-time and day-ahead prices during the same period. The random forest algorithm is used in the feature screening stage to complete the feature importance ranking by calculating the average value of the decrease in accuracy of each feature on all decision trees. In order to study the impact of importance distribution changes over time, this embodiment uses the data from the previous two weeks as the sample data set of historical electricity price original data to predict the day-ahead price of the next day and complete a cycle of day-ahead price prediction. After each cycle is completed, the sample data set of historical electricity price original data selects the starting date to be postponed by one day until the loop stop condition is triggered. In this experiment, the start date of the training set is January 1, 2023, and the training cycle is 160 times. The feature importance distribution is as follows Figure 4As shown. Figure 4 As shown in the figure, the distribution of feature importance is not the same in different periods in the first half of the year. In general, the D-2 bidding space forecast, D-2 prediction of new energy, the average value of the real-time price in the previous two days, vis (visibility), wind speed and other features are ranked higher in importance. Therefore, the top 12 features in terms of importance are selected as training input to reduce the dimension of input data.

[0034] From the above, it can be seen that this embodiment screens the historical electricity price raw data sample data set based on the random forest method, which can effectively reduce the dimension of the data set, retain the influencing factors with higher importance, and at the same time reduce the training time of the electricity price prediction model, thereby improving the accuracy of electricity price prediction.

[0035] In order to further improve the prediction accuracy and prediction efficiency of the day-ahead electricity price, this embodiment also provides a day-ahead electricity price prediction method, which may include the following contents:

[0036] The electricity price prediction model uses the date electricity price prediction relationship to obtain the day-ahead electricity price; the date electricity price prediction relationship can be expressed as: ; Where O is the day-ahead electricity price, l represents the total number of hidden layers, and w jk represents the bias between the jth hidden layer and the kth node of the output layer, b k represents the bias from the hidden layer to the kth node of the output layer, w ij represents the weight between the i-th node of the input layer and the j-th hidden layer, n represents the total number of nodes in the input layer, a j represents the bias from the input layer to the jth hidden layer, x i represents the input data of the i-th node in the input layer, and g is the activation function.

[0037] The above embodiment does not limit how to train the electricity price prediction model. The present invention also provides an exemplary electricity price prediction model training method, which may include the following contents:

[0038] First, the BP neural network model is initialized. The initialization process includes the network parameter setting. The network parameters include the number of input layer nodes, the number of output layer nodes n, m, the number of hidden layers l, the weights and biases between each layer of the network, the biases from the input layer to the hidden layer and from the hidden layer to the output layer, the learning rate, and the activation function. Secondly, for the BP network model with l hidden layers, the relationship Determine the output result of the hidden layer. When the sample data set of electricity price historical data is input into the input layer of the BP neural network model according to the preset batch size, after passing through the hidden layer and the output layer, the output result is: , get the corresponding expected value , through the relation Calculate the error. During the training of the BP neural network model, the weight relationship is called to update the model parameters of each network layer of the BP neural network model, and then the bias relationship is called to update the model parameters of each network layer of the BP neural network model. After the bias and weight update is completed, the result is judged whether it converges according to the number of iterations or the difference between the errors, thereby determining whether the iteration is ended.

[0039] Among them, the weight relationship can be expressed as: ; In the formula, w ij represents the weight between the i-th node of the input layer and the j-th hidden layer after the current iteration is completed, w (ij-0) represents the weight between the i-th node of the input layer and the j-th hidden layer obtained in the previous iteration, n represents the total number of nodes in the input layer, l represents the total number of hidden layers, and w jk represents the bias between the jth hidden layer and the kth node of the output layer, m represents the total number of nodes in the output layer, and b k represents the bias from the hidden layer to the kth node of the output layer, a j represents the bias from the input layer to the jth hidden layer, x i represents the input data of the i-th node in the input layer, g is the activation function, η represents the learning rate, and Y k represents the true value of the day-ahead electricity price, O k Represents the day-ahead electricity price forecast output by the kth node in the output layer.

[0040] Among them, the bias relationship can be expressed as: ; In the formula, a j represents the bias from the input layer to the jth hidden layer after the current iteration is completed, a (j-0) represents the bias from the input layer to the jth hidden layer obtained in the previous iteration, n represents the total number of nodes in the input layer, l represents the total number of hidden layers, and w jk represents the bias between the jth hidden layer and the kth node of the output layer, m represents the total number of nodes in the output layer, and b j represents the bias a from the jth hidden layer to the kth node of the output layer j represents the bias from the input layer to the jth hidden layer, x i represents the input data of the i-th node in the input layer, g is the activation function, η represents the learning rate, and Y k represents the true value of the day-ahead electricity price, O k Represents the day-ahead electricity price forecast output by the kth node in the output layer.

[0041] In order to verify the prediction effect of the electricity price prediction model trained in the above embodiment, MAE (mean absolute error), MSE (mean square error), and SMAPE (symmetric mean absolute percentage error) can be used to calculate the relative error between the predicted value and the actual value through the following relationship, so as to measure the prediction accuracy measurement index of the electricity price prediction model. The calculation formulas are as follows: ; ;

[0042] Among them, yi is the predicted value, yj is the true value, n is the time point, and when the predicted value and the true value are both 0, SMAPE is 100%.

[0043] The filtered features are used as input, and the learning rate of the BP neural network prediction model is lr=0.02. The early stopping method is used to prevent overfitting. Similar to feature engineering, 14 days of data are selected as the sample data set of electricity price history data. The trained electricity price prediction model predicts the price on the 15th day and records the values ​​of each indicator. After each prediction, the start date of the training set is postponed by one day until 160 sets of data are predicted. The mean of each indicator is output. The results are shown in Table 1. Figure 5 As shown, from Figure 5 It can be seen that when electricity prices do not fluctuate much, the predicted price curve can better fit the actual price. When peak electricity prices occur, although the predicted results cannot fully reflect the actual situation, they do reflect the price change trend to a certain extent.

[0044] Table 1. Results of MAE, MSE and SMAPE for electricity price prediction

[0045] It should be noted that there is no strict order of execution between the steps in the present application. As long as they comply with the logical order, these steps can be executed simultaneously or in a preset order. The drawings are only a schematic diagram and do not mean that this is the only execution order.

[0046] The present application also provides a corresponding device for the electricity price prediction method, which further makes the method more practical. Among them, the device can be described from the perspective of functional modules and hardware. The electricity price prediction device provided by the present application is introduced below. The device is used to implement the electricity price prediction method provided by the present application. In this embodiment, the electricity price prediction device may include or be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to complete the electricity price prediction method disclosed in Example 1. The program module referred to in this application refers to a series of computer program instruction segments that can perform specific functions, which is more suitable for describing the execution process of the electricity price prediction device in the storage medium than the program itself. The following description will specifically introduce the functions of each program module of this embodiment. The electricity price prediction device described below and the electricity price prediction method described above can be referenced to each other.

[0047] From the perspective of functional modules, see Figure 6 , Figure 6 This is a structural diagram of an electricity price prediction device provided in this application under a specific implementation mode, and the device may include: The model prediction module 601 is used to pre-train the BP neural network model based on the electricity price historical data sample data set to obtain the electricity price prediction model; the electricity price historical data sample data set includes historical price characteristics, environmental characteristics, bidding space prediction characteristics and power production characteristics.

[0048] The electricity price prediction module 602 is used to input the current environmental parameters, current real-time prices and current electricity production data acquired at the current moment into the electricity price prediction model, and use the output result of the electricity price prediction model as the day-ahead electricity price.

[0049] Optionally, in some implementation schemes of the present embodiment, the above-mentioned device may further include a data screening module for obtaining a sample data set of historical electricity price raw data; each historical electricity price raw data of the sample data set of historical electricity price raw data includes at least historical time characteristics, point sequence data characteristics, bidding space prediction characteristics, predicted load characteristics, historical day-ahead price characteristics of the same period, historical operation day-2 real-time prices, historical operation day-ahead prices, historical operation day-2 load data characteristics, interconnection line characteristics, new energy output prediction characteristics, non-marketized unit output characteristics, environmental characteristics, and average real-time and day-ahead prices of the same period; for each historical electricity price raw data, the importance value of each feature of the historical electricity price raw data is determined by calculating the average value of the accuracy reduction of each feature of the current historical electricity price raw data on all decision trees; according to the predicted feature screening conditions and the feature importance value, the target feature that meets the predicted feature screening conditions is selected for each historical electricity price raw data; according to the target feature of each historical electricity price raw data, a sample data set of electricity price historical data is generated.

[0050] As an exemplary implementation method of the above embodiment, the above data screening module can also be used for: for each historical electricity price original data, the historical operation day-2 bidding space prediction characteristics, the historical operation day-2 predicted new energy characteristics, the average value of the real-time price of the previous two days during the same period, the visibility characteristics, and the wind speed characteristics are used as target characteristics.

[0051] Optionally, in some other implementations of this embodiment, the above-mentioned model prediction module 601 can also be used to: during the training process of the BP neural network model, call the weight relationship formula to update the model parameters of each network layer of the BP neural network model; the weight relationship formula is: ; In the formula, w ij represents the weight between the i-th node of the input layer and the j-th hidden layer after the current iteration is completed, w (ij-0) represents the weight between the i-th node of the input layer and the j-th hidden layer obtained in the previous iteration, n represents the total number of nodes in the input layer, l represents the total number of hidden layers, and w jk represents the bias between the jth hidden layer and the kth node of the output layer, m represents the total number of nodes in the output layer, and b k represents the bias from the hidden layer to the kth node of the output layer, a j represents the bias from the input layer to the jth hidden layer, x i represents the input data of the i-th node in the input layer, g is the activation function, η represents the learning rate, and Y k represents the true value of the day-ahead electricity price, O k Represents the day-ahead electricity price forecast output by the kth node in the output layer.

[0052] Optionally, in some other implementations of this embodiment, the above-mentioned model prediction module 601 can also be used to: during the training process of the BP neural network model, call the bias relationship to update the model parameters of each network layer of the BP neural network model; the bias relationship is: ; In the formula, a j represents the bias from the input layer to the jth hidden layer after the current iteration is completed, a (j-0) represents the bias from the input layer to the jth hidden layer obtained in the previous iteration, n represents the total number of nodes in the input layer, l represents the total number of hidden layers, and w jk represents the bias between the jth hidden layer and the kth node of the output layer, m represents the total number of nodes in the output layer, and b j represents the bias a from the jth hidden layer to the kth node of the output layer j represents the bias from the input layer to the jth hidden layer, x irepresents the input data of the i-th node in the input layer, g is the activation function, η represents the learning rate, and Y k represents the true value of the day-ahead electricity price, O k Represents the day-ahead electricity price forecast output by the kth node in the output layer.

[0053] Optionally, in some other implementations of this embodiment, the electricity price prediction module 602 may also be used for: the electricity price prediction model calls the date electricity price prediction relationship to obtain the day-ahead electricity price; wherein the date electricity price prediction relationship is: ; Where O is the day-ahead electricity price, l represents the total number of hidden layers, and w jk represents the bias between the jth hidden layer and the kth node of the output layer, b k represents the bias from the hidden layer to the kth node of the output layer, w ij represents the weight between the i-th node of the input layer and the j-th hidden layer, n represents the total number of nodes in the input layer, a j represents the bias from the input layer to the jth hidden layer, x i represents the input data of the i-th node in the input layer, and g is the activation function.

[0054] The electricity price prediction device mentioned above is described from the perspective of functional modules. Furthermore, the present application also provides an electronic device, which is described from the perspective of hardware. Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application in one implementation manner. Figure 7 As shown, the electronic device includes a memory 70 for storing a computer program; and a processor 71 for implementing the steps of the electricity price prediction method mentioned in any of the above embodiments when executing the computer program.

[0055] Among them, the processor 71 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the processor 71 may also be a controller, a microcontroller, a microprocessor or other data processing chip. The processor 71 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 71 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 71 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 71 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0056] The memory 70 may include one or more computer-readable storage media, which may be non-transitory. The memory 70 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the memory 70 may be an internal storage unit of an electronic device, such as a hard disk of a server. In other embodiments, the memory 70 may also be an external storage device of an electronic device, such as a plug-in hard disk equipped on a server, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. Further, the memory 70 may also include both an internal storage unit of an electronic device and an external storage device. The memory 70 may not only be used to store application software and various types of data installed in the electronic device, such as: the code of the program in the process of executing the electricity price prediction method, but also be used to temporarily store data that has been output or is to be output. In this embodiment, the memory 70 is at least used to store the following computer program 701, wherein, after the computer program is loaded and executed by the processor 71, the relevant steps of the electricity price prediction method disclosed in any of the aforementioned embodiments can be implemented. In addition, the resources stored in the memory 70 may also include an operating system 702 and data 703, and the storage method may be temporary storage or permanent storage. The operating system 702 may include Windows, Unix, Linux, etc. The data 703 may include but is not limited to data corresponding to the electricity price prediction result.

[0057] In some embodiments, the electronic device may further include a display screen 72, an input / output interface 73, a communication interface 74 or a network interface, a power supply 75 and a communication bus 76. Among them, the display screen 72 and the input / output interface 73 such as a keyboard belong to the user interface, and the optional user interface may also include a standard wired interface, a wireless interface, etc. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface. The communication interface 74 may optionally include a wired interface and / or a wireless interface, such as a WI-FI interface, a Bluetooth interface, etc., which is usually used to establish a communication connection between the electronic device and other electronic devices. The communication bus 76 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0058] Those skilled in the art will understand that Figure 7 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, for example, it may also include a sensor 77 to implement various functions.

[0059] It is understandable that if the electricity price prediction method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the relevant technology or all or 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 to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes but is not limited to: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, removable disk, CD-ROM, magnetic disk or optical disk, etc. Various media that can store program codes. Based on this, the present invention also provides a non-volatile storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of electricity price prediction recorded in any of the above embodiments are performed.

[0060] It is understandable that if the electricity price prediction method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, the computer software product does not need to be stored in a physical storage medium. For example, it can be directly transmitted to a computer or other device with information processing capabilities through a wired network or a wireless network to perform all or part of the steps of the methods of each embodiment of the present invention. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the relevant technology or all or part of the technical solution can be embodied in the form of a software product. Based on this, the present invention also provides a computer program product storing a computer program, which, when executed by a processor, performs the steps of electricity price prediction as described in any of the above embodiments.

[0061] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the hardware disclosed in the embodiments, including devices and electronic devices, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part.

[0062] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0063] The above is a detailed introduction to an electricity price prediction method, device, electronic device, non-volatile storage medium and computer program product provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. It should be pointed out that based on the embodiments in the present application, for ordinary technicians in this technical field, all other embodiments obtained without creative work are within the scope of protection of the present application. Without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.

Claims

1. A method for predicting electricity prices, characterized in that: include: Pre-training a BP neural network model based on a sample data set of electricity price history data to obtain an electricity price prediction model; the sample data set of electricity price history data includes historical price characteristics, environmental characteristics, bidding space prediction characteristics, and power production characteristics; The current environmental parameters, current real-time prices and current electricity production data acquired at the current moment are input into the electricity price prediction model, and the output result of the electricity price prediction model is used as the day-ahead electricity price.

2. The electricity price prediction method according to claim 1, characterized in that: Before the BP neural network model is trained in advance based on the electricity price historical data sample data set to obtain the electricity price prediction model, the method further includes: Obtain a sample data set of historical electricity price raw data; each historical electricity price raw data of the sample data set of historical electricity price raw data at least includes historical time characteristics, point sequence data characteristics, bidding space prediction characteristics, predicted load characteristics, historical day-ahead price characteristics for the same period, historical operation day-2 real-time prices, historical operation day-1 day-ahead prices, historical operation day-2 load data characteristics, tie line characteristics, new energy output prediction characteristics, non-marketized unit output characteristics, environmental characteristics, and real-time and day-ahead price averages for the same period; For each original data of historical electricity prices, the importance value of each feature of the original data of historical electricity prices is determined by calculating the average value of the accuracy decrease of each feature of the original data of current historical electricity prices on all decision trees; According to the prediction feature screening conditions and feature importance values, target features that meet the prediction feature screening conditions are selected for each historical electricity price original data; According to the target characteristics of each historical electricity price original data, a sample data set of electricity price historical data is generated.

3. The electricity price prediction method according to claim 2, characterized in that: The step of selecting target features that meet the prediction feature screening conditions and feature importance values ​​for each historical electricity price original data includes: For each historical electricity price raw data, the historical operation day-2 bidding space prediction characteristics, the historical operation day-2 predicted new energy characteristics, the average value of the real-time price of the previous two days, the visibility characteristics, and the wind speed characteristics are taken as target characteristics.

4. The electricity price prediction method according to claim 1, characterized in that: The method of training the BP neural network model based on the electricity price historical data sample data set to obtain the electricity price prediction model includes: During the training process of the BP neural network model, the weight relationship is called to update the model parameters of each network layer of the BP neural network model; the weight relationship is: ; In the formula, O is the day-ahead electricity price, l represents the total number of hidden layers, w jk represents the jth hidden layer and the jth output layer k The bias between nodes, b k Represents the number of layers from hidden layer to output layer k The bias of the node, w ij The input layer i The node and j The weights between the hidden layers, n represents the total number of nodes in the input layer, a j Represents the input layer to the j The bias of the hidden layer, x i Represents the input layer i The input data of each node, g is the activation function.

5. The electricity price prediction method according to claim 1, characterized in that: The BP neural network model is trained based on the sample data set of electricity price historical data to obtain the electricity price prediction model, including: During the training process of the BP neural network model, the bias relation is called to update the model parameters of each network layer of the BP neural network model; the bias relation is: ; In the formula, a j represents the bias from the input layer to the jth hidden layer after the current iteration is completed, a (j-0) represents the bias from the input layer to the jth hidden layer obtained in the previous iteration, n represents the total number of nodes in the input layer, l represents the total number of hidden layers, and w jk represents the bias between the jth hidden layer and the kth node of the output layer, m represents the total number of nodes in the output layer, and b j represents the bias a from the jth hidden layer to the kth node of the output layer j represents the bias from the input layer to the jth hidden layer, x i represents the input data of the i-th node in the input layer, g is the activation function, η represents the learning rate, and Y k represents the true value of the day-ahead electricity price, O k Represents the day-ahead electricity price forecast output by the kth node in the output layer.

6. The electricity price prediction method according to any one of claims 1 to 5, characterized in that: The step of using the output result of the electricity price prediction model as the day-ahead electricity price includes: The electricity price prediction model calls the date electricity price prediction relationship to obtain the day-ahead electricity price; wherein the date electricity price prediction relationship is: ; In the formula, O is the day-ahead electricity price, l represents the total number of hidden layers, w jk represents the jth hidden layer and the jth output layer k The bias between nodes, b k Represents the number of layers from hidden layer to output layer k The bias of the node, w ij The input layer i The node and j The weights between the hidden layers, n represents the total number of nodes in the input layer, a j Represents the input layer to the j The bias of the hidden layer, x i Represents the input layer i The input data of each node, g is the activation function.

7. An electricity price prediction device, characterized in that: include: A model prediction module is used to train a BP neural network model based on a sample data set of historical electricity price data in advance to obtain an electricity price prediction model; the sample data set of historical electricity price data includes historical price characteristics, environmental characteristics, bidding space prediction characteristics and power production characteristics; The electricity price prediction module is used to input the current environmental parameters, current real-time prices and current electricity production data acquired at the current moment into the electricity price prediction model, and use the output result of the electricity price prediction model as the day-ahead electricity price.

8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the processor is used to implement the steps of the electricity price prediction method according to any one of claims 1 to 6 when executing a computer program stored in the memory.

9. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the electricity price prediction method according to any one of claims 1 to 6 are implemented.

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