Energy Data Asset Right Confirmation Method, System, Device and Medium Based on Federated Learning
By adopting a federated learning-based method in a distributed energy environment, decrypting and aggregating the model parameters of energy data nodes, calculating the data contribution degree and generating asset rights confirmation certificates, the accuracy and privacy leakage of energy data asset rights confirmation in a distributed energy environment are solved, and data security and accurate asset rights confirmation are achieved.
Patent Information
- Application Number
- CN202510338905.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-03-21
AI Technical Summary
The prior art cannot accurately confirm the rights of energy data assets in a distributed energy environment, and there is a large risk of privacy leakage during data processing and analysis.
Using a federated learning method, through the communication connection between the central node and multiple energy data nodes, the encryption model parameters of each energy data node are decrypted, the model node parameters are aggregated to build a global model, the data contribution degree is calculated and the asset rights confirmation certificate is generated to determine the data permissions of the energy data node.
It realizes the accurate quantification of data contributions of each node in a distributed energy environment, ensures data security and privacy, avoids the risk of data leakage, and accurately confirms the rights of energy data assets.
Smart Images

Figure CN119848910B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly to a method, system, device and medium for energy data asset right confirmation based on federated learning. Background Art
[0002] With the development of the trend of energy data assetization, in the current energy industry, existing data acquisition systems usually involve multiple stakeholders, including power generation enterprises, grid operators, users, etc. These participants independently collect, store and process data, and the resource right confirmation mechanism can determine who owns the data and how to reasonably allocate the right of use. Currently, due to the lack of unified data management and ownership definition standards, the attribution problem of energy data has become complicated, and traditional right confirmation methods are difficult to meet the attribution requirements of multi-source heterogeneous data in distributed scenarios. Moreover, as more and more personal and enterprise energy consumption information is digitally recorded, the risk of privacy leakage also increases during the analysis and processing of multi-source heterogeneous data. Summary of the Invention
[0003] The main purpose of the present invention is to provide a method, system, device and medium for energy data asset right confirmation based on federated learning, aiming to solve the technical problems that the prior art cannot accurately confirm the rights of energy data assets in a distributed energy environment and there is a large risk of privacy leakage during data processing and analysis.
[0004] To achieve the above object, the present invention provides a method for energy data asset right confirmation based on federated learning, which is applied to a central node in a system for energy data asset right confirmation based on federated learning. The system for energy data asset right confirmation based on federated learning includes the central node and multiple energy data nodes, and the central node is communicatively connected to each energy data node;
[0005] The method includes the following steps:
[0006] Decrypt the encrypted model parameters sent by each energy data node to obtain model node parameters, where the model node parameters are obtained by each energy data node optimizing the local model based on local energy data;
[0007] Aggregate the model node parameters to obtain global model parameters, and construct a global model based on the global model parameters. The global model parameters are aggregated according to the following formula:
[0008]
[0009] Wherein, is the global model parameter, represents the energy data node The model node parameters of are energy data nodes data volume;
[0010] Calculate the data contribution degrees of each energy data node according to the global model;
[0011] Generate asset confirmation certificates corresponding to each energy data node based on the data contribution degrees, where the asset confirmation certificates are used to determine the data permissions of the energy data nodes, and the data permissions include data ownership permissions and data usage permissions.
[0012] Optionally, the calculating the data contribution degrees of each energy data node according to the global model includes:
[0013] Calculate the initial contribution degrees of each energy data node according to the global model:
[0014]
[0015] where represents the initial contribution degree of the energy data node ; represents the contribution degree of the model node parameters of the energy data node to the performance improvement of the global model, represents the contribution degree of the model node parameters of all energy data nodes to the performance improvement of the global model, is a smoothing factor, and the smoothing factor is used to balance the contribution degree of the historical round and the contribution degree of the current round, represents the current round;
[0016] Obtain the original energy data provided by each energy data node, and preprocess the original energy data to obtain target energy data;
[0017] Adjust the initial contribution degrees based on the target energy data corresponding to each energy data node to obtain data contribution degrees.
[0018] Optionally, the adjusting the initial contribution degrees based on the target energy data corresponding to each energy data node to obtain data contribution degrees includes:
[0019] Conduct time analysis on the target energy data corresponding to each energy data node to determine the peak load period data and normal period data in the target energy data;
[0020] Determine the period weights of each target energy data based on the peak load period data and the normal period data;
[0021] Conduct feature analysis on the target energy data corresponding to each energy data node to determine the energy type and data type corresponding to each target energy data;
[0022] Determine the feature weights of each target energy data according to the energy type and data type;
[0023] Conduct node importance analysis on each energy data node to determine the node importance degree of each energy data node;
[0024] Determine the node weights of each energy data node based on the node importance degree;
[0025] Adjust the initial contribution degree according to the time period weight, the feature weight and the node weight to obtain the data contribution degree.
[0026] Optionally, the obtaining of the original energy data provided by each energy data node and the preprocessing of the original energy data to obtain the target energy data include:
[0027] Obtain the original energy data provided by each energy data node and conduct time series analysis on the original energy data;
[0028] Based on the time series analysis result, conduct data cleaning on the original energy data to obtain the initial energy data;
[0029] Conduct feature extraction on the initial energy data to obtain energy resource features;
[0030] Conduct dimensionality reduction processing on the initial energy data according to the energy resource features to obtain candidate energy data, and the dimensionality reduction processing refers to the following formula:
[0031]
[0032] where, is the initial data matrix of the initial energy data, is the projection matrix after dimensionality reduction, is the candidate data matrix of the candidate energy data obtained after dimensionality reduction, and the initial data matrix is matrix, represents the number of samples, represents the dimension of the initial energy data, and the projection matrix is matrix, represents the dimension after dimensionality reduction, and the candidate data matrix is matrix;
[0033] Conduct normalization processing on the candidate energy data according to the energy type of each candidate energy data to obtain the target energy data.
[0034] Optionally, generating the asset rights confirmation certificates corresponding to each energy data node based on the data contribution degree includes:
[0035] Obtaining the node identity identifier and the rights confirmation timestamp of each energy data node;
[0036] Generating a blockchain hash value based on the data contribution degree, the node identity identifier, and the rights confirmation timestamp:
[0037]
[0038] Wherein, represents the blockchain hash value, represents the data contribution degree, represents the node identity identifier, represents the timestamp of the asset rights confirmation certificate generation time, represents the hash function;
[0039] Generating an original rights confirmation certificate according to the blockchain hash value;
[0040] Generating an encrypted signature for each original rights confirmation certificate, and performing asymmetric encryption on the original rights confirmation certificate based on the encrypted signature to generate the asset rights confirmation certificates corresponding to each energy data node. The encrypted signature is generated with reference to the following formula:
[0041]
[0042] Wherein, represents the encrypted signature, represents encrypting the blockchain hash value using the private key.
[0043] In addition, to achieve the above object, the present invention also proposes an energy data asset rights confirmation method based on federated learning. The method is applied to an energy data node in an energy data asset rights confirmation system based on federated learning. The energy data asset rights confirmation system based on federated learning includes a central node and multiple energy data nodes, and the central node is communicatively connected to each energy data node;
[0044] The method includes:
[0045] Obtaining an energy data sample of the original model parameters and local energy data;
[0046] Performing gradient optimization on the original model parameters based on the energy data sample to obtain model node parameters:
[0047]
[0048] Wherein, Represents an energy data node The loss function of Represents an energy data node The model node parameters obtained after optimizing the original model parameters Represents an energy data node The total number of local energy data samples Represents the Input features of the th energy data sample Represents the True label of the th energy data sample Represents the predicted value of the current model parameters for the input data Represents the loss value of a single energy data sample;
[0049] Encrypt the model node parameters to obtain encrypted model parameters, and send the encrypted model parameters to the central node, so that the central node calculates the data contribution degrees of each energy data node based on the encrypted model parameters, and generates asset confirmation certificates corresponding to each energy data node based on the data contribution degrees.
[0050] Optionally, the encrypting the model node parameters to obtain encrypted model parameters includes:
[0051] Determine the initial gradient parameters of the model node parameters;
[0052] Add Gaussian noise to the initial gradient parameters to obtain target gradient parameters:
[0053]
[0054] Wherein, Represents the initial gradient parameters, Represents the Gaussian noise, Represents the target gradient parameters;
[0055] Encrypt the model node parameters based on the target gradient parameters to obtain encrypted model parameters.
[0056] In addition, to achieve the above object, the present invention also proposes an energy data asset confirmation system based on federated learning. The energy data asset confirmation system based on federated learning includes a central node and a plurality of energy data nodes, and the central node is communicatively connected to each energy data node;
[0057] The energy data node is used to obtain the original model parameters and the energy data samples of the local energy data;
[0058] The energy data node is further used to perform gradient optimization on the original model parameters based on the energy data samples to obtain model node parameters:
[0059]
[0060] Among them, represents the loss function of the energy data node of the represents the model node parameters obtained by optimizing the original model parameters for the energy data node represents the total number of local energy data samples of the energy data node represents the th input feature of the energy data sample represents the th true label of the energy data sample represents the predicted value of the current model parameters for the input data represents the loss value of a single energy data sample;
[0061] The energy data node is further configured to encrypt the model node parameters to obtain encrypted model parameters, and send the encrypted model parameters to the central node;
[0062] The central node is configured to decrypt the encrypted model parameters sent by each energy data node to obtain model node parameters, where the model node parameters are obtained by each energy data node optimizing the local model based on local energy data;
[0063] The central node is further configured to aggregate the model node parameters to obtain global model parameters, and construct a global model based on the global model parameters. The global model parameters are aggregated based on the following formula:
[0064]
[0065] Among them, is the global model parameter, represents the model node parameters of the energy data node is the data volume of the energy data node
[0066] The central node is further configured to calculate the data contribution degree of each energy data node according to the global model;
[0067] The central node is further configured to generate an asset confirmation certificate corresponding to each energy data node based on the data contribution degree. The asset confirmation certificate is used to determine the data permissions of the energy data node, and the data permissions include data ownership permissions and data usage permissions.
[0068] In addition, to achieve the above object, the present application further provides an energy data asset right confirmation device based on federated learning, where the device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the energy data asset right confirmation method based on federated learning as described above.
[0069] In addition, to achieve the above object, the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the steps of the energy data asset right confirmation method based on federated learning as described above.
[0070] In addition, to achieve the above object, the present application further provides a computer program product, where the computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps of the energy data asset right confirmation method based on federated learning as described above.
[0071] The present invention decrypts the encrypted model parameters sent by each energy data node to obtain model node parameters, where the model node parameters are obtained by each energy data node optimizing the local model based on local energy data, aggregates the model node parameters to obtain global model parameters, constructs a global model based on the global model parameters, calculates the data contribution degree of each energy data node according to the global model, and generates an asset right confirmation certificate corresponding to each energy data node based on the data contribution degree, where the asset right confirmation certificate is used to determine the data rights of the energy data node, and the data rights include data ownership rights and data usage rights; since the present invention decrypts the encrypted model parameters sent by each energy data node to obtain model node parameters, it effectively avoids the data leakage risk generated during the analysis and processing of multi-source heterogeneous data, calculates the data contribution degree of each energy data node according to the global model, thereby accurately quantifying the data contribution degree of each node in a distributed energy environment, and accurately confirming the energy data assets while ensuring data security and privacy. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0073] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0074] Figure 1 It is a schematic structural diagram of an energy data asset rights confirmation device based on federated learning in the hardware operating environment involved in the embodiment solution of the present invention;
[0075] Figure 2 It is a schematic flowchart of the first embodiment of the method for energy data asset rights confirmation based on federated learning of the present invention;
[0076] Figure 3 It is a schematic flowchart of the second embodiment of the method for energy data asset rights confirmation based on federated learning of the present invention;
[0077] Figure 4 It is a structural block diagram of the first embodiment of the energy data asset rights confirmation system based on federated learning of the present invention.
[0078] The realization, functional features and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. Detailed Embodiments
[0079] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0080] Referring to Figure 1 , Figure 1 It is a schematic structural diagram of an energy data asset rights confirmation device based on federated learning in the hardware operating environment involved in the embodiment solution of the present invention.
[0081] As Figure 1 shown, the energy data asset rights confirmation device based on federated learning may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard). Optionally, the user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless-fidelity (WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM), or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. Optionally, the memory 1005 may also be a storage system independent of the aforementioned processor 1001.
[0082] Those skilled in the art can understand, Figure 1The structure shown does not constitute a limitation on the device for determining the rights of energy data assets based on federated learning, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0083] As Figure 1 shown, the memory 1005, as a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a program for determining the rights of energy data assets based on federated learning.
[0084] In Figure 1 the device for determining the rights of energy data assets based on federated learning shown, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the device for determining the rights of energy data assets based on federated learning of the present invention may be arranged in the device for determining the rights of energy data assets based on federated learning. The device for determining the rights of energy data assets based on federated learning calls the program for determining the rights of energy data assets stored in the memory 1005 through the processor 1001 and executes the method for determining the rights of energy data assets provided by the embodiments of the present invention.
[0085] The embodiments of the present invention provide a method for determining the rights of energy data assets based on federated learning. Referring to Figure 2 , Figure 2 is a schematic flowchart of the first embodiment of the method for determining the rights of energy data assets based on federated learning of the present invention.
[0086] In this embodiment, the method is applied to a central node in a system for determining the rights of energy data assets based on federated learning. The system for determining the rights of energy data assets based on federated learning includes the central node and multiple energy data nodes, and the central node is communicatively connected to each energy data node;
[0087] The method for determining the rights of energy data assets based on federated learning includes the following steps:
[0088] Step S10: Decrypt the encrypted model parameters sent by each energy data node to obtain model node parameters.
[0089] It should be understood that the execution subject of this embodiment may be a computing service device with data processing, network communication, and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or a terminal electronic device capable of implementing the above functions. Hereinafter, a device for determining the rights of energy data assets based on federated learning (right determination device) will be used as an example to illustrate this embodiment and the following embodiments.
[0090] It should be noted that energy data is distributed across multiple different energy data nodes (for example, energy data nodes can include power plants, user terminals, dispatch centers, etc.). To protect data privacy, this embodiment can adopt federated learning technology to jointly model the data of each energy data node. The model node parameters are optimized by each energy data node based on local energy data for the local model.
[0091] It should be noted that the energy asset data of each energy data node is diverse. For example, energy asset data can include power data, natural gas data, wind energy data, solar energy data, etc.
[0092] In some embodiments, each energy data node in the energy data asset rights confirmation system can preprocess the local energy data, and then perform local model training based on the preprocessed local energy data. Each node independently trains the local model. For example, stochastic gradient descent (SGD) optimization can be used. Each node encrypts the optimized model node parameters and sends them to the central node.
[0093] In some embodiments, the energy data node can include:
[0094] Power generation enterprises, which are used to provide data such as power generation volume and equipment operation efficiency.
[0095] Power consumption units, which are used to provide information such as power consumption volume and time series load data.
[0096] Energy dispatch centers, which are used to collect dynamic supply and demand data of distributed energy.
[0097] Natural resource data (such as wind energy and solar energy farms), which are used to collect data such as wind speed data, wind direction data, sunshine intensity data, and duration data.
[0098] In some embodiments, the data types of the local energy data collected by the energy data node can include:
[0099] Time series data, such as daily load curves, power generation volume, and power consumption volume.
[0100] Geospatial data, such as the distribution locations of energy farms or equipment.
[0101] Specific event data, such as the impact of holidays and meteorological events on energy demand.
[0102] Feature data, such as power load characteristics: peak-valley difference and load change rate.
[0103] Natural gas characteristic data, such as daily consumption volume and supply-demand ratio.
[0104] Wind energy characteristic data, such as wind speed distribution and wind direction distribution.
[0105] Solar energy characteristic data, such as sunshine duration and radiation intensity.
[0106] It should be noted that local energy data has diversity (such as electricity, natural gas, wind energy, solar energy, etc.) and spatio-temporal characteristics (such as seasonality and regionality). In some embodiments, each energy data node can perform data preprocessing (such as data cleaning, data standardization, feature extraction, dimension optimization, etc.) before optimizing and training the local energy data.
[0107] In some embodiments, for the time series characteristics of energy data, the energy data node and the central node can adopt LSTM (Long Short-Term Memory Network) to capture the time dependence and non-linear fluctuation characteristics of the load curve. Through the gating mechanism of LSTM (input gate, forget gate, output gate), the memory and forgetting of historical information are dynamically adjusted to identify the peak and trough change rules of the daily load curve, thereby improving the accuracy of short-term prediction and providing more reliable data support for the training of the global model.
[0108] Step S20: Aggregate the model node parameters to obtain global model parameters, and construct a global model based on the global model parameters.
[0109] It should be noted that the global model parameters are aggregated and obtained based on the following formula:
[0110]
[0111] Where, is the global model parameter, represents the model node parameter of the energy data node and is the data volume of the energy data node .
[0112] Step S30: Calculate the data contribution degree of each energy data node according to the global model.
[0113] It should be noted that in this embodiment, the energy asset data of each energy data node can be confirmed by quantifying the data contribution of each energy data node and based on the data contribution degree.
[0114] In some embodiments, the confirmation device can evaluate the data contribution degree of each energy data node based on the degree of performance optimization of the global model by the model node parameters provided by each energy data node.
[0115] Furthermore, in order to accurately quantify the data contribution degree of each energy data node, the above step S30 may include:
[0116] Step S301: Calculate the initial contribution degree of each energy data node according to the global model;
[0117] Step S302: Obtain the original energy data provided by each energy data node, and preprocess the original energy data to obtain target energy data;
[0118] Step S303: Adjust the initial contribution degree based on the target energy data corresponding to each energy data node to obtain the data contribution degree.
[0119] It should be noted that the confirmation of energy data assets requires quantifying the data contribution of each node. Based on federated learning, the performance change of the global model can reflect the contribution degree of each node. Refer to the following formula:
[0120]
[0121] Where, represents the initial contribution degree of the energy data node , represents the contribution degree of the model node parameters of the energy data node to the performance improvement of the global model, represents the contribution degree of the model node parameters of all energy data nodes to the performance improvement of the global model.
[0122] In some embodiments, the data contribution of each energy data node is in multiple rounds. Therefore, the calculation formula for the incremental data contribution degree of the contribution of each node accumulated with rounds is as follows:
[0123]
[0124] Where, represents the initial contribution degree of the energy data node , represents the contribution degree of the model node parameters of the energy data node to the performance improvement of the global model, represents the contribution degree of the model node parameters of all energy data nodes to the performance improvement of the global model, is the smoothing factor, and the smoothing factor is used to balance the contribution degree of historical rounds and the contribution degree of the current round, represents the current round, represents the previous round.
[0125] Furthermore, in order to deeply explore the features of data and nodes, so as to improve the accuracy of contribution degree calculation, the above step S303 may include:
[0126] Step S3031: Perform time analysis on the target energy data corresponding to each energy data node to determine the peak load period data and normal period data in the target energy data;
[0127] Step S3032: Determine the time period weights of each target energy data based on the peak load period data and the normal period data;
[0128] Step S3033: Conduct a feature analysis on the target energy data corresponding to each energy data node to determine the energy type and data type corresponding to each target energy data;
[0129] Step S3034: Determine the feature weights of each target energy data according to the energy type and data type;
[0130] Step S3035: Conduct a node importance analysis on each energy data node to determine the importance degree of each energy data node;
[0131] Step S3036: Determine the node weights of each energy data node based on the importance degree of the node;
[0132] Step S3037: Adjust the initial contribution degree according to the time period weights, the feature weights, and the node weights to obtain the data contribution degree.
[0133] It should be noted that the rights confirmation device can adjust the contribution weights according to the importance of the energy data provided by different energy data nodes, so as to adjust the initial contribution degree of each energy data node. The importance of the above-mentioned energy data refers to the influence degree of different features, time periods, or data sources on the final prediction result or the global model performance in the model. For example, adjust the contribution weights according to the importance of the energy data (such as peak load period data).
[0134] It should be noted that the importance for adjusting the contribution weights in this embodiment may include the importance of the data time period, the importance of the data features, and the importance of the energy data node itself.
[0135] The importance of the data time period may be that some time periods (such as peak load periods, holidays) are more critical for energy supply and demand forecasting. For example, the impact of electricity load data during peak hours on the model may be much greater than that of data during late night hours.
[0136] The importance of the data features may be that different features have different contribution degrees to the model prediction. For example: Historical data of electricity consumption may be more important for short-term load forecasting than equipment status data. Meteorological data (such as wind speed, sunshine intensity) is particularly important in scenarios of wind energy or solar energy.
[0137] The importance of the data node may be that the nodes from which the data comes may have different weights. For example: Data from large power plants is more critical than data from small electricity users. The data weight of the core node (such as the regional dispatching center) may be higher.
[0138] In some embodiments, the rights confirmation device may assign weights according to the importance of data time periods. For data during peak load times, higher weights are assigned. The adjustment of time period weights refers to the following formula:
[0139]
[0140] Wherein, > , t represents time, is the time period weight.
[0141] In some embodiments, the rights confirmation device may assign weights according to the importance of the characteristics of different energy data. For characteristics with greater influence, higher weights are assigned. The adjustment of characteristic weights refers to the following formula:
[0142]
[0143] Wherein, is the weight of characteristic f , n is the total number of characteristics.
[0144] In some embodiments, the rights confirmation device may assign weights according to the importance of the source nodes of energy data. Higher weights are assigned to data of core nodes. The adjustment of node weights refers to the following formula:
[0145]
[0146] Wherein, is the weight of node i , N is the total number of nodes.
[0147] It should be noted that the adjustment of contribution weights acts on the formula for calculating contribution degrees, and is used to balance the relationship between the importance of nodes and their actual contribution values. The rights confirmation device may first adjust the initial contribution degree based on time period weights, then adjust the initial contribution degree based on characteristic weights, and finally adjust the initial contribution degree based on node weights to obtain the final data contribution degree. The adjustment of contribution degrees refers to the following formula:
[0148]
[0149] Wherein: is the weight of node , is the characteristic weight, is the time period weight, is the improvement value of the global model performance by node ; is the adjusted contribution degree. Through this adjustment, for nodes with higher weights, their contribution degrees will increase accordingly, even if their Relatively low; nodes of low importance, even if If it is higher, its contribution will be reduced by weight adjustment.
[0150] Furthermore, in order to improve data quality and thus improve data analysis efficiency and accuracy, the above step S302:
[0151] Step S3021: acquiring original energy data provided by each energy data node, and performing time series analysis on the original energy data;
[0152] Step S3022: performing data cleaning on the original energy data based on the time series analysis result to obtain initial energy data;
[0153] Step S3023: extracting features from the initial energy data to obtain energy resource features;
[0154] Step S3024: performing dimension reduction processing on the initial energy data according to the energy resource characteristics to obtain candidate energy data;
[0155] Step S3025: normalizing the candidate energy data according to the energy type of each candidate energy data to obtain target energy data.
[0156] It should be noted that local energy data has diversity (such as electricity, natural gas, wind energy, solar energy, etc.) and spatiotemporal characteristics (such as seasonality and regionality). In some embodiments, each energy data node may perform data preprocessing (such as data cleaning, data standardization, feature extraction, dimension optimization, etc.) before optimizing and training the local energy data.
[0157] It is understandable that this embodiment can perform data cleaning on the original energy data, specifically including: the right confirmation equipment detects and fills in the missing values in the energy data (such as using interpolation to process the breakpoints of the power generation data). Eliminate outliers (such as eliminating abnormally high power consumption data points through box plots or Z scores). Process the impact of holidays or extreme weather in time series data.
[0158] In some embodiments, the right confirmation device can extract features and optimize dimensions of the initial energy data, including: extracting features related to the value of energy assets, including but not limited to power load characteristics: daily average load, peak-to-valley difference, load curve volatility; natural gas consumption characteristics: daily consumption, supply-demand ratio; wind and solar energy characteristics: wind speed, wind direction, sunshine duration. Use principal component analysis (PCA) to reduce the complexity of the high-dimensional feature space, and refer to the following formula for dimensionality reduction:
[0159]
[0160] in, is the initial data matrix of the initial energy data, is the projection matrix after dimensionality reduction, is the candidate data matrix of the candidate energy data obtained after dimensionality reduction, and the initial data matrix is a matrix of represents the number of samples, represents the dimension of the initial energy data. The projection matrix is a matrix of represents the dimension after dimensionality reduction. Usually k <n . The column vectors of W are obtained by calculating the eigenvalues and eigenvectors of the covariance matrix of X, and the eigenvectors correspond to the k largest eigenvalues. The candidate data matrix is a matrix of and each row of
[0161] corresponds to the low-dimensional representation of a sample. The dimensionality reduction process is achieved by retaining the most information (i.e., the largest variance) in the original data, thereby simplifying model calculations and reducing the impact of noise.
[0162]
[0163] where represents the target energy data after normalization processing, represents the candidate energy data to be normalized, represents the minimum value in the candidate energy data, represents the maximum value in the candidate energy data. The normalization process is used to normalize the data range to [0,1].
[0164] Step S40: Generate asset confirmation certificates for each energy data node based on the data contribution degree.
[0165] It should be noted that the asset confirmation certificate is used to determine the data permissions of the energy data node, and the data permissions include data ownership permissions and data usage permissions.
[0166] It should be noted that the asset right confirmation certificate plays a core role in the confirmation of energy data assets. It is mainly used to clarify the data ownership, protect the rights and interests of data providers, and provide a basis for data revenue distribution. By recording the unique identifier, contribution value, data type, and generation timestamp of each data node, the right confirmation certificate quantifies the contribution ratio of data in the global model. At the same time, the right confirmation certificate is stored in the blockchain, with the characteristics of being tamper-proof and traceable, ensuring the transparency and trustworthiness of the data usage process. Moreover, the right confirmation certificate also supports data transactions and multi-party collaborations, providing technical guarantees for the sharing and utilization of energy data.
[0167] Furthermore, in order to enhance the security and privacy of energy resource right confirmation, step S40 may include:
[0168] Step S401: Obtain the node identity identifier and the right confirmation timestamp of each energy data node;
[0169] Step S402: Generate a blockchain hash value based on the data contribution degree, the node identity identifier, and the right confirmation timestamp;
[0170] Step S403: Generate an original right confirmation certificate according to the blockchain hash value;
[0171] Step S404: Generate an encrypted signature for each original right confirmation certificate, and perform asymmetric encryption on the original right confirmation certificate based on the encrypted signature to generate the asset right confirmation certificate corresponding to each energy data node.
[0172] It should be noted that the calculation of the blockchain hash value refers to the following formula:
[0173]
[0174] where, represents the blockchain hash value, represents the data contribution degree, represents the node identity identifier, represents the timestamp of the asset right confirmation certificate generation time, represents the hash function.
[0175] It should be noted that the encrypted signature is generated according to the following formula:
[0176]
[0177] where, represents the encrypted signature, represents the encryption operation performed on the blockchain hash value using the private key.
[0178] In some embodiments, the asset right confirmation certificate may include the following fields:
[0179] Node ID: Uniquely identifies the data contributor, such as a node number or an organization name.
[0180] Data contribution degree: Records the contribution ratio of the data node to the global model, which is specifically obtained from the contribution degree calculation formula.
[0181] Timestamp T: Records the time when the rights confirmation certificate is generated, ensuring the timeliness and historical traceability of the certificate.
[0182] Energy data type: Specifies the type of the rights confirmation data, such as electricity data, wind energy data, natural gas data, etc.
[0183] Blockchain hash value: The unique identifier of the rights confirmation certificate, stored in the blockchain to prevent forgery or tampering.
[0184] Signature: A digital signature generated using asymmetric encryption technology to ensure the authenticity and integrity of the certificate.
[0185] Certificate hash value H(C), which can generate the certificate using the SHA-256 hash algorithm. The rights confirmation certificate is registered on the blockchain through a smart contract to ensure the immutability of data ownership.
[0186] In some embodiments, the rights confirmation device can upload the asset rights confirmation certificate to the blockchain for storage. The blockchain storage format may include that each block contains a block hash value, the hash value of the previous block, and the rights confirmation certificate information.
[0187] In some embodiments, the rights confirmation device can be submitted in the form of a transaction and calculate the transaction hash value:
[0188] TxHash = SHA256(Certificate)
[0189] In some embodiments, the rights confirmation device can use the Practical Byzantine Fault Tolerance (PBFT) algorithm to establish a consensus mechanism to ensure data consistency.
[0190] In some embodiments, for historical energy data, the rights confirmation device can adopt a method of off-chain storage combined with on-chain indexing to improve storage efficiency.
[0191] In this embodiment, the encrypted model parameters sent by each energy data node are decrypted to obtain model node parameters. The model node parameters are obtained by each energy data node optimizing the local model based on local energy data. The model node parameters are aggregated to obtain global model parameters, and a global model is constructed based on the global model parameters. The data contribution degrees of each energy data node are calculated according to the global model, and asset confirmation certificates corresponding to each energy data node are generated based on the data contribution degrees. The asset confirmation certificates are used to determine the data permissions of the energy data nodes, and the data permissions include data ownership permissions and data usage permissions. Since, in this embodiment, the encrypted model parameters sent by each energy data node are decrypted to obtain model node parameters, the risk of data leakage generated during the analysis and processing of multi-source heterogeneous data is effectively avoided. The data contribution degrees of each energy data node are calculated according to the global model, so as to accurately quantify the data contribution degrees of each node in a distributed energy environment, and accurately confirm the rights of energy data assets while ensuring data security and privacy.
[0192] Reference Figure 3 , Figure 3 is a schematic flowchart of the second embodiment of the method for confirming the rights of energy data assets based on federated learning according to the present invention.
[0193] Based on the above first embodiment, in this embodiment, the method is applied to an energy data node in a system for confirming the rights of energy data assets based on federated learning. The system for confirming the rights of energy data assets based on federated learning includes a central node and multiple energy data nodes, and the central node is communicatively connected to each energy data node;
[0194] The method includes:
[0195] Step S1: Obtain an energy data sample of the original model parameters and local energy data;
[0196] Step S2: Perform gradient optimization on the original model parameters based on the energy data sample to obtain model node parameters;
[0197] It should be noted that the gradient optimization refers to the following formula:
[0198]
[0199] Where represents the loss function of the energy data node , represents the model node parameters obtained after the energy data node optimizes the original model parameters, represents the total number of local energy data samples of the energy data node , Indicating the th energy data sample Input features is a multi-dimensional vector containing the feature information of the sample; Indicating the true label of the th energy data sample, which is the target value to be compared during model prediction, indicates the predicted value of the current model parameters for the input data, indicates the loss value of a single energy data sample.
[0200] In some embodiments, it can be calculated based on the loss function For example, the loss function can include mean square error loss function and cross-entropy loss function, etc., referring to the following formula:
[0201]
[0202] The overall goal of the above formula is to minimize the loss function at the node so as to optimize the model parameters . The purpose of optimization is to make the model perform better on the data set at the node . The specific process is as follows: iterate over all data samples of the node ; use the current model parameters to predict the output of each sample; calculate the error between the predicted value and the true label ; finally, take the average of the errors of all samples to form the loss function , and minimize this loss through optimization .
[0203] Step S3: Encrypt the model node parameters to obtain encrypted model parameters, and send the encrypted model parameters to the central node, so that the central node calculates the data contribution degrees of each energy data node based on the encrypted model parameters, and generates asset confirmation certificates corresponding to each energy data node based on the data contribution degrees.
[0204] Furthermore, in order to improve the security and privacy in the process of energy asset confirmation, the above step S3 may include:
[0205] Step S31: Determine the initial gradient parameters of the model node parameters;
[0206] Step S32: Add Gaussian noise to the initial gradient parameters to obtain target gradient parameters;
[0207] Step S33: Encrypt the model node parameters based on the target gradient parameters to obtain encrypted model parameters.
[0208] It should be noted that the rights confirmation device can use differential privacy protection gradient update to achieve encrypted transmission of model parameters:
[0209]
[0210] Among them, represents the initial gradient parameters, represents Gaussian noise, represents the target gradient parameters. The encrypted model node parameters can be uploaded to the federated learning server through a secure communication protocol.
[0211] In this embodiment, by obtaining the energy data samples of the original model parameters and local energy data, performing gradient optimization on the original model parameters based on the energy data samples to obtain model node parameters, encrypting the model node parameters to obtain encrypted model parameters, and sending the encrypted model parameters to the central node, so that the central node calculates the data contribution degrees of each energy data node based on the encrypted model parameters, and generates the asset rights confirmation certificates corresponding to each energy data node based on the data contribution degrees; since in this embodiment, the energy data nodes perform gradient optimization on the model parameters locally, thereby realizing effective distributed data processing, and encrypting the optimized model node parameters, thereby ensuring the privacy and security in the data transmission and processing process. While ensuring data security and privacy, accurately confirming the rights of energy data assets, effectively avoiding the data leakage risk generated in the process of analyzing and processing multi-source heterogeneous data.
[0212] In addition, an embodiment of the present invention also proposes a computer-readable storage medium, on which a program for energy data asset rights confirmation based on federated learning is stored. When the program for energy data asset rights confirmation based on federated learning is executed by a processor, the steps of the method for energy data asset rights confirmation based on federated learning as described above are implemented.
[0213] The computer-readable storage medium provided by this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, device, or component. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0214] The above computer-readable storage medium can be included in the energy data asset right confirmation device based on federated learning; it can also exist independently and not be assembled into the energy data asset right confirmation device based on federated learning.
[0215] In addition, an embodiment of the present invention also proposes a computer program product, including an energy data asset right confirmation program based on federated learning. When the energy data asset right confirmation program based on federated learning is executed by a processor, it implements the steps of the energy data asset right confirmation method based on federated learning as described above.
[0216] The specific implementation manner of the computer program product of the present invention is basically the same as that of the embodiments of the above energy data asset right confirmation method based on federated learning, and will not be elaborated here.
[0217] Refer to Figure 4 , Figure 4 , which is the structural block diagram of the first embodiment of the energy data asset right confirmation system based on federated learning of the present invention.
[0218] As Figure 4 shown, the energy data asset right confirmation system based on federated learning proposed by the embodiment of the present invention includes a central node and multiple energy data nodes, and the central node is communicatively connected to each energy data node;
[0219] The energy data node is used to obtain the original model parameters and energy data samples of local energy data.
[0220] The energy data node is further configured to optimize the gradient of the original model parameters based on the energy data samples to obtain model node parameters:
[0221]
[0222] Wherein, represents the loss function of the energy data node ; represents the model node parameters obtained after optimizing the original model parameters by the energy data node ; represents the total number of local energy data samples of the energy data node ; represents the -th input feature of the energy data sample; represents the -th true label of the energy data sample; represents the predicted value of the current model parameters for the input data; represents the loss value of a single energy data sample;
[0223] The energy data node is further configured to encrypt the model node parameters to obtain encrypted model parameters, and send the encrypted model parameters to the central node;
[0224] The central node is configured to decrypt the encrypted model parameters sent by each energy data node to obtain model node parameters, where the model node parameters are optimized by each energy data node based on local energy data;
[0225] The central node is further configured to aggregate the model node parameters to obtain global model parameters, and construct a global model based on the global model parameters, where the global model parameters are aggregated based on the following formula:
[0226]
[0227] Wherein, is the global model parameter; represents the model node parameters of the energy data node ; is the data volume of the energy data node ;
[0228] The central node is further configured to calculate the data contribution degree of each energy data node according to the global model;
[0229] The central node is further configured to generate asset confirmation certificates for each energy data node based on the data contribution degree, where the asset confirmation certificates are used to determine the data permissions of the energy data nodes, and the data permissions include data ownership permissions and data usage permissions.
[0230] Furthermore, the central node is further configured to calculate the initial contribution degree of each energy data node according to the global model:
[0231]
[0232] Wherein, represents the initial contribution degree of the energy data node , represents the contribution degree of the model node parameters of the energy data node to the performance improvement of the global model, represents the contribution degree of the model node parameters of all energy data nodes to the performance improvement of the global model, is a smoothing factor, and the smoothing factor is used to balance the contribution degree of historical rounds and the contribution degree of the current round, represents the current round;
[0233] Furthermore, the central node is further configured to obtain the original energy data provided by each energy data node, preprocess the original energy data to obtain target energy data; and is further configured to adjust the initial contribution degree based on the target energy data corresponding to each energy data node to obtain the data contribution degree.
[0234] Furthermore, the central node is further configured to perform time analysis on the target energy data corresponding to each energy data node to determine the peak load period data and normal period data in the target energy data; determine the period weights of each target energy data based on the peak load period data and the normal period data; perform feature analysis on the target energy data corresponding to each energy data node to determine the energy type and data type corresponding to each target energy data; determine the feature weights of each target energy data according to the energy type and data type; perform node importance analysis on each energy data node to determine the node importance degree of each energy data node; determine the node weights of each energy data node based on the node importance degree; and adjust the initial contribution degree according to the period weights, the feature weights, and the node weights to obtain the data contribution degree.
[0235] Further, the central node is further configured to obtain the original energy data provided by each energy data node, and perform time series analysis on the original energy data; perform data cleaning on the original energy data based on the time series analysis result to obtain initial energy data; perform feature extraction on the initial energy data to obtain energy resource features; perform dimensionality reduction processing on the initial energy data according to the energy resource features to obtain candidate energy data, and the dimensionality reduction processing refers to the following formula:
[0236]
[0237] Wherein, is the initial data matrix of the initial energy data, is the projection matrix after dimensionality reduction, is the candidate data matrix of the candidate energy data obtained after dimensionality reduction, and the initial data matrix is matrix, represents the number of samples, represents the dimension of the initial energy data, and the projection matrix is matrix, represents the dimension after dimensionality reduction, and the candidate data matrix is matrix;
[0238] Perform normalization processing on the candidate energy data according to the energy type of each candidate energy data to obtain target energy data.
[0239] Further, the central node is further configured to obtain the node identity identifier and the confirmation timestamp of each energy data node; generate a blockchain hash value based on the data contribution degree, the node identity identifier and the confirmation timestamp:
[0240]
[0241] Wherein, represents the blockchain hash value, represents the data contribution degree, represents the node identity identifier, represents the timestamp of the asset confirmation certificate generation time, represents the hash function;
[0242] Generate an original confirmation certificate according to the blockchain hash value;
[0243] Generate an encrypted signature for each original confirmation certificate, and perform asymmetric encryption on the original confirmation certificate based on the encrypted signature to generate an asset confirmation certificate corresponding to each energy data node, and the encrypted signature is generated with reference to the following formula:
[0244]
[0245] Among them, represents an encrypted signature, indicating that the private key is used to encrypt the blockchain hash value for encryption operations.
[0246] Furthermore, the energy data node is also used to determine the initial gradient parameter of the model node parameter; add Gaussian noise to the initial gradient parameter to obtain the target gradient parameter:
[0247]
[0248] Among them, represents the initial gradient parameter, represents Gaussian noise, represents the target gradient parameter;
[0249] Encrypt the model node parameter based on the target gradient parameter to obtain the encrypted model parameter.
[0250] In this embodiment, the encrypted model parameters sent by each energy data node are decrypted to obtain the model node parameters. The model node parameters are optimized by each energy data node based on local energy data. The model node parameters are aggregated to obtain the global model parameters, and a global model is constructed based on the global model parameters. The data contribution degree of each energy data node is calculated according to the global model, and the asset rights confirmation certificate corresponding to each energy data node is generated based on the data contribution degree. The asset rights confirmation certificate is used to determine the data rights of the energy data node, and the data rights include data ownership rights and data usage rights; since in this embodiment, the encrypted model parameters sent by each energy data node are decrypted to obtain the model node parameters, the data leakage risk generated in the process of analyzing and processing multi-source heterogeneous data is effectively avoided. The data contribution degree of each energy data node is calculated according to the global model, so as to accurately quantify the data contribution degree of each node in the distributed energy environment, and accurately confirm the rights of energy data assets while ensuring data security and privacy.
[0251] The energy data asset rights confirmation system based on federated learning provided by this application adopts the energy data asset rights confirmation method in the above embodiment, and can solve the technical problems of energy data asset rights confirmation based on federated learning. Compared with the prior art, the beneficial effects of the energy data asset rights confirmation system based on federated learning provided by this application are the same as those of the energy data asset rights confirmation method provided by the above embodiment, and other technical features in the energy data asset rights confirmation system based on federated learning are the same as the features disclosed in the method of the above embodiment, and will not be elaborated here.
[0252] It should be understood that the above is only for illustration and does not constitute any limitation to the technical solution of the present invention. In specific applications, those skilled in the art can set according to needs, and the present invention does not make any restrictions in this regard.
[0253] It should be noted that the above-described workflow is only illustrative and does not limit the protection scope of the present invention. In actual applications, those skilled in the art can select some or all of them according to actual needs to achieve the purpose of the solution of this embodiment, and no restrictions are made here.
[0254] In addition, for the technical details not described in detail in this embodiment, reference can be made to the method for authenticating energy data assets based on federated learning provided in any embodiment of the present invention, and details will not be repeated here.
[0255] It should be noted that in this article, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or system. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article or system including that element.
[0256] The serial numbers of the above embodiments of the present invention are only for description and do not represent the superiority or inferiority of the embodiments.
[0257] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium (such as a read-only memory / random access memory, magnetic disk, optical disc), and includes several instructions to enable a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in various embodiments of the present invention.
[0258] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied to other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. A method for confirming the ownership of energy data assets based on federated learning, characterized in that: The method is applied to a central node in an energy data asset rights confirmation system based on federated learning, wherein the energy data asset rights confirmation system based on federated learning comprises the central node and a plurality of energy data nodes, wherein the central node is communicatively connected with each energy data node; The method comprises: Decrypting the encrypted model parameters sent by each energy data node to obtain model node parameters, where the model node parameters are obtained by optimizing the local model based on local energy data by each energy data node; The model node parameters are aggregated to obtain global model parameters, and a global model is constructed based on the global model parameters. The global model parameters are aggregated based on the following formula: in, are global model parameters, Represents energy data node The model node parameters, Energy Data Node The amount of data, N is the total number of nodes; Calculate the data contribution of each energy data node according to the global model; An asset confirmation certificate corresponding to each energy data node is generated based on the data contribution, and the asset confirmation certificate is used to determine the data authority of the energy data node, and the data authority includes data ownership authority and data use authority.
2. The method for confirming the ownership of energy data assets based on federated learning according to claim 1, characterized in that: Calculating the data contribution of each energy data node according to the global model includes: The initial contribution of each energy data node is calculated according to the global model: in, Represents energy data node The initial contribution of Represents energy data node The contribution of model node parameters to the performance improvement of the global model, Indicates the contribution of the model node parameters of all energy data nodes to the performance improvement of the global model, is a smoothing factor, which is used to balance the contribution of historical rounds with the contribution of the current round. Indicates the current round; Acquire raw energy data provided by each energy data node, and pre-process the raw energy data to obtain target energy data; The initial contribution is adjusted based on the target energy data corresponding to each energy data node to obtain a data contribution.
3. The method for confirming the ownership of energy data assets based on federated learning according to claim 2 is characterized in that: The adjusting the initial contribution based on the target energy data corresponding to each energy data node to obtain the data contribution includes: Performing time analysis on the target energy data corresponding to each energy data node to determine peak load period data and normal period data in the target energy data; Determine the time period weight of each target energy data based on the peak load time period data and the normal time period data; Perform feature analysis on the target energy data corresponding to each energy data node to determine the energy type and data type corresponding to each target energy data; Determine a characteristic weight of each target energy data according to the energy type and data type; Conduct node importance analysis on each energy data node to determine the node importance of each energy data node; Determine the node weight of each energy data node based on the node importance; The initial contribution is adjusted according to the time period weight, the feature weight and the node weight to obtain the data contribution.
4. The method for confirming the ownership of energy data assets based on federated learning according to claim 3 is characterized in that: The obtaining of the original energy data provided by each energy data node and preprocessing the original energy data to obtain the target energy data includes: Acquire original energy data provided by each energy data node, and perform time series analysis on the original energy data; Performing data cleaning on the original energy data based on the time series analysis result to obtain initial energy data; Extracting features from the initial energy data to obtain energy resource features; The initial energy data is subjected to dimensionality reduction processing according to the energy resource characteristics to obtain candidate energy data. The dimensionality reduction processing refers to the following formula: in, is the initial data matrix of initial energy data, is the projection matrix after dimensionality reduction, is the candidate data matrix of candidate energy data obtained after dimensionality reduction, the initial data matrix for The matrix of represents the number of samples, represents the dimension of the initial energy data, and the projection matrix is The matrix of represents the dimension after dimensionality reduction, and the candidate data matrix is Matrix of The candidate energy data are normalized according to the energy type of each candidate energy data to obtain target energy data.
5. The energy data asset rights confirmation method based on federated learning as claimed in any one of claims 1 to 4, characterized in that: The generating of the asset confirmation certificate corresponding to each energy data node based on the data contribution degree includes: Obtain the node identity and confirmation timestamp of each energy data node; Generate a blockchain hash value based on the data contribution, the node identity and the confirmation timestamp: in, Represents the blockchain hash value, Indicates data contribution, Indicates the node identity. The timestamp indicating when the asset title certificate was generated. represents a hash function; Generate an original certificate of ownership based on the blockchain hash value; Generate an encrypted signature for each original confirmation certificate, and asymmetrically encrypt the original confirmation certificate based on the encrypted signature to generate an asset confirmation certificate corresponding to each energy data node. The encrypted signature is generated according to the following formula: in, Indicates encrypted signature, Indicates the use of private keys to hash the blockchain Perform encryption operations.
6. A method for confirming the ownership of energy data assets based on federated learning, characterized in that: The method is applied to an energy data node in an energy data asset confirmation system based on federated learning, wherein the energy data asset confirmation system based on federated learning includes a central node and a plurality of energy data nodes, wherein the central node is communicatively connected with each energy data node; The method comprises: Obtain energy data samples of original model parameters and local energy data; Based on the energy data sample, the original model parameters are gradient optimized to obtain model node parameters: in, Represents energy data node The loss function is Represents energy data node The model node parameters obtained after optimizing the original model parameters, Represents energy data node The total number of local energy data samples, Indicates The input features of energy data samples, Indicates The true labels of energy data samples, Represents the predicted value of the current model parameters for the input data, Represents the loss value of a single energy data sample; The model node parameters are encrypted to obtain encrypted model parameters, and the encrypted model parameters are sent to the central node so that the central node calculates the data contribution of each energy data node based on the encrypted model parameters, and generates an asset title certificate corresponding to each energy data node based on the data contribution.
7. The method for confirming the ownership of energy data assets based on federated learning according to claim 6 is characterized in that: The step of encrypting the model node parameters to obtain encrypted model parameters includes: Determining initial gradient parameters of the model node parameters; Add Gaussian noise to the initial gradient parameter to obtain the target gradient parameter: in, represents the initial gradient parameter, represents Gaussian noise, represents the target gradient parameter; The model node parameters are encrypted based on the target gradient parameters to obtain encrypted model parameters.
8. An energy data asset rights confirmation system based on federated learning, characterized in that: The energy data asset rights confirmation system based on federated learning includes a central node and multiple energy data nodes, and the central node is communicatively connected with each energy data node; The energy data node is used to obtain energy data samples of original model parameters and local energy data; The energy data node is further used to perform gradient optimization on the original model parameters based on the energy data sample to obtain model node parameters: in, Represents energy data node The loss function is Represents energy data node The model node parameters obtained after optimizing the original model parameters, Represents energy data node The total number of local energy data samples, Indicates The input features of energy data samples, Indicates The true labels of energy data samples, Represents the predicted value of the current model parameters for the input data, Represents the loss value of a single energy data sample; The energy data node is further used to encrypt the model node parameters, obtain encrypted model parameters, and send the encrypted model parameters to the central node; The central node is used to decrypt the encrypted model parameters sent by each energy data node to obtain model node parameters, where the model node parameters are obtained by each energy data node optimizing the local model based on local energy data; The central node is further used to aggregate the model node parameters to obtain global model parameters, and build a global model based on the global model parameters. The global model parameters are aggregated based on the following formula: in, are global model parameters, Represents energy data node The model node parameters, Energy Data Node The amount of data, N is the total number of nodes; The central node is further used to calculate the data contribution of each energy data node according to the global model; The central node is also used to generate an asset confirmation certificate corresponding to each energy data node based on the data contribution, and the asset confirmation certificate is used to determine the data authority of the energy data node, and the data authority includes data ownership authority and data use authority.
9. An energy data asset rights confirmation device based on federated learning, characterized in that: The energy data asset title confirmation device based on federated learning includes: a memory, a processor, and an energy data asset title confirmation program based on federated learning stored on the memory and executable on the processor, wherein the energy data asset title confirmation program based on federated learning is configured to implement the energy data asset title confirmation method based on federated learning as described in any one of claims 1 to 5 or 6 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an energy data asset rights confirmation program based on federated learning, and when the energy data asset rights confirmation program based on federated learning is executed by a processor, it implements the energy data asset rights confirmation method based on federated learning as described in any one of claims 1 to 5 or 6 to 7.
Citation Information
Patent Citations
Federal learning model training method and system, computer equipment and storage medium
CN116796831A
Federal learning privacy protection system and method based on block chain and privacy computing technology
CN117852068A