Wind power output prediction method and device
In the aggregation process of wind power-related data, a personalized federal learning model based on homomorphic encryption is used to solve the problems of privacy security and data heterogeneity in wind power output prediction, and high-precision wind power output prediction and model security and privacy protection are achieved.
Patent Information
- Application Number
- CN202311840718.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2025-03-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the aggregation of wind power-related data, how to achieve high-precision wind power output prediction while ensuring privacy and security, especially when the data structures have known attack risks and data heterogeneity.
A personalized federated learning model based on homomorphic encryption is adopted. By selecting multiple wind power-related data providers as clients, the encrypted global model parameters are downloaded, iterative cycle training and encryption and decryption of model parameters are carried out to ensure the security and privacy of the model, and the global model parameters are generated by aggregating local model parameters for wind power output prediction.
Without losing model training accuracy, ensure the security and privacy of the shared model, improve efficiency, provide privacy protection for clients, and achieve high-precision wind power output prediction.
Smart Images

Figure CN119624695A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and in particular to a method and device for predicting wind power output. Background Art
[0002] Energy data involves data from different fields such as electricity, coal, and oil. The common problem is that energy institutions regard their own data as strategic resources, enterprises are unwilling to share and trade data, and energy data remains within the owner. Some energy data (such as wind power-related data) are sensitive and involve user personal secrets, commercial secrets, and system security. Data sharing may be subject to legal risks, and data sharing has certain obstacles. The data interfaces of energy data owners are not unified, and data from different institutions are difficult to integrate and interoperate, which seriously hinders data openness and sharing and causes energy data to be separated from each other. Unwilling to share, dare not share, and cannot share, resulting in massive data scattered in many energy data institutions and information systems, forming "information islands" and "data chimneys", and unable to give full play to the intrinsic value of energy data elements. Privacy computing technology has opened up a new model for energy data enterprise collaboration. Compared with traditional data collaboration methods, privacy computing can make energy data available but invisible, while protecting data privacy and security, creating a better data environment for data and knowledge value discovery such as machine learning. Specifically, the decentralized storage of privacy computing can break through the limitations of centralized data storage, break data islands, and promote the circulation of data elements. Moreover, in the process of data circulation, plaintext information is not leaked. Through secure multi-party computing and other technical means, secure analysis and calculation are realized, and user data output and sharing are driven, which promotes data circulation between enterprises and maximizes the release of data value. However, privacy computing, as a method and technology involving the cross-integration and derivation of multiple disciplines such as cryptography, number theory, game theory and computer science, has certain difficulties in the practical application of new power systems.
[0003] In recent years, federated learning has been widely used in various industries as an important technical means in privacy computing. Using federated learning to solve the problem of industry data islands can promote the advancement of science and technology and promote the development of productivity. In the federated learning framework system, participating clients will be assigned three different roles, namely the input party with original data, the calculation party that builds the model, and the result party that can query the model. However, in federated learning, although only the model information is shared with other clients, if the data structure is known, the attacker can use the model parameters to master the training data and obtain additional information through analysis and reconstruction. Therefore, it is necessary to add privacy protection technology to federated learning.
[0004] Homomorphic encryption, as a cryptographic technology, has become a common means of privacy protection in federated learning. This technology can calculate encrypted data without decryption to protect user privacy. Due to the inconsistent installation time of energy data-related equipment in the wind farm area, some users have less data than other users / the amount of data is missing in some periods; the power collection time intervals of each user may be different, and the data held is unbalanced and insufficient; at the same time, the energy consumption habits of users vary greatly, and the wind power-related data held by each discrete distributed user is often not independent and identically distributed, and the personalized characteristics of the different distribution of wind power-related data of each user cannot be ignored. At the same time, over-emphasizing individual characteristics will lead to slow model convergence and low performance. Summary of the invention
[0005] In view of the above analysis, an embodiment of the present invention aims to provide a wind power output prediction method and device to solve the problem of how to achieve high-precision wind power output prediction through data aggregation while ensuring privacy and security, considering the value generated by the aggregation of wind power-related data.
[0006] On the one hand, an embodiment of the present invention provides a wind power output prediction method, comprising: selecting multiple wind power related data suppliers through a wind power output prediction center, and setting them as clients participating in neural network model training, wherein the multiple wind power related data suppliers collect wind power related data and preprocess the wind power related data; downloading encrypted global model parameters from a central server through the client, and repeatedly performing the following iterative loop steps: decrypting the encrypted global model parameters using a private key; generating a neural network model based on the decrypted global model parameters, and then training the neural network model based on the preprocessed wind power related data; updating and encrypting local model parameters of the neural network model, and then uploading the encrypted local model parameters to the wind power output prediction center; aggregating local model parameters from all clients through the wind power output prediction center to generate aggregated global model parameters, and when the convergence condition is not met, sending the encrypted global model parameters to each client and repeating the loop step, otherwise stopping the loop step; and generating an updated global neural network model using the global model parameters and using the updated global neural network model to predict wind power output in real time.
[0007] The beneficial effects of the above technical solution are as follows: During the wind power output prediction process, the personalized federated learning model based on homomorphic encryption uses homomorphic encryption technology to encrypt the training model shared by the client, which can ensure the security and privacy of the shared model without losing the model training accuracy, improve efficiency, and provide privacy protection for the client.
[0008] Based on the further improvement of the above method, the multiple wind power related data suppliers collecting wind power related data also includes: the wind power output prediction center selects the multiple wind power related data suppliers as multiple clients according to data requirements, and the multiple clients collect wind power related data sets A={A 1 ,A 2 ,…,A n}, where n represents the number of all clients, A i Represents the dataset A of the i-th client i ={a 1 ,a 2 ,…,a m}, m represents the dimension of wind power related data set, a 1 , a 2 , …, a m Indicates each parameter information corresponding to the entire data set of the client; a jt Indicates the value of the jth parameter information at the tth sampling time, where T is the total duration of data collection:
[0009] a j ={a j0 ,a j1 ,…,a jt ,…,a jT}.
[0010] Based on the further improvement of the above method, the preprocessing of the wind power related data includes: data filling, abnormal data processing, data normalization processing and feature correlation analysis, wherein the data filling is to construct multiple replacement values for all missing values using the mice function; the with function is used to perform statistical analysis on each random data set sample; finally, the pool function is used to integrate the statistical analysis results, and the analysis results of each data set are combined to obtain the final statistical estimate; the abnormal data processing is to input the interpolated wind power related data into the Savitzky-Golay filter, and perform k-order polynomial fitting on the local interval of the data through least squares convolution to achieve denoising; the data normalization processing is to normalize the denoised wind power related data through the following formula:
[0011]
[0012] Wherein, x is the original numerical data; and the feature correlation analysis is to screen the normalized wind power related data according to the Pearson coefficient, wherein the wind power related data whose Pearson coefficient is greater than the threshold is selected as the input data:
[0013]
[0014] in, is the mean value of variable x, is the mean value of the variable y.
[0015] Based on the further improvement of the above method, before the client downloads the encrypted model parameters from the central server, it also includes: the central server generates a public key and a private key based on the Pallier homomorphic encryption algorithm; encrypts the public key and the private key to generate a first ciphertext and sends the first ciphertext to all clients; and initializes the global model parameters and encrypts the global model parameters through the wind power output prediction center, and sends the encrypted global model parameters to all clients.
[0016] Based on the further improvement of the above method, the central server generates a public key and a private key based on the Pallier homomorphic encryption algorithm, including: let the public key be (n, g), and the corresponding private key (λ, μ) be:
[0017] λ=lcm(p-1,q-1);
[0018] μ=(L(g λ modn 2 )) -1 modn;
[0019] Where n is the length of the public key, the order of g is a multiple of n, p and q are two randomly generated prime numbers that satisfy gcd(pq,(p-1)(q-1))=1, gcd() represents the greatest common divisor calculation formula, n=pq, lcm() represents the least common multiple calculation formula, L(g λ modn 2 )=(g λ modn 2 -1) / n.
[0020] Based on the further improvement of the above method, the public key encryption process is expressed by the following formula to generate the ciphertext c:
[0021] c=(g m ·r n )modn 2 ;
[0022] The following formula is used to decrypt the ciphertext c using the private key to generate the plaintext m:
[0023] m=L(c λ modn 2 )·μmodn,
[0024] Among them, the ciphertext and plaintext are c<n 2 and m<n, choose a random number r<n, For n 2 Coprime and less than n 2 The multiplicative group of natural numbers.
[0025] Based on the further improvement of the above method, when the encrypted local model parameters transmitted by the client are [W i ], the logarithmic loss function is expressed by the following formula:
[0026]
[0027] For any function f(θ), the Taylor expansion at θ=0 is:
[0028]
[0029] When the logarithmic loss function f(θ) = log(1+e -θ )The Taylor expansion expression at θ = 0 is:
[0030]
[0031] Use a second-order polynomial to approximate the logarithmic loss function, and set θ = [W i ] T Substitute x into the above formula and we get:
[0032]
[0033] Taking the derivative of the above formula, we get the loss function with respect to the local model parameters [W i The encrypted gradient value of ] is:
[0034]
[0035] Based on the further improvement of the above method, the wind power output prediction center aggregates the local model parameters from all clients to generate the aggregated global model parameters, including: the client updates the local model parameters W i After being sent to the wind power output prediction center, the wind power output prediction center verifies and decrypts each local model parameter through an anonymous public key, where the local model parameter W trained by each client is expressed by the following formula:
[0036] W={W 1 ,W 2 ,…,W i ,…,W n};
[0037] Among them, W iThe local model parameters trained by client i are: after verification, the local model parameters in plain text are aggregated to obtain the global model parameters, and the global model parameters are used to update the global training model, wherein the global model parameters are calculated by the following formula:
[0038]
[0039] in, represents the global model parameters obtained by weighted aggregation method, m i The number of categories to which each client belongs.
[0040] Based on the further improvement of the above method, the convergence condition includes the current stage data product value P t Greater than the value threshold P y Or the current iteration round reaches iteration round R, where
[0041] P t ≥P y ;
[0042] The comprehensive value P of the data is expressed as:
[0043] P=αP c +(1-α)P s ;
[0044] P c =TC×a×b;
[0045]
[0046] Among them, α is the data cost value weight, P c is the cost value of wind power related data, P s is the revenue value of wind power related data, a is the quality coefficient, b is the circulation coefficient, q, q k ,q g are the total data volume of data products, the amount of open data, and the amount of shared data, μ k , μ g are the diffusion coefficients of open data and shared data respectively; TC is the total cost of data products.
[0047] On the other hand, an embodiment of the present invention provides a wind power output prediction device, including: a selection module, used to select multiple wind power related data suppliers through a wind power output prediction center, and set them as clients participating in the training of a neural network model, wherein the multiple wind power related data suppliers collect wind power related data and pre-process the wind power related data; a download module, which downloads the encrypted global model parameters from the central server through the client; an iterative loop module, which is used to repeatedly execute the following iterative loop steps: a decryption module, which is used to decrypt the encrypted global model parameters using a private key; a model generation and training module, which is used to generate a neural network model based on the decrypted global model parameters, based on the pre-processed The neural network model is trained with wind power related data; a parameter updating module is used to update the local model parameters of the neural network model; an uploading module is used to upload the updated local model parameters to the wind power output prediction center; an aggregation module is used to aggregate the local model parameters from all clients through the wind power output prediction center to generate aggregated global model parameters; and a judgment module is used to send the encrypted global model parameters to each client and repeat the loop steps when the convergence conditions are not met, otherwise stop the loop steps; a prediction module is used to generate an updated global neural network model using the global model parameters and use the updated global neural network model to predict wind power output in real time.
[0048] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:
[0049] 1. According to the wind power output prediction method of the embodiment of the present invention, in federated learning, sharing model information can obtain a better model than training a single client, but at the same time, attention should be paid to protecting personal information hidden in the parameters, and considering the data heterogeneity and individual characteristics of each client. The federated learning privacy protection model based on homomorphic encryption fills the gap in the privacy protection of wind power-related data in homomorphic encryption in federated learning, which is of great significance for solving the contradiction between federated learning privacy protection and data application.
[0050] 2. In the process of wind power output prediction, the personalized federated learning model based on homomorphic encryption uses homomorphic encryption technology to encrypt the training model shared by the client. It can ensure the security and privacy of the shared model without losing the accuracy of model training, improve efficiency, and provide privacy protection for the client.
[0051] 3. On the basis of traditional federated learning, the individual characteristics of each client are considered, and a personalized federated learning algorithm is adopted. The value generated by the aggregation of wind power-related data is considered, the asset value of the data is accurately estimated, and data-related platform services and technical tool services are provided on the entire value chain. Through data-driven, it is conducive to enterprises to improve decision-making efficiency and production efficiency, as well as the ability of enterprises to evaluate the value of wind power-related data assets and the economy of enterprises in big data transactions and big data investments, thereby improving the efficiency of wind power-related data aggregation.
[0052] In the present invention, the above-mentioned technical solutions can also be combined with each other to achieve more preferred combination solutions. Other features and advantages of the present invention will be described in the subsequent description, and some advantages can become obvious from the description, or can be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The drawings are only for the purpose of illustrating particular embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like components throughout the drawings.
[0054] Figure 1 is a flow chart of a method for predicting wind power output according to an embodiment of the present invention;
[0055] Figure 2 A specific flow chart of a wind power output prediction method based on homomorphic encryption and personalized federated learning according to an embodiment of the present invention;
[0056] Figure 3 is a schematic diagram of multiple interpolation according to an embodiment of the present invention;
[0057] Figure 4 A data training structure diagram according to an embodiment of the present invention;
[0058] Figure 5 A GRU network structure diagram according to an embodiment of the present invention;
[0059] Figure 6 A schematic diagram of a multi-layer structure of a GRU network according to an embodiment of the present invention;
[0060] Figure 7 The wind power related data value chain according to an embodiment of the present invention. DETAILED DESCRIPTION
[0061] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.
[0062] refer to Figure 1 A specific embodiment of the present invention discloses a method for predicting wind power output, comprising: in step S101, selecting multiple wind power related data suppliers through a wind power output prediction center and setting them as clients participating in neural network model training, wherein the multiple wind power related data suppliers collect wind power related data and pre-process the wind power related data; in step S102, downloading the encrypted global model parameters from the central server through the client, and repeatedly performing the following iterative cycle steps: in step S1021, decrypting the encrypted global model parameters using a private key; in step S1022, generating a neural network model based on the decrypted global model parameters, and then generating a neural network model based on the pre-processed global model parameters. In step S1023, the local model parameters of the neural network model are updated and encrypted, and then the encrypted local model parameters are uploaded to the wind power output prediction center; and in step S1024, the local model parameters from all clients are aggregated by the wind power output prediction center to generate aggregated global model parameters, and when the convergence condition is not met, the encrypted global model parameters are sent to each client and the loop step is repeated, otherwise the loop step is stopped; and in step S103, an updated global neural network model is generated using the global model parameters and the updated global neural network model is used to predict wind power output in real time.
[0063] Compared with the prior art, the wind power output prediction method provided in this embodiment uses homomorphic encryption technology to encrypt the training model shared by the client based on the personalized federated learning model based on homomorphic encryption during the model training process. It can ensure the security and privacy of the shared model without losing the model training accuracy, improve efficiency, and provide privacy protection for the client in the wind power output prediction process.
[0064] In the following, reference will be made to Figure 1 Each step of the wind power output prediction method according to an embodiment of the present invention is described in detail.
[0065] In step S101, a plurality of wind power related data suppliers are selected through the wind power output prediction center and set as clients participating in the training of the neural network model, wherein the plurality of wind power related data suppliers collect wind power related data and pre-process the wind power related data. Specifically, the regional wind power output prediction center negotiates with each wind farm client to collect relevant data.
[0066] Wind power related data may include information such as the altitude of the wind farm's location, wind speed, and air humidity.
[0067] The multiple wind power related data suppliers collecting wind power related data also includes: the wind power output prediction center selects multiple wind power related data suppliers as multiple clients according to data requirements, and the multiple clients collect wind power related data sets A={A 1 ,A 2 ,…,A n}, where n represents the number of all clients, A i Represents the dataset A of the i-th client i ={a 1 ,a 2 ,…,a m}, m represents the dimension or number of wind power related data sets, a 1 , a 2 , …, a m Indicates each parameter information corresponding to the entire data set of the client, which corresponds to the information required to predict wind power output, including altitude, wind speed, air humidity, etc.; a jt Indicates the value of the jth parameter information at the tth sampling time, where T is the total duration of data collection:
[0068] a j ={a j0 ,a j1 ,…,a jt ,…,a jT}.
[0069] Preprocessing of wind power related data includes data filling, abnormal data processing, data normalization and feature correlation analysis. Data filling is to construct multiple replacement values for all missing values using the mice function; statistical analysis is performed on each random data set sample using the with function; finally, the statistical analysis results are integrated using the pool function, and the final statistical estimate is obtained by combining the analysis results of each data set. Abnormal data processing is to input the interpolated wind power related data into the Savitzky-Golay filter, and perform k-order polynomial fitting on the local interval of the data through least squares convolution to achieve denoising. Data normalization is to normalize the denoised wind power related data using the following formula:
[0070]
[0071] Among them, x is the original numerical data. The feature correlation analysis is to screen the normalized wind power related data according to the Pearson coefficient, wherein the wind power related data with a Pearson coefficient greater than the threshold is selected as the input data:
[0072]
[0073] in, is the mean value of variable x, is the mean value of the variable y.
[0074] Before downloading the encrypted model parameters from the central server through the client, it also includes: the central server generates a public key and a private key based on the Pallier homomorphic encryption algorithm; encrypts the public key and the private key to generate a first ciphertext and sends the first ciphertext to all clients; and initializes the global model parameters through the wind power output prediction center and encrypts the global model parameters, and sends the encrypted global model parameters to all clients.
[0075] The central server generates public and private keys based on the Pallier homomorphic encryption algorithm: Let the public key be (n, g), and the corresponding private key (λ, μ) be:
[0076] λ=lcm(p-1,q-1);
[0077] μ=(L(g λ modn 2 )) -1 modn;
[0078] Where n is the length of the public key, the order of g is a multiple of n, p and q are two randomly generated prime numbers that satisfy gcd(pq,(p-1)(q-1))=1, gcd() represents the greatest common divisor calculation formula, n=pq, lcm() represents the least common multiple calculation formula, L(g λ modn 2 )=(g λ modn 2 -1) / n.
[0079] When the encrypted local model parameters transmitted by the client are [W i ], the logarithmic loss function is expressed by the following formula:
[0080]
[0081] For any function f(θ), the Taylor expansion at θ=0 is:
[0082]
[0083] When the logarithmic loss function f(θ) = log(1+e -θ )The Taylor expansion expression at θ = 0 is:
[0084]
[0085] Use a second-order polynomial to approximate the logarithmic loss function, and set θ = [W i ] T Substitute x into the above formula and we get:
[0086]
[0087] Taking the derivative of the above formula, we get the loss function with respect to the local model parameters [W i The encrypted gradient value of ] is:
[0088]
[0089] In step S102, the client downloads the encrypted global model parameters from the central server, and repeatedly performs the following iterative cycle steps:
[0090] In step S1021 , the encrypted global model parameters are decrypted using the private key.
[0091] Specifically, the following formula is used to decrypt the ciphertext c using the private key to generate the plaintext m:
[0092]
[0093] Among them, the ciphertext and plaintext are c<n 2 and m<n, choose a random number r<n, For n 2 Coprime and less than n 2 The multiplicative group of natural numbers.
[0094] In step S1022, a neural network model is generated based on the decrypted global model parameters, and then the neural network model is trained based on the preprocessed wind power related data. The neural network model is a GRU neural network.
[0095] In step S1023, the local model parameters of the neural network model are updated and encrypted, and then the encrypted local model parameters are uploaded to the wind power output prediction center.
[0096] Specifically, the public key encryption process is represented by the following formula to generate the ciphertext c:
[0097] c=(g m ·r n )modn 2 .
[0098] In step S1024, the local model parameters from all clients are aggregated by the wind power output prediction center to generate aggregated global model parameters, and the loop step is stopped when the convergence condition is met, otherwise the encrypted global model parameters are sent to each client and the loop step is repeated.
[0099] Specifically, the wind power output prediction center aggregates the local model parameters from all clients to generate the aggregated global model parameters, including: the client updates the local model parameters W i After being sent to the wind power output prediction center, the wind power output prediction center verifies and decrypts each local model parameter through an anonymous public key, where the local model parameter W trained by each client is expressed by the following formula:
[0100] W={W 1 ,W 2 ,…,W i ,…,W n};
[0101] Among them, W i The local model parameters trained for client i;
[0102] After verification, the local model parameters of each plaintext state are aggregated to obtain the global model parameters, and the global model parameters are used to update the global training model. The global model parameters are calculated by the following formula:
[0103]
[0104] in, represents the global model parameters obtained by weighted aggregation method, m i The number of categories that each client belongs to. For example, the data distribution of a client may be similar to multiple data distributions, and the number of categories is the number of other distributions that the client's data distribution is similar to.
[0105] Convergence conditions include the current stage data product value P t Greater than the value threshold P y Or the current iteration round reaches iteration round R, where
[0106] P t ≥P y ;
[0107] The comprehensive value P of the data is expressed as:
[0108] P=αP c +(1-α)P s ;
[0109] P c =TC×a×b;
[0110]
[0111] Among them, α is the data cost value weight, P c is the cost value of wind power related data, P sis the revenue value of wind power related data, a is the quality coefficient, b is the circulation coefficient, q, q k ,q g are the total data volume of data products, the amount of open data, and the amount of shared data, μ k , μ g are the diffusion coefficients of open data and shared data respectively; TC is the total cost of data products.
[0112] In step S103, an updated global neural network model is generated using the global model parameters and the updated global neural network model is used to predict wind power output in real time.
[0113] Another specific embodiment of the present invention discloses a wind power output prediction device, including: a selection module for selecting multiple wind power related data suppliers through a wind power output prediction center, and setting them as clients participating in the training of a neural network model, wherein the multiple wind power related data suppliers collect wind power related data and pre-process the wind power related data; a download module downloads the encrypted global model parameters from the central server through the client; an iterative loop module is used to repeatedly execute the following iterative loop steps: a decryption module is used to decrypt the encrypted global model parameters using a private key; a model generation and training module is used to generate a neural network model based on the decrypted global model parameters, based on the pre-processed The invention discloses a wind power prediction system comprising: a neural network model trained with wind power related data obtained after the prediction; a parameter updating module for updating local model parameters of the neural network model; an uploading module for uploading the updated local model parameters to a wind power output prediction center; an aggregation module for aggregating local model parameters from all clients through the wind power output prediction center to generate aggregated global model parameters; and a judgment module for sending the encrypted global model parameters to each client and repeating the loop steps when the convergence condition is not met, otherwise stopping the loop steps; and a prediction module for generating an updated global neural network model using the global model parameters and predicting wind power output in real time using the updated global neural network model.
[0114] In the following, reference Figures 2 to 7 , the wind power output prediction method according to an embodiment of the present invention is described in detail by way of specific examples.
[0115] refer to Figure 2 ,The wind power output prediction method based on homomorphic encryption and federated learning has the following main execution steps:
[0116] 1) The wind power output prediction center selects the corresponding wind power related data to provide users according to the data product requirements, and sets them as clients participating in the training. The data center sends the key to each client. If the data center wants to predict the output of wind farms in the entire region, it can select all wind farms in the region as training clients.
[0117] 2) The client downloads the encrypted model parameters from the server and then decrypts them using the private key (i.e., the two prime numbers used to generate the secret key are randomly generated, so that the client keys are different and the initial parameters are the same). Then the local model is trained and updated through the neural network model. Finally, the updated model parameters are encrypted and uploaded to the wind power prediction center.
[0118] 1) The wind power output prediction center aggregates the encrypted model parameters from all clients.
[0119] 2) The wind power output prediction center reaches the iteration until the convergence condition is met or the iteration T rounds are reached and stopped.
[0120] The specific implementation steps include: a. Data dimension determination, b. Data collection and preparation, c. Data preprocessing, and d. Data training model.
[0121] a. Data scope, source and classification: The main energy data requirements for wind farm output forecasting include: altitude information of the wind farm's location, wind speed information, air humidity and other information.
[0122] b. Data collection and preparation. The regional output prediction center negotiates with each wind farm client to collect relevant data based on data requirements. The data set is represented as A, where n represents the number of all clients; A i represents the dataset of the i-th client, m represents the dimension of the wind power related dataset, a 1 , a 2 , …, a m Indicates each parameter information corresponding to the entire data set of the client, including altitude, wind speed, air humidity and other information; a jt It represents the value of the j-th parameter information at the t-th sampling time, and T is the total duration of data collection.
[0123] A={A 1 ,A 2 ,…,A n} (1)
[0124] A 1 ={a 1 ,a 2 ,…,a m} (2)
[0125] a j ={a j0 ,a j1 ,…,a jt ,…,a jT} (3)
[0126] c. Data preprocessing. Missing or abnormal data in the collected data can easily interfere with model training, thereby affecting the accuracy of load forecasting. In addition, the indicators of different influencing factors have different dimensions and need to be dimensionless before they can be input into the model for analysis and prediction. Data preprocessing mainly includes data filling, abnormal data processing, data normalization processing and feature correlation analysis.
[0127] c1: data filling. Reference Figure 3 The basic idea of multiple imputation comes from Bayesian estimation, which is derived from single imputation. The mice function is used to interpolate data. Through multiple iterations and chain equations, multiple imputation is performed to construct several alternative values for all missing values to reflect the uncertainty of missing values, thereby generating several different complete data sets after interpolation. Then the with function applies a statistical model to perform statistical analysis on each random data set sample generated, providing a way to execute expressions in a specified environment. Finally, the pool function is used to integrate the statistical results (these three functions belong to a function in the R language), and the analysis results of each data set are combined to obtain the final statistical estimate.
[0128] c2: Abnormal data processing. In the process of collecting, transmitting and storing massive wind power related data, some abnormal data values such as large deviation data or default data may be generated due to equipment or human factors. These abnormal data will affect the results of data analysis and increase the error of training models.
[0129] The data is input into the Savitzky-Golay filter, and the k-order polynomial fitting is performed on the local interval of the data through least squares convolution to achieve denoising. The original data can be smoothed and denoised, and the high-frequency noise in the data can be improved. The outliers of the denoised data are significantly reduced. The formula for data denoising by the Savitzky-Golay filter is:
[0130]
[0131] Where: p t is the t-th smoothing value, w is the window size, C i is the coefficient of the weighting function, p t+i is the unfiltered value of time.
[0132] c3: Data normalization. After the data is normalized, it is input into the training model. This can not only prevent the impact of the dimension and order of magnitude differences between different types of data on the data processing results, but also prevent the "gradient explosion" phenomenon during the model training process, thus improving the effect of the data training model. For numerical data, the maximum-minimum method is used to normalize the data. The calculation formula is as follows:
[0133]
[0134] Among them, x is the original numerical data.
[0135] c4: Feature correlation analysis. The full value of wind power-related data aggregation and utilization is affected by many factors. Feature correlation analysis in the process of aggregating wind power-related data into products helps to ensure the quality, accuracy and practicality of the data. Feature correlation analysis helps to reveal the relationship between different features. In the aggregation process, the introduction of complete data features can ensure the comprehensiveness of the influencing factors of the training model input. However, in some scenarios, the introduction of too much data with less influence will affect the performance of the training model. For example, introducing redundant meteorological features with less influence factors in the prediction of new energy output and using them as input features of the model will lead to a complex model structure, which in turn leads to a lack of pertinence in the prediction model, thereby reducing the efficiency and accuracy of the model. Reasonable screening of wind power-related data features to reduce the complexity of input features can shorten the model training time to a certain extent while ensuring the retention of effective information.
[0136] The Pearson correlation coefficient is a dependency measurement function that is widely used to measure the linear correlation between input feature X and object Y. Its calculation method is shown in the formula:
[0137]
[0138] Where: is the mean value of variable x, is the average value of variable y. The larger the coefficient, the higher the correlation.
[0139] This paper screens wind power related data based on the Pearson coefficient. xy ≥0.8 or r xy When ≤-0.8, it indicates that the correlation between the two variables is stronger, and this data set is selected as the input data.
[0140] d. Data training model. In the process of model transmission in federated learning, model parameters will be exposed to the central server, and the global model parameters issued by the central server will also be obtained by each client. Attackers can launch reconstruction attacks to reversely infer the original data through shared parameters and obtain the user's private information. To address this problem, this technical solution proposes a privacy-preserving federated learning architecture based on Pallier homomorphic encryption technology, encrypts the model parameters of the intermediate process interaction, and thus realizes the privacy protection of the model parameters. At the same time, refer to Figure 4 ,In order to ensure the differences of each client, personalized ,federated learning is used for training.
[0141] Phase 1: Key generation and distribution. Homomorphic encryption refers to performing addition and multiplication operations on the plaintext in a ring before encryption, and the results are equivalent to performing corresponding operations on the ciphertext after encryption. Pallier homomorphic encryption is a partially homomorphic encryption method that satisfies additive homomorphism and consists of three phases: key generation, encryption, and decryption.
[0142] Generate keys: The prediction center initializes the model parameters and distributes the private key to each client. Let the public key be (n, g) and the corresponding private key be (λ, μ). n is the length of the public key, and the order of g is a multiple of n.
[0143] λ=lcm(p-1,q-1) (7)
[0144] μ=(L(g λ modn 2 )) -1 modn (8)
[0145] p and q are two randomly generated prime numbers, satisfying gcd(pq,(p-1)(q-1))=1, gcd represents the greatest common divisor calculation, n=pq, lcm represents the least common multiple calculation, L(g λ modn 2 )=(g λ modn 2 -1) / n.
[0146] Encryption: Let the ciphertext and plaintext be c<n 2 and m<n, choose a random number r<n, For n 2 Coprime and less than n 2 The multiplication group of natural numbers. The public key encryption process is:
[0147] c=(g m ·r n )modn 2 (9)
[0148] Decryption: Input the ciphertext c and use the private key to decrypt the ciphertext. The decryption process is:
[0149] m=L(c λ modn 2 )·μmodn (10)
[0150] Before each round of training begins, the central server completes the local public key PK based on the Pallier homomorphic encryption formula (7) and (8) EDC and private key SK EDC The generated public key PK C and private key SK CDelivered to each client.
[0151] The Paillier encryption algorithm only supports additive homomorphism and scalar multiplication homomorphism, but not multiplication homomorphism, let alone complex exponential and logarithmic operations, so it cannot be solved in an encrypted state. This technical solution uses a Taylor loss to approximate the original logarithmic loss method, that is, by performing Taylor expansion on the original logarithmic loss function, and approximating the logarithmic loss function through a polynomial. After Taylor expansion, the loss function is converted into operations of only scalar multiplication and addition, so that Paillier is used for encryption and solution.
[0152] Assume that the encryption parameter transmitted by the client is [W i ], the logarithmic loss function can be expressed as:
[0153]
[0154] For any function f(θ), the Taylor expansion at θ=0 is:
[0155]
[0156] When f(θ) is the logarithmic loss function, that is, f(θ) = log(1+e -θ )The Taylor expansion expression at θ = 0 is:
[0157]
[0158] This technical solution uses a second-order polynomial to approximate the logarithmic loss function, θ = [W i ] T Substitute x into the above formula and we get:
[0159]
[0160] Taking the derivative of the above formula, we get the loss function with respect to the parameter [W i The encrypted gradient value of ] is:
[0161]
[0162] After the key is generated, the wind power output prediction center calls the encryption module to encrypt the public key PK EDC and private key SK C Encryption is performed to obtain a first ciphertext KEY, and the first ciphertext KEY is sent to all clients participating in the training.
[0163] Phase 2: Model training.
[0164] When each client trains a local model, after the wind power output prediction center obtains the session key, the client uses the private key to decrypt the encrypted model parameters. Based on the GRU neural network, each client uses the local data set to train to obtain the local model parameters, and uses the private key to encrypt the local model parameters and then upload them to the wind power output prediction center. Figure 5 Compared with the LSTM neural network, the GRU neural network has made many simplifications, changing the input gate, forget gate, and output gate into two gates: the update gate z t and reset gate r t , and merge the (candidate) cell state with the hidden state (output), that is, only the candidate hidden state at the current moment and the current hidden state h t , while maintaining the same effect as LSTM.
[0165] Update gate z t Control the hidden state output h at the previous time t-1 t-1 and the hidden state input x at the current time t t How much flows into the hidden state h at the current time t t ,The larger the value of the update gate, the more information flows in;
[0166] Reset Gate t Control the hidden state output h at the previous time t-1 t-1 How many candidate hidden states flow into the current time t, The smaller the value of the reset gate, the less information flows in, which means more information has been forgotten.
[0167] The expressions of the relevant variables are as follows:
[0168] z t =σ(W z ·|h t-1 ,x t |+b z )=σ(W zh ·h t-1 +W zx ·x t +b z ) (16)
[0169] r t =σ(W r ·|h t-1 ,x t |+b r )=σ(W rh ·h t-1 +W rx ·x t +b r ) (17)
[0170]
[0171]
[0172] Where: σ, tanh activation function, W z , W r , W zh , W zx , W rh , W rx is the weight matrix, b z 、b r 、b h are the bias vectors for updating the gate, resetting the gate, and hiding the state, respectively, and ⊙ is element-wise multiplication.
[0173] During the training process, in order to enhance the adaptability of the model and improve the optimization effect of the aggregation algorithm, the adaptive RMSprop optimization algorithm is mainly adopted. The specific implementation steps are as follows:
[0174] Step 1: Initialize time step t = 0 and learning rate η 0 , state variable s 0 =0;
[0175] Step 2: Randomly initialize the wind power related data sequence x 0 , state variable hyperparameter γ∈(γ * ,1), penalty parameter θ∈(0,1), real constant ε∈(0,1);
[0176] Step 3: t=t+1, enter iterative loop steps 4 to 8;
[0177] Step 4: Calculate the stochastic gradient g of the updated wind power related data according to the following formula: t :
[0178]
[0179] Where: b i is a wind power related data sample, which consists of the training set sample index i; |b| is the number of wind power related data samples; is the stochastic gradient of the objective function The larger theta is, the larger the regularization penalty is.
[0180] Step 5: Update the stochastic gradient g from step 4 t Look at each element squared, and calculate the updated state variable s by equation (21) t :
[0181] s t =γs t-1 +(1-γ)g t ⊙gt (twenty one)
[0182] Where: ⊙ is the element-wise product operator.
[0183] Step 6: Use equation (22) to convert the state variable s t To make a deviation correction:
[0184]
[0185] Step 7: Adjust the objective function f(x) by equation (23) t-1 ) is the learning rate of each wind power related data element:
[0186]
[0187] Where: ε is a real constant added to maintain the stability of numerical elements.
[0188] Step 8: Update the data sequence x at time t using equation (24) t
[0189]
[0190] The loop is repeated until the maximum number of iterations is reached, and the optimal solution is output. The GRU neural network consists of one or more GRU layers, which are composed of multiple GRU units. t and c t The connection is achieved through transmission. To ensure the personalized features of each client and improve the prediction accuracy, all parameters in the GRU network will be updated once a round of training of each local model is completed. The calculated first and second layer model parameters are uploaded to the prediction center, where the third and fourth layers of the GRU network are used as personalized layers, which only perform model training and parameter updates locally and do not participate in the parameter aggregation of the central server. When and only when the central server completes the initialization and sends the model parameters, the personalized layer network parameters participate in the data exchange of the central server. The schematic diagram of the multi-layer structure of the GRU network is shown in the figure. Figure 6 shown.
[0191] The model parameter expressions trained by each client are as follows:
[0192] W={W 1 ,W 2 ,…,W i ,…,W n} (25)
[0193] Where: W i The trained local model parameters for client i.
[0194] The third stage is model aggregation.
[0195] The client will update the parameter W i After being sent to the wind power output prediction center, the wind power output prediction center verifies and decrypts the parameters of each local model through an anonymous public key, aggregates the local models in plain text, calculates the global parameters, and updates the global training model. The wind power output prediction center performs secure aggregation operations when the weight parameters of the client are unknown, while not leaking relevant information of the client, such as gradient information.
[0196] The gradient average aggregation is calculated as follows:
[0197]
[0198] W global Represents the global parameters obtained using the average aggregation method.
[0199] However, when the number of clients participating in the prediction is too large, the global parameters obtained after the average aggregation of parameters are very different from the parameters of each client, resulting in low convergence and poor performance. If the clients with the same data structure can be distinguished and the corresponding parameter weights with common characteristics are increased during the parameter aggregation process, the problem of global model failure caused by too many types of data distribution and large amount of calculation can be avoided. Since the federated learning data is not local, it is impossible to directly distinguish isomorphic customers by the customer data distribution distance, and calculating the customer model index is an effective alternative method. Mutual information is a method to measure the mutual dependence between two random variables, which can reflect the correlation between variables. The parameters in the model in federated learning are actually random variables that obey a specific data distribution. For a federated learning system with n clients, the number of non-repetitive data distributions of the entire federated learning client is denoted as M, and the corresponding data distribution is δ k , k∈[1,M], client A i The data distribution is δ i Therefore, the introduction of mutual information can effectively calculate the similarity of the model. For non-repeated data distribution δ k and the client model δ i , the mutual information similarity is:
[0200] M MI (δ i ; δ k )=H(δ i )+H(δ k )-H(δ i ; δ k ) (27)
[0201] Where: H(δ i )、H(δ k ) is the model entropy; H(δ i ; δ k ) is the joint entropy of the model.
[0202] Then for any data distribution δ k , let the client set belonging to this distribution be S k , then it satisfies:
[0203]
[0204] Where: n k belongs to the data distribution δ k The number of customers.
[0205] In fact, when there are multiple similar data distributions and these data distributions cannot be approximated to one data distribution, it is unreasonable to classify the client into one data distribution, because the client has a certain degree of correlation with this type of data distribution, and the client should belong to multiple data distributions, that is, the client belongs to multiple classes during clustering. This technical solution calculates the mutual information similarity of all clients. When M MI (θ i θ k )≤ε,δ i and δ k Can be approximated to the same data distribution, that is, belong to the same class S k ; When ε<M MI (θ i θ k )≤ε r When A i and A j It can be weakly approximated to the same data distribution, and the client can belong to multiple classes, where ε is the similarity threshold, ε r >ε is a given positive real number. Therefore, in this technical solution, for client A i , which may belong to S k Class, and may belong to S l Class, where S l belongs to the distribution δ l The client set, l∈[1,M]. For client A i , its data distribution characteristics may be similar to multiple distributions at the same time, and the sum of the categories to which each client belongs is m i , satisfying 1≤m i ≤M, then the parameter weighted aggregation calculation formula is:
[0206]
[0207] Where: Represents the global parameters obtained using the weighted aggregation method.
[0208] The prediction center obtains the pre-model, and then encrypts the model with a private key to calculate the global parameters. After receiving the updated global gradient, each client performs a decryption operation according to formula (10), loads the parameters to the local model, and performs model training on the local dataset.
[0209] The fourth stage is to judge the convergence of the model.
[0210] The traditional convergence condition of federated learning is: when the current iteration round reaches iteration round R, the training ends; otherwise, wait for the client to send the updated parameters of round t+1 for the next iteration.
[0211] However, in the process of processing wind power related data, we cannot only consider the iteration round, but also need to consider the value of wind power related data products obtained by the wind power output prediction center after aggregating the information of each client. When the value of wind power related data products reaches a certain threshold, the entire data processing process is completed. Therefore, when aggregating and training the model, the wind power output prediction center needs to evaluate the value of the current round of wind power related data products.
[0212] There are three main methods for data value assessment: cost method, income method and market method. The application of market method requires estimating the value by analyzing and comparing the differences between the data assets to be valued and the selected comparable data assets. Considering that the application of energy big data is currently in its infancy and lacks comparable data asset information, this article adopts a combination of cost method and income method.
[0213] The cost value information of wind power related data mainly includes data collection cost information, data processing cost information, data product R&D cost information, data product marketing cost information, and data product risk control cost information; evaluation information: quality coefficient, circulation coefficient.
[0214] refer to Figure 7 The realization of wind power-related data cost value mainly includes four links: data collection, data processing, data analysis and data application. Data collection mainly refers to the process of collecting, acquiring, extracting and converting structured data from various data sources. Data processing refers to the cleaning, conversion, integration, analysis and visualization of the collected raw data. Data analysis refers to the application of statistical, modeling, machine learning and data mining analysis methods to data. Data application refers to the deployment and sales application of data products formed after data analysis. Therefore, the total cost TC of data products includes the costs incurred in data collection, storage, processing and marketing in the process of forming data products, mainly including data collection costs, data processing costs, data product R&D costs, data product marketing costs, and data product risk control information. In order to correct the total cost TC, it is necessary to consider the quality coefficient and circulation coefficient.
[0215] The quality coefficient a is mainly evaluated in combination with the "Information Technology Data Quality Evaluation Indicators" (GB / T36344-2018); the circulation coefficient b determines the circulation coefficient of the data through the propagation coefficient and the proportion of the circulation data volume. The calculation formula is:
[0216]
[0217] Where: q, q k ,q g are the total data volume of data products, the amount of open data, and the amount of shared data, μ k , μ g are the propagation coefficients of open data and shared data, respectively, and are calculated by the proportion of data access in the network. Therefore, the cost value of wind power related data products aggregated by the wind power output prediction center is:
[0218] P c =TC×a×b (31)
[0219] Where: P c It is the cost value of wind power related data.
[0220] The benefit value of data P s Measure data assets based on expected future returns to more accurately and truly reflect the economic benefits that data assets bring to the enterprise.
[0221] Therefore, the comprehensive value P of the data can be expressed as:
[0222] P=αP c +(1-α)P s (32)
[0223] Where: α is the data cost value weight.
[0224] Therefore, the convergence condition of the training model is that the value of the data product at the current stage is greater than the value threshold P y or reaches an iteration round.
[0225] P t ≥P y (33)
[0226] In an optional embodiment, the technical solution of the present application can be applied to the energy industry. As big data gradually extends from comprehensive and general planning to segmented fields and segmented industries, the energy industry, as the basic support for economic and social development, generates energy big data in the process of energy development, production, transmission, storage, and consumption with its large volume, multiple types, fast speed, and high value. Its value in energy security, energy supply, and other fields is increasingly evident. Therefore, in the process of energy data processing, it is necessary to consider the value generated by energy data aggregation. At present, there is no method suitable for data value assessment in practice. In view of the connection and differences between the definition and characteristics of data assets and traditional assets, traditional asset assessment methods and basic principles provide a reference for experimental paths for data asset value assessment, and its limitations provide room for innovation and improvement.
[0227] Taking the data value threshold as a constraint, key technologies for energy data aggregation in a privacy-preserving environment are proposed, which will help solve the key problem of how to provide energy data aggregation and utilization methods and technologies, and provide technical support for energy data trading.
[0228] In addition to new energy output prediction, the application scenarios of this technical solution also include virtual power plant resource aggregation, microgrid group control, etc. The specific application methods are as follows:
[0229] (1) In the process of virtual power plant resource aggregation, the virtual power plant selects resources including power supply, energy storage, energy conversion equipment, etc. as clients according to resource demand, and sends secret keys and initial parameters. Each client uses the GRU neural network to train the local model parameters using the operating parameter information, etc., and then uploads them to the data center after encryption. The data center decrypts and aggregates the parameters of each client, and then encrypts and transmits them to each client for training. The above training process is repeated until the iterative convergence conditions are met. The virtual power plant aggregates various resources according to the global model, and various resources are dispatched and optimized according to the local model to improve the efficiency of resource optimization configuration.
[0230] (2) In the process of microgrid group control, the microgrid aggregator first issues the secret key and initial parameters to the microgrids in the region. The microgrids are trained using the GRU neural network in combination with the operation information. The local parameter information is encrypted and uploaded to the aggregator. The data center decrypts it and aggregates the parameters of each client. It is then encrypted and transmitted to each client for training. The above training process is repeated until the iterative convergence conditions are met. Finally, each microgrid uses the locally trained model to optimize the scheduling of its own source, load, and storage to improve energy efficiency.
[0231] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0232] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for predicting wind power output, characterized in that: include: Selecting multiple wind power related data suppliers through a wind power output prediction center and setting them as clients participating in the neural network model training, wherein the multiple wind power related data suppliers collect wind power related data and pre-process the wind power related data; The client downloads the encrypted global model parameters from the central server and repeatedly performs the following iterative cycle steps: Decrypt the encrypted global model parameters using the private key; generating a neural network model based on the decrypted global model parameters, and then training the neural network model based on the preprocessed wind power related data; updating and encrypting local model parameters of the neural network model, and then uploading the encrypted local model parameters to the wind power output prediction center; and Aggregating local model parameters from all clients through the wind power output prediction center to generate aggregated global model parameters, and sending the encrypted global model parameters to each client and repeating the loop step when the convergence condition is not met, otherwise stopping the loop step; and An updated global neural network model is generated using the global model parameters and the updated global neural network model is used to predict wind power output in real time.
2. The method for predicting wind power output according to claim 1, characterized in that: The plurality of wind power related data suppliers collecting wind power related data also includes: The wind power output prediction center selects the multiple wind power related data suppliers as multiple clients according to data requirements, and the multiple clients collect wind power related data sets A={A1, A2, ..., A n }, where n represents the number of all clients, A i Represents the dataset A of the i-th client i ={a1,a2,…,a m }, m represents the dimension of the wind power related data set, a1, a2, …, a m Indicates each parameter information corresponding to the entire data set of the client; a jt Indicates the value of the jth parameter information at the tth sampling time, where T is the total duration of data collection: a j ={a j0 ,a j1 ,…,a jt ,…,a jT }。 3. The method for predicting wind power output according to claim 2, characterized in that: The preprocessing of the wind power related data includes: data filling, abnormal data processing, data normalization processing and feature correlation analysis, wherein: The data filling is to construct multiple replacement values for all missing values using mice function; to perform statistical analysis on each random data set sample using with function; and finally to integrate the statistical analysis results using pool function, and to obtain the final statistical estimate by combining the analysis results of each data set; The abnormal data processing is to input the interpolated wind power related data into the Savitzky-Golay filter, and perform k-order polynomial fitting on the local interval of the data through least squares convolution to achieve denoising; The data normalization process is to normalize the wind power related data after denoising by the following formula: Wherein, x is the original numerical data; and The feature correlation analysis is to screen the normalized wind power related data according to the Pearson coefficient, wherein the wind power related data with the Pearson coefficient greater than the threshold is selected as input data: in, is the mean value of variable x, is the mean value of the variable y.
4. The method for predicting wind power output according to claim 1, characterized in that: Before the client downloads the encrypted model parameters from the central server, the method further includes: The central server generates a public key and a private key based on the Pallier homomorphic encryption algorithm; encrypting the public key and the private key to generate a first ciphertext and sending the first ciphertext to all clients; and The global model parameters are initialized and encrypted by the wind power output prediction center, and the encrypted global model parameters are sent to all the clients.
5. The method for predicting wind power output according to claim 4, characterized in that: The central server generates a public key and a private key based on the Pallier homomorphic encryption algorithm, including: Let the public key be (n,g), and the corresponding private key (λ,μ) be: λ=lcm(p-1,q-1); μ=(L(g λ towards n 2 )) -1 towards n; Where n is the length of the public key, the order of g is a multiple of n, p and q are two randomly generated prime numbers that satisfy gcd(pq,(p-1)(q-1))=1, gcd() represents the greatest common divisor calculation formula, n=pq, lcm() represents the least common multiple calculation formula, L(g λ mod n 2 )=(g λ mod n 2 -1) / n.
6. The method for predicting wind power output according to claim 5, characterized in that: The public key encryption process is represented by the following formula to generate the ciphertext c: c=(g m ·r n )mod n 2 ; The following formula is used to decrypt the ciphertext c using the private key to generate the plaintext m: m=L(c λ mod n 2 )·μmod n, Among them, the ciphertext and plaintext are c<n 2 and m<n, choose a random number r<n, For n 2 Coprime and less than n 2 The multiplicative group of natural numbers.
7. The method for predicting wind power output according to claim 5, characterized in that: When the encrypted local model parameters transmitted by the client are [W i ], the logarithmic loss function is expressed by the following formula: For any function f(θ), the Taylor expansion at θ=0 is: When the logarithmic loss function f(θ) = log(1+e -θ )The Taylor expansion expression at θ = 0 is: Use a second-order polynomial to approximate the logarithmic loss function, and set θ = [W i ] T Substitute x into the above formula and we get: Taking the derivative of the above formula, we get the loss function with respect to the local model parameters [W i The encrypted gradient value of ] is:
8. The method for predicting wind power output according to claim 5, characterized in that: Aggregating local model parameters from all clients through the wind power output prediction center to generate aggregated global model parameters includes: The client updates the local model parameters W i After being sent to the wind power output prediction center, the wind power output prediction center verifies and decrypts each local model parameter through an anonymous public key, where the local model parameter W trained by each client is expressed by the following formula: W={W1,W2,…,W i ,…,IN n } Among them, W i The local model parameters trained for client i; After verification, the local model parameters of each plaintext state are aggregated to obtain the global model parameters, and the global model parameters are used to update the global training model, wherein the global model parameters are calculated by the following formula: in, represents the global model parameters obtained by weighted aggregation method, m i The number of categories to which each client belongs.
9. The method for predicting wind power output according to claim 5, characterized in that: The convergence condition includes the current stage data product value P t Greater than the value threshold P y Or the current iteration round reaches iteration round R, where P t ≥P y ; The comprehensive value P of the data is expressed as: P=αP c +(1-α)P s ; P c =TC×a×b; Among them, α is the data cost value weight, P c is the cost value of wind power related data, P s is the revenue value of wind power related data, a is the quality coefficient, b is the circulation coefficient, q, q k ,q g are the total data volume of data products, the amount of open data, and the amount of shared data, μ k , μ g are the diffusion coefficients of open data and shared data respectively; TC is the total cost of data products.
10. A wind power output prediction device, characterized in that: include: A selection module is used to select multiple wind power related data suppliers through a wind power output prediction center and set them as clients participating in the neural network model training, wherein the multiple wind power related data suppliers collect wind power related data and pre-process the wind power related data; A download module, downloading encrypted global model parameters from a central server through the client; Iteration loop module, used to repeatedly execute the following iterative loop steps: A decryption module, used for decrypting the encrypted global model parameters using a private key; A model generation and training module, used for generating a neural network model based on the decrypted global model parameters, and training the neural network model based on the preprocessed wind power related data; A parameter updating module, used for updating local model parameters of the neural network model; An uploading module, used for uploading updated local model parameters to the wind power output prediction center; an aggregation module, used to aggregate local model parameters from all clients through the wind power output prediction center to generate aggregated global model parameters; and A judgment module, used for sending the encrypted global model parameters to each client and repeating the loop step when the convergence condition is not met, otherwise stopping the loop step; The prediction module is used to generate an updated global neural network model using the global model parameters and predict wind power output in real time using the updated global neural network model.