Electricity price prediction method and device based on neural network, and electronic equipment
Through the neural network-based electricity price prediction method, combined with historical electricity price, load and weather data, the GRU and DNN models are used to predict electricity price, which solves the problem of low accuracy of the existing electricity price prediction model and achieves more efficient electricity price prediction.
Patent Information
- Application Number
- CN202411212243.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-01-07
AI Technical Summary
The existing electricity price prediction model has problems such as poor applicability and low electricity price prediction accuracy in the field of electricity price prediction.
The electricity price prediction method based on neural network is adopted, and the electricity price is carried out through a multi-layer neural network model using deep gated cyclic unit (GRU), deep neural network (DNN) and splicing network. Forecasting, improve prediction accuracy.
This method improves the adaptability and self-learning ability of electricity price prediction, reduces the impact of load and weather on electricity price prediction, and is suitable for electricity price prediction scenarios on different time scales, significantly improving the accuracy of electricity price prediction.
Smart Images

Figure CN119273377A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of artificial intelligence and energy and power technology, and in particular to a method, device, electronic device and storage medium for predicting electricity prices based on a neural network. Background Art
[0002] At present, with the continuous development of artificial intelligence technology, electricity price prediction models have the advantages of high electricity price prediction efficiency and low labor cost, and have been widely used in the field of electricity price prediction. However, the electricity price prediction models in related technologies have the problems of poor applicability and low electricity price prediction accuracy. Summary of the invention
[0003] The present application aims to solve one of the technical problems in the related art at least to some extent.
[0004] To this end, the first purpose of this application is to propose an electricity price prediction method based on neural network.
[0005] The second objective of this application is to propose an electricity price prediction device based on a neural network.
[0006] The third objective of the present application is to provide an electronic device.
[0007] A fourth objective of the present application is to provide a computer-readable storage medium.
[0008] A fifth object of the present application is to provide a computer program product.
[0009] To achieve the above-mentioned purpose, the first embodiment of the present application proposes a method for predicting electricity prices based on a neural network, comprising: receiving an electricity price query request sent by a client, and acquiring historical electricity price data, predicted load data, and predicted weather data based on the electricity price query request;
[0010] Obtain an electricity price prediction model, wherein the electricity price prediction model includes a deep gated recurrent unit GRU, a first deep neural network DNN, a splicing network and a second DNN; input the historical electricity price data into the deep GRU, and the deep GRU outputs a first intermediate parameter; input the predicted load data and the predicted weather data into the first DNN, and the first DNN outputs a second intermediate parameter; input the first intermediate parameter and the second intermediate parameter into the splicing network, and the splicing network splices the first intermediate parameter and the second intermediate parameter to obtain a third intermediate parameter; input the third intermediate parameter into the second DNN, and the second DNN outputs a first predicted electricity price data, and the first predicted electricity price data is sent to the client.
[0011] To achieve the above-mentioned purpose, the second aspect of the present application proposes an electricity price prediction device based on a neural network, including: a first acquisition module, used to receive an electricity price query request sent by a client, and acquire historical electricity price data, predicted load data and predicted weather data based on the electricity price query request; a second acquisition module, used to acquire an electricity price prediction model, wherein the electricity price prediction model includes a deep gated recurrent unit GRU, a first deep neural network DNN, a splicing network and a second DNN; a first processing module, used to input the historical electricity price data into the deep GRU, and the deep GRU outputs a first intermediate parameter; a second processing module, used to input the predicted load data and the predicted weather data into the first DNN, and the first DNN outputs a second intermediate parameter; a splicing module, used to input the first intermediate parameter and the second intermediate parameter into the splicing network, and the splicing network splices the first intermediate parameter and the second intermediate parameter to obtain a third intermediate parameter; a third processing module, used to input the third intermediate parameter into the second DNN, and the second DNN outputs a first predicted electricity price data, and sends the first predicted electricity price data to the client.
[0012] To achieve the above-mentioned purpose, the third aspect embodiment of the present application proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method described in the first aspect embodiment above.
[0013] To achieve the above-mentioned purpose, the fourth aspect embodiment of the present application proposes a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed by a processor, they are used to implement the method described in the first aspect embodiment above.
[0014] To achieve the above-mentioned purpose, the fifth aspect of the present application proposes a computer program product, including a computer program, which, when executed by a processor, implements the method described in the first aspect of the present application.
[0015] The neural network-based electricity price prediction method, device, electronic device and storage medium provided in the present application process historical electricity price data by a deep GRU to obtain a first intermediate parameter, process predicted load data and predicted weather data by a first DNN to obtain a second intermediate parameter, concatenate the first intermediate parameter and the second intermediate parameter by a concatenation network to obtain a third intermediate parameter, and process the third intermediate parameter by a second DNN to obtain first predicted electricity price data. The neural network-based electricity price prediction model can be used to process historical electricity price data, predicted load data and predicted weather data to obtain first predicted electricity price data. The electricity price prediction model has adaptability and self-learning ability, can adapt to the impact of load output distribution and different time scales on electricity prices, reduce the impact of load and weather on the accuracy of electricity price prediction, is suitable for electricity price prediction scenarios at different time scales, and effectively improves the accuracy of electricity price prediction.
[0016] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0018] Figure 1 A flowchart of a method for predicting electricity prices based on a neural network provided in an embodiment of the present application;
[0019] Figure 2 A schematic diagram of an electricity price prediction model provided in an embodiment of the present application;
[0020] Figure 3 A flowchart of another method for predicting electricity prices based on a neural network provided in an embodiment of the present application;
[0021] Figure 4 A flowchart of another method for predicting electricity prices based on a neural network provided in an embodiment of the present application;
[0022] Figure 5 A flowchart of another method for predicting electricity prices based on a neural network provided in an embodiment of the present application;
[0023] Figure 6 A schematic diagram of the structure of a neural network-based electricity price prediction device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0025] The following describes the neural network-based electricity price prediction method, device, electronic device and storage medium according to an embodiment of the present application with reference to the accompanying drawings.
[0026] Figure 1 A flowchart of a method for predicting electricity prices based on a neural network is provided in an embodiment of the present application.
[0027] At present, with the continuous development of artificial intelligence technology, electricity price prediction models have the advantages of high electricity price prediction efficiency and low labor cost, and have been widely used in the field of electricity price prediction. However, the electricity price prediction models in related technologies have the problems of poor applicability and low electricity price prediction accuracy.
[0028] To address this problem, an embodiment of the present application provides an electricity price prediction method based on a neural network, wherein a deep GRU processes historical electricity price data to obtain a first intermediate parameter, a first DNN processes predicted load data and predicted weather data to obtain a second intermediate parameter, a splicing network concatenates the first intermediate parameter and the second intermediate parameter to obtain a third intermediate parameter, and a second DNN processes the third intermediate parameter to obtain first predicted electricity price data. The neural network-based electricity price prediction model can be used to process historical electricity price data, predicted load data and predicted weather data to obtain first predicted electricity price data. The electricity price prediction model has adaptability and self-learning capabilities, can adapt to the impact of load output distribution and different time scales on electricity prices, reduce the impact of load and weather on the accuracy of electricity price prediction, is suitable for electricity price prediction scenarios at different time scales, and effectively improves the accuracy of electricity price prediction.
[0029] like Figure 1 As shown, the method comprises the following steps:
[0030] S101, receiving an electricity price query request sent by a client, and acquiring historical electricity price data, predicted load data, and predicted weather data based on the electricity price query request.
[0031] It should be noted that Figures 1 to 5 The execution subject of the electricity price prediction method based on neural network shown is an electronic device, such as a server. The client refers to a client that can provide electricity price query services, such as electricity price query APP (Application), website, etc. For example, taking the execution subject as a server as an example, the server refers to a server that can provide electricity price prediction services.
[0032] It should be noted that the historical electricity price data refers to the electricity price data before the forecast date of the electricity price data to be forecasted (i.e., the first forecast electricity price data). For example, if the forecast date is August 15, the historical electricity price data refers to the electricity price data before August 15, such as the electricity price data on August 14, the electricity price data on August 13, etc. There is at least one historical electricity price data.
[0033] It should be noted that the forecasted load data refers to the load data on the forecast date. For example, if the forecast date is August 15, the forecasted load data refers to the load data on August 15. There are no excessive restrictions on load data, for example, it may include the whole network load, direct load, cross-regional power transmission load, base load, peak load, average load, interruptible load, controllable load, uncontrollable load, sudden load, etc.
[0034] It should be noted that the forecast weather data refers to the weather data on the forecast date. For example, if the forecast date is August 15, the forecast weather data refers to the weather data on August 15. There are no excessive restrictions on the weather data, for example, it may include temperature, wind speed, visibility, average temperature, maximum temperature, minimum temperature, etc.
[0035] In one embodiment, historical electricity price data, predicted load data, and predicted weather data are obtained based on an electricity price query request, including determining a predicted date and a predicted time point of the first predicted electricity price data based on the electricity price query request, obtaining electricity price data at the predicted time point for each of the consecutive K dates before the predicted date as historical electricity price data, where K is a positive integer, predicting the load data at the predicted time point on the predicted date to obtain predicted load data, and predicting the weather data at the predicted time point on the predicted date to obtain predicted weather data. Thus, the predicted date and the predicted time point can be determined based on the electricity price query request, and the electricity price data at the predicted time point for each of the consecutive multiple dates before the predicted date can be obtained as historical electricity price data, and the load data and weather data at the predicted time point on the predicted date can be predicted to obtain predicted load data and predicted weather data.
[0036] It should be noted that there are no excessive restrictions on the forecast time points, for example, the time scale of the forecast time points can be hourly, that is, the forecast time points can include 0:00, 1:00, 2:00, 3:00, etc. There are no excessive restrictions on K, for example, it can be 7, 14, etc. In this embodiment, the forecast load data refers to the load data of the forecast date at the forecast time point, and the forecast weather data refers to the weather data of the forecast date at the forecast time point.
[0037] For example, taking K=14, if the prediction date is August 15 and the prediction time point is 6 a.m., the electricity price data at 6 a.m. from August 1 to August 14 can be obtained as historical electricity price data, and the load data at 6 a.m. on August 15 can be predicted to obtain predicted load data, and the weather data at 6 a.m. on August 15 can be predicted to obtain predicted weather data.
[0038] It should be noted that the acquisition of historical electricity price data can be achieved by using any electricity price calculation method in the relevant technology, and no further restrictions are made here. Among them, the electricity price calculation method may include the time-of-use electricity price calculation principle. For example, taking the sampling period of electricity price data as 15 minutes, the average of the electricity price data at four time points in a certain hour is obtained as the electricity price data for that hour.
[0039] In some examples, the method further includes obtaining an average of electricity price data at multiple adjacent time points of the target date at the forecast time point as the electricity price data of the target date at the forecast time point, wherein the target date is one of the K consecutive dates before the forecast date.
[0040] In some examples, determining a predicted date and a predicted time point of the first predicted electricity price data based on the electricity price query request includes extracting the predicted date and the predicted time point from the electricity price query request.
[0041] In one embodiment, obtaining historical electricity price data, predicted load data and predicted weather data based on an electricity price query request includes extracting historical electricity price data, predicted load data and predicted weather data from the electricity price query request.
[0042] In one embodiment, the method further comprises generating a first statistical report based on historical electricity price data, and generating a second statistical report based on predicted load data and predicted weather data. Thus, the historical electricity price data can be integrated into the first statistical report, and the predicted load data and predicted weather data can be integrated into the second statistical report.
[0043] S102, obtaining an electricity price prediction model, wherein the electricity price prediction model includes a deep gated recurrent unit GRU, a first deep neural network DNN, a concatenated network and a second DNN.
[0044] like Figure 2As shown, the electricity price prediction model includes a deep GRU (Gated Recurrent Unit), a first DNN (Deep Neural Network), a spliced network and a second DNN. It should be noted that the deep GRU is a gated recurrent neural network (Gated Recurrent Neural Network). The electricity price prediction model is a model based on a neural network. The deep GRU, the first DNN, the spliced network and the second DNN can all adopt the networks in the relevant technology, and no excessive restrictions are made here.
[0045] In one embodiment, the first DNN and / or the second DNN includes multiple DNNs. It should be noted that there are no excessive restrictions on the connection method between the multiple DNNs in the first DNN and / or the second DNN, for example, it may include series connection, parallel connection, etc.
[0046] In some examples, the first DNN and / or the second DNN is composed of multiple DNNs connected in series. Figure 2 As shown, the first DNN and the second DNN are respectively composed of two DNNs connected in series.
[0047] S103, inputting historical electricity price data into the deep GRU, and the deep GRU outputs a first intermediate parameter.
[0048] For example, if the prediction date is August 15 and the prediction time point is 6 a.m., the electricity price data at 6 a.m. from August 1 to August 14 can be obtained as historical electricity price data. The electricity price data at 6 a.m. from August 1 to August 14 are input into the deep GRU, and the deep GRU outputs the first intermediate parameter.
[0049] In one embodiment, the method further includes performing feature extraction on historical electricity price data of multiple time steps by a deep GRU to obtain a first intermediate parameter.
[0050] For example, if the prediction date is August 15 and the prediction time is 6 a.m., the electricity price data at 6 a.m. from August 1 to August 14 can be obtained as the historical electricity price data, and the electricity price data at 6 a.m. on August X is used as the historical electricity price data of the Xth time step, where X is a positive integer not greater than 14. For example, the electricity price data at 6 a.m. on August 1 is used as the historical electricity price data of the first time step, and the electricity price data at 6 a.m. on August 2 is used as the historical electricity price data of the second time step.
[0051] The electricity price data at 6 a.m. from August 1 to August 14 (i.e., historical electricity price data for 14 time steps) can be input into the deep GRU, and the deep GRU performs feature extraction on the historical electricity price data for 14 time steps to obtain the first intermediate parameter.
[0052] In one embodiment, before inputting the historical electricity price data into the deep GRU, the historical electricity price data is further normalized. For example, the historical electricity price data is normalized, including mapping the historical electricity price data to a data interval [0, 1].
[0053] S104, input the predicted load data and the predicted weather data into the first DNN, and the first DNN outputs a second intermediate parameter.
[0054] For example, if the prediction date is August 15 and the prediction time point is 6 a.m., the load data at 6 a.m. on August 15 is predicted to obtain predicted load data, and the weather data at 6 a.m. on August 15 is predicted to obtain predicted weather data. The above-mentioned predicted load data and the above-mentioned predicted weather data are input into the first DNN, and the first DNN outputs the second intermediate parameter.
[0055] In one embodiment, the method further includes performing feature extraction on the predicted load data and the predicted weather data by the first DNN to obtain a second intermediate parameter.
[0056] For example, if the prediction date is August 15 and the prediction time point is 6 a.m., the load data at 6 a.m. on August 15 is predicted to obtain predicted load data, and the weather data at 6 a.m. on August 15 is predicted to obtain predicted weather data. The above predicted load data and the above predicted weather data are input into the first DNN, and the first DNN performs feature extraction on the above predicted load data and the above predicted weather data to obtain the second intermediate parameter.
[0057] In one embodiment, before the predicted load data and the predicted weather data are input into the first DNN, the predicted load data and the predicted weather data are further standardized. For example, the predicted load data and the predicted weather data are standardized, including mapping the predicted load data and the predicted weather data to the data interval [0, 1] respectively.
[0058] S105, inputting the first intermediate parameter and the second intermediate parameter into a splicing network, and the splicing network splices the first intermediate parameter and the second intermediate parameter to obtain a third intermediate parameter.
[0059] It should be noted that the splicing of the first intermediate parameter and the second intermediate parameter by the splicing network can be implemented by using any data splicing method in the relevant technology, and no excessive limitation is made here.
[0060] In one embodiment, the first intermediate parameter and the second intermediate parameter are spliced by a splicing network to obtain a third intermediate parameter, including when the first intermediate parameter and the second intermediate parameter are both features, the splicing network splices the first intermediate parameter and the second intermediate parameter according to the feature dimension to obtain the third intermediate parameter. It can be understood that splicing according to the feature dimension will not change the number of feature dimensions, that is, the number of feature dimensions of the first to third intermediate parameters is consistent.
[0061] S106, input the third intermediate parameter into the second DNN, the second DNN outputs the first predicted electricity price data, and the first predicted electricity price data is sent to the client.
[0062] In one embodiment, the method further includes performing feature extraction on the third intermediate parameter by the second DNN to obtain a fourth intermediate parameter, and performing electricity price prediction by the second DNN based on the fourth intermediate parameter to obtain first predicted electricity price data.
[0063] In one embodiment, the method further includes displaying the first predicted electricity price data on a display device, and / or controlling a voice playback device to play the first predicted electricity price data by voice, so that a user can understand the predicted electricity price data more intuitively.
[0064] In one embodiment, the method further includes adjusting the power dispatching strategy based on the first predicted electricity price data, wherein the power dispatching strategy may include the power generation at the predicted date at the predicted time point, etc.
[0065] For example, the first predicted electricity price data can be input into the power dispatch model, and the power dispatch model outputs the power dispatch strategy. It should be noted that there are no excessive restrictions on the power dispatch model, for example, it can include a data-driven model, a mechanism model, etc.
[0066] In summary, according to the neural network-based electricity price prediction method of the embodiment of the present application, an electricity price query request sent by a client is received, and historical electricity price data, predicted load data and predicted weather data are obtained based on the electricity price query request to obtain an electricity price prediction model, wherein the electricity price prediction model includes a deep gated recurrent unit GRU, a first deep neural network DNN, a splicing network and a second DNN, the historical electricity price data is input into the deep GRU, the deep GRU outputs a first intermediate parameter, the predicted load data and the predicted weather data are input into the first DNN, the first DNN outputs a second intermediate parameter, the first intermediate parameter and the second intermediate parameter are input into the splicing network, the splicing network splices the first intermediate parameter and the second intermediate parameter to obtain a third intermediate parameter, the third intermediate parameter is input into the second DNN, the second DNN outputs a first predicted electricity price data, and the first predicted electricity price data is sent to the client. Therefore, the deep GRU processes the historical electricity price data to obtain the first intermediate parameter, the first DNN processes the predicted load data and the predicted weather data to obtain the second intermediate parameter, the splicing network splices the first intermediate parameter and the second intermediate parameter to obtain the third intermediate parameter, and the second DNN processes the third intermediate parameter to obtain the first predicted electricity price data. The neural network-based electricity price prediction model can be used to process the historical electricity price data, the predicted load data and the predicted weather data to obtain the first predicted electricity price data. The electricity price prediction model has adaptability and self-learning capabilities, can adapt to the impact of load output distribution and different time scales on electricity prices, reduce the impact of load and weather on the accuracy of electricity price prediction, is suitable for electricity price prediction scenarios at different time scales, and effectively improves the accuracy of electricity price prediction.
[0067] The embodiment of the present application provides another method for predicting electricity prices based on a neural network.
[0068] like Figure 3 As shown, the method may include the following steps:
[0069] S301, receiving an electricity price query request sent by a client, and acquiring historical electricity price data, predicted load data, and predicted weather data based on the electricity price query request.
[0070] S302, obtaining an electricity price prediction model, wherein the electricity price prediction model includes a deep gated recurrent unit GRU, a first deep neural network DNN, a concatenated network and a second DNN.
[0071] S303, inputting historical electricity price data into the deep GRU, and the deep GRU outputs a first intermediate parameter.
[0072] For the relevant contents of steps S301 - S303 , please refer to the above embodiment and will not be described again here.
[0073] S304, obtaining time-stamped data corresponding to the predicted load data and / or predicted weather data.
[0074] It should be noted that there are not too many restrictions on time-stamped data.
[0075] In one embodiment, the time-tagged data may include week-tagged data and / or weekend-tagged data. Therefore, when the time-tagged data includes week-tagged data, the electricity price prediction model can adapt to the impact of different days of the week on electricity prices, and when the time-tagged data includes weekend-tagged data, the electricity price prediction model can adapt to the impact of weekends on electricity prices, effectively improving the accuracy of electricity price prediction.
[0076] For example, taking the time marking data corresponding to the predicted load data as an example, the week marking data corresponding to the predicted load data is used to indicate the day of the week (i.e., the day of the week) to which the date corresponding to the predicted load data belongs, such as Monday, Tuesday, etc. The weekend marking data of the predicted load data is used to indicate whether the date corresponding to the predicted load data is a weekend.
[0077] For example, the day of the week may be represented by numbers 1 to 7, where number 1 is used to represent Monday, number 2 is used to represent Tuesday, number 3 is used to represent Wednesday, number 4 is used to represent Thursday, number 5 is used to represent Friday, number 6 is used to represent Saturday, and number 7 is used to represent Sunday.
[0078] For example, weekend labeling data can be represented by the numbers 0 and 1, where the number 0 is used to represent non-weekends and the number 1 is used to represent weekends.
[0079] In one embodiment, the time-stamped data may include working day-stamped data and / or rest day-stamped data. For example, taking the time-stamped data corresponding to the predicted load data as an example, the working day-stamped data corresponding to the predicted load data is used to indicate whether the date corresponding to the predicted load data is a working day, and the rest day-stamped data of the predicted load data is used to indicate whether the date corresponding to the predicted load data is a rest day. As a result, the electricity price prediction model can adapt to the impact of working days and rest days on electricity prices, effectively improving the accuracy of electricity price prediction.
[0080] In one embodiment, the time-stamped data may include time period-stamped data. For example, taking the time-stamped data corresponding to the predicted load data as an example, the time period-stamped data corresponding to the predicted load data is used to indicate that the time point corresponding to the predicted load data is morning, afternoon, night, etc. Thus, the electricity price prediction model can adapt to the impact of different time periods on electricity prices, and effectively improve the accuracy of electricity price prediction.
[0081] S305, input the predicted load data, predicted weather data and time-stamped data into the first DNN, and the first DNN outputs a second intermediate parameter.
[0082] It should be noted that the relevant content of step S305 can refer to the relevant content of step S104, which will not be repeated here.
[0083] For example, if the prediction date is August 15 and the prediction time point is 6 a.m., the load data at 6 a.m. on August 15 is predicted to obtain predicted load data, and the weather data at 6 a.m. on August 15 is predicted to obtain predicted weather data. The above-mentioned predicted load data, the above-mentioned predicted weather data, and the time-marked data of the above-mentioned predicted load data and / or the above-mentioned predicted weather data are input into the first DNN, and the first DNN performs feature extraction on the above-mentioned predicted load data, the above-mentioned predicted weather data, and the time-marked data of the above-mentioned predicted load data and / or the above-mentioned predicted weather data to obtain the second intermediate parameter.
[0084] S306, inputting the first intermediate parameter and the second intermediate parameter into a splicing network, and the splicing network splices the first intermediate parameter and the second intermediate parameter to obtain a third intermediate parameter.
[0085] S307, input the third intermediate parameter into the second DNN, the second DNN outputs the first predicted electricity price data, and the first predicted electricity price data is sent to the client.
[0086] For the relevant contents of steps S306-S307, please refer to the above embodiment and will not be repeated here.
[0087] In summary, according to the neural network-based electricity price prediction method of the embodiment of the present application, the time-marked data corresponding to the predicted load data and / or predicted weather data is obtained, and the predicted load data, predicted weather data and time-marked data are input into the first DNN, and the first DNN outputs the second intermediate parameter. Thus, the first DNN processes the predicted load data, predicted weather data and time-marked data to obtain the second intermediate parameter, and the electricity price prediction model can adapt to the impact of seasonal changes in data on electricity prices, reduce the impact of electricity price prediction time on the accuracy of electricity price prediction, and effectively improve the accuracy of electricity price prediction.
[0088] Based on any of the above embodiments, the deep GRU includes N hidden layers, each hidden layer includes M GRUs, and N and M are both positive integers. Figure 2 As shown, the deep GRU includes 1st to Nth hidden layers, and each hidden layer includes 1st to Mth GRUs.
[0089] The embodiment of the present application provides another method for predicting electricity prices based on a neural network.
[0090] like Figure 4 As shown, the method may include the following steps:
[0091] S401, receiving an electricity price query request sent by a client, and acquiring historical electricity price data, predicted load data, and predicted weather data based on the electricity price query request.
[0092] S402, obtaining an electricity price prediction model, wherein the electricity price prediction model includes a deep gated recurrent unit GRU, a first deep neural network DNN, a concatenated network and a second DNN.
[0093] For the relevant contents of steps S401 - S402 , please refer to the above embodiment and will not be described again here.
[0094] S403, inputting the historical electricity price data of the first time step into the first GRU in the first hidden layer, and the first GRU in the first hidden layer outputs the hidden state of the first time step.
[0095] S404, input the historical electricity price data of the t-th time step and the hidden state of the t-1th time step output by the t-1th GRU in the first hidden layer into the t-th GRU in the first hidden layer, and the t-th GRU in the first hidden layer outputs the hidden state of the t-th time step, where 2≤t≤M and t is a positive integer.
[0096] S405, if N=1, the hidden state of the Mth time step output by the Mth GRU in the first hidden layer is used as the first intermediate parameter.
[0097] It should be noted that the acquisition of the hidden state at each time step can be achieved by using any GRU processing method in the relevant technology, and no excessive restrictions are made here.
[0098] For example, if the prediction date is August 15 and the prediction time point is 6 a.m., the electricity price data at 6 a.m. from August 1 to August 14 can be obtained as the historical electricity price data, and the electricity price data at 6 a.m. on August X can be used as the historical electricity price data for the Xth time step, where X is a positive integer not greater than 14, and M=14.
[0099] The electricity price data at 6 a.m. on August 1 is input into the first GRU in the first hidden layer, and the first GRU in the first hidden layer outputs the hidden state h1 of the first time step.
[0100] The electricity price data at 6 a.m. on August 2 and the hidden state h1 of the first time step output by the first GRU in the first hidden layer are input to the second GRU in the first hidden layer, and the second GRU in the first hidden layer outputs the hidden state h2 of the second time step.
[0101] The electricity price data at 6 a.m. on August 3 and the hidden state h2 of the second time step output by the second GRU in the first hidden layer are input to the third GRU in the first hidden layer, and the third GRU in the first hidden layer outputs the hidden state h3 of the third time step.
[0102] The process of obtaining the hidden state of the 4th to 14th time steps can refer to the above-mentioned process of obtaining h2 and h3, which will not be repeated here.
[0103] If N = 1, the hidden state h of the 14th time step of the 14th GRU output in the first hidden layer 14 , as the first intermediate parameter.
[0104] S406, if N ≥ 2, the hidden state of the first time step output by the first GRU in the i-1th hidden layer is input to the first GRU in the i-th hidden layer, and the hidden state of the first time step is updated by the first GRU in the i-th hidden layer, where 2 ≤ i ≤ N, and i is a positive integer.
[0105] S407, the hidden state of the t-th time step output by the t-th GRU in the i-1-th hidden layer and the hidden state of the t-1-th time step output by the t-th GRU in the i-th hidden layer are input to the t-th GRU in the i-th hidden layer, and the hidden state of the t-th time step is updated by the t-th GRU in the i-th hidden layer.
[0106] S408, taking the hidden state of the Mth time step output by the Mth GRU in the Nth hidden layer as the first intermediate parameter.
[0107] For example, taking N=3 as an example, the hidden state h1 of the first time step output by the first GRU in the first hidden layer can be input to the first GRU in the second hidden layer, and the hidden state h1 of the first time step is updated by the first GRU in the second hidden layer.
[0108] The hidden state h2 of the second time step output by the second GRU in the first hidden layer and the hidden state h1 of the first time step output by the first GRU in the second hidden layer are input to the second GRU in the second hidden layer, and the hidden state h2 of the second time step is updated by the second GRU in the second hidden layer.
[0109] The hidden state h3 of the third time step output by the third GRU in the first hidden layer and the hidden state h2 of the second time step output by the second GRU in the second hidden layer are input to the third GRU in the second hidden layer, and the hidden state h3 of the third time step is updated by the third GRU in the second hidden layer.
[0110] For the second hidden layer, the updating process of the hidden state from the 4th to the 14th time steps can refer to the updating process of h2 and h3 above, which will not be repeated here.
[0111] The hidden state h1 of the first time step output by the first GRU in the second hidden layer can be input to the first GRU in the third hidden layer, and the hidden state h1 of the first time step is updated by the first GRU in the third hidden layer.
[0112] The hidden state h2 of the second time step output by the second GRU in the second hidden layer and the hidden state h1 of the first time step output by the first GRU in the third hidden layer are input to the second GRU in the third hidden layer, and the hidden state h2 of the second time step is updated by the second GRU in the third hidden layer.
[0113] The hidden state h3 of the third time step output by the third GRU in the second hidden layer and the hidden state h2 of the second time step output by the second GRU in the third hidden layer are input to the third GRU in the third hidden layer, and the hidden state h3 of the third time step is updated by the third GRU in the third hidden layer.
[0114] For the third hidden layer, the updating process of the hidden state from the 4th to the 14th time steps can refer to the updating process of h2 and h3 above, which will not be repeated here.
[0115] The hidden state h of the 14th time step output by the 14th GRU in the 3rd hidden layer 14 , as the first intermediate parameter.
[0116] For example, each GRU includes an update gate and a reset gate, and the hidden state h at the tth time step is t The acquisition process is as follows:
[0117] z t =σ(W z x t +U z h t-1 )
[0118] r t =σ(W r x t +Ur h t-1 )
[0119]
[0120]
[0121] Among them, z t is the output of the update gate in the tth GRU, r t is the output of the reset gate in the tth GRU, h′ t is the candidate state of the tth time step, W z , U z , W r , U r , W, U are weights, x t is the input parameter of the tth GRU, h t-1 is the hidden state at the t-1th time step, σ(·) is the sigmoid activation function, tanh(·) is the tanh nonlinear activation function (also called the hyperbolic tangent function), and the symbol is the Hadamard product operator.
[0122] It should be noted that for the tth GRU in the first hidden layer, its input parameter x t is the historical electricity price data at the t-th time step. For the t-th GRU in the i-th hidden layer, its input parameter x t is the hidden state of the t-th time step output by the t-th GRU in the i-1-th hidden layer.
[0123] S409, input the predicted load data and the predicted weather data into the first DNN, and the first DNN outputs a second intermediate parameter.
[0124] S410, inputting the first intermediate parameter and the second intermediate parameter into a splicing network, and the splicing network splices the first intermediate parameter and the second intermediate parameter to obtain a third intermediate parameter.
[0125] S411, input the third intermediate parameter into the second DNN, the second DNN outputs the first predicted electricity price data, and sends the first predicted electricity price data to the client.
[0126] For the relevant contents of steps S409-S411, please refer to the above embodiment and will not be repeated here.
[0127] In summary, according to the neural network-based electricity price prediction method of the embodiment of the present application, the historical electricity price data of multiple time steps are respectively input into different GRUs in the first hidden layer for processing to obtain hidden states of multiple time steps. If the deep GRU only includes one hidden layer, the hidden state of the last time step output by the last GRU in the first hidden layer is used as the first intermediate parameter. Alternatively, if the deep GRU includes multiple hidden layers, the hidden states of multiple time steps are updated using the hidden layer after the first hidden layer, and the hidden state of the last time step output by the last GRU in the last hidden layer is used as the first intermediate parameter.
[0128] The embodiment of the present application provides another method for predicting electricity prices based on a neural network.
[0129] like Figure 5 As shown, the method may include the following steps:
[0130] S501, obtaining first sample electricity price data, sample load data, sample weather data and second sample electricity price data, wherein the second sample electricity price data is the electricity price data at the sample date at the sample time point.
[0131] S502, inputting the first sample electricity price data into the deep GRU, and the deep GRU outputs a fourth intermediate parameter.
[0132] S503, inputting the sample load data and the sample weather data into the first DNN, and the first DNN outputs the fifth intermediate parameter.
[0133] S504, inputting the fourth intermediate parameter and the fifth intermediate parameter into the splicing network, and the splicing network splices the fourth intermediate parameter and the fifth intermediate parameter to obtain a sixth intermediate parameter.
[0134] S505, input the sixth intermediate parameter into the second DNN, and the second DNN outputs the second predicted electricity price data of the sample date at the sample time point.
[0135] The relevant contents of steps S501-S505 may refer to the relevant contents of steps S101-S106 in the above embodiment, which will not be repeated here.
[0136] It should be noted that the first sample electricity price data refers to the electricity price data on the date before the sample date, for example, it may include the electricity price data of K consecutive dates before the sample date at the sample time point; the sample load data refers to the load data on the sample date, for example, it may include the load data on the sample date at the sample time point; the sample weather data refers to the weather data on the sample date, for example, it may include the weather data on the sample date at the sample time point.
[0137] S506: Training an electricity price prediction model based on the second predicted electricity price data and the second sample electricity price data.
[0138] It should be noted that the electricity price prediction model is trained based on the second predicted electricity price data and the second sample electricity price data, and any model training method in the relevant technology can be used to implement it, and no further restrictions are made here. Among them, the model training method may include LoRA (Low-Rank Adaptation) and instruction fine-tuning methods. It should be noted that LoRA is a method for efficient fine-tuning of model parameters (Parameter-Efficient Fine-Tuning).
[0139] In one embodiment, the electricity price prediction model is trained based on the second predicted electricity price data and the second sample electricity price data, including obtaining a loss function of the electricity price prediction model based on the second predicted electricity price data and the second sample electricity price data, and training the electricity price prediction model based on the loss function. It should be noted that there are no excessive restrictions on the loss function, for example, it may include CE (Cross Entropy), MSE (Mean-Square Error), KL (Kullback-Leibler) divergence, contrast loss function, etc. Among them, CE may include multi-classification cross entropy.
[0140] In summary, according to the neural network-based electricity price prediction method of the embodiment of the present application, first sample electricity price data, sample load data, sample weather data and second sample electricity price data are obtained, wherein the second sample electricity price data is the electricity price data of the sample date at the sample time point, the first sample electricity price data is input into the deep GRU, the deep GRU outputs the fourth intermediate parameter, the sample load data and the sample weather data are input into the first DNN, the first DNN outputs the fifth intermediate parameter, the fourth intermediate parameter and the fifth intermediate parameter are input into the splicing network, the splicing network splices the fourth intermediate parameter and the fifth intermediate parameter to obtain the sixth intermediate parameter, the sixth intermediate parameter is input into the second DNN, the second DNN outputs the second predicted electricity price data of the sample date at the sample time point, and the electricity price prediction model is trained based on the second predicted electricity price data and the second sample electricity price data. Therefore, the first sample electricity price data, sample load data, sample weather data and second sample electricity price data can be used to train the electricity price prediction model, so that during the training process the electricity price prediction model can learn the relationship between the first sample electricity price data, sample load data, sample weather data and the second sample electricity price data, so that the trained electricity price prediction model can make electricity price predictions based on historical electricity price data, predicted load data and predicted weather data.
[0141] In order to implement the above embodiments, the present application also proposes an electricity price prediction device based on a neural network.
[0142] Figure 6 A schematic diagram of the structure of a neural network-based electricity price prediction device provided in an embodiment of the present application.
[0143] like Figure 6 As shown, the electricity price prediction device 100 based on a neural network includes: a first acquisition module 110 , a second acquisition module 120 , a first processing module 130 , a second processing module 140 , a splicing module 150 , and a third processing module 160 .
[0144] The first acquisition module 110 is used to receive an electricity price query request sent by a client, and acquire historical electricity price data, predicted load data and predicted weather data based on the electricity price query request;
[0145] A second acquisition module 120, configured to acquire an electricity price prediction model, wherein the electricity price prediction model includes a deep gated recurrent unit GRU, a first deep neural network DNN, a concatenated network, and a second DNN;
[0146] A first processing module 130, configured to input the historical electricity price data into a deep GRU, and the deep GRU outputs a first intermediate parameter;
[0147] A second processing module 140, configured to input the predicted load data and the predicted weather data into a first DNN, and the first DNN outputs a second intermediate parameter;
[0148] A splicing module 150, configured to input the first intermediate parameter and the second intermediate parameter into the splicing network, and the splicing network splices the first intermediate parameter and the second intermediate parameter to obtain a third intermediate parameter;
[0149] The third processing module 160 is used to input the third intermediate parameter into the second DNN, output the first predicted electricity price data by the second DNN, and send the first predicted electricity price data to the client.
[0150] Furthermore, in a possible implementation of an embodiment of the present application, the second processing module 140 is also used to: obtain time-stamped data corresponding to the predicted load data and / or the predicted weather data; input the predicted load data, the predicted weather data and the time-stamped data into the first DNN, and the first DNN outputs the second intermediate parameter.
[0151] Furthermore, in a possible implementation of the embodiment of the present application, the time marking data includes week marking data and / or weekend marking data.
[0152] Further, in a possible implementation of the embodiment of the present application, the deep GRU includes N hidden layers, each hidden layer includes M GRUs, and N and M are both positive integers;
[0153] The first processing module 130 is also used to: input the historical electricity price data of the first time step into the first GRU in the first hidden layer, and the first GRU in the first hidden layer outputs the hidden state of the first time step; input the historical electricity price data of the tth time step and the hidden state of the t-1th time step output by the t-1th GRU in the first hidden layer into the tth GRU in the first hidden layer, and the tth GRU in the first hidden layer outputs the hidden state of the tth time step, wherein 2≤t≤M, t is a positive integer; if N=1, the hidden state of the Mth time step output by the Mth GRU in the first hidden layer is used as the first intermediate parameter.
[0154] Furthermore, in a possible implementation manner of an embodiment of the present application, the first processing module 130 is also used for: if N≥2, inputting the hidden state of the 1st time step output by the 1st GRU in the i-1th hidden layer to the 1st GRU in the i-th hidden layer, and the 1st GRU in the i-th hidden layer updates the hidden state of the 1st time step, wherein 2≤i≤N, and i is a positive integer; inputting the hidden state of the tth time step output by the tth GRU in the i-1th hidden layer and the hidden state of the t-1th time step output by the t-1th GRU in the i-th hidden layer to the tth GRU in the i-th hidden layer, and the tth GRU in the i-th hidden layer updates the hidden state of the tth time step; and using the hidden state of the Mth time step output by the Mth GRU in the Nth hidden layer as the first intermediate parameter.
[0155] Furthermore, in a possible implementation of an embodiment of the present application, the first DNN and / or the second DNN is composed of multiple DNNs connected in series.
[0156] Furthermore, in a possible implementation of an embodiment of the present application, the first acquisition module 110 is also used to: determine the forecast date and forecast time point of the first predicted electricity price data based on the electricity price query request; obtain the electricity price data of K consecutive dates before the forecast date at the forecast time point as the historical electricity price data, where K is a positive integer; predict the load data of the forecast date at the forecast time point to obtain the predicted load data; predict the weather data of the forecast date at the forecast time point to obtain the predicted weather data.
[0157] Furthermore, in a possible implementation of an embodiment of the present application, the device 100 also includes: a training module, used to: obtain first sample electricity price data, sample load data, sample weather data and second sample electricity price data, wherein the second sample electricity price data is the electricity price data of the sample date at the sample time point; input the first sample electricity price data into the deep GRU, and the deep GRU outputs a fourth intermediate parameter; input the sample load data and the sample weather data into the first DNN, and the first DNN outputs a fifth intermediate parameter; input the fourth intermediate parameter and the fifth intermediate parameter into the splicing network, and the splicing network splices the fourth intermediate parameter and the fifth intermediate parameter to obtain a sixth intermediate parameter; input the sixth intermediate parameter into the second DNN, and the second DNN outputs the second predicted electricity price data of the sample date at the sample time point; and train the electricity price prediction model based on the second predicted electricity price data and the second sample electricity price data.
[0158] It should be noted that the aforementioned explanation of the embodiment of the electricity price prediction method based on a neural network is also applicable to the electricity price prediction device based on a neural network in this embodiment, and will not be repeated here.
[0159] In summary, in the neural network-based electricity price prediction device of the embodiment of the present application, the deep GRU processes the historical electricity price data to obtain the first intermediate parameter, the first DNN processes the predicted load data and the predicted weather data to obtain the second intermediate parameter, the splicing network splices the first intermediate parameter and the second intermediate parameter to obtain the third intermediate parameter, and the second DNN processes the third intermediate parameter to obtain the first predicted electricity price data. The neural network-based electricity price prediction model can be used to process the historical electricity price data, the predicted load data and the predicted weather data to obtain the first predicted electricity price data. The electricity price prediction model has adaptability and self-learning ability, can adapt to the load output distribution and the impact of different time scales on electricity prices, reduce the impact of load and weather on the accuracy of electricity price prediction, is suitable for electricity price prediction scenarios of different time scales, and effectively improves the accuracy of electricity price prediction.
[0160] In order to implement the above embodiments, the present application also proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method provided by the above embodiments.
[0161] In order to implement the above embodiments, the present application also proposes a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the methods provided by the above embodiments.
[0162] In order to implement the above embodiments, the present application also proposes a computer program product, including a computer program, which implements the methods provided by the above embodiments when executed by a processor.
[0163] The collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in this application are in compliance with relevant laws and regulations and do not violate public order and good morals.
[0164] It should be noted that personal information from users should be collected for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. In addition, such collection / sharing should be carried out after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign the agreement / authorization including authorization of relevant user information before the user uses the function. In addition, any necessary steps should be taken to protect and safeguard access to such personal information data and ensure that others who have access to personal information data comply with its privacy policy and procedures.
[0165] The present application is expected to provide an implementation scheme for users to selectively block the use or access of personal information data. That is, the present disclosure is expected to provide hardware and / or software to prevent or block access to such personal information data. Once the personal information data is no longer needed, the risk can be minimized by limiting data collection and deleting the data. In addition, when applicable, such personal information is de-identified to protect the privacy of the user.
[0166] In the description of the aforementioned embodiments, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0167] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood to control or imply relative importance or implicitly indicate the number of technical features controlled. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0168] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0169] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0170] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0171] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0172] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0173] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A method for predicting electricity prices based on a neural network, characterized in that: include: Receive an electricity price query request sent by a client, and obtain historical electricity price data, predicted load data, and predicted weather data based on the electricity price query request; Acquire an electricity price prediction model, wherein the electricity price prediction model includes a deep gated recurrent unit GRU, a first deep neural network DNN, a concatenated network, and a second DNN; Inputting the historical electricity price data into a deep GRU, and having the deep GRU output a first intermediate parameter; Inputting the predicted load data and the predicted weather data into a first DNN, and having the first DNN output a second intermediate parameter; Inputting the first intermediate parameter and the second intermediate parameter into the splicing network, and the splicing network splices the first intermediate parameter and the second intermediate parameter to obtain a third intermediate parameter; The third intermediate parameter is input into the second DNN, the second DNN outputs first predicted electricity price data, and the first predicted electricity price data is sent to the client.
2. The method according to claim 1, characterized in that The step of inputting the predicted load data and the predicted weather data into a first DNN, and outputting a second intermediate parameter by the first DNN, comprises: Obtaining time-stamped data corresponding to the predicted load data and / or the predicted weather data; The predicted load data, the predicted weather data and the time-stamped data are input into the first DNN, and the first DNN outputs the second intermediate parameter.
3. The method according to claim 2, characterized in that The time marking data includes week marking data and / or weekend marking data.
4. The method according to claim 1, characterized in that The deep GRU includes N hidden layers, each hidden layer includes M GRUs, and N and M are both positive integers; The step of inputting the historical electricity price data into a deep GRU, and outputting a first intermediate parameter by the deep GRU, includes: Inputting the historical electricity price data of the first time step into the first GRU in the first hidden layer, and the first GRU in the first hidden layer outputs the hidden state of the first time step; Input the historical electricity price data at the t-th time step and the hidden state at the t-1th time step output by the t-1th GRU in the first hidden layer to the t-th GRU in the first hidden layer, and the t-th GRU in the first hidden layer outputs the hidden state at the t-th time step, where 2≤t≤M and t is a positive integer; If N=1, the hidden state of the Mth time step output by the Mth GRU in the first hidden layer is used as the first intermediate parameter.
5. The method according to claim 4, characterized in that The method further comprises: If N ≥ 2, the hidden state of the first time step output by the first GRU in the i-1th hidden layer is input to the first GRU in the i-th hidden layer, and the hidden state of the first time step is updated by the first GRU in the i-th hidden layer, where 2 ≤ i ≤ N, and i is a positive integer; The hidden state of the t-th time step output by the t-th GRU in the i-1-th hidden layer and the hidden state of the t-1-th time step output by the t-th GRU in the i-th hidden layer are input to the t-th GRU in the i-th hidden layer, and the hidden state of the t-th time step is updated by the t-th GRU in the i-th hidden layer; The hidden state of the Mth time step output by the Mth GRU in the Nth hidden layer is used as the first intermediate parameter.
6. The method according to claim 1, characterized in that The first DNN and / or the second DNN is composed of multiple DNNs connected in series.
7. The method according to claim 1, characterized in that The acquiring of historical electricity price data, predicted load data and predicted weather data based on the electricity price query request includes: Based on the electricity price query request, determining a forecast date and a forecast time point of the first forecast electricity price data; Obtaining electricity price data at the forecast time point for each of K consecutive dates before the forecast date as the historical electricity price data, where K is a positive integer; Predicting the load data of the forecast date at the forecast time point to obtain the forecast load data; The weather data of the predicted date at the predicted time point is predicted to obtain the predicted weather data.
8. The method according to claim 1, characterized in that The method further comprises: Acquire first sample electricity price data, sample load data, sample weather data, and second sample electricity price data, wherein the second sample electricity price data is electricity price data at a sample date at a sample time point; Inputting the first sample electricity price data into the deep GRU, and having the deep GRU output a fourth intermediate parameter; Inputting the sample load data and the sample weather data into the first DNN, and having the first DNN output a fifth intermediate parameter; Inputting the fourth intermediate parameter and the fifth intermediate parameter into the splicing network, and the splicing network splices the fourth intermediate parameter and the fifth intermediate parameter to obtain a sixth intermediate parameter; Inputting the sixth intermediate parameter into the second DNN, and having the second DNN output the second predicted electricity price data of the sample date at the sample time point; The electricity price prediction model is trained based on the second predicted electricity price data and the second sample electricity price data.
9. A device for predicting electricity prices based on a neural network, characterized in that: include: A first acquisition module, configured to receive an electricity price query request sent by a client, and acquire historical electricity price data, predicted load data, and predicted weather data based on the electricity price query request; A second acquisition module is used to acquire an electricity price prediction model, wherein the electricity price prediction model includes a deep gated recurrent unit GRU, a first deep neural network DNN, a spliced network and a second DNN; A first processing module, configured to input the historical electricity price data into a deep GRU, and output a first intermediate parameter from the deep GRU; A second processing module, configured to input the predicted load data and the predicted weather data into a first DNN, and the first DNN outputs a second intermediate parameter; a splicing module, configured to input the first intermediate parameter and the second intermediate parameter into the splicing network, and the splicing network splices the first intermediate parameter and the second intermediate parameter to obtain a third intermediate parameter; The third processing module is used to input the third intermediate parameter into the second DNN, output the first predicted electricity price data by the second DNN, and send the first predicted electricity price data to the client.
10. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 8 when executed by a processor.
12. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 8 when being executed by a processor.