Power market differential privacy federal learning method based on data quality evaluation

By adopting differential privacy federated learning method based on data quality assessment in the power market, clustering and weighted average aggregation, calculating Shapley values, the difficulties of multi-data source model update and privacy protection in FL are solved, and model performance and privacy protection are improved value of application.

CN119227835APending Publication Date: 2024-12-31BEIJING POWER EXCHANGE CENT CO LTD +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411353543.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

In the power market, when Federal Learning (FL) involves multiple data sources, it is difficult to achieve high-quality model update aggregation, and calculating Shapley values ​​in the FL environment is expensive, making it impossible to balance data privacy protection and model performance. Especially in hundreds of mobile device scenarios, it is cumbersome to calculate the marginal contribution of a single node.

Method used

Using the power market differential privacy federated learning method based on data quality evaluation, by collecting target power market data, building power training data sets, training local models and calculating local gradients, performing clustering and weighted average aggregation, calculating Shapley values ​​and normalizing , generate global models, and update them through iteratively until the termination condition is met.

Benefits of technology

It reduces the computational complexity, significantly improves model performance, improves the practical application value of data privacy protection and collaborative utilization in the power market, and solves the balance problem of high-quality model update aggregation and privacy protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119227835A_ABST
    Figure CN119227835A_ABST
Patent Text Reader

Abstract

The invention relates to a power market differential privacy federal learning method based on data quality assessment, and the method comprises the steps: carrying out the model training of local data on each client, and adding Laplace noise in a gradient estimation process; clustering the local model update of each client, and averagely aggregating clustering results to obtain clustering representative update; evaluating contribution of the clustering representatives, and calculating a Shapley value of each clustering representative; using a normalized Shapley value as a weight, and performing weighted average aggregation on the model update represented by all clusters to form a global model; and the server sends the updated global model back to each client, and starts a new training round until the model converges and reaches a preset training round or precision requirement. Therefore, the problems that in the prior art, FL relates to a plurality of data sources, high-quality model updating aggregation is difficult to achieve, in the FL environment, the calculation cost of Shapley values and the like is high, and balance of privacy protection and model performance cannot be achieved are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of differential privacy federated learning in the electricity market, and in particular to a differential privacy federated learning method in the electricity market based on data quality assessment. Background Art

[0002] At present, FL usually involves multiple data sources. Common problems in the data input process include missing entries and data confusion, making it difficult to achieve high-quality model update aggregation. In addition, the cost of calculating Shapley values ​​in the FL environment with existing technologies is high, making it difficult to achieve efficient solutions for data privacy protection and collaborative utilization in the power market. In addition, especially in FL scenarios involving hundreds of mobile devices, directly applying SV to calculate the marginal contribution of a single node is computationally very cumbersome and needs to be solved urgently. Summary of the invention

[0003] The present application provides a differential privacy federated learning method for the electricity market based on data quality assessment to solve the problems in the prior art that FL involves multiple data sources, making it difficult to achieve high-quality model update aggregation, and in the FL environment, the calculation cost of Shapley values, etc. is high, making it impossible to achieve a balance between privacy protection and model performance.

[0004] The first aspect of the present application provides a differential privacy federated learning method for the electricity market based on data quality assessment, comprising the following steps: collecting target electricity market data, and constructing an electricity training data set based on the target electricity market data, so as to train the local model corresponding to each target client in the preset federated learning framework through the electricity training data set, and at the same time calculate the local gradient corresponding to each target client according to the preset differential privacy mechanism; based on the local gradient, perform an update clustering operation on the local model corresponding to each target client to obtain a clustering result, and perform an average aggregation operation on the clustering result to obtain an update result represented by the clustering node corresponding to the clustering result, and evaluate each target client through the update result. The contribution value of the clustering node representative corresponding to each target client is calculated to calculate the Shapley value of each clustering node representative according to the contribution value, and the Shapley value of each clustering node representative is normalized to obtain the weight value of each clustering node representative, and a weighted average aggregation operation is performed on the local model corresponding to each clustering node representative according to the weight value to generate a global model; the global model is updated to a new local model corresponding to each target client, and local model training, clustering update operation, average aggregation operation and weighted average aggregation operation are iteratively performed on the new local model through each target client until a preset iteration termination condition is met to generate a final global model.

[0005] Optionally, in one embodiment of the present application, based on the target power market data, a power training data set is constructed to train the local model corresponding to each target client in the preset federated learning framework through the power training data set, and at the same time, the local gradient corresponding to each target client is calculated according to the preset differential privacy mechanism, including: preprocessing the target power market data to obtain standard power market data, and constructing the power training data set according to the standard power market data; determining the global sensitivity of a preset gradient estimator, and scaling the Laplace noise of each target client based on the global sensitivity and preset privacy parameters to obtain the perturbation gradient estimation value corresponding to each target client; sharing the perturbation gradient estimation value corresponding to each target client through each target client and a preset central server, and enabling the central server to aggregate the perturbation gradient estimation value corresponding to each target client according to a preset Gaussian mechanism to calculate and update the local gradient corresponding to each target client.

[0006] Optionally, in one embodiment of the present application, the global model is updated to a new local model corresponding to each target client, and local model training, clustering operation update, average aggregation operation and weighted average aggregation operation are iteratively performed on the new local model by each target client until a preset iteration termination condition is met to generate a final global model, including: calculating the local contribution, global contribution and binary flag variable corresponding to the cluster node representative in the current iteration round, and determining a contribution index based on the local contribution and the global contribution; evaluating the binary flag variable through the contribution index to obtain an evaluation result corresponding to the cluster node representative; determining the target cluster node representative based on the evaluation result and a preset node contribution-aware aggregation rule, so as to perform the average aggregation operation and weighted average aggregation operation in the current iteration round through the target cluster node representative.

[0007] Optionally, in one embodiment of the present application, the mathematical expression of the Shapley value is:

[0008]

[0009] in, represents the global model; S represents the feature set; N represents the cluster node representative set; Represents the average gradient difference after clustering; y s Represents the label corresponding to the global model; Represents the cluster node representative of the jth cluster.

[0010] The second aspect of the present application provides a differential privacy federated learning device for an electricity market based on data quality assessment, including: a gradient calculation module, which is used to collect target electricity market data, and based on the target electricity market data, construct an electricity training data set, so as to train the local model corresponding to each target client in a preset federated learning framework through the electricity training data set, and at the same time calculate the local gradient corresponding to each target client according to a preset differential privacy mechanism; a modeling module, which is used to update the local model corresponding to each target client based on the local gradient to obtain a clustering result, and perform an average aggregation operation on the clustering result to obtain an update result represented by the clustering node corresponding to the clustering result, and evaluate the update result through the update result. The contribution value of the clustering node representative corresponding to each target client is used to calculate the Shapley value represented by each clustering node according to the contribution value, and the Shapley value represented by each clustering node is normalized to obtain the weight value represented by each clustering node, and a weighted average aggregation operation is performed on the local model corresponding to each clustering node representative according to the weight value to generate a global model; an iteration module is used to update the global model to a new local model corresponding to each target client, and iteratively perform local model training, update clustering operation, average aggregation operation and weighted average aggregation operation on the new local model through each target client until a preset iteration termination condition is met to generate a final global model.

[0011] Optionally, in one embodiment of the present application, the gradient calculation module includes: a preprocessing unit, used to preprocess the target power market data to obtain standard power market data, and construct the power training data set based on the standard power market data; a scaling unit, used to determine the global sensitivity of a preset gradient estimator, and scale the Laplace noise of each target client based on the global sensitivity and a preset privacy parameter to obtain a perturbation gradient estimation value corresponding to each target client; an aggregation unit, used to share the perturbation gradient estimation value corresponding to each target client through each target client and a preset central server, and enable the central server to aggregate the perturbation gradient estimation value corresponding to each target client according to a preset Gaussian mechanism to calculate and update the local gradient corresponding to each target client.

[0012] Optionally, in one embodiment of the present application, the iteration module includes: a calculation unit, used to calculate the local contribution, global contribution and binary flag variable corresponding to the cluster node representative in the current iteration round, and determine the contribution index based on the local contribution and the global contribution; an evaluation unit, used to evaluate the binary flag variable through the contribution index to obtain the evaluation result corresponding to the cluster node representative; an execution unit, used to determine the target cluster node representative based on the evaluation result and a preset node contribution-aware aggregation rule, so as to perform the average aggregation operation and weighted average aggregation operation in the current iteration round through the target cluster node representative.

[0013] Optionally, in one embodiment of the present application, the mathematical expression of the Shapley value is:

[0014]

[0015] in, represents the global model; S represents the feature set; N represents the cluster node representative set; Represents the average gradient difference after clustering; y s Represents the label corresponding to the global model; Represents the cluster node representative of the jth cluster.

[0016] The third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the differential privacy federated learning method for the electricity market based on data quality assessment as described in the above embodiment.

[0017] The fourth aspect embodiment of the present application provides a computer-readable storage medium, which stores a computer program, which, when executed by a processor, implements the above-mentioned differential privacy federated learning method for the electricity market based on data quality assessment.

[0018] The fifth aspect embodiment of the present application provides a computer program product, including a computer program, which is executed to implement the above-mentioned differential privacy federated learning method for the electricity market based on data quality assessment.

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

[0020] The embodiments of the present application can collect target power market data, and construct a power training data set based on the target power market data, so as to train the local model corresponding to each target client in the preset federated learning framework through the power training data set, and calculate the local gradient corresponding to each target client according to the preset differential privacy mechanism; based on the local gradient, perform an update clustering operation on the local model corresponding to each target client to obtain a clustering result, and perform an average aggregation operation on the clustering result to obtain an update result represented by the clustering node corresponding to the clustering result, and evaluate the contribution value of the clustering node representative corresponding to each target client through the update result, so as to calculate the Shapl representative of each clustering node according to the contribution value. ey value, and normalize the Shapley value represented by each clustering node to obtain the weight value represented by each clustering node, and perform weighted average aggregation operation on the local model corresponding to each clustering node representative according to the weight value to generate a global model; update the global model to a new local model corresponding to each target client, and iteratively perform local model training, update clustering operation, average aggregation operation and weighted average aggregation operation on the new local model through each target client until the preset iteration termination condition is met to generate the final global model, thereby reducing the computational complexity, significantly improving the performance of the model, and improving the practical application value of data privacy protection and collaborative utilization in the power market. As a result, the problems in the prior art that FL involves multiple data sources and it is difficult to achieve high-quality model update aggregation, and in the FL environment, the calculation cost of Shapley value and the like is high, and it is impossible to achieve a balance between privacy protection and model performance are solved.

[0021] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0023] Figure 1 A flowchart of a differential privacy federated learning method for an electricity market based on data quality assessment provided according to an embodiment of the present application;

[0024] Figure 2 This is an example diagram of a differential privacy federated learning device for an electricity market based on data quality assessment according to an embodiment of the present application;

[0025] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0026] Among them, 10-differential privacy federated learning device for electricity market based on data quality assessment; 100-gradient calculation module, 200-modeling module, 300-iteration module; 501-memory, 502-processor, 503-communication interface. DETAILED DESCRIPTION

[0027] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0028] The following describes the differential privacy federated learning method for the electricity market based on data quality assessment of an embodiment of the present application with reference to the accompanying drawings. In response to the problems mentioned in the above background technology, the present application provides a differential privacy federated learning method for the electricity market based on data quality assessment. In this method, by collecting target electricity market data and constructing an electricity training data set based on the target electricity market data, the local model corresponding to each target client in the preset federated learning framework is trained through the electricity training data set, and the local gradient corresponding to each target client is calculated according to the preset differential privacy mechanism; based on the local gradient, the local model corresponding to each target client is updated and clustered to obtain a clustering result, and an average aggregation operation is performed on the clustering result to obtain an updated result represented by the clustering node corresponding to the clustering result, and the contribution value represented by the clustering node corresponding to each target client is evaluated through the updated result. , to calculate the Shapley value represented by each clustering node according to the contribution value, and normalize the Shapley value represented by each clustering node to obtain the weight value represented by each clustering node, and perform weighted average aggregation operation on the local model corresponding to each clustering node representative according to the weight value to generate a global model; update the global model to a new local model corresponding to each target client, and iteratively perform local model training, update clustering operation, average aggregation operation and weighted average aggregation operation on the new local model through each target client until the preset iteration termination condition is met to generate the final global model, thereby reducing the computational complexity, significantly improving the performance of the model, and improving the practical application value of data privacy protection and collaborative utilization in the power market. As a result, the problems in the prior art that FL involves multiple data sources and it is difficult to achieve high-quality model update aggregation, and in the FL environment, the calculation cost of Shapley values ​​is high, and it is impossible to achieve a balance between privacy protection and model performance are solved.

[0029] Specifically, Figure 1 A flowchart of a differential privacy federated learning method for the electricity market based on data quality assessment provided in an embodiment of the present application.

[0030] like Figure 1 As shown in FIG. 1 , the differential privacy federated learning method for the electricity market based on data quality assessment includes the following steps:

[0031] In step S101, target power market data is collected, and based on the target power market data, a power training data set is constructed to train the local model corresponding to each target client in the preset federated learning framework through the power training data set, and at the same time, the local gradient corresponding to each target client is calculated according to the preset differential privacy mechanism.

[0032] The embodiment of the present application can first collect and preprocess high-dimensional data of the electricity market (i.e., target electricity market data), and preprocess the target electricity market data to solve the data missing and confusion problems in the target electricity market data, and then use local data on each client to train the model and calculate the local gradient. The embodiment of the present application can add Laplace noise in the gradient estimation process to ensure the privacy protection of a single client data.

[0033] It can be understood that the embodiment of the present application perturbs the projection vector in the gradient estimation process through an efficient differential privacy federated learning framework driven by data quality to adapt to high-dimensional electricity market data; in addition, considering that FL usually involves multiple data sources and there are common problems such as missing entries and data confusion in the data input process, the embodiment of the present application introduces a data quality assessment method based on clustered Shapley values, thereby achieving high-quality model update aggregation and improving model performance through the FL framework that combines differential privacy with data quality assessment, so as to ensure a balance between data privacy and model performance.

[0034] Optionally, in one embodiment of the present application, based on the target power market data, a power training data set is constructed to train the local model corresponding to each target client in the preset federated learning framework through the power training data set, and at the same time, the local gradient corresponding to each target client is calculated according to the preset differential privacy mechanism, including: preprocessing the target power market data to obtain standard power market data, and constructing the power training data set based on the standard power market data; determining the global sensitivity of the preset gradient estimator, and scaling the Laplace noise of each target client based on the global sensitivity and preset privacy parameters to obtain the perturbation gradient estimation value corresponding to each target client; sharing the perturbation gradient estimation value corresponding to each target client through each target client and the preset central server, and according to the preset Gaussian mechanism, the central server aggregates the perturbation gradient estimation value corresponding to each target client to calculate and update the local gradient corresponding to each target client.

[0035] It should be noted that in the federated learning of the embodiment of the present application,

[0036] It should be understood by those skilled in the art that, in federated learning, achieving differential privacy in private gradient estimation usually involves perturbing the projection vector during the gradient calculation process to mask the contribution information of a single client. As a feasible approach, the prior art can add calibration noise to these projection vectors. The unperturbed gradient estimate of client k relative to its projection vector v is calculated as shown in formula (1):

[0037]

[0038] Among them, W t represents the global model at iteration t; represents the local dataset belonging to customer k; represents the size of the local data set belonging to client \(k\); X j Indicates from ; l(·) represents the loss function.

[0039] In order to achieve differential privacy, the embodiment of the present application can introduce Laplace noise in the gradient estimation, and the Laplace noise is scaled according to the sensitivity of the gradient estimator. The embodiment of the present application can use Δ f represents the sensitivity of the gradient estimator (i.e., global sensitivity), then the perturbed gradient estimate is:

[0040]

[0041] Where ∈ is the privacy parameter. In fact, the global sensitivity quantifies the maximum change in the gradient output when a single data point is changed on all customer data sets, and its mathematical expression is:

[0042]

[0043] in, and represents two data sets of client k, which differ by only one data point; W t denotes the global model parameters at iteration t; ||·||2 denotes the L2 norm.

[0044] Understandably, Δ captures the worst case scenario, i.e., how much the gradient output changes due to the modification of a single data point in the dataset of all clients. Incorporating this perturbation into the gradient estimation process ensures that the privacy of individual client updates is preserved within the federated learning framework, thereby protecting sensitive information while enabling collaborative model training.

[0045] In actual implementation, after the perturbation, each client shares its noisy gradient estimate with the central server. The server then aggregates these perturbed gradients to update the global model while maintaining differential privacy. The aggregation process usually involves techniques such as weighted averaging or secure aggregation to ensure that the updates from individual clients are effectively merged without compromising privacy. The noisy gradient updates from K clients are expressed as In order to protect different privacy while aggregating these updates, the Gaussian mechanism can be used for aggregation in the embodiment of the present application, and the updated global model parameter W t+1 It can be calculated as:

[0046]

[0047] Where η is the learning rate; σ is the standard deviation of the Gaussian noise added to the aggregation, represents Gaussian noise.

[0048] It should be noted that, in the specific implementation process, those skilled in the art may also use methods such as exponential mechanism for aggregation, which is not specifically limited here.

[0049] Therefore, the embodiment of the present application achieves differential privacy by adding Laplace noise to the gradient estimation through a differential privacy mechanism based on private gradient estimation, that is, by perturbing the projection vector of the gradient estimation and adopting the Gaussian mechanism to aggregate the global model, so that during the aggregation process, the global model can be updated in a privacy-preserving manner, and the noise gradients from all clients are incorporated therein, so as to achieve efficient model training while ensuring privacy protection.

[0050] In step S102, based on the local gradient, the local model corresponding to each target client is updated and clustered to obtain a clustering result, and an average aggregation operation is performed on the clustering result to obtain an update result of the clustering node representative corresponding to the clustering result, and the contribution value of the clustering node representative corresponding to each target client is evaluated through the update result to calculate the Shapley value of each clustering node representative according to the contribution value, and the Shapley value of each clustering node representative is normalized to obtain a weight value of each clustering node representative, and a weighted average aggregation operation is performed on the local model corresponding to each clustering node representative according to the weight value to generate a global model.

[0051] Furthermore, the embodiments of the present application may also use the K-means clustering algorithm to cluster the local model updates of each client, and average the clustering results to obtain cluster representative updates; thereafter, the embodiments of the present application may use a Shapley value-based method to evaluate the contribution of cluster representatives to calculate the Shapley value of each cluster representative, and use the normalized Shapley value as a weight to perform weighted average aggregation on the model updates of all cluster representatives to form a global model.

[0052] Therefore, the embodiment of the present application adopts a data quality assessment method based on clustered Shapley values, and uses a k-means clustering algorithm to cluster local model updates, and averages the clustering results to reduce computational complexity; and then uses normalized Shapley values ​​as aggregation weights to achieve high-quality model update aggregation and improve model performance, thereby solving the problem of high computational cost of calculating Shapley values ​​in the FL environment.

[0053] Optionally, in one embodiment of the present application, the mathematical expression of the Shapley value is:

[0054]

[0055] in, represents the global model; S represents the feature set; N represents the cluster node representative set; Represents the average gradient difference after clustering; y s Indicates the label corresponding to the global model; Represents the cluster node representative of the jth cluster.

[0056] Those skilled in the art should understand that Shapley Value is a concept in cooperative game theory, which is used to fairly distribute the value generated by a player alliance. In machine learning, it is often used to understand the contribution of each feature to model prediction.

[0057] In the embodiment of the present application, a prediction model may be denoted as f, and Φ i (f) represents the Shapley value of feature i in model f. The Shapley value of feature i can be calculated as follows:

[0058]

[0059] Where N represents the set of all features; x S represents an instance with only features in the feature set S; f(x S {i}) represents the predicted value f(x) of the model when feature i is added to the set S. S ) is the prediction value of the model when only the features in set S are considered; |S| represents the insertion degree of set S; |N| is the total number of features.

[0060] Formula (5) calculates the marginal contribution of feature i when it is added to different feature subsets S, and the weighting method is the ratio of the number of permutations of the feature in S to the total number of permutations of all features. However, in actual implementation, especially for models with a large number of features, the computational cost of directly using the above formula to calculate the Shapley value is high. Therefore, the existing technology usually adopts various approximation techniques such as sampling or kernel approximation to effectively estimate the Shapley value.

[0061] However, in FL scenarios involving hundreds of mobile devices, directly applying SV to calculate the marginal contribution of a single node is computationally very cumbersome. To address this challenge, the embodiments of the present application may use a k-means clustering algorithm to reduce the complexity of SV calculation.

[0062] Specifically, the embodiment of the present application clusters the local model updates by using the k-means clustering algorithm to generate a cluster containing Δw k Then, the local model updates in the clusters are averaged and aggregated to obtain (where j represents the jth cluster) as the node representative of the cluster, thereby obtaining k node representatives, and using these node representatives as a set in SV Therefore, the final calculation result of SV can be expressed as:

[0063]

[0064] in, represents the global model, y s Indicates the corresponding label.

[0065] Then, the embodiment of the present application can calculate the Shapley value represented by each cluster node. Normalize to aggregate them as aggregation weights.

[0066] Therefore, the embodiments of the present application further evaluate the data quality by estimating the private gradient based on federated learning and using the clustered Shapley value, thereby achieving a good balance between efficient training and privacy protection.

[0067] In step S103, the global model is updated to a new local model corresponding to each target client, and local model training, clustering operation update, average aggregation operation and weighted average aggregation operation are iteratively performed on the new local model by each target client until the preset iteration termination condition is met to generate the final global model.

[0068] Furthermore, the embodiments of the present application can update the global model and send the updated global model back to each client through the server, start a new training round, and then repeat the above steps until the model converges, thereby achieving the preset training rounds or accuracy requirements.

[0069] Optionally, in one embodiment of the present application, the global model is updated to a new local model corresponding to each target client, and local model training, clustering operation update, average aggregation operation and weighted average aggregation operation are iteratively performed on the new local model through each target client until a preset iteration termination condition is met to generate a final global model, including: calculating the local contribution, global contribution and binary flag variable corresponding to the cluster node representative in the current iteration round, and determining the contribution index based on the local contribution and the global contribution; evaluating the binary flag variable through the contribution index to obtain the evaluation result corresponding to the cluster node representative; based on the evaluation result and the preset node contribution-aware aggregation rule, determining the target cluster node representative, so as to perform the average aggregation operation and weighted average aggregation operation in the current iteration round through the target cluster node representative.

[0070] In order to evaluate the contribution of each node in detail, the embodiment of the present application can divide the node contribution in each round into local and global contributions, where the local contribution represents the performance of the node in the local training of this round, and the global contribution represents the influence of the node on the model aggregation. The embodiment of the present application can calculate the local and global contributions by the following formula:

[0071]

[0072] in, represents the global model; D test represents the test data set; w k Represents the local model parameters of node k, and it is necessary to traverse all nodes to calculate the above contribution value.

[0073] After determining the global and local contributions, they are adaptively incorporated into the selection process of the client participating in the model aggregation, thereby temporarily excluding clients with low update quality. To achieve this goal, the embodiment of the present application may introduce a binary flag variable, denoted as α∈{0,1}.

[0074] In addition, according to whether certain predefined standards are met, the embodiment of the present application can design a value of a contribution index evaluation indicator parameter α to ensure that only nodes with excellent performance are included in the aggregation process. The contribution is calculated as follows:

[0075]

[0076] For the t-th round of evaluation, assume that the global model performance evaluation result of the t-1th round is The judgment condition of the flag parameter can be expressed as: If Then set α k =1, otherwise set α k =0; when α k =1, it means that the node is retained for aggregation; otherwise, the node will be excluded in this round. Therefore, the node contribution-aware aggregation rule can be expressed as follows:

[0077]

[0078] Therefore, the embodiments of the present application can significantly reduce the computational cost while ensuring the model performance by combining the clustering algorithm and the Shapley value data quality assessment method; in addition, the embodiments of the present application significantly improve the practical application value of data privacy protection and collaborative utilization in the power market through the innovative design of the differential privacy mechanism and the data quality assessment method through the data quality-driven efficient differential privacy FL framework.

[0079] According to the differential privacy federated learning method for the electricity market based on data quality assessment proposed in the embodiment of the present application, by collecting target electricity market data and constructing an electricity training data set based on the target electricity market data, the local model corresponding to each target client in the preset federated learning framework is trained through the electricity training data set, and the local gradient corresponding to each target client is calculated according to the preset differential privacy mechanism; based on the local gradient, the local model corresponding to each target client is updated and clustered to obtain a clustering result, and an average aggregation operation is performed on the clustering result to obtain an update result represented by the clustering node corresponding to the clustering result, and the contribution value of the clustering node representative corresponding to each target client is evaluated through the updated result to calculate according to the contribution value The Shapley value represented by each clustering node is normalized to obtain the weight value represented by each clustering node, and the local model corresponding to each clustering node is weighted average aggregation operation is performed according to the weight value to generate a global model; the global model is updated to a new local model corresponding to each target client, and local model training, clustering update operation, average aggregation operation and weighted average aggregation operation are iteratively performed on the new local model by each target client until the preset iteration termination condition is met to generate the final global model, thereby reducing the computational complexity, significantly improving the performance of the model, and improving the practical application value of data privacy protection and collaborative utilization in the power market.

[0080] Secondly, the differential privacy federated learning device for the electricity market based on data quality assessment proposed in accordance with an embodiment of the present application is described with reference to the accompanying drawings.

[0081] Figure 2It is a block diagram of a differential privacy federated learning device for the electricity market based on data quality assessment according to an embodiment of the present application.

[0082] like Figure 2 As shown, the differential privacy federated learning device 10 for the electricity market based on data quality assessment includes: a gradient calculation module 100, a modeling module 200 and an iteration module 300.

[0083] Among them, the gradient calculation module 100 is used to collect target power market data and construct a power training data set based on the target power market data, so as to train the local model corresponding to each target client in the preset federated learning framework through the power training data set, and at the same time calculate the local gradient corresponding to each target client according to the preset differential privacy mechanism.

[0084] Modeling module 200 is used to update the local model corresponding to each target client based on the local gradient to obtain a clustering result, and perform an average aggregation operation on the clustering result to obtain the update result of the clustering node representative corresponding to the clustering result, and evaluate the contribution value of the clustering node representative corresponding to each target client through the update result to calculate the Shapley value of each clustering node representative according to the contribution value, and normalize the Shapley value of each clustering node representative to obtain the weight value of each clustering node representative, and perform a weighted average aggregation operation on the local model corresponding to each clustering node representative according to the weight value to generate a global model.

[0085] The iteration module 300 is used to update the global model into a new local model corresponding to each target client, and iteratively perform local model training, update clustering operations, average aggregation operations and weighted average aggregation operations on the new local model through each target client until the preset iteration termination condition is met to generate a final global model.

[0086] Optionally, in one embodiment of the present application, the gradient calculation module 100 includes: a preprocessing unit, a scaling unit and an aggregation unit.

[0087] The preprocessing unit is used to preprocess the target power market data to obtain standard power market data, and to construct a power training data set based on the standard power market data.

[0088] The scaling unit is used to determine the global sensitivity of a preset gradient estimator, and scale the Laplace noise of each target client based on the global sensitivity and a preset privacy parameter to obtain a perturbation gradient estimation value corresponding to each target client.

[0089] An aggregation unit is used to share the disturbance gradient estimation value corresponding to each target client through each target client and a preset central server, and enable the central server to aggregate the disturbance gradient estimation value corresponding to each target client according to a preset Gaussian mechanism to calculate and update the local gradient corresponding to each target client.

[0090] Optionally, in one embodiment of the present application, the iteration module 300 includes: a calculation unit, an evaluation unit and an execution unit.

[0091] The calculation unit is used to calculate the local contribution, global contribution and binary flag variable corresponding to the cluster node representative in the current iteration round, and determine the contribution index according to the local contribution and the global contribution.

[0092] The evaluation unit is used to evaluate the binary flag variable through the contribution index to obtain the evaluation result corresponding to the cluster node representative.

[0093] The execution unit is used to determine the target clustering node representative based on the evaluation result and the preset node contribution-aware aggregation rule, so as to perform the average aggregation operation and the weighted average aggregation operation in the current iteration round through the target clustering node representative.

[0094] Optionally, in one embodiment of the present application, the mathematical expression of the Shapley value is:

[0095]

[0096] in, represents the global model; S represents the feature set; N represents the cluster node representative set; Represents the average gradient difference after clustering; y s Indicates the label corresponding to the global model; Represents the cluster node representative of the jth cluster.

[0097] It should be noted that the aforementioned explanation of the embodiment of the differential privacy federated learning method for the electricity market based on data quality assessment is also applicable to the differential privacy federated learning device for the electricity market based on data quality assessment of this embodiment, and will not be repeated here.

[0098] According to the data quality assessment-based differential privacy federated learning device for the electricity market proposed in the embodiment of the present application, the device includes a gradient calculation module, which is used to collect target electricity market data, and construct an electricity training data set based on the target electricity market data, so as to train the local model corresponding to each target client in the preset federated learning framework through the electricity training data set, and calculate the local gradient corresponding to each target client according to the preset differential privacy mechanism; a modeling module, which is used to update the local model corresponding to each target client based on the local gradient to obtain a clustering result, and perform an average aggregation operation on the clustering result to obtain an update result represented by the clustering node corresponding to the clustering result, and evaluate the contribution value of the clustering node representative corresponding to each target client according to the contribution. The Shapley value represented by each clustering node is calculated by the contribution value, and the Shapley value represented by each clustering node is normalized to obtain the weight value represented by each clustering node, and the local model corresponding to each clustering node representative is weighted average aggregation operation is performed according to the weight value to generate a global model; an iteration module is used to update the global model to a new local model corresponding to each target client, and iteratively perform local model training, update clustering operation, average aggregation operation and weighted average aggregation operation on the new local model through each target client until the preset iteration termination condition is met to generate the final global model, thereby reducing the computational complexity, significantly improving the performance of the model, and improving the practical application value of data privacy protection and collaborative utilization in the power market.

[0099] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:

[0100] A memory 301 , a processor 302 , and a computer program stored in the memory 301 and executable on the processor 302 .

[0101] When the processor 302 executes the program, the differential privacy federated learning method for the electricity market based on data quality assessment provided in the above embodiment is implemented.

[0102] Furthermore, the electronic device further comprises:

[0103] The communication interface 303 is used for communication between the memory 301 and the processor 302 .

[0104] The memory 301 is used to store computer programs that can be run on the processor 302 .

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

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

[0107] Optionally, in a specific implementation, if the memory 301, the processor 302 and the communication interface 303 are integrated on a chip, the memory 301, the processor 302 and the communication interface 303 can communicate with each other through an internal interface.

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

[0109] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned differential privacy federated learning method for the electricity market based on data quality assessment.

[0110] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed, is used to implement the above-mentioned differential privacy federated learning method for the electricity market based on data quality assessment.

[0111] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

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

[0113] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0114] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or N wirings (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways as necessary and then storing it in a computer memory.

[0115] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0116] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0117] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0118] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A differential privacy federated learning method for power market based on data quality assessment, characterized in that: The following steps are involved: Collect target power market data, and construct a power training data set based on the target power market data, so as to train a local model corresponding to each target client in a preset federated learning framework through the power training data set, and calculate a local gradient corresponding to each target client according to a preset differential privacy mechanism; Based on the local gradient, the local model corresponding to each target client is updated and clustered to obtain a clustering result, and an average aggregation operation is performed on the clustering result to obtain an update result of the clustering node representative corresponding to the clustering result, and the contribution value of the clustering node representative corresponding to each target client is evaluated through the update result to calculate the Shapley value of each clustering node representative according to the contribution value, and the Shapley value of each clustering node representative is normalized to obtain a weight value of each clustering node representative, and a weighted average aggregation operation is performed on the local model corresponding to each clustering node representative according to the weight value to generate a global model; The global model is updated to a new local model corresponding to each target client, and local model training, clustering update operation, average aggregation operation and weighted average aggregation operation are iteratively performed on the new local model by each target client until a preset iteration termination condition is met, so as to generate a final global model.

2. The method according to claim 1, characterized in that The method of constructing a power training data set based on the target power market data, so as to train a local model corresponding to each target client in a preset federated learning framework through the power training data set, and calculating a local gradient corresponding to each target client according to a preset differential privacy mechanism, includes: Preprocessing the target power market data to obtain standard power market data, and constructing the power training data set according to the standard power market data; Determine a global sensitivity of a preset gradient estimator, and scale the Laplace noise of each target client based on the global sensitivity and a preset privacy parameter to obtain a perturbation gradient estimation value corresponding to each target client; The disturbance gradient estimation value corresponding to each target client is shared by each target client and a preset central server, and the central server aggregates the disturbance gradient estimation value corresponding to each target client according to a preset Gaussian mechanism to calculate and update the local gradient corresponding to each target client.

3. The method according to claim 1, characterized in that: The updating of the global model to a new local model corresponding to each target client, and iteratively performing local model training, updating clustering operation, average aggregation operation and weighted average aggregation operation on the new local model by each target client until a preset iteration termination condition is met to generate a final global model, includes: Calculate the local contribution, global contribution and binary flag variable corresponding to the cluster node representative in the current iteration round, and determine the contribution index according to the local contribution and the global contribution; Evaluating the binary flag variable by the contribution index to obtain an evaluation result corresponding to the cluster node representative; Based on the evaluation result and a preset node contribution-aware aggregation rule, a target clustering node representative is determined, so as to perform the average aggregation operation and the weighted average aggregation operation in the current iteration round through the target clustering node representative.

4. The method according to claim 1, characterized in that The mathematical expression of the Shapley value is: in, represents the global model; S represents the feature set; N represents the cluster node representative set; Represents the average gradient difference after clustering; y s Represents the label corresponding to the global model; Represents the cluster node representative of the jth cluster.

5. A differential privacy federated learning device for power market based on data quality assessment, characterized in that: include: A gradient calculation module, used to collect target power market data, and construct a power training data set based on the target power market data, so as to train a local model corresponding to each target client in a preset federated learning framework through the power training data set, and calculate the local gradient corresponding to each target client according to a preset differential privacy mechanism; A modeling module, configured to perform an update clustering operation on the local model corresponding to each target client based on the local gradient to obtain a clustering result, and perform an average aggregation operation on the clustering result to obtain an update result of the clustering node representative corresponding to the clustering result, and evaluate the contribution value of the clustering node representative corresponding to each target client through the update result to calculate the Shapley value of each clustering node representative according to the contribution value, and normalize the Shapley value of each clustering node representative to obtain a weight value of each clustering node representative, and perform a weighted average aggregation operation on the local model corresponding to each clustering node representative according to the weight value to generate a global model; An iteration module is used to update the global model to a new local model corresponding to each target client, and iteratively perform local model training, update clustering operations, average aggregation operations and weighted average aggregation operations on the new local model through each target client until a preset iteration termination condition is met, so as to generate a final global model.

6. The device according to claim 5, characterized in that The gradient calculation module comprises: A preprocessing unit, configured to preprocess the target power market data to obtain standard power market data, and construct the power training data set according to the standard power market data; A scaling unit, configured to determine a global sensitivity of a preset gradient estimator, and scale the Laplace noise of each target client based on the global sensitivity and a preset privacy parameter to obtain a perturbation gradient estimation value corresponding to each target client; An aggregation unit is used to share the disturbance gradient estimation value corresponding to each target client through each target client and a preset central server, and enable the central server to aggregate the disturbance gradient estimation value corresponding to each target client according to a preset Gaussian mechanism to calculate and update the local gradient corresponding to each target client.

7. The device according to claim 5, characterized in that The iteration module includes: A calculation unit, used to calculate the local contribution, global contribution and binary flag variable corresponding to the cluster node representative in the current iteration round, and determine the contribution index according to the local contribution and the global contribution; An evaluation unit, configured to evaluate the binary flag variable by using the contribution index to obtain an evaluation result corresponding to the cluster node representative; An execution unit is used to determine a target clustering node representative based on the evaluation result and a preset node contribution-aware aggregation rule, so as to perform the average aggregation operation and the weighted average aggregation operation in the current iteration round through the target clustering node representative.

8. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the differential privacy federated learning method for the electricity market based on data quality assessment as described in any one of claims 1 to 4.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the differential privacy federated learning method for the electricity market based on data quality assessment as described in any one of claims 1 to 4.

10. A computer program product, comprising a computer program, characterized in that The computer program is executed to implement the differential privacy federated learning method for the electricity market based on data quality assessment as described in any one of claims 1 to 4.

Citation Information

Cited By

  • Data value evaluation method, electronic equipment and medium

    CN120105043A

  • Photovoltaic power prediction-oriented multi-level security data resource pool construction method

    CN122113142A