DCN-GRU-based medium and long term photovoltaic power prediction method, device and medium
Through the medium- and long-term photovoltaic power prediction method based on DCN-GRU, the problem of ignoring weather factors and difficulty in characterizing volatility characteristics in the prior art is solved, and a higher accuracy and stability of photovoltaic power generation power prediction is achieved.
Patent Information
- Application Number
- CN202411893339.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-05-13
AI Technical Summary
In the prior art, physical models ignore the impact of weather factors on photovoltaic power generation efficiency, and statistical learning methods are difficult to effectively characterize the volatility characteristics of medium and long-term photovoltaic power generation power, resulting in limited prediction accuracy.
The medium- and long-term photovoltaic power prediction method based on DCN-GRU is adopted to perform feature vectorization processing on photovoltaic power station data, and the cross-network layer and deep network layer in the DCN network are used to extract cross- features and deep features, combined with the update gate and reset gate in the GRU network, the periodic and volatility characteristics of the historical power timing are captured, and the photovoltaic power prediction value is output at each moment in the future.
It improves the accuracy and robustness of photovoltaic power prediction, can capture key information in the data more accurately, and achieve accurate predictions at different time lengths, with high accuracy and stability, and slows down the trend of prediction errors increasing with output step length.
Smart Images

Figure CN119988926A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power prediction, and in particular to a medium- and long-term photovoltaic power prediction method, device, and medium based on DCN-GRU. Background Art
[0002] With the increasing global awareness of environmental protection and the transformation of energy structure, the development and utilization of clean energy has become the focus of attention of countries around the world. In this context, photovoltaic power generation, as one of the most promising clean energy sources, has been rapidly developed and widely used due to its renewable, pollution-free and widely distributed characteristics. The continuous advancement of photovoltaic power generation technology and the continuous decline in costs have made it gradually become an important way to replace traditional fossil energy power generation, which is of great significance for promoting the optimization of energy structure, improving energy utilization efficiency and achieving energy conservation and emission reduction goals.
[0003] However, the output characteristics of photovoltaic power generation systems are significantly different from traditional power generation methods. The output power of photovoltaic power generation is highly dependent on multiple environmental factors such as solar radiation intensity, temperature, humidity, cloud cover, etc., and has significant time-varying and uncertainty, resulting in strong volatility and intermittency in photovoltaic power generation, making it difficult for the power grid to accurately carry out production planning and power dispatch. In order to ensure the safe and reliable operation of the power grid and improve the stability and economy of power supply, it is necessary to accurately and timely predict the photovoltaic power generation power so that the power grid dispatching department can formulate reasonable production plans and power dispatching plans in advance, effectively balance the needs of the power supply side and the power consumption side, and reduce the power grid fluctuations and risks caused by the fluctuations of photovoltaic power generation.
[0004] In order to predict the power of photovoltaic power generation, a variety of prediction methods have been proposed in the prior art. Among them, the physical model method is based on the physical mechanism of photovoltaic power generation and the transmission process of solar radiation, and predicts the power generation by simulating the interaction between solar radiation and photovoltaic panels. However, this method often oversimplifies or ignores the influence of various complex factors in the actual environment, such as cloud cover, temperature effects, photovoltaic cell aging, etc., resulting in limited prediction accuracy. In addition, physical models usually require a lot of computing resources and time, which is difficult to meet the needs of real-time prediction.
[0005] On the other hand, statistical learning methods use historical power generation data and weather forecast information to predict future photovoltaic power generation by mining the underlying laws and patterns in the data. Such methods include traditional machine learning models such as autoregressive models, support vector machines, and random forests, as well as deep learning models that have emerged in recent years, such as convolutional neural networks (CNNs) and recurrent neural networks (RNNs). Although these models perform well in capturing the periodic laws and trends of time series data, they still face challenges in dealing with local volatility caused by weather changes in medium- and long-term forecasts. How to effectively integrate physical mechanisms with statistical learning methods to improve the accuracy and robustness of photovoltaic power generation predictions has become a hot and difficult issue in current research. Summary of the invention
[0006] The embodiments of the present application provide a medium- and long-term photovoltaic power prediction method, device and medium based on DCN-GRU, which are used to solve the technical problems in the prior art that the physical model ignores the effect of weather factors on power generation efficiency, and the statistical learning method is difficult to characterize the volatility characteristics within the cycle.
[0007] On the one hand, the embodiment of the present application provides a medium- and long-term photovoltaic power prediction method based on DCN-GRU, including:
[0008] Vectorizing the categorical features in the original data of the photovoltaic power station, and concatenating the processed categorical features with the numerical features in the original data to construct a corresponding input feature set;
[0009] Extracting the cross feature vector and the deep feature vector of the input feature set through the cross network layer and the deep network layer in the DCN network respectively, and concatenating the cross feature vector and the deep feature vector, and inputting them into the GRU network as the input information at the current moment;
[0010] Determine the degree of new information addition and the degree of historical information retention through the update gate and the reset gate in the GRU network respectively, and calculate the current hidden state according to the degree of new information addition and the degree of historical information retention to complete the DCN-GRU model training; the current hidden state includes the periodic characteristics and volatility characteristics of the historical power time series;
[0011] The current hidden state, the categorical features and the numerical features are input into the trained DCN-GRU model to output the predicted photovoltaic power generation value at each future moment.
[0012] In one implementation of the present application, respectively extracting the cross feature vector and the deep feature vector of the input feature set through the cross network layer and the deep network layer in the DCN network includes:
[0013] A cross network layer in the DCN network is constructed based on multiple cross layers, so as to obtain the interactive relationship between the features through the cross network layer and according to the recursive structure in the cross network, and obtain the cross feature vector of the input feature set;
[0014] The cross network layer calculates the cross feature vector by the following formula:
[0015] c k+1 =x i ⊙(W k1 ·c k +b k1 )+c k
[0016] Among them, c k+1 represents the output of the k-th cross network layer, and also represents the input of the k+1-th cross network layer, x i Represents the output of the feature construction part, including the embedding vector after the conversion of numerical features and categorical features, W k1 and b k1 Represent the vector weight matrix and bias vector of the k-th cross network layer, c k It represents the output of the k-1th cross network layer and the input of the kth cross network layer.
[0017] In one implementation of the present application, respectively extracting the cross feature vector and the deep feature vector of the input feature set through the cross network layer and the deep network layer in the DCN network includes:
[0018] Connecting multiple fully connected layers in series to construct a deep network layer in the DCN network, so as to extract a deep feature vector corresponding to the input feature set through the deep network layer and based on an activation function;
[0019] The deep network layer calculates the deep feature vector by the following formula:
[0020] d k+1 =f(W k2 ·d k +b k2 )
[0021] Among them, d k+1 represents the output of the k-th deep network layer, and also represents the input of the k+1-th deep network layer. f(·) represents the activation function ReLU, and W k2 and b k2 Represent the vector weight matrix and bias vector of the k-th deep network layer, d k It represents the output of the k-1th deep network layer and the input of the kth deep network layer.
[0022] In one implementation of the present application, the degree of new information addition and the degree of historical information retention are determined by the update gate and reset gate in the GRU network, respectively, including:
[0023] Obtaining the hidden state at the previous moment to pass through the update gate in the GRU network, and controlling the degree of adding new information at the current moment according to the input information at the current moment and the hidden state at the previous moment;
[0024] The update gate controls the degree of new information addition through the following formula:
[0025] z i =σ(W z ·[h i-1 ,f i ]+b z )
[0026] Among them, z i represents the degree of new information added to update the gate control, σ represents the sigmoid activation function, which is used to convert the output information into the range of 0 to 1 as the gating signal, and h i-1 represents the hidden state at the previous moment, f i Represents the input information at the current moment, W z represents the weight matrix of the update gate, b z represents the bias vector of the update gate.
[0027] In one implementation of the present application, the degree of new information addition and the degree of historical information retention are determined by the update gate and reset gate in the GRU network, respectively, including:
[0028] According to the input information at the current moment, controlling the degree of dependency corresponding to the hidden state at the previous moment, so as to control the degree of retention of historical information through the reset gate;
[0029] The reset gate controls the degree of historical information retention through the following formula:
[0030] r i =σ(W r ·[h i-1 ,f i ]+b r )
[0031] Among them, r i Indicates the degree of historical information retention of reset gate control, W r represents the weight matrix of the reset gate, b r represents the bias vector of the reset gate.
[0032] In one implementation of the present application, the current hidden state is calculated according to the degree of addition of the new information and the degree of retention of the historical information to complete the DCN-GRU model training, specifically including:
[0033] Based on the degree of historical information retention controlled by the reset gate, the candidate hidden state is calculated using the following formula:
[0034]
[0035] in, represents the candidate hidden state, tanh represents the activation function, W represents the weight matrix, r i ·h i-1 represents that the reset gate is combined with the hidden state of the previous moment to control the influence range of historical information, and b represents a bias vector;
[0036] Based on the degree of new information added controlled by the update gate and the candidate hidden state, the current hidden state is calculated to complete the training of the DCN-GRU model. The calculation formula is as follows:
[0037]
[0038] Among them, h i represents the current hidden state, z i ·h i-1 Indicates the historical information that is retained. Represents new information learned.
[0039] In one implementation of the present application, the current hidden state, the categorical features, and the numerical features are input into a trained DCN-GRU model to output the predicted photovoltaic power generation value at each future moment, specifically including:
[0040] Inputting the current hidden state, historical power features, meteorological features, and time features into the historical part of the trained DCN-GRU model, so as to obtain the historical hidden state by serial processing through the DCN module and the first GRU module in the DCN-GRU model;
[0041] Inputting the meteorological feature and the time feature into the future part of the DCN-GRU model to obtain future high-order cross features through another GRU module in the DCN-GRU model;
[0042] The historical hidden state and the future high-order cross features are merged to output the photovoltaic power prediction value corresponding to each future moment through a fully connected layer.
[0043] In one implementation of the present application, the categorical features in the original data of the photovoltaic power station are vectorized, and the processed categorical features are concatenated with the numerical features in the original data to construct a corresponding input feature set, specifically including:
[0044] Acquire raw data of a photovoltaic power station, and extract a number of features from the raw data;
[0045] Determine the feature types corresponding to the plurality of features, and construct a categorical feature set and a numerical feature set according to the feature types; the feature types include categorical features and numerical features, the categorical features include meteorological features and time features, and the numerical features include historical power features and meteorological features;
[0046] The categorical features are vectorized by embedding to convert high-dimensional discrete features into low-dimensional continuous vectors, and the converted categorical features are concatenated with the numerical features to construct a corresponding input feature set.
[0047] On the other hand, the embodiment of the present application further provides a medium- and long-term photovoltaic power prediction device based on DCN-GRU, the device comprising:
[0048] at least one processor;
[0049] and, a memory communicatively coupled to the at least one processor;
[0050] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the medium- and long-term photovoltaic power prediction method based on DCN-GRU as described above.
[0051] On the other hand, an embodiment of the present application further provides a non-volatile computer storage medium storing computer executable instructions, which, when executed, implement the above-mentioned medium- and long-term photovoltaic power prediction method based on DCN-GRU.
[0052] The embodiment of the present application provides a medium- and long-term photovoltaic power prediction method, device, and medium based on DCN-GRU, which at least have the following beneficial effects:
[0053] Through a large amount of data analysis and comparison, relevant features are extracted and classified, and categorical features are vectorized by embedding. The processed categorical features are then concatenated with numerical features and then trained to achieve medium- and long-term photovoltaic power prediction. This helps the model to capture key information in the data more accurately, and can achieve accurate predictions at different time lengths with high accuracy and stability. The two-layer feature extraction mechanism can deeply explore the complex relationships and high-order nonlinear combinations between features, and provide the GRU network with richer and more effective input information, thereby improving the prediction performance of the model. The DCN-GRU model has the ability to capture periodic and volatility characteristics, and can accurately capture the changes in photovoltaic power over time. It comprehensively considers historical information, current features and future trends, and outputs the predicted photovoltaic power at each moment in the future, improving the stability and reliability of the prediction, and can slow down the trend of increasing prediction errors as the output step size increases. Compared with other models, it performs more prominently in medium- and long-term power prediction tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0055] Figure 1 A schematic diagram of a process flow of a medium- and long-term photovoltaic power prediction method based on DCN-GRU provided in an embodiment of the present application;
[0056] Figure 2 A schematic diagram of the internal structure of a medium- and long-term photovoltaic power prediction device based on DCN-GRU provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0058] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0059] Figure 1 A schematic flow chart of a medium- and long-term photovoltaic power prediction method based on DCN-GRU provided in an embodiment of the present application.
[0060] The analysis method involved in the embodiments of the present application can be implemented by a terminal device or a server, and the present application does not impose any special restrictions on this. For the convenience of understanding and description, the following embodiments are described in detail by taking a server as an example.
[0061] It should be noted that the server may be a single device or a system consisting of multiple devices, that is, a distributed server, and this application does not make any specific limitation on this.
[0062] like Figure 1 As shown, the medium- and long-term photovoltaic power prediction method based on DCN-GRU provided in the embodiment of the present application includes:
[0063] 101. Vectorize the categorical features in the original data of the photovoltaic power station, and concatenate the processed categorical features with the numerical features in the original data to construct a corresponding input feature set.
[0064] Specifically, in one embodiment of the present application, the categorical features in the original data of the photovoltaic power station are vectorized, and the processed categorical features are concatenated with the numerical features in the original data to construct a corresponding input feature set, which specifically includes:
[0065] Obtain raw data of the photovoltaic power station and extract several features from the raw data;
[0066] Determine the feature types corresponding to a number of features, and construct a categorical feature set and a numerical feature set according to the feature types; the feature types include categorical features and numerical features, the categorical features include meteorological features and time features, and the numerical features include historical power features and meteorological features;
[0067] The categorical features are vectorized by embedding to convert high-dimensional discrete features into low-dimensional continuous vectors, and the converted categorical features are concatenated with the numerical features to construct the corresponding input feature set.
[0068] In one embodiment, a photovoltaic power station hopes to use medium- and long-term historical data and meteorological data to predict future photovoltaic power generation. To this end, a large amount of raw data is collected, and it is decided to use a prediction method based on DCN-GRU for modeling and prediction. Before implementing this method, the raw data needs to be preprocessed to construct an input feature set suitable for model input.
[0069] The raw data of photovoltaic power stations includes numerical features and categorical features, which are mainly divided into historical power features, meteorological features and time features. Numerical features such as historical power and solar radiation can be directly input into the model to characterize time series characteristics, while categorical features such as weather type, year, and season cannot be directly recognized by the model as input. Therefore, it is necessary to vectorize the categorical features through the embedding method, so as to convert the high-dimensional discrete features into low-dimensional continuous vectors to improve their expression ability, and then combine them with the numerical features to obtain the input features of the model.
[0070] Extract features from the raw data of the photovoltaic power station and construct a feature set A{a1,a2,...,a 10 ,a 11 Elements a1,...,a7 in feature set A are numerical features of the photovoltaic power station, including historical power features and meteorological features. The historical power feature is the historical actual power of the photovoltaic power station, and the meteorological features include irradiance, wind speed, wind direction, temperature, pressure, and humidity. Elements a8,...,a 11 It is the category characteristics of photovoltaic power stations, including meteorological characteristics and time characteristics. Meteorological characteristics refer to weather types, and time characteristics include seasons, years, and days.
[0071] Table 1: Detailed description of original data
[0072]
[0073] 102. Extract the cross feature vector and the deep feature vector of the input feature set through the cross network layer and the deep network layer in the DCN network respectively, concatenate the cross feature vector and the deep feature vector, and input them into the GRU network as the input information at the current moment.
[0074] Specifically, in one embodiment of the present application, extracting a cross feature vector and a deep feature vector of an input feature set through a cross network layer and a deep network layer in a DCN network respectively includes:
[0075] A cross network layer in a DCN network is constructed based on multiple cross layers, so as to obtain the interactive relationship between features through the cross network layer and according to the recursive structure in the cross network, and obtain the cross feature vector of the input feature set;
[0076] The cross network layer calculates the cross feature vector using the following formula:
[0077] c k+1 =x i ⊙(W k1 ·c k +b k1 )+ck
[0078] Among them, c k+1 represents the output of the k-th cross network layer, and also represents the input of the k+1-th cross network layer, x i Represents the output of the feature construction part, including the embedding vector after the conversion of numerical features and categorical features, W k1 and b k1 Represent the vector weight matrix and bias vector of the k-th cross network layer, c k It represents the output of the k-1th cross network layer and the input of the kth cross network layer.
[0079] In one embodiment, the traditional neural network relies on the validity of the original input features, so a large number of artificial features constructed based on the experience of the staff need to be constructed. This process is not only cumbersome but also cannot guarantee the construction of effective high-order features. The DCN network can automatically learn high-order cross features without complex feature construction, especially the intersection of numerical features and categorical features after embedding processing in photovoltaic power generation, which cannot be replaced by artificial features. The DCN network is applied to power prediction tasks, and its ability to automatically and efficiently obtain high-order cross features can be used to capture the fluctuation characteristics of time series. The DCN module mainly includes two parts: the cross network layer and the deep network layer. The cross network layer is the core part of the DCN module. It is a cross network composed of multiple cross layers, which is used to capture the interactive relationship between features and is mainly used to extract high-order cross features.
[0080] Since the cross network has an obvious recursive structure, when the number of cross layers is 1, the model obtains the highest 2nd-order cross features, when the number of cross layers is 2, the model obtains the highest 3rd-order cross features, and so on. This unique recursive structure allows the model to easily obtain high-order cross features. In addition, in order to avoid the problem of network performance degradation caused by too many layers, the cross network borrows the idea of the residual network. After completing a feature cross, its original input will be added back to facilitate the learning of effective high-order cross features.
[0081] In one embodiment of the present application, respectively extracting a cross feature vector and a deep feature vector of an input feature set through a cross network layer and a deep network layer in a DCN network includes:
[0082] Connect multiple fully connected layers in series to construct a deep network layer in the DCN network, so as to extract the deep feature vector corresponding to the input feature set through the deep network layer and based on the activation function;
[0083] The deep network layer calculates the deep feature vector using the following formula:
[0084] dk+1 =f(W k2 ·d k +b k2 )
[0085] Among them, d k+1 represents the output of the k-th deep network layer, and also represents the input of the k+1-th deep network layer. f(·) represents the activation function ReLU, and W k2 and b k2 Represent the vector weight matrix and bias vector of the k-th deep network layer, d k It represents the output of the k-1th deep network layer and the input of the kth deep network layer.
[0086] In one embodiment, the deep network layer is composed of multiple fully connected layers in series, the purpose of which is to use activation functions to extract nonlinear deep features that are difficult to capture.
[0087] The cross network layer and the deep network layer are calculated in parallel, so two sets of feature vectors are obtained in the end. The cross feature vector and the deep feature vector are merged through the concatenation layer as the final output of the DCN module. i To indicate the output information of the DCN module at the current moment.
[0088] 103. The degree of new information addition and the degree of historical information retention are determined through the update gate and reset gate in the GRU network respectively, and the current hidden state is calculated based on the degree of new information addition and the degree of historical information retention to complete the DCN-GRU model training.
[0089] It should be noted that the current hidden state in the embodiment of the present application includes the periodic characteristics and volatility characteristics of the historical power time series.
[0090] Specifically, in one embodiment of the present application, the degree of new information addition and the degree of historical information retention are determined by respectively using the update gate and the reset gate in the GRU network, specifically including:
[0091] Get the hidden state of the previous moment to pass through the update gate in the GRU network, and control the degree of new information added at the current moment based on the input information at the current moment and the hidden state at the previous moment;
[0092] The update gate controls the extent of new information addition through the following formula:
[0093] z i =σ(W z ·[g i-1 ,f i ]+b z )
[0094] Among them, zi represents the degree of new information added to update the gate control, σ represents the sigmoid activation function, which is used to convert the output information into the range of 0 to 1 as the gating signal, and h i-1 represents the hidden state at the previous moment, f i Represents the input information at the current moment, W z represents the weight matrix of the update gate, b z Represents the bias vector for the update gate.
[0095] In one embodiment, GRU is a simplified variant of LSTM, which is designed to effectively handle the long-term dependency problem of sequence data while improving model efficiency. Compared with traditional recurrent neural networks, GRU significantly improves the training speed by reducing training parameters and simplifying the structure, while maintaining or even improving performance, and can better solve the gradient disappearance problem, and is particularly suitable for modeling tasks of long time series. Therefore, the present invention uses a GRU module to capture the periodic characteristics of medium and long-term power.
[0096] Specifically, GRU simplifies the three gating mechanisms in LSTM (input gate, forget gate, and output gate) into two gating mechanisms (update gate and reset gate).
[0097] The update gate in the GRU determines how much new information needs to be added to the hidden state at the current time step. The update gate outputs a value between 0 and 1, indicating the relative importance of the hidden state at the previous moment and the input at the current moment. It determines how much new information needs to be added at the current moment based on the current input and the hidden state at the previous moment.
[0098] In one embodiment of the present application, the degree of adding new information and the degree of retaining historical information are determined by respectively using the update gate and the reset gate in the GRU network, specifically including:
[0099] According to the input information at the current moment, the degree of dependence corresponding to the hidden state at the previous moment is controlled, so as to control the degree of retention of historical information by resetting the gate;
[0100] The reset gate controls the degree of historical information retention through the following formula:
[0101] r i =σ(W r ·[h i-1 ,f i ]+b r )
[0102] Among them, r i Indicates the degree of historical information retention of reset gate control, W r represents the weight matrix of the reset gate, b r Represents the bias vector for the reset gate.
[0103] In one embodiment, the reset gate controls the degree of forgetting of historical information according to the current moment, and determines to what extent the hidden state of the previous moment is ignored. The output of the reset gate is a value between 0 and 1, indicating the relative importance of the hidden state of the previous moment and the input of the current moment. When the output of the reset gate is close to 0, it tends to "forget" the information of the previous moment and only depends on the current input; when the output is close to 1, the information of the previous moment will be retained more.
[0104] In one embodiment of the present application, the current hidden state is calculated according to the degree of new information addition and the degree of historical information retention to complete the DCN-GRU model training, specifically including:
[0105] Based on the degree of historical information retention controlled by the reset gate, the candidate hidden state is calculated using the following formula:
[0106]
[0107] in, represents the candidate hidden state, tanh represents the activation function, W represents the weight matrix, r i ·h i-1 Represents the reset gate combined with the hidden state of the previous moment to control the influence range of historical information, and b represents the bias vector;
[0108] Based on the degree of new information added and the candidate hidden state controlled by the update gate, the current hidden state is calculated to complete the training of the DCN-GRU model. The calculation formula is as follows:
[0109]
[0110] Among them, h i represents the current hidden state, z i ·h i-1 Indicates the historical information that is retained. Represents new information learned.
[0111] In one embodiment, the update gate (z i ) and reset gate (r i ). The output of these gates will control the update of the hidden state and the degree of retention of historical information. GRU uses the reset gate to control the degree of dependence on the hidden state of the previous moment and calculate the candidate hidden state.
[0112] Then, the current hidden state is calculated through the update gate. The final output current hidden state retains part of the information of the previous moment and also introduces new information of the current input.
[0113] 104. Input the current hidden state, categorical features and numerical features into the trained DCN-GRU model to output the predicted photovoltaic power generation value at each moment in the future.
[0114] Specifically, in one embodiment of the present application, the current hidden state, categorical features, and numerical features are input into the trained DCN-GRU model to output the predicted photovoltaic power generation value at each moment in the future, specifically including:
[0115] Input the current hidden state, historical power features, meteorological features, and time features into the history part of the trained DCN-GRU model, so as to obtain the historical hidden state by serial processing through the DCN module and the first GRU module in the DCN-GRU model;
[0116] The meteorological features and the time features are input into the future part of the DCN-GRU model to obtain the future high-order cross features through another GRU module in the DCN-GRU model;
[0117] The historical hidden state and future high-order cross features are merged to output the predicted photovoltaic power generation value corresponding to each moment in the future through the fully connected layer.
[0118] In one embodiment, in the history part of the DCN-GRU model, historical power features, meteorological features, and time features are input, and the hidden state h is finally obtained by serially passing through the DCN1 module and the GRU module. i , which contains the periodic and volatility characteristics of the historical power time series. In the future part of the DCN-GRU model, only meteorological characteristics and time characteristics can be input, and [x t+1 ,x t+n ], which contains high-order cross-signal features for future parts.
[0119] Finally, the hidden state h of the historical part i It is combined with the high-order cross features of the future part, and then the fully connected layer Dense is used to output the photovoltaic power generation [y t+1 ,y t+n ].
[0120] The above is an embodiment of the method proposed in this application. Based on the same inventive concept, the embodiment of this application also provides a medium- and long-term photovoltaic power prediction device based on DCN-GRU, whose structure is as follows: Figure 2 shown.
[0121] Figure 2 The internal structure diagram of the medium- and long-term photovoltaic power prediction device based on DCN-GRU provided in the embodiment of the present application. Figure 2 As shown, the device includes:
[0122] at least one processor;
[0123] and, a memory communicatively coupled to the at least one processor;
[0124] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor to enable the at least one processor to:
[0125] Vectorize the categorical features in the original data of the photovoltaic power station, and concatenate the processed categorical features with the numerical features in the original data to construct the corresponding input feature set;
[0126] The cross feature vector and deep feature vector of the input feature set are extracted through the cross network layer and deep network layer in the DCN network respectively, and the cross feature vector and deep feature vector are concatenated and input into the GRU network as the input information at the current moment;
[0127] The update gate and reset gate in the GRU network are used to determine the degree of new information addition and the degree of historical information retention, and the current hidden state is calculated based on the degree of new information addition and the degree of historical information retention to complete the DCN-GRU model training; the current hidden state includes the periodic characteristics and volatility characteristics of the historical power time series;
[0128] The current hidden state, categorical features, and numerical features are input into the trained DCN-GRU model to output the predicted photovoltaic power generation value at each moment in the future.
[0129] The present application also provides a non-volatile computer storage medium storing computer executable instructions. When the computer executable instructions are executed, they can:
[0130] Vectorize the categorical features in the original data of the photovoltaic power station, and concatenate the processed categorical features with the numerical features in the original data to construct the corresponding input feature set;
[0131] The cross feature vector and deep feature vector of the input feature set are extracted through the cross network layer and deep network layer in the DCN network respectively, and the cross feature vector and deep feature vector are concatenated and input into the GRU network as the input information at the current moment;
[0132] The update gate and reset gate in the GRU network are used to determine the degree of new information addition and the degree of historical information retention, and the current hidden state is calculated based on the degree of new information addition and the degree of historical information retention to complete the DCN-GRU model training; the current hidden state includes the periodic characteristics and volatility characteristics of the historical power time series;
[0133] The current hidden state, categorical features, and numerical features are input into the trained DCN-GRU model to output the predicted photovoltaic power generation value at each moment in the future.
[0134] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0135] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0136] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0137] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0138] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0139] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0140] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0141] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0142] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0143] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0144] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0145] The above is only the embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A medium- and long-term photovoltaic power prediction method based on DCN-GRU, characterized in that: The method comprises: Vectorizing the categorical features in the original data of the photovoltaic power station, and concatenating the processed categorical features with the numerical features in the original data to construct a corresponding input feature set; Extracting the cross feature vector and the deep feature vector of the input feature set through the cross network layer and the deep network layer in the DCN network respectively, and concatenating the cross feature vector and the deep feature vector, and inputting them into the GRU network as the input information at the current moment; Determine the degree of new information addition and the degree of historical information retention through the update gate and the reset gate in the GRU network respectively, and calculate the current hidden state according to the degree of new information addition and the degree of historical information retention to complete the DCN-GRU model training; the current hidden state includes the periodic characteristics and volatility characteristics of the historical power time series; The current hidden state, the categorical features and the numerical features are input into the trained DCN-GRU model to output the predicted photovoltaic power generation value at each future moment.
2. The medium- and long-term photovoltaic power prediction method based on DCN-GRU according to claim 1 is characterized in that: Extracting the cross feature vector and the deep feature vector of the input feature set through the cross network layer and the deep network layer in the DCN network respectively, specifically includes: A cross network layer in the DCN network is constructed based on multiple cross layers, so as to obtain the interactive relationship between the features through the cross network layer and according to the recursive structure in the cross network, and obtain the cross feature vector of the input feature set; The cross network layer calculates the cross feature vector by the following formula: c k+1 =x i ⊙(W k1 ·c k +b k1 )+c k Among them, c k+1 represents the output of the k-th cross network layer, and also represents the input of the k+1-th cross network layer, x i Represents the output of the feature construction part, including the embedding vector after the conversion of numerical features and categorical features, W k1 and b k1 Represent the vector weight matrix and bias vector of the k-th cross network layer, c k It represents the output of the k-1th cross network layer and the input of the kth cross network layer.
3. The medium- and long-term photovoltaic power prediction method based on DCN-GRU according to claim 1 is characterized in that: Extracting the cross feature vector and the deep feature vector of the input feature set through the cross network layer and the deep network layer in the DCN network respectively, specifically includes: Connecting multiple fully connected layers in series to construct a deep network layer in the DCN network, so as to extract a deep feature vector corresponding to the input feature set through the deep network layer and based on an activation function; The deep network layer calculates the deep feature vector by the following formula: d k+1 =f(W k2 ·d k +b k2 ) Among them, d k+1 represents the output of the k-th deep network layer, and also represents the input of the k+1-th deep network layer. f(·) represents the activation function ReLU, and W k2 and b k2 Represent the vector weight matrix and bias vector of the k-th deep network layer, d k It represents the output of the k-1th deep network layer and the input of the kth deep network layer.
4. The medium- and long-term photovoltaic power prediction method based on DCN-GRU according to claim 1 is characterized in that: The update gate and reset gate in the GRU network are used to determine the extent to which new information is added and the extent to which historical information is retained, including: Obtaining the hidden state at the previous moment to pass through the update gate in the GRU network, and controlling the degree of adding new information at the current moment according to the input information at the current moment and the hidden state at the previous moment; The update gate controls the degree of new information addition through the following formula: z i =σ(W z ·[ i-1 ,f i ]+b z ) Among them, z i represents the degree of new information added to the update gate control, σ represents the sigmoid activation function, which is used to convert the output information into the range of 0 to 1 as the gating signal, i-1 represents the hidden state at the previous moment, and f i Represents the input information at the current moment, W z represents the weight matrix of the update gate, b z represents the bias vector of the update gate.
5. The medium- and long-term photovoltaic power prediction method based on DCN-GRU according to claim 4 is characterized in that: The update gate and reset gate in the GRU network are used to determine the extent to which new information is added and the extent to which historical information is retained, including: According to the input information at the current moment, controlling the degree of dependency corresponding to the hidden state at the previous moment, so as to control the degree of retention of historical information through the reset gate; The reset gate controls the degree of historical information retention through the following formula: r i =σ(W r ·[ i-1 ,f i ]+b r ) Among them, r i Indicates the degree of historical information retention of reset gate control, W r represents the weight matrix of the reset gate, b r represents the bias vector of the reset gate.
6. The medium- and long-term photovoltaic power prediction method based on DCN-GRU according to claim 5 is characterized in that: According to the degree of addition of the new information and the degree of retention of the historical information, the current hidden state is calculated to complete the DCN-GRU model training, specifically including: Based on the degree of historical information retention controlled by the reset gate, the candidate hidden state is calculated using the following formula: in, represents the candidate hidden state, tanh represents the activation function, W represents the weight matrix, r i · i-1 represents that the reset gate is combined with the hidden state of the previous moment to control the influence range of historical information, and b represents a bias vector; Based on the degree of new information added controlled by the update gate and the candidate hidden state, the current hidden state is calculated to complete the training of the DCN-GRU model. The calculation formula is as follows: Among them, h i represents the current hidden state, z i ·h i-1 Indicates the historical information that is retained. Represents new information learned.
7. The medium- and long-term photovoltaic power prediction method based on DCN-GRU according to claim 1 is characterized in that: The current hidden state, the categorical features and the numerical features are input into the trained DCN-GRU model to output the predicted photovoltaic power generation value at each moment in the future, specifically including: Inputting the current hidden state, historical power features, meteorological features, and time features into the historical part of the trained DCN-GRU model, so as to obtain the historical hidden state by serial processing through the DCN module and the first GRU module in the DCN-GRU model; Inputting the meteorological feature and the time feature into the future part of the DCN-GRU model to obtain future high-order cross features through another GRU module in the DCN-GRU model; The historical hidden state and the future high-order cross features are merged to output the photovoltaic power prediction value corresponding to each future moment through a fully connected layer.
8. The medium- and long-term photovoltaic power prediction method based on DCN-GRU according to claim 1 is characterized in that: The categorical features in the original data of the photovoltaic power station are vectorized, and the processed categorical features are concatenated with the numerical features in the original data to construct a corresponding input feature set, specifically including: Acquire raw data of a photovoltaic power station, and extract a number of features from the raw data; Determine the feature types corresponding to the plurality of features, and construct a categorical feature set and a numerical feature set according to the feature types; the feature types include categorical features and numerical features, the categorical features include meteorological features and time features, and the numerical features include historical power features and meteorological features; The categorical features are vectorized by embedding to convert high-dimensional discrete features into low-dimensional continuous vectors, and the converted categorical features are concatenated with the numerical features to construct a corresponding input feature set.
9. The medium- and long-term photovoltaic power prediction device based on DCN-GRU is characterized by: The device comprises: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the medium- and long-term photovoltaic power prediction method based on DCN-GRU as described in any one of claims 1-8.
10. A non-volatile computer storage medium storing computer executable instructions, characterized in that: When the computer executable instructions are executed, the medium- and long-term photovoltaic power prediction method based on DCN-GRU as described in any one of claims 1 to 8 is implemented.