Discrete probability prediction method and device based on conditional variation auto-encoder

Through the discrete probability prediction method based on the conditional variational autoencoder, the discrete probability model of new energy generation is constructed and trained, which solves the problems of high time cost and difficult distribution balance in the prediction of new energy generation, and realizes the distribution of new energy generation Efficient and accurate prediction.

CN119227743APending Publication Date: 2024-12-31TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411123419.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The prior art has high time cost in the prediction of new energy power generation, and it is difficult to accurately and efficiently predict the probability distribution of new energy, and ignores the complex mixed distribution of photovoltaic power generation, making it difficult to achieve a balance between continuous and discrete photovoltaic distribution.

Method used

By using a discrete probability prediction method based on conditional variational autoencoder, a discrete probability power prediction model is constructed, multiple fully connected neural networks, convolutional neural networks and long and short-term memory neural networks are used, combining Bernoulli distribution and KL divergence Loss function, train and infer the distribution of new energy power generation, and achieve accurate prediction of the distribution of new energy power generation.

Benefits of technology

It achieves more efficient fitting of discrete features, balances continuous and discrete photovoltaic distributions, improves the prediction accuracy and efficiency of new energy power generation distribution, and solves the problems of high prediction time cost and difficult distribution balance in the existing technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119227743A_ABST
    Figure CN119227743A_ABST
Patent Text Reader

Abstract

The invention relates to a discrete probability prediction method and device based on a conditional variation auto-encoder, and the method comprises the steps: constructing a discrete probability power prediction model based on the conditional variation auto-encoder and a decoder; obtaining historical power data and historical candidate feature data of target new energy power generation to establish a new energy power generation training data set; training a discrete probability power prediction model based on the new energy power generation training data set to generate a new energy power generation prediction model, and predicting target new energy power generation distribution by using the new energy power generation prediction model; and inferring actual Bernoulli distribution corresponding to the preset Bernoulli distribution according to the enhanced inference strategy and the trained decoder. Therefore, the problems that in the prior art, the prediction time cost of new energy power generation is high, meanwhile, the probability distribution of new energy is difficult to accurately and efficiently predict, complex mixed distribution of photovoltaic power generation is ignored, and balance between continuous and discrete photovoltaic distribution is difficult to obtain are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of renewable energy power generation prediction, and in particular to a discrete probability prediction method and device based on a conditional variational autoencoder. Background Art

[0002] As the penetration rate of renewable energy continues to rise, the uncertainty of power output on the supply side is gradually increasing. In addition, significant changes in climate have led to increased uncertainty in power on the demand side. The uncertainty on both the supply and demand sides has seriously affected the safe and stable operation of the power system. The U.S. Energy Information Administration reported that by the end of 2024, new energy sources such as solar and wind power will contribute more than 79% of new power generation in the United States. Therefore, accurate renewable energy generation forecasting (REGF) is crucial for grid operators to balance renewable energy generation and demand and ensure the stability of the grid.

[0003] In recent years, the power industry has faced significant challenges due to variability and uncertainty on the supply side. As a result, utilities are increasingly adopting probabilistic forecasting (PF) to enhance their decision-making processes. In addition, advanced metering infrastructure now collects a large amount of historical data at fine-grained intervals, ranging from minutes to hours, and this rich data set naturally helps estimate the distribution of renewable energy generation.

[0004] In PF, forecasts can be represented by intervals, scenarios, density functions or probabilities. The latest advances in this field often involve the use of artificial neural networks combined with quantile regression, which modifies the mean absolute error objective function by incorporating quantile weights, allowing the output or power of renewable energy to be estimated at specific quantiles rather than the exact probability distribution; however, quantile-based PF methods require the construction of a probability distribution of PV power generation across multiple specific quantiles, resulting in repeated training and calculations, which can be time-consuming; in addition, these methods often ignore the complex mixed distribution characteristics of PV power generation, often leading to quantile crossing problems.

[0005] Variational Auto-Encoder (VAE) is a probabilistic generative model that combines variational reasoning with deep Bayesian neural networks. This method has made significant progress in fields such as text generation and image generation. The operating premise of VAE is that the observed variable of interest (denoted as y) is generated by an unobserved latent variable z through a probabilistic process p(y|z). The distribution of p(y) can be inferred by sampling from the latent space z. In PF, p(y) represents the true distribution of renewable energy generation, which is often difficult to obtain directly. Therefore, VAE can be applied to PF to estimate p(y) by sampling from z, usually assuming that z follows a simple distribution similar to a Gaussian distribution.

[0006] In practical scenarios such as text and image generation, it is often necessary to generate specific content. To meet this requirement, the existing technology introduces conditional VAE to construct conditional variational autoencoder (CVAE), and allows to generate content p(y|x, z) based on given conditions x and latent variables z; in the context of renewable energy generation probabilistic forecasting (REGPF), external factors x can affect the distribution of renewable energy generation p(y), so p(y|x) represents the actual distribution under condition x. The underlying mathematical foundation and logic of CVAE are very suitable for the needs of REGPF, which makes CVAE a promising framework for this application. However, the distribution of renewable energy generation sometimes exhibits discrete characteristics, so enhancements are needed to adapt REGPF to scenarios involving discrete distributions.

[0007] In summary, the existing technology has a high prediction time cost for renewable energy power generation. It is difficult to accurately and efficiently predict the probability distribution of renewable energy and ignores the complex mixed distribution of photovoltaic power generation. It is difficult to achieve a balance between continuous and discrete photovoltaic distribution, which needs to be solved urgently. Summary of the invention

[0008] The present application provides a discrete probability prediction method and device based on a conditional variational autoencoder to solve the problems of high prediction time cost of renewable energy power generation in the prior art, difficulty in accurately and efficiently predicting the probability distribution of renewable energy, ignoring the complex mixed distribution of photovoltaic power generation, and difficulty in achieving a balance between continuous and discrete photovoltaic distribution.

[0009] The first aspect of the present application provides a discrete probability prediction method based on a conditional variational autoencoder, which is applied to an offline training stage and includes the following steps: constructing a discrete probability power prediction model based on a preset conditional variational autoencoder and decoder; acquiring historical power data and historical candidate feature data of a target renewable energy power generation, and establishing a renewable energy power generation training data set based on the historical power data and the historical candidate feature data; training the discrete probability power prediction model based on the renewable energy power generation training data set to generate a renewable energy power generation prediction model, and using the renewable energy power generation prediction model to predict the target renewable energy power generation distribution.

[0010] Optionally, in one embodiment of the present application, the discrete probability power prediction model is constructed based on the preset conditional variational autoencoder and decoder, including: establishing the conditional variational autoencoder and the decoder based on a preset multiple fully connected neural networks, multiple convolutional neural networks, multiple long short-term memory neural networks, multiple dynamic timing dependency models and architecture combination strategies; constructing the discrete probability power prediction model according to the conditional variational autoencoder and the decoder.

[0011] Optionally, in one embodiment of the present application, the discrete probability power prediction model is trained based on the new energy power generation training data set, including: inputting the historical power data and the historical candidate feature data into the multiple fully connected neural networks and the multiple long short-term memory neural networks, respectively, to output a first historical power and a first feature data; performing one-dimensionalization and stacking operations on the first historical power and the first feature data to obtain first stacked data, and calculating the success probability of mapping the first stacked data to a multidimensional Bernoulli distribution through the multiple fully connected neural networks, and calculating a probability function based on the success probability; performing Bernoulli sampling according to the probability function to obtain Bernoulli sampling data, and based on the historical candidate feature data and the The multiple long short-term memory neural networks generate second feature data, and input the Bernoulli sampling data into the multiple fully connected neural networks to obtain sampling processing information; perform one-dimensionalization and stacking operations on the second feature data and the sampling processing information to obtain second stacked data, so as to obtain predicted power according to the second stacked data and the multiple fully connected neural networks; calculate the predicted Bernoulli distribution corresponding to the preset Bernoulli distribution through the encoder, and calculate the KL divergence of the predicted Bernoulli distribution and the preset Bernoulli distribution; calculate the power root mean square error according to the predicted power and the actual value of the preset power, and determine the total loss function based on the KL divergence and the power root mean square error, so as to train the discrete probability power prediction model through the total loss function.

[0012] The second aspect of the present application provides a discrete probability prediction method based on a conditional variational autoencoder, which is applied to the enhanced inference stage, and includes the following steps: using the decoder in a preset new energy power generation prediction model to perform multiple Bernoulli experiments on a preset Bernoulli distribution to obtain multiple sampling data, wherein the new energy power generation prediction model is obtained by training a discrete probability power prediction model constructed by a preset conditional variational autoencoder and a decoder using a preset new energy power generation training data set; the multiple sampling data are input into the decoder in sequence to infer the actual Bernoulli distribution corresponding to the preset Bernoulli distribution.

[0013] The third aspect of the present application provides a discrete probability prediction device based on a conditional variational autoencoder, which is applied to an offline training stage, including: a modeling module, which is used to construct a discrete probability power prediction model based on a preset conditional variational autoencoder and a decoder; an establishment module, which is used to obtain historical power data and historical candidate feature data of a target new energy power generation, and establish a new energy power generation training data set based on the historical power data and the historical candidate feature data; a training module, which is used to train the discrete probability power prediction model based on the new energy power generation training data set to generate a new energy power generation prediction model, and use the new energy power generation prediction model to predict the target new energy power generation distribution.

[0014] Optionally, in one embodiment of the present application, the modeling module includes: a first construction unit, used to establish the conditional variational autoencoder and the decoder based on a preset multiple fully connected neural networks, multiple convolutional neural networks, multiple long short-term memory neural networks, multiple dynamic timing dependency models and architecture combination strategies; a second construction unit, used to construct the discrete probability power prediction model based on the conditional variational autoencoder and the decoder.

[0015] Optionally, in one embodiment of the present application, the training module includes: an input unit, used to input the historical power data and the historical candidate feature data into the multiple fully connected neural networks and the multiple long short-term memory neural networks, respectively, to output first historical power and first feature data; a first stacking unit, used to perform one-dimensionalization and stacking operations on the first historical power and the first feature data to obtain first stacked data, and calculate the success probability of mapping the first stacked data to a multidimensional Bernoulli distribution through the multiple fully connected neural networks, and calculate a probability function based on the success probability; a sampling unit, used to perform Bernoulli sampling according to the probability function to obtain Bernoulli sampling data, and based on the historical candidate feature data and the multiple long short-term memory neural networks, Generate second feature data, and input the Bernoulli sampling data into the multiple fully connected neural networks to obtain sampling processing information; a second stacking unit is used to perform one-dimensionalization and stacking operations on the second feature data and the sampling processing information to obtain second stacked data, so as to obtain predicted power according to the second stacked data and the multiple fully connected neural networks; a calculation unit is used to calculate the predicted Bernoulli distribution corresponding to the preset Bernoulli distribution through the encoder, and calculate the KL divergence of the predicted Bernoulli distribution and the preset Bernoulli distribution; a determination unit is used to calculate the power root mean square error according to the predicted power and the actual value of the preset power, and determine the total loss function based on the KL divergence and the power root mean square error, so as to train the discrete probability power prediction model through the total loss function.

[0016] The fourth aspect of the present application provides a discrete probability prediction device based on a conditional variational autoencoder, which is applied to the enhanced inference stage, including: an acquisition module, which is used to use the decoder in a preset new energy power generation prediction model to perform multiple Bernoulli experiments on a preset Bernoulli distribution to obtain multiple sampling data, wherein the new energy power generation prediction model is obtained by training a discrete probability power prediction model constructed by a preset conditional variational autoencoder and a decoder with a preset new energy power generation training data set; an inference module, which is used to input the multiple sampling data into the decoder in sequence to infer the actual Bernoulli distribution corresponding to the preset Bernoulli distribution.

[0017] The fifth aspect embodiment of the present application provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the discrete probability prediction method based on the conditional variational autoencoder as described in the above embodiment.

[0018] The sixth aspect embodiment of the present application provides a computer-readable storage medium, which stores a computer program, which, when executed by a processor, implements the above-mentioned discrete probability prediction method based on conditional variational autoencoder.

[0019] The seventh aspect embodiment of the present application provides a computer program product, including a computer program, which is executed to implement the above-mentioned discrete probability prediction method based on conditional variational autoencoder.

[0020] Therefore, the embodiments of the present application have the following beneficial effects:

[0021] The embodiments of the present application can construct a discrete probability power prediction model based on a preset conditional variational autoencoder and decoder; obtain the historical power data and historical candidate feature data of the target new energy power generation, and establish a new energy power generation training data set based on the historical power data and the historical candidate feature data; based on the new energy power generation training data set, train the discrete probability power prediction model to generate a new energy power generation prediction model, and use the new energy power generation prediction model to predict the target new energy power generation distribution; then infer the actual Bernoulli distribution corresponding to the preset Bernoulli distribution according to the enhanced inference strategy and the trained decoder. The present application can better fit discrete features and achieve a balance between continuous and discrete photovoltaic distributions, so as to accurately learn and infer the distribution of new energy power generation. Thus, the problems of high prediction time cost of new energy power generation in the prior art, difficulty in accurately and efficiently predicting the probability distribution of new energy, ignoring the complex mixed distribution of photovoltaic power generation, and difficulty in achieving a balance between continuous and discrete photovoltaic distributions are solved.

[0022] 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

[0023] 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:

[0024] Figure 1 A flowchart of a discrete probability prediction method based on a conditional variational autoencoder applied to an offline training stage according to an embodiment of the present application;

[0025] Figure 2 A schematic diagram of the forward process of a discrete probability power prediction model according to an embodiment of the present application;

[0026] Figure 3 A schematic diagram of a training process of a discrete probability power prediction model according to an embodiment of the present application;

[0027] Figure 4 A flowchart of a discrete probability prediction method based on a conditional variational autoencoder applied to an enhanced inference stage provided according to an embodiment of the present application;

[0028] Figure 5 A schematic diagram of a traditional inference process of an embodiment of the present application;

[0029] Figure 6 A schematic diagram comparing an inference process based on an enhanced inference strategy and a traditional inference process according to an embodiment of the present application;

[0030] Figure 7 This is a schematic diagram comparing the prediction performance of the present application and the traditional point prediction SPGF method according to an embodiment of the present application;

[0031] Figure 8 A schematic diagram showing a comparison of the model structures of the present application and the traditional point prediction SPGF method according to an embodiment of the present application;

[0032] Fig. 9 A discrete probability prediction curve and a schematic diagram of photovoltaic power generation distribution according to an embodiment of the present application;

[0033] Fig.10 This is an example diagram of a discrete probability prediction device based on a conditional variational autoencoder applied in an offline training stage according to an embodiment of the present application;

[0034] Fig.11 This is an example diagram of a discrete probability prediction device based on a conditional variational autoencoder applied to an enhanced inference stage according to an embodiment of the present application;

[0035] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0036] Among them, 10-a discrete probability prediction device based on a conditional variational autoencoder applied in the offline training stage, 20-a discrete probability prediction device based on a conditional variational autoencoder applied in the enhanced inference stage; 101-a modeling module, 102-an establishment module, 103-a training module; 201-an acquisition module, 202-an inference module; 1201-a memory, 1202-a processor, 1203-a communication interface. DETAILED DESCRIPTION

[0037] 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.

[0038] The following describes the discrete probability prediction method and device based on the conditional variational autoencoder of the embodiment of the present application with reference to the accompanying drawings. In view of the problems mentioned in the above background technology, the present application provides a discrete probability prediction method based on the conditional variational autoencoder, in which a discrete probability power prediction model is constructed based on a preset conditional variational autoencoder and a decoder; the historical power data and historical candidate feature data of the target new energy power generation are obtained, and a new energy power generation training data set is established based on the historical power data and the historical candidate feature data; based on the new energy power generation training data set, a discrete probability power prediction model is trained to generate a new energy power generation prediction model, and the target new energy power generation distribution is predicted using the new energy power generation prediction model; then, the actual Bernoulli distribution corresponding to the preset Bernoulli distribution is inferred according to the enhanced inference strategy and the trained decoder. The present application can better fit discrete features and achieve a balance between continuous and discrete photovoltaic distributions, thereby accurately learning and inferring the distribution of new energy power generation. As a result, the problems of high prediction time cost of new energy power generation in the prior art, difficulty in accurately and efficiently predicting the probability distribution of new energy, and ignoring the complex mixed distribution of photovoltaic power generation, and difficulty in achieving a balance between continuous and discrete photovoltaic distributions are solved.

[0039] Specifically, Figure 1 A flowchart of a discrete probability prediction method based on a conditional variational autoencoder applied in an offline training stage provided in an embodiment of the present application.

[0040] like Figure 1 As shown, the discrete probability prediction method based on conditional variational autoencoder includes the following steps:

[0041] In step S101, a discrete probability power prediction model is constructed based on a preset conditional variational autoencoder and decoder.

[0042] The embodiment of the present application uses solar photovoltaic power generation as an example for discrete probability prediction. First, the embodiment of the present application can construct a discrete probability power prediction model based on CVAE through conditional variational autoencoders and decoders, thereby providing reliable theoretical and data support for the prediction and inference of renewable energy power generation distribution.

[0043] Optionally, in one embodiment of the present application, a discrete probability power prediction model is constructed based on a preset conditional variational autoencoder and decoder, including: establishing a conditional variational autoencoder and decoder based on a preset multiple fully connected neural networks, multiple convolutional neural networks, multiple long short-term memory neural networks, multiple dynamic timing dependency models and architecture combination strategies; constructing a discrete probability power prediction model based on the conditional variational autoencoder and decoder.

[0044] It should be noted that in the embodiments of the present application, the neural networks in the encoder and the decoder can be designed according to the needs of the user, and can take various forms, such as a fully connected (FC) neural network, a convolutional neural network (CNN), a long short-term memory (LSTM) neural network, a dynamic temporal dependency model, and a combination of the above architectures;

[0045] In the specific implementation process, the input of the conditional variational autoencoder is composed of the historical power y∈R p And historical feature input x∈R p×n It consists of two parts, where p represents the length of the historical features and historical power sequences, and n represents the number of features used for prediction; the input of the decoder is the value z∈R after Bernoulli sampling d And historical feature input x∈R p×n It consists of two parts, where d represents the number of Bernoulli distributions.

[0046] Therefore, the embodiment of the present application constructs a discrete probability power prediction model based on the conditional variational autoencoder, thereby effectively ensuring the reliability of subsequent new energy power generation distribution inference.

[0047] In step S102, historical power data and historical candidate feature data of the target new energy power generation are obtained, and a new energy power generation training data set is established according to the historical power data and the historical candidate feature data.

[0048] In step S103, a discrete probability power prediction model is trained based on the new energy power generation training data set to generate a new energy power generation prediction model, and the new energy power generation prediction model is used to predict the target new energy power generation distribution.

[0049] Furthermore, the embodiments of the present application can also obtain historical power data and historical candidate feature data of the target renewable energy power generation to establish a renewable energy power generation training data set, and train a discrete probability power prediction model based on the renewable energy power generation training data set, thereby generating a renewable energy power generation prediction model, and the renewable energy power generation prediction model can be used to predict the target renewable energy power generation distribution.

[0050] Optionally, in one embodiment of the present application, based on a new energy power generation training data set, a discrete probability power prediction model is trained, including: inputting historical power data and historical candidate feature data into multiple fully connected neural networks and multiple long short-term memory neural networks, respectively, to output first historical power and first feature data; performing one-dimensionalization and stacking operations on the first historical power and the first feature data to obtain first stacked data, and calculating the success probability of mapping the first stacked data to a multidimensional Bernoulli distribution through multiple fully connected neural networks, and calculating a probability function based on the success probability; performing Bernoulli sampling according to the probability function to obtain Bernoulli sampling data, and based on the historical candidate feature data and the multidimensional Bernoulli distribution, A long short-term memory neural network is used to generate second feature data, and the Bernoulli sampling data is input into multiple fully connected neural networks to obtain sampling processing information; the second feature data and the sampling processing information are one-dimensionalized and stacked to obtain second stacked data, so as to obtain predicted power according to the second stacked data and the multiple fully connected neural networks; the predicted Bernoulli distribution corresponding to the preset Bernoulli distribution is calculated through the encoder, and the KL divergence of the predicted Bernoulli distribution and the preset Bernoulli distribution is calculated; the power root mean square error is calculated according to the predicted power and the actual value of the preset power, and the total loss function is determined based on the KL divergence and the power root mean square error, so as to train the discrete probability power prediction model through the total loss function.

[0051] For the sake of convenience, the embodiment of the present application takes LSTM as an example to illustrate the forward process of the discrete probability power prediction model. Figure 2 The specific process is as follows:

[0052] 1. Input the power sequence y to multiple FC layers to get the first historical power:

[0053] y1=FC(y);

[0054] 2. Input historical feature x to multiple LSTM layers and output the first feature data:

[0055] y2=LSTM(x);

[0056] 3. Expand y1 and y2 into one dimension and stack them to get the first stacked data:

[0057] y3=Concat(Flatten(y2)+y1);

[0058] 4. Map y3 through multiple FC layers to the success probability p={p1,...p d}:

[0059] p = FC(y3);

[0060] 5. Combined with p, we get the random variable z = {z1,...zd Probability function:

[0061]

[0062] 6. According to f(z i |p i ), sampling is performed to obtain Bernoulli sampling data z;

[0063] 7. Input the historical feature x to multiple LSTM layers to output the second feature data:

[0064] y4=LSTM(x);

[0065] 8. Input z to multiple FC layers:

[0066] y5=FC(z);

[0067] 9. Expand y4 and y5 into one dimension and stack them to obtain the second stacked data:

[0068] y6=Concat(Flatten(y4)+y5);

[0069] 10. Pass y6 through multiple FC layers to get the predicted power:

[0070] y6=Concat(Flatten(y4)+y5).

[0071] In the embodiment of the present application, the training process is as follows Figure 3 As shown, the specific process is as follows:

[0072] 1. Calculate the predicted Bernoulli distribution B(p) and the given Bernoulli distribution B(p ′ )’s KL divergence:

[0073]

[0074] 2. Calculate the root mean square error between the predicted power and the actual power:

[0075] L x =(xx ′ ) 2 ;

[0076] 3. Calculate the total loss function L of the model:

[0077] L=L x +L p ;

[0078] 4. Based on the loss function L, update the model parameters according to the gradient descent algorithm.

[0079] Therefore, the embodiment of the present application retains the basic architecture of CVAE and uses Bernoulli distribution instead of Gaussian distribution to better fit discrete features; in addition, the embodiment of the present application designs the reconstruction loss and KL divergence loss of the discrete probability prediction method based on conditional variational autoencoder (Conditional Variational Autoencoder Based Discrete Probabilistic Forecasting, CDPFM) to quantify the difference between the predicted photovoltaic power generation and the actual photovoltaic power generation, and measure the difference between the latent variable and the Bernoulli distribution, thereby maintaining the prediction performance and enabling CDPFM to infer the distribution of renewable energy power generation.

[0080] According to the discrete probability prediction method based on conditional variational autoencoder applied to the offline training stage proposed in the embodiment of the present application, a discrete probability power prediction model is constructed based on a preset conditional variational autoencoder and decoder; the historical power data and historical candidate feature data of the target renewable energy power generation are obtained, and a renewable energy power generation training data set is established based on the historical power data and historical candidate feature data; based on the renewable energy power generation training data set, a discrete probability power prediction model is trained to generate a renewable energy power generation prediction model, and the target renewable energy power generation distribution is predicted using the renewable energy power generation prediction model. The present application can better fit discrete features and achieve a balance between continuous and discrete photovoltaic distributions, thereby accurately learning and inferring the distribution of renewable energy power generation.

[0081] Figure 4 A flowchart of a discrete probability prediction method based on a conditional variational autoencoder applied to an enhanced inference stage provided in an embodiment of the present application.

[0082] like Figure 4 As shown, the discrete probability prediction method based on conditional variational autoencoder includes the following steps:

[0083] In step S401, multiple Bernoulli experiments are performed on a preset Bernoulli distribution using the decoder in the preset renewable energy power generation prediction model to obtain multiple sampling data, wherein the renewable energy power generation prediction model is obtained by training a discrete probability power prediction model constructed by a preset conditional variational autoencoder and decoder using a preset renewable energy power generation training data set.

[0084] In step S402, a plurality of sample data are sequentially input into a decoder to infer an actual Bernoulli distribution corresponding to a preset Bernoulli distribution.

[0085] In the embodiments of the present application, the general inference process is as follows Figure 5 The specific inference process is as follows:

[0086] Step 1: Sample k vectors {z1,z2,...,z k}, where any z i ={z i,1 ,...z i,d};

[0087] Step 2: Set {z1,z2,...,z k} are input into the decoder in sequence to predict k values.

[0088] It should be noted that the embodiments of the present application may use an enhanced inference strategy for inference, which is compared with the general inference process, such as Figure 6 As shown, the specific process of the enhanced inference strategy in the embodiment of the present application is as follows:

[0089] Step 1: Perform n Bernoulli experiments B(n,p′) from d given Bernoulli distributions B(p′) and sample k vectors {z1,z2,...,z k};

[0090] Step 2: Set {z1,z2,...,z k} are input into the decoder in sequence to predict k values.

[0091] The following is an explanation of the execution effect of the discrete probability prediction method based on conditional variational autoencoder of the present application through a specific embodiment and in combination with the accompanying drawings.

[0092] First, the data set used in the embodiment of the present application consists of two parts: load data and candidate features. The power data records the actual power in Switzerland every hour, and the candidate features include the hourly temperature and weather quality observed in Switzerland. In addition, the present application also collects time information such as year, month, day, hour and holiday. The data is normalized using z-score normalization and divided into two subsets for different purposes: a training set (January 1, 2015 to March 1, 2015) and a test set (March 2, 2015 to April 1, 2015). The training set is used for training the prediction model, and the test set is used for result evaluation.

[0093] Secondly, this application can use the Danish public dataset to verify the proposed method. The Danish dataset consists of two main components: renewable energy generation data and candidate features. The renewable energy generation data includes real renewable energy generation records of the second, 1-minute, 5-minute and 60-minute period in Denmark from June 1, 2019 to August 31, 2020, and the candidate features include the corresponding granular temperature data and weather quality data observed in Denmark. This application can use a 5-minute resolution for the SPGF for the next 5 hours. To ensure consistency, the data is normalized using the z-score normalization method and then divided into three subsets of 70%, 20%, and 10%. The training set (subset 1) contains data from June 1, 2019 to April 16, 2019, which is used to train the prediction model. The validation set (subset 2) contains data from April 16, 2019 to June 16, 2019, which is used to verify the prediction model. The test set (subset 3) contains data from June 16, 2019 to August 31, 2020, which is used to evaluate the results.

[0094] In the specific embodiment of the present application, the performance comparison of the prediction results obtained by the present application and the traditional point prediction SPGF method is as follows: Figure 7 The corresponding model structure is shown in Figure 8 Compared with the traditional SPGF, the performance of the present application does not change much, which means that the CDPFM proposed in the present application can greatly maintain the prediction performance. Therefore, the model structure can be easily applied to other ANN-based SPGFs.

[0095] Fig. 9 Detailed discrete probability prediction curves and PV power generation distribution are shown. Fig. 9 (a) is a part of the photovoltaic power generation curves in the test set, where the red line represents the actual photovoltaic power generation value, and the others represent the predicted probabilistic photovoltaic power generation values; Fig. 9 (b) clearly shows Fig. 9 Part of the photovoltaic power generation sequence in (a). Fig. 9 (c), (d) and (e) show more clearly Fig. 9 Part of the photovoltaic power generation sequence in (b); Fig. 9 (f), (g) and (h) show the predicted probabilistic PV power generation distribution at timestamps 75, 120, and 205.

[0096] In summary, the present application can accurately learn and infer the distribution of renewable energy generation, and the CDPFM of the present application is suitable for probability prediction scenarios with discrete distributions. The implementation process of the discrete probability prediction method based on conditional variational autoencoder of the present application includes three key steps: first, a multiple Bernoulli distribution method is used to fit the distribution of renewable energy generation; second, a comprehensive training and reasoning framework is established to ensure that CDPFM can produce reliable and accurate photovoltaic power generation distribution; finally, an enhanced reasoning strategy is used to explore the diversity of discrete distributions. The present application demonstrates the effectiveness of CDPFM through evaluations on Danish datasets. These evaluations compare CDPFM with various artificial neural network-based SPGF methods, which strongly demonstrates that CDPFM has superior performance and accuracy in predicting photovoltaic power generation distribution.

[0097] According to the discrete probability prediction method based on conditional variational autoencoder applied to the enhanced inference stage proposed in the embodiment of the present application, multiple Bernoulli experiments are performed on the preset Bernoulli distribution by using the decoder in the preset new energy power generation prediction model to obtain multiple sampling data; the multiple sampling data are sequentially input into the decoder to infer the actual Bernoulli distribution corresponding to the preset Bernoulli distribution. The present application can better fit discrete features and achieve a balance between continuous and discrete photovoltaic distributions, thereby accurately learning and inferring the distribution of new energy power generation.

[0098] Secondly, the discrete probability prediction device based on conditional variational autoencoder proposed in accordance with the embodiment of the present application is described with reference to the accompanying drawings.

[0099] Fig.10 It is a block diagram of a discrete probability prediction device based on a conditional variational autoencoder applied in an offline training stage of an embodiment of the present application.

[0100] like Fig.10 As shown, the discrete probability prediction device 10 based on conditional variational autoencoder includes: a modeling module 101, a building module 102 and a training module 103.

[0101] Among them, the modeling module 101 is used to build a discrete probability power prediction model based on a preset conditional variational autoencoder and decoder.

[0102] The establishment module 102 is used to obtain the historical power data and the historical candidate feature data of the target new energy power generation, and establish a new energy power generation training data set according to the historical power data and the historical candidate feature data.

[0103] The training module 103 is used to train a discrete probability power prediction model based on a new energy power generation training data set to generate a new energy power generation prediction model, and use the new energy power generation prediction model to predict the target new energy power generation distribution.

[0104] Optionally, in one embodiment of the present application, the modeling module 101 includes: a first construction unit and a second construction unit.

[0105] Among them, the first construction unit is used to establish a conditional variational autoencoder and decoder based on a preset multiple fully connected neural networks, multiple convolutional neural networks, multiple long short-term memory neural networks, multiple dynamic timing dependency models and architecture combination strategies.

[0106] The second construction unit is used to construct a discrete probability power prediction model based on the conditional variational autoencoder and the decoder.

[0107] Optionally, in one embodiment of the present application, the training module 103 includes: an input unit, a first stacking unit, a sampling unit, a second stacking unit, a calculation unit and a determination unit.

[0108] Among them, the input unit is used to input the historical power data and the historical candidate feature data into multiple fully connected neural networks and multiple long short-term memory neural networks respectively, so as to output the first historical power and the first feature data.

[0109] The first stacking unit is used to perform one-dimensional and stacking operations on the first historical power and the first characteristic data to obtain first stacked data, and to calculate the success probability of mapping the first stacked data to a multidimensional Bernoulli distribution through multiple fully connected neural networks, and to calculate a probability function based on the success probability.

[0110] The sampling unit is used to perform Bernoulli sampling according to the probability function to obtain Bernoulli sampling data, generate second feature data based on historical candidate feature data and multiple long short-term memory neural networks, and input the Bernoulli sampling data into multiple fully connected neural networks to obtain sampling processing information.

[0111] The second stacking unit is used to perform one-dimensionalization and stacking operations on the second feature data and the sampling processing information to obtain second stacked data, so as to obtain predicted power according to the second stacked data and multiple fully connected neural networks.

[0112] The calculation unit is used to calculate the predicted Bernoulli distribution corresponding to the preset Bernoulli distribution through the encoder, and calculate the KL divergence between the predicted Bernoulli distribution and the preset Bernoulli distribution.

[0113] The determination unit is used to calculate the power root mean square error according to the predicted power and the preset power actual value, and determine the total loss function based on the KL divergence and the power root mean square error, so as to train the discrete probability power prediction model through the total loss function.

[0114] According to the discrete probability prediction device based on conditional variational autoencoder applied to the offline training stage proposed in the embodiment of the present application, it includes a modeling module for constructing a discrete probability power prediction model based on a preset conditional variational autoencoder and a decoder; a building module for obtaining historical power data and historical candidate feature data of target renewable energy power generation, and establishing a renewable energy power generation training data set based on the historical power data and historical candidate feature data; a training module for training a discrete probability power prediction model based on the renewable energy power generation training data set to generate a renewable energy power generation prediction model, and using the renewable energy power generation prediction model to predict the target renewable energy power generation distribution. The present application can better fit discrete features and achieve a balance between continuous and discrete photovoltaic distributions, thereby accurately learning and inferring the distribution of renewable energy power generation.

[0115] Fig.11 It is a block diagram of a discrete probability prediction device based on a conditional variational autoencoder applied to an online pre-stage according to an embodiment of the present application.

[0116] like Fig.11 As shown, the discrete probability prediction device 20 based on conditional variational autoencoder applied to the enhanced inference stage includes: an acquisition module 201 and an inference module 202.

[0117] Among them, the acquisition module 201 is used to use the decoder in the preset new energy power generation prediction model to perform multiple Bernoulli experiments on the preset Bernoulli distribution to obtain multiple sampling data, wherein the new energy power generation prediction model is obtained by training a discrete probability power prediction model constructed by a preset conditional variational autoencoder and decoder using a preset new energy power generation training data set.

[0118] The inference module 202 is used to input a plurality of sample data into the decoder in sequence to infer the actual Bernoulli distribution corresponding to the preset Bernoulli distribution.

[0119] It should be noted that the above explanation of the embodiment of the discrete probability prediction method based on the conditional variational autoencoder is also applicable to the discrete probability prediction device based on the conditional variational autoencoder of this embodiment, and will not be repeated here.

[0120] According to the discrete probability prediction device based on conditional variational autoencoder applied to the enhanced inference stage proposed in the embodiment of the present application, it includes an acquisition module for performing multiple Bernoulli experiments on a preset Bernoulli distribution using a decoder in a preset new energy power generation prediction model to obtain multiple sampling data, wherein the new energy power generation prediction model is obtained by training a discrete probability power prediction model constructed by a preset conditional variational autoencoder and a decoder using a preset new energy power generation training data set; an inference module is used to input multiple sampling data into the decoder in sequence to infer the actual Bernoulli distribution corresponding to the preset Bernoulli distribution. The present application can better fit discrete features and achieve a balance between continuous and discrete photovoltaic distributions, thereby accurately learning and inferring the distribution of new energy power generation.

[0121] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:

[0122] A memory 1201 , a processor 1202 , and a computer program stored in the memory 1201 and executable on the processor 1202 .

[0123] When the processor 1202 executes the program, the discrete probability prediction method based on the conditional variational autoencoder provided in the above embodiment is implemented.

[0124] Furthermore, the electronic device further comprises:

[0125] The communication interface 1203 is used for communication between the memory 1201 and the processor 1202 .

[0126] The memory 1201 is used to store computer programs that can be executed on the processor 1202 .

[0127] The memory 1201 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0128] If the memory 1201, the processor 1202 and the communication interface 1203 are implemented independently, the communication interface 1203, the memory 1201 and the processor 1202 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.12 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0129] Optionally, in a specific implementation, if the memory 1201, the processor 1202 and the communication interface 1203 are integrated on a chip, the memory 1201, the processor 1202 and the communication interface 1203 can communicate with each other through an internal interface.

[0130] The processor 1202 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0131] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned discrete probability prediction method based on conditional variational autoencoder.

[0132] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed, is used to implement the above-mentioned discrete probability prediction method based on conditional variational autoencoder.

[0133] In the description of this specification, 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 N 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.

[0134] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0135] 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 N 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 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.

[0136] 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 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 N wirings (electronic devices), 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 by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways as necessary and then storing it in a computer memory.

[0137] 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 embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. 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.

[0138] 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.

[0139] 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.

[0140] 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 discrete probability prediction method based on conditional variational autoencoder, applied in the offline training stage, characterized in that: The following steps are involved: Based on the preset conditional variational autoencoder and decoder, a discrete probability power prediction model is constructed; Acquire historical power data and historical candidate feature data of target new energy power generation, and establish a new energy power generation training data set based on the historical power data and the historical candidate feature data; Based on the new energy power generation training data set, the discrete probability power prediction model is trained to generate a new energy power generation prediction model, and the new energy power generation prediction model is used to predict the target new energy power generation distribution.

2. The method according to claim 1, characterized in that The discrete probability power prediction model is constructed based on the preset conditional variational autoencoder and decoder, including: Based on a preset plurality of fully connected neural networks, a plurality of convolutional neural networks, a plurality of long short-term memory neural networks, a plurality of dynamic temporal dependency models and an architecture combination strategy, the conditional variational autoencoder and the decoder are established; The discrete probability power prediction model is constructed according to the conditional variational autoencoder and the decoder.

3. The method according to claim 2, characterized in that The step of training the discrete probability power prediction model based on the new energy power generation training data set includes: Inputting the historical power data and the historical candidate feature data into the multiple fully connected neural networks and the multiple long short-term memory neural networks respectively to output a first historical power and a first feature data; Performing one-dimensionalization and stacking operations on the first historical power and the first characteristic data to obtain first stacked data, and calculating the success probability of mapping the first stacked data to a multidimensional Bernoulli distribution through the multiple fully connected neural networks, and calculating a probability function according to the success probability; Performing Bernoulli sampling according to the probability function to obtain Bernoulli sampling data, generating second feature data based on the historical candidate feature data and the multiple long short-term memory neural networks, and inputting the Bernoulli sampling data into the multiple fully connected neural networks to obtain sampling processing information; Performing one-dimensionalization and stacking operations on the second feature data and the sampling processing information to obtain second stacked data, so as to obtain predicted power according to the second stacked data and the multiple fully connected neural networks; Calculating a predicted Bernoulli distribution corresponding to a preset Bernoulli distribution by the encoder, and calculating a KL divergence between the predicted Bernoulli distribution and the preset Bernoulli distribution; A power root mean square error is calculated according to the predicted power and the preset power actual value, and a total loss function is determined based on the KL divergence and the power root mean square error, so as to train the discrete probability power prediction model through the total loss function.

4. A discrete probability prediction method based on conditional variational autoencoder, characterized in that: Applied to the enhanced inference stage, it includes the following steps: Using a decoder in a preset new energy power generation prediction model to perform multiple Bernoulli experiments on a preset Bernoulli distribution to obtain multiple sampling data, wherein the new energy power generation prediction model is obtained by training a discrete probability power prediction model constructed by a preset conditional variational autoencoder and a decoder using a preset new energy power generation training data set; The plurality of sampled data are sequentially input into the decoder to infer an actual Bernoulli distribution corresponding to the preset Bernoulli distribution.

5. A discrete probability prediction device based on conditional variational autoencoder, applied in the offline training stage, characterized in that: include: A modeling module, used to construct a discrete probability power prediction model based on a preset conditional variational autoencoder and decoder; Establishing a module for acquiring historical power data and historical candidate feature data of target renewable energy power generation, and establishing a renewable energy power generation training data set based on the historical power data and the historical candidate feature data; A training module is used to train the discrete probability power prediction model based on the new energy power generation training data set to generate a new energy power generation prediction model, and use the new energy power generation prediction model to predict the target new energy power generation distribution.

6. The device according to claim 5, characterized in that The modeling module includes: A first construction unit is used to establish the conditional variational autoencoder and the decoder based on a preset plurality of fully connected neural networks, a plurality of convolutional neural networks, a plurality of long short-term memory neural networks, a plurality of dynamic temporal dependency models and an architecture combination strategy; The second construction unit is used to construct the discrete probability power prediction model according to the conditional variational autoencoder and the decoder.

7. A discrete probability prediction device based on conditional variational autoencoder, characterized in that: Applied to the enhanced inference stage, including: An acquisition module is used to perform multiple Bernoulli experiments on a preset Bernoulli distribution using a decoder in a preset new energy power generation prediction model to obtain multiple sampling data, wherein the new energy power generation prediction model is obtained by training a discrete probability power prediction model constructed by a preset conditional variational autoencoder and a decoder using a preset new energy power generation training data set; An inference module is used to input the plurality of sampled data into the decoder in sequence to infer an actual Bernoulli distribution corresponding to the preset Bernoulli distribution.

8. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement a discrete probability prediction method based on a conditional variational autoencoder as described in any one of claims 1 to 3 or claim 4.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement a discrete probability prediction method based on a conditional variational autoencoder as described in any one of claims 1 to 3 or claim 4.

10. A computer program product, comprising a computer program, characterized in that The computer program is executed to implement the discrete probability prediction method based on conditional variational autoencoder as described in any one of claims 1-3 or claim 4.