Differential privacy protection-based IGA-LSTM photovoltaic power generation power prediction method and system
By applying a combination of differential privacy protection and IGA-LSTM in photovoltaic power generation prediction, the problem of low data privacy protection and prediction accuracy of photovoltaic power stations is solved, and the dual improvement of data privacy security and prediction accuracy is achieved, which promotes the stability and economic benefits of the power system.
Patent Information
- Application Number
- CN202510203452.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-05-06
AI Technical Summary
The prior art has difficulties in data privacy protection and low prediction accuracy in the prediction power prediction of photovoltaic power generation, which makes it difficult to guarantee the data island phenomenon of photovoltaic power stations and the stability of the power grid system.
The IGA-LSTM photovoltaic power generation prediction method based on differential privacy protection is adopted to privacy the photovoltaic power station data through differential privacy technology, and the improved genetic algorithm is used to optimize the LSTM network parameters to build an optimal prediction model to improve prediction accuracy.
It effectively protects the privacy and security of photovoltaic power station data, while improving the accuracy of photovoltaic power generation power prediction, promoting cross-power station data collaboration, and enhancing the stability and economic benefits of the power system.
Smart Images

Figure CN119940650A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart grid photovoltaic prediction, and in particular to an IGA-LSTM photovoltaic power prediction method and system based on differential privacy protection. Background Art
[0002] With the rapid development of the photovoltaic industry, the proportion of photovoltaic grid-connected power continues to rise. Photovoltaic power output is mainly determined by the solar irradiance received by the photovoltaic array plane. It is easily affected by the random changes of meteorological elements such as solar radiation, humidity, temperature, precipitation, and cloud movement. It has obvious volatility and intermittency. This variability brings potential risks to the power grid system. Therefore, accurate photovoltaic power generation prediction is very important for the operation and dispatch of the power system.
[0003] With sufficient training data and computing resources, deep learning methods can effectively predict photovoltaic power. Considering that photovoltaic power prediction requires a large amount of historical data, including weather data, historical power generation data, equipment operating status, etc. However, these data may involve sensitive information of individuals or enterprises. In order to protect their own data privacy, a single photovoltaic power station is unwilling to exchange data with the outside world, resulting in the formation of the "data island" phenomenon. Therefore, how to promote the exchange of photovoltaic power station data, provide the possibility of data collaboration across photovoltaic power stations, and obtain sufficient training data, privacy protection is particularly important.
[0004] In addition, photovoltaic power generation is affected by a variety of meteorological factors and has a high degree of volatility and uncertainty. Therefore, the existing methods of predicting photovoltaic power using deep learning methods still have the problem of insufficient prediction accuracy. Summary of the invention
[0005] In order to address the deficiencies in the prior art, the present application proposes an IGA-LSTM photovoltaic power prediction method and system based on differential privacy protection. The present invention proposes a method for optimizing LSTM network parameters using an improved genetic algorithm based on differential privacy protection. Differential privacy protection can better protect the privacy of photovoltaic power station data, and the optimal LSTM prediction model can be used to predict photovoltaic power generation, which can also improve the accuracy of photovoltaic power generation prediction.
[0006] The technical solution adopted by the present invention is as follows:
[0007] A photovoltaic power generation prediction method based on IGA-LSTM with differential privacy protection includes the following steps:
[0008] S1: Collect photovoltaic data to obtain the original photovoltaic data set X;
[0009] S2: Perform privacy processing on the original data set X to obtain data set X';
[0010] S3: Perform data normalization on the data set X' to obtain the data set X".
[0011] S4: Use the IGA algorithm to optimize the LSTM network learning rate and the number of neuron layers to obtain the optimal LSTM prediction model;
[0012] S5: Input the normalized data set into the optimal LSTM prediction model to predict the photovoltaic power generation.
[0013] Get the prediction result Y;
[0014] S6: Denormalize the prediction result Y to obtain the final photovoltaic power prediction value Y'.
[0015] Furthermore, privacy processing is performed based on the privacy budget ε, privacy leakage probability δ and Gaussian mechanism.
[0016] Furthermore, the data normalization process uses maximum and minimum normalization.
[0017] Further, the steps of S4 are as follows:
[0018] S4.1: Encode the learning rate and number of neuron layers of the LSTM model to form individuals of the genetic algorithm;
[0019] S4.2: Randomly generate multiple individuals to form an initial population;
[0020] S4.3: For each individual in the population, train an LSTM prediction model using its corresponding learning rate and neuron parameters;
[0021] S4.4: Calculate the fitness value based on the prediction performance mean square error MSE, and use the inverse of the mean square error MSE as the fitness function:
[0022]
[0023] Where n is the number of samples, y i is the ith actual value, Y i ' is the i-th predicted value;
[0024] S4.5: Roulette wheel selection method is used to select individuals from the current population to enter the next generation based on fitness values;
[0025] S4.6: For the selected individuals, the learning rate and the number of neuron layers are exchanged according to the preset crossover probability, and a crossover operation is performed to generate a new individual;
[0026] S4.7: Perform mutation operations on individuals generated by crossover, dynamically adjust the mutation probability according to the evolution process of the algorithm, and use exponential decay to adjust the mutation rate;
[0027] S4.8: The individual with the highest fitness value in the current population is directly retained to the next generation, and the new individuals generated after crossover and mutation are added to the population to form a new population;
[0028] S4.9: When the population fitness value no longer changes significantly and tends to converge, terminate;
[0029] S4.10: Extract the individual with the highest fitness value from the final population and decode it. The corresponding learning rate and number of neuron layers are the optimal parameters of the LSTM network. Retrain the LSTM model to obtain the optimal LSTM prediction model.
[0030] Further, the process of selecting an operation in S4.5 is as follows:
[0031] Calculate the sum of all individual fitness in the population, recorded as:
[0032]
[0033] The selection probability of each individual is recorded as:
[0034]
[0035] Calculate a cumulative probability for each individual to construct the roulette wheel. The cumulative probability is recorded as:
[0036]
[0037] Generate a random number r and find the smallest k that makes c k ≥r; According to the cumulative probability distribution, find the first individual whose cumulative fitness value is greater than or equal to the generated random number; this individual will be selected to participate in the reproduction of the next generation. After each selection, the individual is removed from the population to ensure that each individual can only be selected once.
[0038] Furthermore, the process of mutation operation in S4.7 is as follows:
[0039] Exponential decay is used to adjust the mutation rate, and the mutation rate gradually decreases with the increase of generations; the mutation rate formula is as follows:
[0040] P m (t) = P mo ·e -kt
[0041] Where P m (t) is the mutation rate of the tth generation, P m0is the initial mutation rate, k is the attenuation coefficient, which controls the speed at which the mutation rate decreases, and t is the current number of iterations.
[0042] Further, in S7, the prediction result Y is processed by inverse maximum and minimum normalization to obtain the final prediction result Y';
[0043] Furthermore, PV data include total radiation, direct radiation, diffuse radiation, air temperature, air pressure, humidity and actual power;
[0044] A photovoltaic power generation prediction system based on IGA-LSTM with differential privacy protection, comprising: a data collection module, a differential privacy processing module, a data processing module, an IGA-LSTM optimization module, an LSTM prediction module, and a prediction result output module;
[0045] The data collection module is used to collect photovoltaic data to form a data set X;
[0046] The differential privacy processing module is used to perform privacy processing on the data set to obtain the data set X';
[0047] The data processing module includes a data normalization unit and a denormalization unit; the data normalization unit performs a maximum and minimum normalization process on the privacy-processed data to obtain a data set X'; the data denormalization unit performs a demaximal and minimum normalization process on the prediction result Y to obtain a final photovoltaic power prediction result Y';
[0048] In the IGA-LSTM optimization module, the IGA algorithm is used to optimize the LSTM network learning rate and the number of neuron layers to obtain the optimal LSTM prediction model;
[0049] The LSTM prediction module stores the optimal LSTM prediction model, and uses the optimal LSTM prediction model to predict the data set X" after the maximum and minimum normalization processing to obtain the prediction result Y;
[0050] The prediction result output module outputs the prediction result Y' after denormalization.
[0051] Furthermore, the data collection module adopts edge devices.
[0052] Beneficial effects of the present invention:
[0053] 1. The present invention adopts a solution combining differential privacy and IGA-LSTM, which not only integrates the advantages of differential privacy technology to ensure the privacy security of photovoltaic power station data, but also uses the IGA algorithm to optimize the traditional LSTM prediction model, accelerate the convergence speed of the model, reduce the number of iterations, and improve the accuracy of photovoltaic power generation prediction.
[0054] 2. From the perspective of photovoltaic power station operators, the design of the present invention can promote the exchange of photovoltaic power station data through differential privacy protection training models, provide the possibility of data collaboration across photovoltaic power stations, and thus alleviate the problem of insufficient historical data of the power station itself. From the perspective of power system operators, more accurate photovoltaic power prediction results can be obtained through the IGA-LSTM prediction model, which is conducive to the designation of scheduling plans, enhances the stability of the power system, reduces the number of hot standby units, thereby saving maintenance expenses and improving economic benefits. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 It is a simplified flow chart of the present invention.
[0056] Figure 2 It is a flow chart of the present invention.
[0057] Figure 3 Schematic diagram of the modules of the system of the present invention. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0059] like Figure 3 As shown, the present invention proposes a photovoltaic power prediction system based on IGA-LSTM with differential privacy protection, including: a data collection module, a differential privacy processing module, a data processing module, an IGA-LSTM optimization module, and a prediction result output module. Among them, the data collection module uses an edge device to collect photovoltaic data to form a data set X.
[0060] The differential privacy processing module is used to perform privacy processing on the data set to obtain the data set X'.
[0061] The data processing module includes a data normalization unit and a denormalization unit. The data normalization unit performs maximum and minimum normalization on the privacy-protected data, scales the data set to the interval [0,1], reduces the dimensional impact between different features, and obtains the data set X'. The data denormalization unit performs denormalization on the prediction result Y, restores it to the actual range of the original data, and obtains the final photovoltaic power prediction result Y'.
[0062] In the IGA-LSTM optimization module, the IGA algorithm is used to optimize the LSTM network learning rate and the number of neuron layers to obtain the optimal LSTM prediction model;
[0063] The LSTM prediction module stores the optimal LSTM prediction model, and uses the optimal LSTM prediction model to predict the data set X" after the maximum and minimum normalization processing to obtain the prediction result Y;
[0064] The prediction result output module outputs the prediction result Y' after denormalization.
[0065] A photovoltaic power generation prediction method based on IGA-LSTM with differential privacy protection includes the following steps:
[0066] S1: Use the data collection module to collect photovoltaic data from photovoltaic power plants and obtain the photovoltaic raw data set X. The types of data that edge devices can collect are very rich, covering photovoltaic equipment, environment, meteorology, images, historical records and other aspects.
[0067] In this embodiment, the edge device can also store and process historical data for subsequent model training and prediction, including historical power generation data (actual power) and historical environmental data (total radiation, direct radiation, scattered radiation, temperature, air pressure, humidity), etc.
[0068] S2: The original data set X is input into the differential privacy processing module, and the original data set X is privacy-processed to obtain the data set X'.
[0069] In this embodiment, in S2, the initial data input into the differential privacy processing module is the data set X, and privacy processing is performed in the differential privacy processing module based on the privacy budget ε obtained based on the expected empirical value, the privacy leakage probability δ, and the noise mechanism determined to be Gaussian Mechanism.
[0070] Furthermore, differential privacy is used in S2 to perform privacy processing on the dataset X to obtain the dataset X'. The principle of ε-differential privacy can be expressed as follows:
[0071] P r [A(X1)∈X']≤e ε ·P r [A(X2)∈X'] (1)
[0072] Where ε is the privacy budget, which is used to characterize the sensitivity and privacy level, and ε also determines the degree of noise addition; X1 and X2 are any two adjacent data subsets in X, and adjacent means that the data points in the two data subsets are extremely similar, P r represents the event probability, A is any data processing algorithm applied to the data subset, X' is the output privacy data set, and ε-differential privacy can control the probability of obtaining the same output result after applying algorithm A on data sets X1 and X2 respectively.
[0073] Δf=max||A(X1)-A(X2)||2 (2)
[0074] Here, let Δf be the sensitivity between the data processing results A(X1) and A(X2). Differential privacy ensures that even if there is only a slight change in one data point between the input data sets X1 and X2, the output results will not be much different, thereby preventing the leakage of information about individual data points.
[0075] The Gaussian mechanism is one of the common mechanisms for introducing noise in differential privacy. It is applicable to real-valued functions, statistical queries in machine learning, etc. The query result is the perturbed original query result. x is the independent noise value added by the Gaussian mechanism, sampled from the Gaussian distribution, and σ is the standard deviation of the Gaussian distribution, which determines the amplitude of the noise. The probability density function (PDF) of the noise x introduced in the Gaussian mechanism is based on the normal distribution N(0,σ 2 ), the following formula f(x) describes the probability density function of the noise x.
[0076]
[0077] Among them, δ is the probability of privacy leakage.
[0078] Add Gaussian noise N(0,σ) to the data in the data set X based on the probability density function of noise x. 2 ), complete the privacy processing, and obtain the data set X'. For the privacy-processed data set X', when we need to query the corresponding data from the data set X', we can use the query function q, and the query result is expressed as q(x)+N(0,σ 2 ).
[0079] S3: Input the data set X' into the data normalization unit, normalize the user's original data set, adopt the maximum and minimum normalization method used in the literature [1], and then aggregate the processed data into the data set X".
[0080] [1]Huang W.Enhancing stock market prediction through LSTM modeling and analysis[C] / / ICIDC 2023:Proceedings of the 2nd International Conference on Information Economy,Data Modeling and Cloud Computing,ICIDC 2023,June 2–4,2023,Nanchang,China.EuropeanAllianceforInnovation,2023:487.
[0081] S4: Divide the data set X' into training set X1' and test set X2' in a ratio of 70%:30%. Input the training set X1' into the IGA-LSTM optimization module, and use the IGA algorithm to optimize the LSTM network learning rate and the number of neuron layers to obtain the optimal LSTM prediction model. The specific steps are as follows:
[0082] S4.1: Encode the learning rate and number of neuron layers of the LSTM model to form individuals of the genetic algorithm.
[0083] S4.2: Randomly generate N individuals to form an initial population.
[0084] S4.3: For each individual in the population, train an LSTM prediction model using its corresponding learning rate and neuron parameters.
[0085] S4.4: Calculate the fitness value based on the mean square error (MSE) of the prediction performance. When the number of samples is n, the actual value of the i-th is y i , the i-th predicted value is Y i ', the expression of mean square error MSE can be obtained as:
[0086]
[0087] Thus, the expression of the fitness function f is obtained as follows:
[0088]
[0089] S4.5: Execute the selection operation and use the roulette wheel selection method to select individuals with higher fitness values from the current population to enter the next generation. The roulette wheel selection method can refer to "Chen Wenyi, Li Qi. An improved genetic algorithm based on roulette wheel selection [J]. Fujian Computer, 2016, 32(5): 50-51.".
[0090] The roulette wheel selection method first needs to calculate the fitness f of n individuals in the population i The sum of is expressed as:
[0091]
[0092] For each individual, the selection probability is equal to the fitness of the individual divided by the total fitness, expressed as:
[0093]
[0094] A cumulative probability is calculated for each individual to construct the roulette wheel. The cumulative probability represents the sum of the selection probabilities of the first i individuals. The formula is as follows:
[0095]
[0096] Among them, j is a loop variable that traverses the first i individuals.
[0097] Generate a uniformly distributed random number r in the interval [0, 1] and find the smallest k such that c k ≥r. According to the cumulative probability distribution, find the first individual whose cumulative fitness value is greater than or equal to the generated random number. This individual will be selected to participate in the reproduction of the next generation. After each selection, the individual is removed from the population to ensure that each individual can only be selected once.
[0098] S4.6: Perform a crossover operation to exchange the learning rate and number of neuron layers of the selected individuals according to the preset crossover probability to generate new individuals.
[0099] S4.7: Perform mutation operations and dynamically adjust the mutation probability according to the evolution of the algorithm. The exponential decay method is used to adjust the mutation rate. The mutation rate gradually decreases with the increase of generations, and the decrease is smoother. In the early stage of the algorithm, the mutation rate is high, which can better explore the solution space and avoid falling into the local optimum. As the number of iterations increases, the mutation rate gradually decreases, and the algorithm is more inclined to local search and fine optimization of solutions. The formula is as follows:
[0100] P m (t) = P mo ·e -kt (10)
[0101] Where P m (t) is the mutation rate of the tth generation, P m0 is the initial mutation rate (0.5), k is the decay coefficient, which controls the speed at which the mutation rate decreases (0.1), and t is the current number of iterations (generations).
[0102] S4.8: Keep the individual with the highest fitness value in the current population to the next generation, add the new individuals generated after crossover and mutation to the population, and form a new population;
[0103] S4.9: Repeat the above steps. When the fitness value of the population no longer changes significantly and tends to converge, terminate the improved genetic algorithm.
[0104] S4.10: Extract the individual with the highest fitness value from the final population and perform decoding operation on it. The corresponding learning rate and number of neuron layers are the optimal parameters of the LSTM network. Retrain the LSTM model to obtain the optimal LSTM prediction model.
[0105] The above-trained optimal LSTM prediction model is tested using the test set "X2" to verify the reliability of the optimal LSTM prediction model.
[0106] S5: Use the optimal LSTM prediction model to predict the photovoltaic power generation and obtain the prediction result Y.
[0107] S6: Input the prediction result Y into the data denormalization unit, using the denormalization method of maximum and minimum. [3] , and obtain the final photovoltaic power prediction value Y'. For the inverse maximum and minimum normalization processing, please refer to "Wang Daiying. Research on stock price prediction based on LSTM and GRU[J]. E-Commerce Letters, 2024, 13: 3203."
[0108] S7: The prediction result output module outputs the photovoltaic prediction result Y'.
[0109] The above embodiments are only used to illustrate the design ideas and features of the present invention, and their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The protection scope of the present invention is not limited to the above embodiments. Therefore, any equivalent changes or modifications made based on the principles and design ideas disclosed by the present invention are within the protection scope of the present invention.
Claims
1. A photovoltaic power generation prediction method based on IGA-LSTM with differential privacy protection, characterized in that: The following steps are involved: S1: Collect photovoltaic data to obtain the original photovoltaic data set X; S2: Perform privacy processing on the original data set X to obtain data set X'; S3: Perform data normalization on the data set X' to obtain the data set X". S4: Use the IGA algorithm to optimize the LSTM network learning rate and the number of neuron layers to obtain the optimal LSTM prediction model; S5: Input the normalized data set X' into the optimal LSTM prediction model to predict the photovoltaic power generation and obtain the prediction result Y; S6: Denormalize the prediction result Y to obtain the final photovoltaic power prediction value Y'.
2. According to claim 1, a photovoltaic power prediction method based on IGA-LSTM with differential privacy protection is characterized in that: Privacy processing is performed based on the privacy budget ε, privacy leakage probability δ and Gaussian mechanism.
3. The photovoltaic power generation prediction method based on IGA-LSTM with differential privacy protection according to claim 1 is characterized in that: Data normalization uses maximum and minimum normalization.
4. The photovoltaic power generation prediction method based on IGA-LSTM with differential privacy protection according to claim 1 is characterized in that: The steps of S4 are as follows: S4.1: Encode the learning rate and number of neuron layers of the LSTM model to form individuals of the genetic algorithm; S4.2: Randomly generate multiple individuals to form an initial population; S4.3: For each individual in the population, train an LSTM prediction model using its corresponding learning rate and neuron parameters; S4.4: Calculate the fitness value based on the prediction performance mean square error MSE, and use the inverse of the mean square error MSE as the fitness function: Where n is the number of samples, y i is the ith actual value, Y i ' is the i-th predicted value; S4.5: Roulette wheel selection method is used to select individuals from the current population to enter the next generation based on fitness values; S4.6: For the selected individuals, the learning rate and the number of neuron layers are exchanged according to the preset crossover probability, and a crossover operation is performed to generate a new individual; S4.7: Perform mutation operations on individuals generated by crossover, dynamically adjust the mutation probability according to the evolution process of the algorithm, and use exponential decay to adjust the mutation rate; S4.8: The individual with the highest fitness value in the current population is directly retained to the next generation, and the new individuals generated after crossover and mutation are added to the population to form a new population; S4.9: When the population fitness value no longer changes significantly and tends to converge, terminate; S4.10: Extract the individual with the highest fitness value from the final population and decode it. The corresponding learning rate and number of neuron layers are the optimal parameters of the LSTM network. Retrain the LSTM model to obtain the optimal LSTM prediction model.
5. The photovoltaic power generation prediction method based on IGA-LSTM with differential privacy protection according to claim 4 is characterized in that: The process of selecting an operation in S4.5 is as follows: Calculate the sum of all individual fitness in the population, recorded as: The selection probability of each individual is recorded as: Calculate a cumulative probability for each individual to construct the roulette wheel. The cumulative probability is recorded as: Generate a random number r and find the smallest k that makes c k ≥r; According to the cumulative probability distribution, find the first individual whose cumulative fitness value is greater than or equal to the generated random number; This individual will be selected to participate in the reproduction of the next generation, and after each selection, the individual is removed from the population to ensure that each individual can only be selected once.
6. The photovoltaic power generation prediction method based on IGA-LSTM with differential privacy protection according to claim 4 is characterized in that: The process of mutation operation in S4.7 is as follows: Exponential decay is used to adjust the mutation rate, and the mutation rate gradually decreases with the increase of generations; the mutation rate formula is as follows: P m (t)=P mo ·e -kt Where P m (t) is the mutation rate of the tth generation, P m0 is the initial mutation rate, k is the attenuation coefficient, which controls the speed at which the mutation rate decreases, and t is the current number of iterations.
7. The photovoltaic power generation prediction method based on IGA-LSTM with differential privacy protection according to claim 1 is characterized in that: In S7, the prediction result Y is processed by inverse maximum and minimum normalization to obtain the final prediction result Y'.
8. The photovoltaic power generation prediction method based on IGA-LSTM with differential privacy protection according to claim 1 is characterized in that: Photovoltaic data include global radiation, direct radiation, diffuse radiation, air temperature, air pressure, humidity and actual power.
9. A photovoltaic power generation prediction system based on IGA-LSTM with differential privacy protection, characterized in that: A photovoltaic power generation power prediction method based on IGA-LSTM with differential privacy protection according to claim 1 is implemented, and the system includes: a data collection module, a differential privacy processing module, a data processing module, an IGA-LSTM optimization module, an LSTM prediction module, and a prediction result output module; The data collection module is used to collect photovoltaic data to form a data set X; The differential privacy processing module is used to perform privacy processing on the data set to obtain the data set X'; The data processing module includes a data normalization unit and a denormalization unit; the data normalization unit performs a maximum and minimum normalization process on the privacy-processed data to obtain a data set X'; the data denormalization unit performs a demaximal and minimum normalization process on the prediction result Y to obtain a final photovoltaic power prediction result Y'; In the IGA-LSTM optimization module, the IGA algorithm is used to optimize the LSTM network learning rate and the number of neuron layers to obtain the optimal LSTM prediction model; The LSTM prediction module stores the optimal LSTM prediction model, and uses the optimal LSTM prediction model to predict the data set X" after the maximum and minimum normalization processing to obtain the prediction result Y; The prediction result output module outputs the prediction result Y' after denormalization.
10. The photovoltaic power generation prediction system based on IGA-LSTM with differential privacy protection according to claim 9, characterized in that: The data collection module adopts edge devices.
Citation Information
Cited By
Multi-dimensional time sequence photovoltaic power prediction method based on GA-LSTM
CN120181340A
Photovoltaic power generation power prediction method based on dynamic differential privacy federated learning
CN121749153A