Load forecasting method and system for energy aggregation service providers based on horizontal federated learning

Through the FedAvg horizontal federated learning framework and PCA-BP neural network model, the problem of insufficient load prediction performance of energy aggregation service providers in the power market is solved, and load prediction for data privacy is realized, data security and privacy are ensured, and accurate market strategy formulation support.

CN117350439BActive Publication Date: 2024-11-15SOUTH CHINA UNIV OF TECH
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202311535675.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-16
Publication Date
2024-11-15
Estimated Expiration
2043-11-16

AI Technical Summary

Technical Problem

In the power market environment, energy aggregation service providers have difficulty directly obtaining complete power data sets due to data privacy and security issues, resulting in insufficient load prediction performance. The existing technology relies on data encryption processing but cannot effectively ensure data privacy and security.

Method used

Using the FedAvg horizontal federated learning framework and the PCA-BP neural network model, the load prediction of data privacy and security is carried out through the limited interaction between local servers and central servers, and the PCA algorithm is used to extract main features, eliminate useless and redundant features, and ensure data Security and privacy.

Benefits of technology

It achieves accurate load prediction capabilities without touching real data sets, ensures data privacy and security, reduces model number and time consumption, and provides technical support for energy aggregators to formulate market strategies to obtain profits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117350439B_ABST
    Figure CN117350439B_ABST
Patent Text Reader

Abstract

The present invention discloses a load forecasting method and system for an energy aggregation service provider based on horizontal federated learning. The method realizes the load forecasting of the energy aggregation service provider under data privacy security based on the FedAvg horizontal federated learning framework and the PCA-BP neural network model. The data and model parameters are respectively placed in the local server of each terminal user and the central server of the energy aggregation service provider. The local server uses the PCA-BP neural network model to forecast the load of the terminal user and calculate the root mean square error RMSE; the central server uses the FedAvg algorithm to aggregate the weighted average losses of all local servers and update the PCA-BP neural network model parameters; through the limited number of interactions between the local server and the central server, it is ensured that the data security and privacy protocols are strictly followed, the number of models and time consumption are reduced, and accurate load forecasting is achieved without compromising the privacy of user data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of load forecasting for energy aggregation service providers, and in particular to a method and system for load forecasting for energy aggregation service providers based on horizontal federated learning. Background Art

[0002] New energy market players such as distributed photovoltaics, electric vehicles and energy storage are important structural supports for the new power system. Compared with traditional energy suppliers such as coal-fired and gas-fired power plants, new energy suppliers usually have smaller capacity, are dispersed and independent at the physical level of the power system, so their ability to directly obtain positive returns in the power market is relatively weak. To solve this problem, energy aggregation service providers that match market transactions have emerged. However, the effective load forecasting ability of energy aggregation service providers is the cornerstone of their participation in the power market and a key factor in maximizing market profits. With the continuous growth of the new energy supplier group, a large amount of power data with different spatiotemporal granularity will be generated. These data are of great value for load forecasting and will be saved according to the energy type and environmental factors of individual new energy suppliers. However, due to the security and privacy characteristics of electricity commodities, energy suppliers are reluctant to share their data with energy aggregation service providers. Therefore, on the premise of ensuring the security and privacy of individual energy supplier data, how to enable energy aggregation service providers to effectively use power data for load forecasting has become an important issue.

[0003] Power data has been widely used in scenarios such as load forecasting, and its important social and economic value is being continuously explored. Traditional load forecasting methods mainly include wavelet neural network WNN, generalized regression neural network GRNN, least squares support vector regression LSSVR, data transfer learning DTL, gradient boosting decision tree GBDT, deep belief network DBN, bidirectional long short-term memory network BiLSTM, etc. However, in the power market environment, energy aggregation service providers usually cannot directly obtain complete data sets when providing diversified services to their energy suppliers. From the perspective of retailers, power data involves system security and privacy, and sharing or leaking it with the outside may pose great security risks. In response to this problem, existing research, whether using traditional centralized learning algorithms or distributed computing algorithms, mainly relies on encrypting data to ensure data security and privacy. However, this method still requires external interaction of original data, which will result in data privacy and security cannot be effectively guaranteed. To resolve this contradiction, federated learning FL provides a good way to protect data security and privacy.

[0004] Federated learning has been put into practical use in many fields, including mobile devices, industrial engineering, healthcare, finance, etc., especially in the medical and financial industries. In the FL technical architecture, there are mainly two modes: decentralized and centralized. The centralized mode is to deploy a central server at the aggregation service provider, which is responsible for global model parameter fitting; each energy supplier deploys a client server, which is responsible for communicating with the central server. In this process, the power data of the energy supplier is stored in the local client and does not participate in data exchange. The energy supplier only needs to download the model parameters of the central server for local training, and then upload the trained model parameters to the central server. After the global optimization fitting, the central server sends the updated parameters to the client for iterative training until the final prediction model is obtained. However, when participating in federated learning training, there will be a problem: under the federated learning framework, the prediction network may have insufficient prediction performance due to irrelevant features of the data set and the huge amount of data. Summary of the invention

[0005] The first purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art and to provide a load forecasting method for energy aggregation service providers based on horizontal federated learning, which allows the information of new energy entities to be shared without accessing the real data set, thereby obtaining accurate and effective load forecasting capabilities.

[0006] The second object of the present invention is to provide an energy aggregation service provider load forecasting system based on horizontal federated learning.

[0007] The first purpose of the present invention is achieved through the following technical solutions: a load forecasting method for energy aggregation service providers based on horizontal federated learning, which is based on the FedAvg horizontal federated learning framework and the PCA-BP neural network model to achieve load forecasting of energy aggregation service providers under data privacy security, wherein data and model parameters are respectively placed in the local server of each terminal user and the central server of the energy aggregation service provider, and the local server uses the PCA-BP neural network model to perform load forecasting on the terminal user and calculate the root mean square error RMSE. The PCA-BP neural network model is based on the original BP neural network model and extracts the main features based on the PCA algorithm, eliminates useless and redundant features of the local data set of the aggregator user, and prevents the network shortcomings from being amplified in the BP neural network model; the central server uses the FedAvg algorithm to aggregate the weighted average losses of all local servers and update the parameters of the PCA-BP neural network model; through limited interactions between local servers and central servers, strict compliance with data security and privacy protocols is ensured, the number of models and time consumption are reduced, thereby achieving accurate load forecasting without compromising user data privacy.

[0008] Furthermore, the energy aggregation service provider load forecasting method based on horizontal federated learning includes the following steps:

[0009] S1: Collect the initial data of five feature types, namely time data, weather data, industry data, load data and economic data, and perform manual feature selection to form a local data set of aggregator users. Preprocess the local data set of aggregator users, including outlier detection and missing value supplementation, and use one-hot encoding and sin / cos cyclic encoding for discrete values ​​in the data, and mean-variance normalization for continuous values; then, divide the preprocessed local data set of aggregator users into a training set and a test set, which are used for model training and testing respectively;

[0010] S2: Send the data of the training set to the PCA-BP neural network model of the local server for the first training. The initial parameter θ0 of the model is given in this training. During the training, PCA is first used to extract features from the data of the training set, including the standardization of the data feature matrix, the calculation of the covariance matrix and the singular value decomposition, to obtain the feature matrix after feature extraction. The extracted feature matrix is ​​then input into the PCA-BP neural network model to obtain the initial load forecast value of each terminal user. In the back propagation, the smooth curve cross entropy method is used to calculate the loss value of the load forecast result and the true value. After a finite number of iterations until the loss value is minimized, the optimal network for a single local training is obtained.

[0011] S3: Input the test set data into the single local training optimal network to obtain the load forecast information. Then, calculate the smooth curve cross entropy loss function of the load forecast information and the true value and the back propagation gradient of the network weight and network threshold to generate a single local optimal network parameter update value θ′.

[0012] S4: The local server uploads the single local optimal network parameter update value θ′ to the central server. The central server calculates the weighted average loss of all terminal users based on the FedAvg algorithm and fits the global model parameter θ through stochastic gradient descent SGD. Then, the central server sends the global model parameter θ to the local server. The local server updates the local parameter θ′=θ based on θ. The PCA-BP neural network model of the local server uses the new parameter θ for a new round of training.

[0013] S5: Repeat steps S2-S4 until the Rth interaction is completed; through continuous interaction and iteration between the central server and the local server, the global optimal model for load forecasting under the current market environment is obtained, and the final global optimal model parameter θ is used to perform the final load forecast on the local server to obtain the global optimal load forecast value, and formulate the corresponding market strategy based on this global optimal load forecast value to obtain benefits.

[0014] Further, in step S1, the influencing factors in the collected initial data include: time factors, weather factors, industry factors and economic factors; among them, the latitude data of the time factor selects year, month, day, hour and minute information to reflect the periodic changes of the load; the weather factors affecting the load change include temperature, humidity, precipitation, sunshine, wind direction, wind speed and air pressure; the industry factor describes the impact on the load through the electricity consumption of 10 industries, namely agriculture / forestry / animal husbandry / fishery, industry, transportation / warehousing / postal industry, information transmission / software / information technology service industry, wholesale and retail industry, accommodation and catering industry, finance industry, real estate industry, leasing and business service industry, public service and management organization; the economic factor directly selects the local GDP data to reflect the connection between the socio-economic environment and the load.

[0015] Further, in step S1, the aggregator user local data set is preprocessed, including:

[0016] a. Use the 3-Sigma criterion to detect possible outliers in the energy aggregation service provider's load data set;

[0017] b. Fill missing values ​​according to formula (1) and (2):

[0018] x ab =X a-1 (1-w ab )+X a w ab ,a=2,3,...,T″,b=1,2,...,N (1);

[0019]

[0020] In the formula, X a is the data value of the ath hour of the original sequence, X a-1 is the data value of the original sequence at hour a-1, x ab is the bth data value in the ath hour of the interpolated sequence, w ab For X a x ab The weight of , N is the total number of split points within 1 hour, T″ is the total number of hours in the original sequence;

[0021] c. Use one-hot encoding and sin / cos cyclic encoding for discrete values ​​in the data;

[0022] d. Use mean variance normalization to scale the features of continuous values ​​in the data, as shown in formula (3):

[0023]

[0024] In the formula, x norm is the normalized value of the data, μ is the mean value of the data, and σ is the standard deviation of the data.

[0025] Further, in step S2, a PCA-BP neural network is used for training, including the following steps:

[0026] S21: For each feature d in the feature data sample of the training set m Calculate the mean and standard deviation And standardize each data to get the feature d i ' j , and finally get the standardized feature matrix D stand , where m represents the number of features, n represents the sequence length of each feature in the time dimension, i∈n, j∈m, as shown in equations (4)-(8):

[0027]

[0028]

[0029]

[0030]

[0031]

[0032] In the formula, D is the feature matrix, d nm Represents the specific data of the m-th dimension feature of the data sample at the n-th length, d' m Represents the m-th dimension eigenvector of the standardized feature matrix, d' nm Represents the specific data of the m-th dimension feature vector of the standardized feature matrix at the n-th length;

[0033] S22: Calculate the standardized feature matrix D stand The covariance matrix A of is shown in equations (9) and (10):

[0034]

[0035]

[0036] In the formula, a ij and a nm Represents the elements of the covariance matrix, k∈n, d' ki and d' kj They represent the kth data of the standardized i-th and j-th dimension features, respectively, and are calculated by formula (7). and They represent the mean of the i-th and j-th dimension features, respectively, and are calculated by formula (5);

[0037] S23: Calculate the eigenvalue λ of the covariance matrix A using singular value decomposition SVD q and the eigenvector Z q , where q∈[1,m], as shown in equations (11) and (12):

[0038] Z1=[z 11 z 12 … z 1m ] T Z2=[z 21 z 22 … z 2m ] T …Z m =[z n1 z n2 … z nm ] T (11);

[0040] λ1≥λ2≥…≥λ m ≥0 (12);

[0041] In the formula, λ m , Z m are the eigenvalues ​​and eigenvectors of the covariance matrix, z nm is the nth data of the mth eigenvector;

[0042] S24: Introduce the cumulative contribution rate μ′ of the principal component as the evaluation index of the eigenvector, and select the eigenvector t with a cumulative contribution rate exceeding 80% j As the evaluation matrix T′, the feature matrix X is obtained through PCA feature extraction, as shown in equations (13)-(15):

[0043]

[0044] T′=[t1 t2 … t m ] (14);

[0045] x m =d m t m ,X=DT′ (15);

[0046] In the formula, p′ represents the order of eigenvalues, λ j , k Both are λ m A subset of x m is the m-th dimension feature of the feature matrix X;

[0047] S25: Based on the BP neural network model, a load forecasting model consisting of 1 input layer, 3 hidden layers and 1 output layer is built, namely the PCA-BP neural network model. Its activation function all uses the Sigmoid function, as shown in formula (16):

[0048]

[0049] In the formula, f(x) is the activation function of the neuron, and x represents the output of each layer of neurons;

[0050] S26: Set the weight coefficients of the three hidden layers to ω1, ω2, ω3, and the thresholds to b1, b2, b3; the weight coefficient of the output layer to ω4, and the threshold to b4; statistically calculate the parameters of the PCA-BP neural network model as θ∈W,b, where W = {ω1, ω2, ω3, ω4|, b = {b1, b2, b3, b4}, W is the weight set of the PCA-BP neural network model, and b is the threshold set of the PCA-BP neural network model; the forward propagation of the PCA-BP neural network model is shown in formula (17):

[0051]

[0052] Where q = Z + Indicates the number of layers of the network model, h∈q; X q =[x q,1 x q,2 … x q,m ] and Y q =[y q,1 y q,2 … y q,m ] represent the input and output of the qth layer network, respectively, x q,m is the mth input of the qth layer network, y q,m is the mth output of the qth layer network; ω h and b h Respectively represent the weight coefficient and threshold of the h-th layer network, ω h ∈W,b h ∈b, and when q=1, X q is equal to X in formula (15), that is, X is the first layer input of the network model;

[0053] S27: Input the input X of the training set data after PCA dimension reduction into the constructed PCA-BP neural network model to obtain the prediction result;

[0054] S28: The smooth curve cross entropy method is used to obtain the loss function L of each level of the PCA-BP neural network model q , as shown in formula (18):

[0055]

[0056] Where, Y′ q Represents the true value of each layer of the network;

[0057] S29: Calculate the back propagation gradient of the PCA-BP neural network model weights Backpropagating gradients with threshold As shown in formula (19) and (20):

[0058]

[0059]

[0060] S210: Update the PCA-BP neural network model parameters, expressed as formula (21):

[0061]

[0062] In the formula, l is the learning rate of the network model, which is used to indicate the speed of iterative convergence of network model training, ω′ h , b' h Respectively represent the updated PCA-BP neural network model weights and thresholds;

[0063] S211: Repeat steps S26-S210 until the iterative update of the PCA-BP neural network parameters θ′ is stopped after a limited number of rounds of training, and the optimal network for a single local training is obtained.

[0064] Further, the step S3 comprises the following steps:

[0065] S31: input the data of the test set into the single local training optimal network to obtain the load forecast value;

[0066] S32: Calculate the smooth curve cross entropy loss function L between the load prediction value and the true value of the test set according to equations (18)-(20) j (θ) and the back-propagated gradients of network weights and network thresholds;

[0067] S33: Generate a single local optimal network parameter update value θ′ according to formula (21).

[0068] Further, the step S4 comprises the following steps:

[0069] S41: The local server uploads the single local optimal network parameter update value θ′ to the central server;

[0070] S42: The central server collects all updated model parameters θ′={θ′ p (p=1,2,…,P)},θ'p represents the single local optimal network parameter update value of the p-th responding user. The parameters are aggregated based on the FedAvg algorithm to calculate the weighted average loss of all terminal users. The global model parameter θ is fitted through SGD, as shown in Equations (22) and (23):

[0071]

[0072]

[0073] In the formula, F p (θ) represents the average loss of all data features of the p-th aggregator user, f(θ) is the function for updating θ, and F g (θ) represents the average loss of all data features of the g-th aggregator user, g∈P is a subset;

[0074] S43: The central server of the energy aggregation service provider sends the global model parameter θ to all local servers, and the local server of the aggregator user updates the PCA-BP neural network model parameter θ′=θ based on the global model parameter;

[0075] S44: The PCA-BP neural network model of the local server uses the new parameter θ to perform a new round of training.

[0076] Further, the step S5 comprises the following steps:

[0077] S51: repeating steps S2-S4 to complete a limited number of interactions between the central server and the local server;

[0078] S52: After the Rth interaction, the global optimal model for load forecasting under the current market environment is obtained, and the communication interaction round r=1,2,…,R is the number of model parameter interactions between the aggregator user's local server and the energy aggregation service provider's central server;

[0079] S53: The energy aggregation service provider verifies the global optimal model and gives corresponding aggregator users distribution response rewards according to the degree of contribution to the global optimal model;

[0080] S54: using the final global optimal model parameter θ to perform a final load forecast of the aggregator user in the local server to obtain a global optimal load forecast value;

[0081] S55: Formulate corresponding market strategies according to the global optimal load forecast value to obtain benefits.

[0082] The second object of the present invention is achieved through the following technical solution: an energy aggregation service provider load forecasting system based on horizontal federated learning, which is used to implement the above-mentioned energy aggregation service provider load forecasting method based on horizontal federated learning, comprising:

[0083] The data collection and processing module is used to collect the initial data of five feature types, namely time data, weather data, industry data, load data and economic data, and perform manual feature selection to form a local data set of aggregator users. The local data set of aggregator users is preprocessed, including outlier detection and missing value supplementation, and the discrete values ​​in the data are encoded using one-hot encoding and sin / cos cyclic encoding, and the continuous values ​​are normalized using mean-variance normalization operations; then, the preprocessed local data set of aggregator users is divided into a training set and a test set, which are used for model training and testing respectively;

[0084] The training module is used to send the data of the training set to the PCA-BP neural network model of the local server for the first training. The initial parameter θ0 of the model is given in this training. During the training, the data of the training set is firstly subjected to feature extraction by PCA, including the standardization of the data feature matrix, the calculation of the covariance matrix and the singular value decomposition, so as to obtain the feature matrix after feature extraction. The extracted feature matrix is ​​then input into the PCA-BP neural network model to obtain the initial load forecast value of each terminal user. In the back propagation, the smooth curve cross entropy method is used to calculate the loss value of the load forecast result and the true value. After a finite number of iterations until the loss value is minimized, the optimal network for a single local training is obtained.

[0085] The parameter updating module is used to input the test set data into the single local training optimal network to obtain the load forecast information, and then calculate the smooth curve cross entropy loss function of the load forecast information and the true value and the back propagation gradient of the network weight and the network threshold to generate a single local optimal network parameter update value θ′;

[0086] The calculation module uploads the single local optimal network parameter update value θ′ to the central server through the local server. The central server calculates the weighted average loss of all terminal users based on the FedAvg algorithm and fits the global model parameter θ through stochastic gradient descent SGD. Then, the central server sends the global model parameter θ to the local server. The local server updates the local parameter θ′=θ based on θ. The PCA-BP neural network model of the local server uses the new parameter θ for a new round of training.

[0087] The load forecasting module obtains the global optimal model for load forecasting under the current market environment through continuous interactive iteration between the central server and the local server. The final global optimal model parameter θ is used to perform the final load forecast on the local server to obtain the global optimal load forecast value. Based on this global optimal load forecast value, the corresponding market strategy is formulated to obtain benefits.

[0088] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0089] 1. The present invention introduces a novel federation framework for energy aggregators, ensuring the confidentiality of data of emerging energy suppliers, thereby enabling them to communicate without disclosing electricity consumption information.

[0090] 2. The present invention proposes a PCA-BP neural network model, which uses data privacy considerations to perform feature extraction.

[0091] 3. The present invention designs a method for training a neural network model using a joint average weighted combination, which provides technical support for energy aggregators to formulate corresponding market strategies and obtain profits.

[0092] In summary, the present invention ensures strict compliance with data security and privacy protocols, reduces the number of models and time consumption, and thus utilizes federated learning to aggregate parameters without compromising user data privacy, thus achieving accurate load forecasting, which has practical application value and is worthy of promotion. BRIEF DESCRIPTION OF THE DRAWINGS

[0093] Figure 1 It is a schematic diagram of the process of the present invention.

[0094] Figure 2 Schematic diagram of the system of the present invention. DETAILED DESCRIPTION

[0095] The present invention is further described in detail below in conjunction with embodiments and drawings, but the embodiments of the present invention are not limited thereto.

[0096] Example 1

[0097] like Figure 1As shown, this embodiment discloses a load forecasting method for energy aggregation service providers based on horizontal federated learning. The method is based on the FedAvg horizontal federated learning framework and the PCA-BP neural network model to achieve load forecasting for energy aggregation service providers under data privacy security, wherein data and model parameters are respectively placed in the local server of each terminal user and the central server of the energy aggregation service provider, and the local server uses the PCA-BP neural network model to perform load forecasting on the terminal user and calculate the root mean square error RMSE. The PCA-BP neural network model is based on the original BP neural network model and extracts the main features based on the PCA algorithm, removes useless and redundant features of the local data set of the aggregator user, and prevents the network shortcomings from being amplified in the BP neural network model; the central server uses the FedAvg algorithm to aggregate the weighted average losses of all local servers and updates the parameters of the PCA-BP neural network model; through limited interactions between the local server and the central server, strict compliance with data security and privacy protocols is ensured, the number of models and time consumption are reduced, and accurate load forecasting is achieved without compromising user data privacy.

[0098] The specific implementation of the energy aggregation service provider load forecasting method includes the following steps:

[0099] S1: Collect initial data of five feature types, including time data, weather data, industry data, load data, and economic data, and perform manual feature selection to form a local data set of aggregator users. Preprocess the local data set of aggregator users, including outlier detection and missing value supplementation, and use one-hot encoding and sin / cos cyclic encoding for discrete values ​​in the data, and mean-variance normalization for continuous values; then, divide the preprocessed local data set of aggregator users into a training set and a test set, which are used for model training and testing respectively.

[0100] The influencing factors in the initial data collected include: time factors, weather factors, industry factors and economic factors; among them, the latitude data of the time factor selects year, month, day, hour and minute information to reflect the periodic changes of the load; the weather factors that affect the load change include temperature, humidity, precipitation, sunshine, wind direction, wind speed and air pressure; the industry factor describes the impact on the load through the electricity consumption of 10 industries, including agriculture / forestry / animal husbandry / fishery, industry, transportation / warehousing / postal industry, information transmission / software / information technology services, wholesale and retail industry, accommodation and catering industry, finance industry, real estate industry, leasing and business services industry, public services and management organizations; the economic factor directly selects the local GDP data to reflect the connection between the socio-economic environment and the load.

[0101] Preprocess the aggregator user local data set, including:

[0102] a. Use the 3-Sigma criterion to detect possible outliers in the energy aggregation service provider's load data set;

[0103] b. Fill missing values ​​according to formula (1) and (2):

[0104] x ab =X a-1 (1-w ab )+X a w ab ,a=2,3,...,T″,b=1,2,...,N (1);

[0105]

[0106] In the formula, X a is the data value of the ath hour of the original sequence, X a-1 is the data value of the original sequence at hour a-1, x ab is the bth data value in the ath hour of the interpolated sequence, w ab For X a x ab The weight of , N is the total number of split points within 1 hour, T″ is the total number of hours in the original sequence;

[0107] c. Use one-hot encoding and sin / cos cyclic encoding for discrete values ​​in the data;

[0108] d. Use mean variance normalization to scale the features of continuous values ​​in the data, as shown in formula (3):

[0109]

[0110] In the formula, x norm is the normalized value of the data, μ is the mean value of the data, and σ is the standard deviation of the data.

[0111] S2: Send the data of the training set to the PCA-BP neural network model of the local server for the first training. The initial parameter λ0 of the model is given in this training. During the training, PCA is first used to extract features from the data of the training set, including standardization of the data feature matrix, calculation of the covariance matrix and singular value decomposition, to obtain the feature matrix after feature extraction. The extracted feature matrix is ​​then input into the PCA-BP neural network model to obtain the initial load forecast value of each terminal user. In the back propagation, the smooth curve cross entropy method is used to calculate the loss value of the load forecast result and the true value. After a finite number of iterations until the loss value is minimized, the optimal network for a single local training is obtained.

[0112] The PCA-BP neural network is used for training, which includes the following steps:

[0113] S21: For each feature d in the feature data sample of the training set m Calculate the mean and standard deviation And standardize each data to get the feature d i ' j , and finally get the standardized feature matrix D stand , where m represents the number of features, n represents the sequence length of each feature in the time dimension, i∈n, j∈m, as shown in equations (4)-(8):

[0114]

[0115]

[0116]

[0117]

[0118]

[0119] Where D is the feature matrix, d nm Represents the specific data of the m-th dimension feature of the data sample at the n-th length, d' m Represents the m-th dimension eigenvector of the standardized feature matrix, d' nm Represents the specific data of the m-th dimension feature vector of the standardized feature matrix at the n-th length;

[0120] S22: Calculate the standardized feature matrix D stand The covariance matrix A of is shown in equations (9) and (10):

[0121]

[0122]

[0123] In the formula, a ij and a nm Represents the elements of the covariance matrix, k∈n, d' ki and d' kj They represent the kth data of the standardized i-th and j-th dimension features, respectively, and are calculated by formula (7). and They represent the mean of the i-th and j-th dimension features, respectively, and are calculated by formula (5);

[0124] S23: Calculate the eigenvalue λ of the covariance matrix A using singular value decomposition SVD q and the eigenvector Z q , where q∈[1,m], as shown in equations (11) and (12):

[0125] Z1=[z 11 z 12 … z 1m ] T Z2=[z 21 z 22 … z 2m ] T …Z m =[z n1 z n2 … z nm ] T (11);

[0127] λ1≥λ2≥…≥λ m ≥0 (12);

[0128] In the formula, λ m , Z m are the eigenvalues ​​and eigenvectors of the covariance matrix, z nm is the nth data of the mth eigenvector;

[0129] S24: Introduce the cumulative contribution rate μ′ of the principal component as the evaluation index of the eigenvector, and select the eigenvector t with a cumulative contribution rate exceeding 80% j As the evaluation matrix T′, the feature matrix X is obtained through PCA feature extraction, as shown in equations (13)-(15):

[0130]

[0131] T′=[t1 t2 … t m ] (14);

[0132] x m =d m t m ,X=DT′ (15);

[0133] In the formula, p′ represents the order of eigenvalues, λ j , k Both are λ m A subset of x m is the m-th dimension feature of the feature matrix X;

[0134] S25: Based on the BP neural network model, a load forecasting model consisting of 1 input layer, 3 hidden layers and 1 output layer is built, namely the PCA-BP neural network model. Its activation function all uses the Sigmoid function, as shown in formula (16):

[0135]

[0136] In the formula, f(x) is the activation function of the neuron, and x represents the output of each layer of neurons;

[0137] S26: Set the weight coefficients of the three hidden layers to ω1, ω2, ω3, and the thresholds to b1, b2, b3; the weight coefficient of the output layer to ω4, and the threshold to b4; statistically calculate the parameters of the PCA-BP neural network model as θ∈W,b, where W = {ω1, ω2, ω3, ω4}, b = {b1, b2, b3, b4}, W is the weight set of the PCA-BP neural network model, and b is the threshold set of the PCA-BP neural network model; the forward propagation of the PCA-BP neural network model is shown in formula (17):

[0138]

[0139] Where q = Z + Indicates the number of layers of the network model, h∈q; X q =[x q,1 x q,2 … x q,m ] and Y q =[y q,1 y q,2 … y q,m ] represent the input and output of the qth layer network, respectively, x q,m is the mth input of the qth layer network, y q,m is the mth output of the qth layer network; ω h and b h Respectively represent the weight coefficient and threshold of the h-th layer network, ω h ∈W,b h ∈b, and when q=1, X q is equal to X in formula (15), that is, X is the first layer input of the network model;

[0140] S27: Input the input X of the training set data after PCA dimension reduction into the constructed PCA-BP neural network model to obtain the prediction result;

[0141] S28: The smooth curve cross entropy method is used to obtain the loss function L of each level of the PCA-BP neural network model q , as shown in formula (18):

[0142]

[0143] Where, Y′ q Represents the true value of each layer of the network;

[0144] S29: Calculate the back propagation gradient of the PCA-BP neural network model weights Backpropagating gradients with threshold As shown in formula (19) and (20):

[0145]

[0146]

[0147] S210: Update the PCA-BP neural network model parameters, expressed as formula (21):

[0148]

[0149] In the formula, l is the learning rate of the network model, which is used to indicate the speed of iterative convergence of network model training, ω′ h , b' h Respectively represent the updated PCA-BP neural network model weights and thresholds;

[0150] S211: Repeat steps S26-S210 until the iterative update of the PCA-BP neural network parameters θ′ is stopped after a limited number of rounds of training, and the optimal network for a single local training is obtained.

[0151] S3: Input the data of the test set into the single local training optimal network to obtain the load forecast information, then calculate the smooth curve cross entropy loss function of the load forecast information and the true value and the back propagation gradient of the network weight and network threshold to generate a single local optimal network parameter update value θ′, including the following steps:

[0152] S31: input the data of the test set into the single local training optimal network to obtain the load forecast value;

[0153] S32: Calculate the smooth curve cross entropy loss function L between the load prediction value and the true value of the test set according to equations (18)-(20) j (θ) and the back-propagated gradients of network weights and network thresholds;

[0154] S33: Generate a single local optimal network parameter update value θ′ according to formula (21).

[0155] S4: The local server uploads the single local optimal network parameter update value θ′ to the central server. The central server calculates the weighted average loss of all terminal users based on the FedAvg algorithm and fits the global model parameter θ through stochastic gradient descent SGD. Then, the central server sends the global model parameter θ to the local server. The local server updates the local parameter θ′=θ based on θ. The PCA-BP neural network model of the local server uses the new parameter θ for a new round of training, including the following steps:

[0156] S41: The local server uploads the single local optimal network parameter update value θ′ to the central server;

[0157] S42: The central server collects all updated model parameters θ′={θ′ p (p=1,2,…,P)},θ' p represents the single local optimal network parameter update value of the p-th responding user. The parameters are aggregated based on the FedAvg algorithm to calculate the weighted average loss of all terminal users. The global model parameter θ is fitted through SGD, as shown in Equations (22) and (23):

[0158]

[0159]

[0160] In the formula, F p (θ) represents the average loss of all data features of the p-th aggregator user, f(θ) is the function for updating θ, and F g (θ) represents the average loss of all data features of the g-th aggregator user, g∈P is a subset;

[0161] S43: The central server of the energy aggregation service provider sends the global model parameter θ to all local servers, and the local server of the aggregator user updates the PCA-BP neural network model parameter θ′=0 based on the global model parameter;

[0162] S44: The PCA-BP neural network model of the local server uses the new parameter θ to perform a new round of training.

[0163] S5: Repeat steps S2-S4 until the Rth interaction is completed; through continuous interaction and iteration between the central server and the local server, a global optimal model for load forecasting under the current market environment is obtained, and the final global optimal model parameter θ is used to perform final load forecasting on the local server to obtain the global optimal load forecast value, and a corresponding market strategy is formulated according to the global optimal load forecast value to obtain benefits, including the following steps:

[0164] S51: repeating steps S2-S4 to complete a limited number of interactions between the central server and the local server;

[0165] S52: After the Rth interaction, the global optimal model for load forecasting under the current market environment is obtained, and the communication interaction round r=1,2,…,R is the number of model parameter interactions between the aggregator user's local server and the energy aggregation service provider's central server;

[0166] S53: The energy aggregation service provider verifies the global optimal model and gives corresponding aggregator users distribution response rewards according to the degree of contribution to the global optimal model;

[0167] S54: using the final global optimal model parameter θ to perform a final load forecast of the aggregator user in the local server to obtain a global optimal load forecast value;

[0168] S55: Formulate corresponding market strategies according to the global optimal load forecast value to obtain benefits.

[0169] Below we use a specific example to illustrate the execution process of the energy aggregation service provider load forecasting method based on horizontal federated learning provided by the above embodiment of the present invention and the beneficial effects that can be achieved.

[0170] The dataset used is a real dataset of multivariate features of a large energy aggregation service provider in a city in southern China and its 10 new energy suppliers from September 2018 to August 2019, totaling 365 days. The time granularity of constructing the dataset is 1 hour, that is, there are 24 multivariate feature load data values ​​every day. The dataset involved in the training will be divided into training set, validation set and test set in a ratio of 6:2:2.

[0171] After comprehensively considering the factors affecting the load, the input feature types of the load forecasting model are finally selected as time, weather, load, industry and economy. The data of the time dimension selects the year, month, day, hour and minute information to reflect the periodic changes of the load; the factors affecting the load change by weather include temperature, humidity, precipitation, sunshine, wind direction, wind speed and air pressure; the industry type factor describes the impact on the load through the electricity consumption of 10 industries such as agriculture / forestry / animal husbandry / fishery, industry, transportation / warehousing / postal industry, information transmission / software / information technology service industry, wholesale and retail industry, accommodation and catering industry, finance industry, real estate industry, leasing and business service industry, public service and management organization; the economic factor directly selects the local GDP data to reflect the connection between the social and economic environment and the load.

[0172] Furthermore, the original power load data is preprocessed by anomaly detection, missing value filling and other data set preprocessing to construct the energy aggregation service provider load data set, as shown in Table 1:

[0173] Table 1 Initial feature types of energy aggregation service provider load dataset

[0174]

[0175] By manually selecting features from the initial data of five feature types, namely time, weather, industry, load and economy, and using unique hot encoding and sin / cos cyclic encoding conversion for discrete values, and normalization conversion for continuous values, 29 feature quantities are finally obtained, as shown in Table 2:

[0176] Table 2 Feature extraction

[0177]

[0178]

[0179] SVD and PCA are used to extract the main features in Table 2 and obtain the extracted feature matrix X.

[0180] Based on the FedAvg algorithm, a load forecasting architecture for energy aggregation service providers based on federated learning is established. The main entities include wind power energy suppliers, photovoltaic energy suppliers, energy storage energy suppliers, electric vehicle energy suppliers, and energy aggregation service providers. In this application scenario, individual clients of energy suppliers each have their own independent power data sets with different sample sizes, but they are all in the same area, and the load forecast is affected by the same factors and has data features of the same dimensions. The entire process is divided into 6 steps, as shown below:

[0181] Step 1: Energy aggregation service providers participating in market bidding need to formulate strategies to initiate federated training requests to their internal energy suppliers.

[0182] Step 2: The energy supplier decides whether to respond to the server request for prediction model training based on its own needs in combination with local power data.

[0183] Step 3: In each round, the energy suppliers that respond to the server request first download the global model parameters from the energy aggregation service provider server, input their respective power data into the above prediction model for local training on the local client, and upload the model parameters for each round to the server.

[0184] Step 4: After multiple communications and interactions with the responding energy supplier client, the energy aggregation service provider server will obtain the global optimal model for load forecasting under the current market environment.

[0185] Step 5: The energy aggregation service provider verifies the global optimal model and distributes response rewards to the responding energy suppliers based on their contribution to the global optimal model.

[0186] Step 6: The energy aggregation service provider uses the final global optimal model to perform load forecasting and formulate corresponding market strategies to obtain profits.

[0187] Set the parameters of the federated learning model according to Table 3. The load forecasting in this embodiment predicts the load value at the current moment through the historical data of the 24 hours before the current moment, which is a regression task problem. Systems for such problems usually use four evaluation indicators: Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), Mean Absolute Percentage Error (MAPE) and Symmetric Mean Absolute Percentage Error (SMAPE). Since the RMSE indicator has a greater penalty for large error samples and is more sensitive to outliers, and load forecasting needs to be sensitive to prediction accuracy, RMSE is used as the evaluation indicator of the model algorithm, as shown in formula (24):

[0188] Table 3 Model parameters

[0189] Parameter name Parameter Value Input layer neurons 32 Hidden layer neurons 60 (20×20×20) Output layer neurons 10 Network learning rate l 0.08 Proportional parameter C 0.5 Client quantity parameter P 10 Local sampling parameters B 100 Local training parameters E 100 rounds Communication parameters R 10 rounds

[0190]

[0191] In the formula, λ RMSE Expressed as Time prediction value With the true value The sample standard deviation of the difference; is the total number of samples. RMSE The smaller the value, the better the model prediction accuracy.

[0192] The current mainstream load forecasting technical methods are comprehensively compared from the three dimensions of data privacy and security, feature extraction, and model training speed, as shown in Tables 4 and 5. Among them, PF represents the energy aggregation service provider load forecasting method based on horizontal federated learning proposed in this invention, Fedavg represents the PF method without feature extraction; P-BP, P-LSTM, and LSTM represent traditional centralized load forecasting methods that require direct access to all data, while P-BP and P-LSTM methods will extract features from the data set.

[0193] Table 4 Comparison of model training time for different prediction methods

[0194]

[0195] Table 5 RMSE comparison of prediction accuracy of different methods

[0196] Client PF Fedavg P-BP P-LSTM LSTM 1 0.03996 0.03882 0.04774 0.06413 0.14433 2 0.04115 0.04194 0.04280 0.05893 0.06413 3 0.03966 0.04044 0.04332 0.07143 0.06074 4 0.04092 0.04545 0.04016 0.06279 0.12337 5 0.04091 0.04545 0.04016 0.08179 0.11793 6 0.03924 0.04196 0.04218 0.08229 0.13123 7 0.03923 0.03980 0.04418 0.04609 0.09295 8 0.03943 0.03937 0.04428 0.08999 0.13312 9 0.04672 0.04163 0.05576 0.10567 0.07222 10 0.04014 0.04163 0.04082 0.04279 0.12828 average value 0.04074 0.04165 0.04414 0.07059 0.10683

[0197] As can be seen from Tables 5 and 6, the PF and P-LSTM methods have improved the RMSE value performance compared to the Fedavg and LSTM methods, indicating that for the same method, the prediction accuracy of the method using feature extraction will be higher than that without feature extraction, and the speed of training and learning will also be more advantageous. This is because before training, PCA can effectively identify the features related to load changes, making the model method more efficient during training. The comparison results show that compared with the traditional method, the deviation between the load prediction value and the true value of the algorithm model proposed in the present invention is the smallest, and the performance is better. It can be seen that in the environment of parallel data sets, the PF method can not only effectively guarantee data privacy and security, but also show superior performance in terms of prediction accuracy and the speed of model learning and training.

[0198] Finally, considering that the amount of data samples available to individual energy suppliers is different in the real environment, the algorithm model will have the problem of unbalanced data sets under federated distributed learning. In this experiment, the original data samples of 10 individual energy suppliers were randomly sampled, and simulation experiments were carried out at a ratio of 56%, 36%, 89%, 47%, 23%, 22%, 68%, 76%, 48%, and 35% to obtain Table 6. The results show that the algorithm model proposed in the present invention can still guarantee sufficient prediction accuracy in the environment of unbalanced data sets and has strong versatility.

[0199] Table 6 RMSE comparison of federated learning prediction accuracy under unbalanced datasets

[0200] Client RMSE value 1 0.00655 2 0.00874 3 0.08602 4 0.01793 5 0.03718 6 0.03274 7 0.04143 8 0.08920 9 0.00771 10 0.00942 average 0.03369

[0201] Example 2

[0202] This embodiment discloses a load forecasting system for energy aggregation service providers based on horizontal federated learning, which is used to implement the load forecasting method for energy aggregation service providers based on horizontal federated learning described in Example 1. Figure 2 As shown, the system includes the following functional modules:

[0203] The data collection and processing module is used to collect the initial data of five feature types, namely time data, weather data, industry data, load data and economic data, and perform manual feature selection to form a local data set of aggregator users. The local data set of aggregator users is preprocessed, including outlier detection and missing value supplementation, and the discrete values ​​in the data are encoded using one-hot encoding and sin / cos cyclic encoding, and the continuous values ​​are normalized using mean-variance normalization operations; then, the preprocessed local data set of aggregator users is divided into a training set and a test set, which are used for model training and testing respectively;

[0204] The training module is used to send the data of the training set to the PCA-BP neural network model of the local server for the first training. The initial parameter θ0 of the model is given in this training. During the training, the data of the training set is firstly subjected to feature extraction by PCA, including the standardization of the data feature matrix, the calculation of the covariance matrix and the singular value decomposition, so as to obtain the feature matrix after feature extraction. The extracted feature matrix is ​​then input into the PCA-BP neural network model to obtain the initial load forecast value of each terminal user. In the back propagation, the smooth curve cross entropy method is used to calculate the loss value of the load forecast result and the true value. After a finite number of iterations until the loss value is minimized, the optimal network for a single local training is obtained.

[0205] The parameter updating module is used to input the test set data into the single local training optimal network to obtain the load forecast information, and then calculate the smooth curve cross entropy loss function of the load forecast information and the true value and the back propagation gradient of the network weight and the network threshold to generate a single local optimal network parameter update value θ′;

[0206] The calculation module uploads the single local optimal network parameter update value θ′ to the central server through the local server. The central server calculates the weighted average loss of all terminal users based on the FedAvg algorithm and fits the global model parameter θ through stochastic gradient descent SGD. Then, the central server sends the global model parameter θ to the local server. The local server updates the local parameter θ′=θ based on θ. The PCA-BP neural network model of the local server uses the new parameter θ for a new round of training.

[0207] The load forecasting module obtains the global optimal model for load forecasting under the current market environment through continuous interactive iteration between the central server and the local server. The final global optimal model parameter θ is used to perform the final load forecast on the local server to obtain the global optimal load forecast value. Based on this global optimal load forecast value, the corresponding market strategy is formulated to obtain benefits.

[0208] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. A load forecasting method for energy aggregation service providers based on horizontal federated learning, characterized in that: The method is based on the FedAvg horizontal federated learning framework and the PCA-BP neural network model to achieve load forecasting of energy aggregation service providers under data privacy security, wherein data and model parameters are placed in the local server of each end user and the central server of the energy aggregation service provider respectively, and the local server uses the PCA-BP neural network model to forecast the load of the end user and calculate the root mean square error RMSE. The PCA-BP neural network model extracts the main features based on the PCA algorithm on the basis of the original BP neural network model, and eliminates the useless and redundant features of the local data set of the aggregator user; the central server uses the FedAvg algorithm to aggregate the weighted average loss of all local servers and update the parameters of the PCA-BP neural network model; through the limited number of interactions between the local server and the central server, it is ensured that the data security and privacy protocols are strictly followed, and accurate load forecasting is achieved without compromising the privacy of user data; the following steps are included: S1: Collect the initial data of five feature types, namely time data, weather data, industry data, load data and economic data, and perform manual feature selection to form a local data set of aggregator users. Preprocess the local data set of aggregator users, including outlier detection and missing value supplementation, and use one-hot encoding and sin / cos cyclic encoding for discrete values ​​in the data, and mean-variance normalization for continuous values; then, divide the preprocessed local data set of aggregator users into a training set and a test set, which are used for model training and testing respectively; S2: Send the data of the training set to the PCA-BP neural network model of the local server for the first training. The initial parameter θ0 of the model is given in this training. During the training, PCA is first used to extract features from the data of the training set, including the standardization of the data feature matrix, the calculation of the covariance matrix and the singular value decomposition, to obtain the feature matrix after feature extraction. The extracted feature matrix is ​​then input into the PCA-BP neural network model to obtain the initial load forecast value of each terminal user. In the back propagation, the smooth curve cross entropy method is used to calculate the loss value of the load forecast result and the true value. After a finite number of iterations until the loss value is minimized, the optimal network for a single local training is obtained. The PCA-BP neural network is used for training, which includes the following steps: S21: For each feature d in the feature data sample of the training set m Calculate the mean and standard deviation S dm , and standardize each data to obtain feature d i ' j , and finally get the standardized feature matrix D stand , where m represents the number of features, n represents the sequence length of each feature in the time dimension, i∈n, j∈m, as shown in equations (4)-(8): In the formula, D is the feature matrix, d nm Represents the specific data of the m-th dimension feature of the data sample at the n-th length, d' m Represents the m-th dimension eigenvector of the standardized feature matrix, d' nm Represents the specific data of the m-th dimension feature vector of the standardized feature matrix at the n-th length; S22: Calculate the standardized feature matrix D stand The covariance matrix A of is shown in equations (9) and (10): In the formula, a ij and a nm Represents the elements of the covariance matrix, k∈n, d' ki and d' kj They represent the kth data of the standardized i-th and j-th dimension features, respectively, and are calculated by formula (7). and They represent the mean of the i-th and j-th dimension features, respectively, and are calculated by formula (5); S23: Calculate the eigenvalue λ of the covariance matrix A using singular value decomposition SVD q and the eigenvector Z q , where q∈[1,m], as shown in equations (11) and (12): Z1=[z 11 With 12 …With 1m ] T Z2=[z 21 With 22 …With 2m ] T …WITH m =[of n1 With n2 …With nm ] T (11); λ1≥λ2≥…≥λ m ≥0 (12); In the formula, λ m , Z m are the eigenvalues ​​and eigenvectors of the covariance matrix, z nm is the nth data of the mth eigenvector; S24: Introduce the cumulative contribution rate μ′ of the principal component as the evaluation index of the eigenvector, and select the eigenvector t with a cumulative contribution rate exceeding 80% j As the evaluation matrix T′, the feature matrix X is obtained through PCA feature extraction, as shown in equations (13)-(15): T′=[t1 t2…t m ] (14); x m =d m t m ,X=DT′ (15); In the formula, p′ represents the order of eigenvalues, λ j , k Both are λ m A subset of x m is the m-th dimension feature of the feature matrix X; S25: Based on the BP neural network model, a load forecasting model consisting of 1 input layer, 3 hidden layers and 1 output layer is built, namely the PCA-BP neural network model. Its activation function all uses the Sigmoid function, as shown in formula (16): In the formula, f(x) is the activation function of the neuron, and x represents the output of each layer of neurons; S26: Set the weight coefficients of the three hidden layers to ω1, ω2, ω3, and the thresholds to b1, b2, b3; the weight coefficient of the output layer to ω4, and the threshold to b4; statistically calculate the parameters of the PCA-BP neural network model as θ∈W,b, where W = {ω1, ω2, ω3, ω4}, b = {b1, b2, b3, b4}, W is the weight set of the PCA-BP neural network model, and b is the threshold set of the PCA-BP neural network model; the forward propagation of the PCA-BP neural network model is shown in formula (17): Where q = Z + Indicates the number of layers of the network model, h∈q; X q =[x q,1 x q,2 …x q,m ] and Y q =[y q,1 y q,2 …y q,m ] represent the input and output of the qth layer network, respectively, x q,m is the mth input of the qth layer network, y q,m is the mth output of the qth layer network; ω h and b h Respectively represent the weight coefficient and threshold of the h-th layer network, ω h ∈W,b h ∈b, and when q=1, X q is equal to X in formula (15), that is, X is the first layer input of the network model; S27: Input the input X of the training set data after PCA dimension reduction into the constructed PCA-BP neural network model to obtain the prediction result; S28: The smooth curve cross entropy method is used to obtain the loss function L of each level of the PCA-BP neural network model q , as shown in formula (18): Where Y q 'Represents the true value of each layer of the network; S29: Calculate the back propagation gradient of the PCA-BP neural network model weights Backpropagating gradients with threshold As shown in formula (19) and (20): S210: Update the PCA-BP neural network model parameters, expressed as formula (21): In the formula, l is the learning rate of the network model, which is used to indicate the speed of iterative convergence of network model training, ω' h , b' h Respectively represent the updated PCA-BP neural network model weights and thresholds; S211: repeating steps S26-S210 until the PCA-BP neural network parameter θ′ is updated after a limited number of training rounds, and the optimal network for a single local training is obtained; S3: Input the test set data into the single local training optimal network to obtain the load forecast information. Then, calculate the smooth curve cross entropy loss function of the load forecast information and the true value and the back propagation gradient of the network weight and network threshold to generate a single local optimal network parameter update value θ′. S4: The local server uploads the single local optimal network parameter update value θ′ to the central server. The central server calculates the weighted average loss of all terminal users based on the FedAvg algorithm and fits the global model parameter θ through stochastic gradient descent SGD. Then, the central server sends the global model parameter θ to the local server. The local server updates the local parameter θ′=θ based on θ. The PCA-BP neural network model of the local server uses the new parameter θ for a new round of training. The following steps are included: S41: The local server uploads the single local optimal network parameter update value θ′ to the central server; S42: The central server collects all updated model parameters θ′={θ′ p (p=1,2,...,P)},θ' p represents the single local optimal network parameter update value of the p-th responding user. The parameters are aggregated based on the FedAvg algorithm to calculate the weighted average loss of all terminal users. The global model parameter θ is fitted through SGD, as shown in Equations (22) and (23): In the formula, F p (θ) represents the average loss of all data features of the p-th aggregator user, f(θ) is the function for updating θ, and F g (θ) represents the average loss of all data features of the g-th aggregator user, g∈P is a subset; S43: The central server of the energy aggregation service provider sends the global model parameter θ to all local servers, and the local server of the aggregator user updates the PCA-BP neural network model parameter θ′=θ based on the global model parameter; S44: the PCA-BP neural network model of the local server uses the new parameter θ to perform a new round of training; S5: Repeat steps S2-S4 until the Rth interaction is completed; through continuous interaction and iteration between the central server and the local server, the global optimal model for load forecasting under the current market environment is obtained, and the final global optimal model parameter θ is used to perform the final load forecast on the local server to obtain the global optimal load forecast value, and formulate the corresponding market strategy based on this global optimal load forecast value to obtain benefits.

2. The method for load forecasting of energy aggregation service providers based on horizontal federated learning according to claim 1 is characterized in that: In step S1, the influencing factors in the collected initial data include: time factors, weather factors, industry factors and economic factors; among them, the latitude data of the time factor selects the year, month, day, hour and minute information to reflect the periodic changes of the load; the weather factors affecting the load change include temperature, humidity, precipitation, sunshine, wind direction, wind speed and air pressure; the industry factor describes the impact on the load through the electricity consumption of 10 industries, namely agriculture / forestry / animal husbandry / fishery, industry, transportation / warehousing / postal industry, information transmission / software / information technology service industry, wholesale and retail industry, accommodation and catering industry, finance industry, real estate industry, leasing and business service industry, public service and management organization; the economic factor directly selects the local GDP data to reflect the connection between the socio-economic environment and the load.

3. The method for load forecasting of energy aggregation service providers based on horizontal federated learning according to claim 2 is characterized in that: In step S1, the aggregator user local data set is preprocessed, including: a. Use the 3-Sigma criterion to detect possible outliers in the energy aggregation service provider's load data set; b. Fill missing values ​​according to formula (1) and (2): x ab =X a-1 (1-w ab )+X a w ab ,a=2,3,…,T",b=1,2,...,N(1); In the formula, X a is the data value of the ath hour of the original sequence, X a-1 is the data value of the original sequence at hour a-1, x ab is the bth data value in the ath hour of the interpolated sequence, w ab For X a x ab The weight of , N is the total number of split points within 1 hour, and T″ is the total number of hours in the original sequence; c. Use one-hot encoding and sin / cos cyclic encoding for discrete values ​​in the data; d. Use mean variance normalization to scale the features of continuous values ​​in the data, as shown in formula (3): In the formula, x norm is the normalized value of the data, μ is the mean value of the data, and σ is the standard deviation of the data.

4. The method for load forecasting of energy aggregation service providers based on horizontal federated learning according to claim 3 is characterized in that: The step S3 comprises the following steps: S31: input the data of the test set into the single local training optimal network to obtain the load forecast value; S32: Calculate the smooth curve cross entropy loss function L between the load prediction value and the true value of the test set according to equations (18)-(20) j (θ) and the back-propagated gradients of network weights and network thresholds; S33: Generate a single local optimal network parameter update value θ′ according to formula (21).

5. The method for load forecasting of energy aggregation service providers based on horizontal federated learning according to claim 4 is characterized in that: The step S5 comprises the following steps: S51: repeating steps S2-S4 to complete a limited number of interactions between the central server and the local server; S52: After the Rth interaction, the global optimal model for load forecasting under the current market environment is obtained, and the communication interaction round r=1,2,…,R is the number of model parameter interactions between the aggregator user's local server and the energy aggregation service provider's central server; S53: The energy aggregation service provider verifies the global optimal model and gives corresponding aggregator users distribution response rewards according to the degree of contribution to the global optimal model; S54: using the final global optimal model parameter θ to perform a final load forecast of the aggregator user in the local server to obtain a global optimal load forecast value; S55: Formulate corresponding market strategies according to the global optimal load forecast value to obtain benefits.

6. The energy aggregation service provider load forecasting system based on horizontal federated learning is characterized by: The method for load forecasting of energy aggregation service providers based on horizontal federated learning is used to implement any one of claims 1 to 5, comprising: The data collection and processing module is used to collect the initial data of five feature types, namely time data, weather data, industry data, load data and economic data, and perform manual feature selection to form a local data set of aggregator users. The local data set of aggregator users is preprocessed, including outlier detection and missing value supplementation, and the discrete values ​​in the data are encoded using one-hot encoding and sin / cos cyclic encoding, and the continuous values ​​are normalized using mean-variance normalization operations; then, the preprocessed local data set of aggregator users is divided into a training set and a test set, which are used for model training and testing respectively; The training module is used to send the data of the training set to the PCA-BP neural network model of the local server for the first training. The initial parameter θ0 of the model is given in this training. During the training, the data of the training set is firstly subjected to feature extraction by PCA, including the standardization of the data feature matrix, the calculation of the covariance matrix and the singular value decomposition, so as to obtain the feature matrix after feature extraction. The extracted feature matrix is ​​then input into the PCA-BP neural network model to obtain the initial load forecast value of each terminal user. In the back propagation, the smooth curve cross entropy method is used to calculate the loss value of the load forecast result and the true value. After a finite number of iterations until the loss value is minimized, the optimal network for a single local training is obtained. The parameter updating module is used to input the test set data into the single local training optimal network to obtain the load forecast information, and then calculate the smooth curve cross entropy loss function of the load forecast information and the true value and the back propagation gradient of the network weight and the network threshold to generate a single local optimal network parameter update value θ′; The calculation module uploads the single local optimal network parameter update value θ′ to the central server through the local server. The central server calculates the weighted average loss of all terminal users based on the FedAvg algorithm and fits the global model parameter θ through stochastic gradient descent SGD. Then, the central server sends the global model parameter θ to the local server. The local server updates the local parameter θ′=θ based on θ. The PCA-BP neural network model of the local server uses the new parameter θ for a new round of training. The load forecasting module obtains the global optimal model for load forecasting under the current market environment through continuous interactive iteration between the central server and the local server. The final global optimal model parameter θ is used to perform the final load forecast on the local server to obtain the global optimal load forecast value. Based on this global optimal load forecast value, the corresponding market strategy is formulated to obtain benefits.

Citation Information

Patent Citations

  • Multi-factor electrical load prediction method based on deep learning

    CN113962364A

  • Sub-industry power load prediction method and device based on federated learning, and storage medium

    CN115600717A

  • Power data sharing method based on transverse federated learning

    CN115775010A

  • Power load short-term prediction system and method based on privacy protection

    CN116128164A

  • Wireless service traffic prediction method based on weighted federated learning

    WO2021169577A1