CN112732470B - Federal learning reliability assessment method and device for electric energy data - Google Patents

Federal learning reliability assessment method and device for electric energy data Download PDF

Info

Publication number
CN112732470B
CN112732470B CN202110337306.6A CN202110337306A CN112732470B CN 112732470 B CN112732470 B CN 112732470B CN 202110337306 A CN202110337306 A CN 202110337306A CN 112732470 B CN112732470 B CN 112732470B
Authority
CN
China
Prior art keywords
evaluation
data
model
node
electric energy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110337306.6A
Other languages
Chinese (zh)
Other versions
CN112732470A (en
Inventor
郑楷洪
李胜
周尚礼
李鹏
曾璐琨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southern Power Grid Digital Grid Research Institute Co Ltd
Original Assignee
Southern Power Grid Digital Grid Research Institute Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southern Power Grid Digital Grid Research Institute Co Ltd filed Critical Southern Power Grid Digital Grid Research Institute Co Ltd
Priority to CN202110337306.6A priority Critical patent/CN112732470B/en
Publication of CN112732470A publication Critical patent/CN112732470A/en
Application granted granted Critical
Publication of CN112732470B publication Critical patent/CN112732470B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/008Reliability or availability analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/06Electricity, gas or water supply

Abstract

The application provides a federal learning reliability assessment method and device for electric energy data, computer equipment and a storage medium. The method comprises the following steps: determining a plurality of target nodes for federal learning according to the prestige of each electric energy data node, sending an initial training model to the plurality of target nodes, obtaining model updating data obtained when each target node trains the initial training model according to a local training data set, obtaining an intermediate verification model according to the model updating data, evaluating the initial training model and the intermediate verification model, and obtaining reliability evaluation results of the plurality of target nodes according to the evaluation results. The node for federal learning is determined through the prestige of each electric energy data node, reliability evaluation is carried out on each target node, the reliability of the electric energy data node participating in federal learning is improved, and the accuracy of the reliability evaluation on the electric energy data is further improved.

Description

Federal learning reliability assessment method and device for electric energy data
Technical Field
The application relates to the technical field of electric power metering, in particular to a method and a device for evaluating federal learning reliability of electric energy data, computer equipment and a storage medium.
Background
The electric power metering system generally comprises a plurality of electric energy data owners, and a data demand side can collect data from the owners of the plurality of electric energy data, integrate the data and perform big data analysis so as to perform electric power metering detection and support decision.
In the prior art, each electric energy data owner has the problems of data privacy and data safety, and data can not be acquired from partial electric energy data owners due to data demand, so that the reliability of electric energy data analysis is low.
Disclosure of Invention
Based on this, it is necessary to provide a method, an apparatus, a computer device, and a storage medium for evaluating the federal learning reliability of electric energy data, in order to solve the technical problem in the prior art that the reliability of electric energy data analysis is low.
A method for federal learning reliability assessment of electrical energy data, the method comprising:
determining a plurality of target nodes for carrying out federal learning from each electric energy data node according to the prestige of each electric energy data node; the prestige of each electric energy data node is associated with the historical evaluation result of each electric energy data node participating in federal learning;
sending an initial training model to the target nodes, and acquiring model updating data obtained when each target node trains the initial training model according to a local training data set;
updating data according to the models respectively corresponding to the target nodes to obtain an intermediate verification model;
and evaluating the initial training model and the intermediate verification model, and obtaining the reliability evaluation results of the target nodes according to the evaluation results.
In one embodiment, before determining a plurality of target nodes for federal learning from the respective electric energy data nodes according to the prestige of the respective electric energy data nodes, the method further includes:
acquiring a plurality of historical evaluation records corresponding to the electric energy data nodes aiming at each electric energy data node; each historical evaluation record comprises a historical demander, a historical evaluation result and evaluation record time;
obtaining an evaluation weight corresponding to each historical evaluation record according to the historical demander and the evaluation record time corresponding to each historical evaluation record;
and obtaining the reputation of the electric energy data node according to the historical evaluation result and the evaluation weight corresponding to each historical evaluation record.
In one embodiment, the obtaining model update data obtained when each target node trains the initial training model according to a local training data set includes:
obtaining gradient change data corresponding to the target nodes respectively according to training round data of the node models corresponding to the target nodes respectively;
and obtaining the model updating data according to the node identification and the gradient change data corresponding to the target nodes.
In one embodiment, the evaluating the initial training model and the intermediate verification model and obtaining reliability evaluation results of the target nodes according to the evaluation results includes:
determining an evaluation index for evaluating the initial training model and the intermediate verification model according to the model task corresponding to the federal learning;
and evaluating the initial training model and the intermediate verification model according to the verification data sets and the evaluation indexes corresponding to the target nodes respectively to obtain reliability evaluation results of the target nodes corresponding to the evaluation indexes.
In one embodiment, the evaluating the initial training model and the intermediate verification model according to the verification data sets and the evaluation indexes respectively corresponding to the target nodes to obtain reliability evaluation results of the target nodes corresponding to the evaluation indexes includes:
according to the verification data sets and the evaluation indexes corresponding to the target nodes respectively, evaluating the intermediate verification model to obtain first evaluation results of the target nodes, and evaluating the initial training model to obtain second evaluation results of the target nodes;
and obtaining reliability evaluation results corresponding to the target nodes respectively according to the comparison result of the first evaluation result and the second evaluation result.
In one embodiment, the obtaining, according to a comparison result between the first evaluation result and the second evaluation result, reliability evaluation results corresponding to the plurality of target nodes, respectively includes:
for any target node in the target nodes, if the first evaluation result of the target node is smaller than the second evaluation result, taking a preset reference value as a reliability evaluation result of the target node;
and if the first evaluation result of the target node is greater than or equal to the second evaluation result, calculating to obtain a reliability evaluation result of the target node according to the quantitative relation between the first evaluation result and the second evaluation result.
In one embodiment, after obtaining the reliability evaluation results of the target nodes according to the evaluation results, the method further includes:
and generating an encryption block by using the information of the demand side, the reliability evaluation result and the evaluation recording time of the target nodes, and sending the encryption block to a block chain for storage.
An apparatus for federally learned reliability assessment of electrical energy data, said apparatus comprising:
the target node acquisition module is used for determining a plurality of target nodes for carrying out federal learning from each electric energy data node according to the reputation of each electric energy data node; the prestige of each electric energy data node is associated with the historical evaluation result of each electric energy data node participating in federal learning;
the model updating data acquisition module is used for sending an initial training model to the target nodes and acquiring model updating data obtained when each target node trains the initial training model according to a local training data set;
the intermediate verification model generation module is used for updating data according to the models respectively corresponding to the target nodes to obtain an intermediate verification model;
and the reliability evaluation module is used for evaluating the initial training model and the intermediate verification model and obtaining the reliability evaluation results of the target nodes according to the evaluation results.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method for federally learned reliability assessment of electrical energy data in any of the above embodiments when executing the computer program.
A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method steps of the federal learning reliability assessment method for electrical energy data in any of the above embodiments.
According to the method, the device, the computer equipment and the storage medium for evaluating the reliability of the federal learning of the electric energy data, a plurality of target nodes for the federal learning are determined according to the reputation of each electric energy data node, an initial training model is sent to the target nodes, model updating data obtained when each target node trains the initial training model according to a local training data set is obtained, an intermediate verification model is obtained according to the model updating data, the initial training model and the intermediate verification model are evaluated, and the reliability evaluation results of the target nodes are obtained according to the evaluation results. The node for federal learning is determined through the prestige of each electric energy data node, reliability evaluation is carried out on each target node, the reliability of the electric energy data node participating in federal learning is improved, and the accuracy of the reliability evaluation on the electric energy data is further improved.
Drawings
FIG. 1 is a diagram of an application environment of a federated learning-based node method for electric energy data in one embodiment;
FIG. 2 is a flow diagram of an electric energy data node method based on federated learning in one embodiment;
FIG. 3 is a flow diagram of an electric energy data node based on federated learning in another embodiment;
FIG. 4 is a flow diagram of an electric energy data node based on federated learning in another embodiment;
FIG. 5 is a flow diagram of an electric energy data node based on federated learning in another embodiment;
FIG. 6 is a flow diagram of an electric energy data node based on federated learning in another embodiment;
FIG. 7 is a flow diagram of an electric energy data node based on federated learning in another embodiment;
FIG. 8 is a flow diagram of an electric energy data node based on federated learning in another embodiment;
FIG. 9 is a flow diagram of an electric energy data node based on federated learning in another embodiment;
FIG. 10 is a block diagram of an exemplary federated learning reliability assessment apparatus for electrical energy data;
FIG. 11 is a diagram illustrating an internal structure of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It should be noted that the term "first \ second" referred to in the embodiments of the present invention only distinguishes similar objects, and does not represent a specific ordering for the objects, and it should be understood that "first \ second" may exchange a specific order or sequence when allowed. It should be understood that "first \ second" distinct objects may be interchanged under appropriate circumstances such that embodiments of the invention described herein may be practiced in sequences other than those illustrated or described herein.
The Federal learning-based electric energy data node method can be applied to the application environment shown in FIG. 1. Wherein the demander server 102 communicates with the participant server 104 over a network. The demander side server 102 obtains the prestige of each electric energy data node, determines a plurality of target nodes, sends the initial training model to the participator side server 104 corresponding to each target node for model training, verifies the initial training model and the intermediate verification model according to the verification set, and obtains the reliability evaluation result of each target node according to the verification result. The demander server 102 and the participant server 104 may be implemented as separate servers or as a server cluster composed of a plurality of servers.
In the electric power metering system, a data demand side can collect data from a data participant side to calculate and analyze electric energy data. The data demander can collect data from a plurality of data participants, and the data participants can also provide data to a plurality of data demanders.
In one embodiment, as shown in fig. 2, a federate learning based electric energy data node method is provided, which is illustrated by applying the method to the demander server 102 in fig. 1, and includes the following steps:
step S201, according to the prestige of each electric energy data node, a plurality of target nodes for carrying out federal learning are determined from each electric energy data node.
The electric energy data nodes can be nodes corresponding to all data participants, and each electric energy data node can be configured with a node number to distinguish all data participants. The prestige of each electric energy data node is related to the historical evaluation result of each electric energy data node participating in the federal learning, and the evaluation result of each electric energy data node participating in the federal learning in each historical period is represented. The prestige can be one of the indexes for evaluating the reliability of the electric energy data node, for example, the reliability degree of the electric energy data node is higher as the prestige is larger. The reputation may be stored on a storage module, cloud storage unit, or blockchain of each of the demand side servers. Federated learning may be a machine learning framework under which the problem of different data owners collaborating without exchanging data is solved by designing virtual models. The virtual model is an optimal model for all parties to aggregate data together, and each area serves a local target according to the model. Under a federal mechanism, the identity and the status of each participant are the same, a shared data strategy can be established, and the privacy of users or the data specification cannot be revealed because the data is not transferred.
In specific implementation, the demander server can obtain the prestige of each electric energy data node, and determine a certain number of target nodes for federal learning from each electric energy data node.
Step S202, an initial training model is sent to a plurality of target nodes, and model updating data obtained when each target node trains the initial training model according to a local training data set is obtained.
Wherein, the initial training model can be determined by the server of the demand side according to the training task. Each target node is configured with a local training data set, and the initial training model can be trained. When each target node performs model training, multiple rounds of training can be performed based on the data samples, and model update data corresponding to the front and the back of each training round are obtained. The local training data set of each target node may be electric energy data generated by the target node, and the local training data set of each target node may be different and is stored in the participant server corresponding to each target node.
In specific implementation, the demander server may determine an initial training model according to a training task, and send the initial training model to each target node, so that each target node trains the initial model according to local data to obtain model update data. The demander server may obtain model update data corresponding to each target node from the participant server.
Step S203, updating data according to the models respectively corresponding to the target nodes to obtain an intermediate verification model.
The middle verification model can integrate the model training data of each target node under a federal learning framework to obtain a combined model, and can be used for verifying the model training condition of each target node so as to evaluate the reliability degree of a participant corresponding to each target node.
In specific implementation, the demander server can obtain model update data from a plurality of target nodes, analyze the model update data, train and integrate the model update data, and obtain an intermediate verification model corresponding to the federal study.
And S204, evaluating the initial training model and the intermediate verification model, and obtaining reliability evaluation results of a plurality of target nodes according to the evaluation results.
The demander server can evaluate the initial training model and the intermediate verification model through model evaluation indexes, such as an AUC index of a classification model, an mAP index of a regression model, and the like. The demander server can determine corresponding evaluation indexes according to the model training task. The reliability evaluation result may be a qualitative evaluation, such as reliable or unreliable, or may be a quantitative evaluation, and the score of the current evaluation of each target node is obtained.
In specific implementation, the demander server may evaluate the initial training model and the intermediate verification model according to evaluation indexes corresponding to the model training tasks, respectively obtain corresponding evaluation results of each target node, and then determine reliability evaluation results of each target node according to the evaluation results.
According to the federal learning reliability assessment method for the electric energy data, a plurality of target nodes used for federal learning are determined through the prestige of each electric energy data node, an initial training model is sent to the target nodes, model updating data obtained when each target node trains the initial training model according to a local training data set is obtained, an intermediate verification model is obtained according to the model updating data, the initial training model and the intermediate verification model are assessed, and reliability assessment results of the target nodes are obtained according to assessment results. The node for federal learning is determined through the prestige of each electric energy data node, reliability evaluation is carried out on each target node, the reliability of the electric energy data node participating in federal learning is improved, and the accuracy of the reliability evaluation on the electric energy data is further improved.
In one embodiment, as shown in fig. 3, the step of determining the reputation of each electric energy data node on the block chain in step S201 before determining a plurality of target nodes for federal learning from each electric energy data node comprises:
acquiring a plurality of historical evaluation records corresponding to the electric energy data nodes aiming at each electric energy data node; obtaining an evaluation weight corresponding to each historical evaluation record according to the historical demander and the evaluation record time corresponding to each historical evaluation record; and obtaining the reputation of the electric energy data node according to the historical evaluation result and the evaluation weight corresponding to each historical evaluation record.
In this embodiment, the prestige may be an index quantized with respect to a data demander, and is calculated from the historical evaluation record of the target node, and each historical evaluation record may include the historical demander, the historical evaluation result, and the evaluation record time corresponding to the node. The demander server can obtain the prestige corresponding to a certain target node according to the historical evaluation result corresponding to the target node and the weight corresponding to the evaluation result.
In some embodiments, the number of times a target node participates in federated learning and the historical assessment results may affect the reputation of the target node. The contribution, i.e., weight, of each historical estimate to the reputation may be the same or different. The electric energy data node participates in the process of federal learning more, the reputation of the node can be effectively improved, the possibility of being selected to participate in the federal learning is improved, malicious data uploading can obviously reduce the reputation, and the node is not beneficial to the execution of the federal learning. The reliability evaluation results of the data participating party and the federal learning are determined by the training effect of the data, and the training effect is directly reflected by the data quality.
In some embodiments, the reliability assessment of each data node by the data demander can be saved and published in the form of a blockchain to ensure the publicity, traceability and non-falsification of the reputation information.
In some embodiments, the historical estimate is a node of the electrical energy dataiSet of reliability assessment results from historical participation in federated learningS(set size ofN) Each item recording
Figure DEST_PATH_IMAGE001
Including corresponding historical demanders
Figure 151189DEST_PATH_IMAGE002
The electric energy data node
Figure DEST_PATH_IMAGE003
Time of recording of the evaluation
Figure 441356DEST_PATH_IMAGE004
And historical evaluation results
Figure DEST_PATH_IMAGE005
Inspection by sound
Figure 524850DEST_PATH_IMAGE006
The calculation method comprises the following steps:
Figure DEST_PATH_IMAGE007
wherein the content of the first and second substances,
Figure 900468DEST_PATH_IMAGE008
data node for representing electric energyiEach reliability evaluation result of
Figure DEST_PATH_IMAGE009
The weight of (c).
The weight can be based on historical demand
Figure 22882DEST_PATH_IMAGE010
Recording time span
Figure DEST_PATH_IMAGE011
And historical evaluation results
Figure 433135DEST_PATH_IMAGE012
A joint decision, denoted as
Figure DEST_PATH_IMAGE013
Figure 812164DEST_PATH_IMAGE014
Wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE015
the historical evaluation record is characterized by being obtained by evaluating the current data demander h,
Figure 675077DEST_PATH_IMAGE016
the historical evaluation record is characterized not to be evaluated by the current data demander h.
According to the scheme of the embodiment, the evaluation weight corresponding to each historical evaluation record is obtained by obtaining the plurality of historical evaluation records of a certain electric energy data node, and then the reputation of the electric energy data node is obtained according to the historical evaluation result and the evaluation weight corresponding to each historical evaluation record, so that the reliability of the obtained electric energy data reputation is improved.
In one embodiment, as shown in fig. 4, the step of determining node models respectively corresponding to a plurality of target nodes in step S203, and the step of extracting model update data includes:
obtaining gradient change data corresponding to the target nodes respectively according to training round data of the node models corresponding to the target nodes respectively; and obtaining model updating data according to the node identification and the gradient change data corresponding to the target nodes.
In this embodiment, the model update data may include node identifiers of the target nodes and gradient change data.
The Gradient change data is obtained according to the training data of each round of the target node in the training process, and can be obtained according to a Gradient Descent algorithm (Gradient decision Optimization). In particular, according to the formula of gradient descent
Figure 571489DEST_PATH_IMAGE017
Under the condition of simplifying the influence of the learning rate, the electric energy data participant corresponding to the target node iiGradient changes to initial training model by the federated model distributed over the round, for the participating partiesiElectric energy data diSubtracting the gradient before and after trainingTo, wherein the firstiOf the data participantsLGradient change of round
Figure DEST_PATH_IMAGE018
Expressed as:
Figure 69205DEST_PATH_IMAGE019
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE020
is shown asiOf the data participantsLThe gradient of the number of turns is changed,
Figure 619135DEST_PATH_IMAGE021
is shown asiOf the data participantsLThe gradient after local training data training in the run,
Figure DEST_PATH_IMAGE022
representing data participantsLGradient before training of local training data in round.
In some embodiments, the demander server may store the gradient change data corresponding to each target node in a differentiated manner based on the node identifier. And each target node is respectively corresponding to model updating data. The demander server can update data according to the model corresponding to each target node, and after data analysis, the data is used as a data sample to train to obtain an intermediate verification model corresponding to federal learning.
According to the scheme of the embodiment, the gradient change data corresponding to each target node is obtained by obtaining the training round data of each target node in the training process, so that the model update data is obtained, and a data source is provided for training the intermediate verification model.
In one embodiment, as shown in fig. 5, the step S204 of evaluating the initial training model and the intermediate verification model, and the step of obtaining the reliability evaluation results of the plurality of target nodes according to the evaluation results includes:
determining an evaluation index for evaluating the initial training model and the intermediate verification model according to the model task corresponding to the federal learning; and evaluating the initial training model and the intermediate verification model according to the verification data sets and the evaluation indexes corresponding to the target nodes respectively to obtain reliability evaluation results of the target nodes corresponding to the evaluation indexes.
In this embodiment, the federal learning corresponds to a model task, for example, for classification or prediction, and the evaluation index for performing model evaluation may be different for different model tasks. The verification data set may be a pre-stored data set, and may be different from a local training data set stored in a participant server corresponding to the target node, and is used to verify a node model obtained by training the target node. The verification data set may be stored on the demander server or on the blockchain. The demander server can evaluate the initial training model corresponding to each target node and evaluate the intermediate verification model according to the verification data set corresponding to each target node. The reliability evaluation result is a data reliability evaluation result made by the data demander j in the power metering system aiming at the effect of the data participator i training model.
In some embodiments, the demander server may obtain pre-stored verification set data corresponding to each target node. According to different model tasks, the intermediate verification model is evaluated through the verification set data of the target node, and an evaluation result a corresponding to the model task is generatedij(i.e., the first evaluation result), for example, an AUC (Area Under ROC Curve) index of the classification model, an mapp (mean Average precision) index of the regression model, and the like. And evaluating the initial training model through the same verification set data of the target node to obtain an evaluation result b corresponding to the target nodeij(i.e. the second evaluation result), and obtaining the reliability evaluation result of the target node according to the comparison of the two evaluation results.
In some embodiments, the demander server may determine the target according to a comparison result of the first evaluation result and the second evaluation resultAnd evaluating the reliability of the target node. Specifically, when a data demander j in the power metering system performs reliability evaluation on the effect of a training model of a participant i corresponding to a target node i, a first evaluation result is aijThe second evaluation result is bijThen, the reliability evaluation result score corresponding to the target nodeijCan be expressed as:
Figure 969344DEST_PATH_IMAGE023
that is, when the first evaluation result of the target node is smaller than the second evaluation result, a preset reference value (e.g., -1) is used as the reliability evaluation result of the target node. And if the first evaluation result of the target node is greater than or equal to the second evaluation result, calculating to obtain the reliability evaluation result of the target node according to the quantity relationship between the first evaluation result and the second evaluation result.
According to the scheme of the embodiment, the intermediate verification model and the initial training model are evaluated through the verification data set and the evaluation indexes corresponding to the model training tasks, the reliability evaluation result corresponding to each target node is obtained according to the evaluation result, and the reliability evaluation of the model training data of each target node is achieved.
In an embodiment, as shown in fig. 6, after obtaining reliability evaluation results of a plurality of target nodes according to the evaluation results, the method further includes:
and generating an encryption block by using the demander of the target nodes, the reliability evaluation result and the evaluation recording time, and sending the encryption block to a block chain for storage.
In this embodiment, the demander server may generate an evaluation record from the reliability evaluation result, the evaluation record time, and the demander information obtained by the evaluation, encrypt the evaluation record with a private key, generate a block, and send the block to the block chain for storage.
In some embodiments, the demander side server may also broadcast the reliability evaluation result, the ciphertext, and the public key of each target node to the power metering system network, and each power energy data node may verify the evaluation record data according to the received information and write the reliability evaluation result into the block chain, thereby implementing decentralized storage of the reliability evaluation result and the reputation information of the target node participating in the federal training at this time. The data demand side and the data participant can register as the user on the block chain, and the fair and open use of the reputation mechanism can be effectively ensured.
According to the scheme of the embodiment, the encryption block is generated by the information of the demand side of the target nodes, the reliability evaluation result and the evaluation recording time, and is sent to the block chain for storage, so that the calling efficiency of the reliability evaluation result is improved.
In one embodiment, as shown in fig. 7, there is provided a method for federally learned reliability assessment of electrical energy data, the method comprising:
step S701, a data demander server acquires a plurality of historical evaluation records corresponding to the electric energy data nodes aiming at each electric energy data node; each historical evaluation record comprises a historical demander, a historical evaluation result and evaluation record time; obtaining an evaluation weight corresponding to each historical evaluation record according to the historical demander and the evaluation record time corresponding to each historical evaluation record; obtaining the prestige of the electric energy data node according to the historical evaluation result and the evaluation weight corresponding to each historical evaluation record;
step S702, the data demand side server determines a plurality of target nodes for federal learning from each electric energy data node according to the reputation of each electric energy data node; the prestige of each electric energy data node is associated with the historical evaluation result of each electric energy data node participating in federal learning;
step S703, the data demander server sends an initial training model to a plurality of target nodes;
step S704, the data participant server corresponding to each target node obtains the gradient change data corresponding to the target node according to the training round data of the node model corresponding to the target node; obtaining model updating data according to the node identification and the gradient change data corresponding to the target node, sending the model updating data to a data demander server, and obtaining an intermediate verification model by the data demander server according to the model updating data;
step S705, the data demander server determines an evaluation index for evaluating the initial training model and the intermediate verification model according to the model task corresponding to the federal learning; and evaluating the intermediate verification model according to the verification data sets and the evaluation indexes corresponding to the target nodes respectively to obtain first evaluation results of the target nodes, and evaluating the initial model to obtain second evaluation results of the target nodes.
Step S706, aiming at any one of a plurality of target nodes, if the first evaluation result of the target node is smaller than the second evaluation result, taking a preset reference value as the reliability evaluation result of the target node; and if the first evaluation result of the target node is greater than or equal to the second evaluation result, calculating to obtain the reliability evaluation result of the target node according to the quantity relationship between the first evaluation result and the second evaluation result.
And step S707, generating an encrypted block by using the information of the demand side, the reliability evaluation result and the evaluation recording time of the plurality of target nodes, and sending the encrypted block to a block chain for storage.
In the above embodiment, the reputation of each electric energy data node is obtained through the historical evaluation data of each electric energy data node, a plurality of target nodes for performing the federal learning are determined according to the reputation, an initial training model is sent to the plurality of target nodes, model update data obtained by training each target node on the initial training model according to a local training data set is obtained, an intermediate verification model is obtained according to the model update data, the initial training model and the intermediate verification model are evaluated, reliability evaluation results of the plurality of target nodes are obtained according to the evaluation results, and the reliability evaluation results corresponding to each target node are sent to the block chain for storage. The node for federal learning is determined through the reputation of each electric energy data node, reliability assessment is carried out on each target node, a reputation mechanism and a block chain technology are combined, the reliability of the electric energy data node participating in federal learning is improved, and the accuracy of the reliability assessment on the electric energy data is further improved.
It should be understood that although the various steps in the flow charts of fig. 2-7 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-7 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In order to more clearly illustrate the solution provided by the present application, the method for evaluating the federal learning reliability of the electric energy data of the above embodiment of the present application is described below in a specific application.
As shown in fig. 8, a basic framework of a federal learning reliability calculation method and a reputation mechanism for electric energy data is provided, and the framework includes: the system comprises a federated learning data node reputation calculation module, a federated learning data participant reliability evaluation module and a reputation storage module based on a block chain technology. The demand side server can obtain the reliability evaluation record of each electric energy data node from the block chain, obtains the prestige of each electric energy data node according to the reliability evaluation record, determines the target node participating in federal learning from the prestige, trains the federal learning public model at the target node, extracts the model characteristic and the federal learning model characteristic obtained by training each target node according to the gradient contribution, further obtains the reliability evaluation result of the participant corresponding to each target node according to the evaluation index corresponding to the training task, and sends the reliability evaluation result to the block chain for storage.
As shown in fig. 9, an implementation flowchart of a federal learning reliability calculation method and a reputation mechanism for electric energy data is provided, where the method includes: the method comprises the steps that a data demand side issues a federal learning task, electric energy data nodes apply for participation in the task according to willingness, the data demand side extracts historical reliability evaluation data of each electric energy data node from a block chain after collecting participation willingness of each electric energy data, the historical reliability evaluation data are sorted into reliability records, and then the reputation of each data node is obtained through calculation according to the reliability records; the data demand side selects reliable data nodes to participate in federal learning according to the reputation of the data nodes; each data participant of the data demand direction distributes an initial training model, the data participants receive the distributed model, and the model is trained based on own data to obtain a node model; the data participant performs feature extraction on the node model, calculates the gradient change of the local training model, obtains model updating data and transmits the model updating data back to the data demand side; and the data demand party verifies and evaluates the reliability of each data participant according to the returned data, and stores the reliability evaluation result into the block chain.
In one embodiment, as shown in fig. 10, there is provided a federal learning reliability evaluation device for electric energy data, the device 1000 including:
a target node obtaining module 1001, configured to determine, according to the reputation of each electric energy data node, a plurality of target nodes for performing federal learning from the electric energy data nodes; the prestige of each electric energy data node is associated with the historical evaluation result of each electric energy data node participating in federal learning;
a model update data obtaining module 1002, configured to send an initial training model to the multiple target nodes, and obtain model update data obtained when each target node trains the initial training model according to a local training data set;
an intermediate verification model generation module 1003, configured to update data according to the models corresponding to the multiple target nodes, respectively, to obtain an intermediate verification model;
and the reliability evaluation module 1004 is configured to evaluate the initial training model and the intermediate verification model, and obtain reliability evaluation results of the plurality of target nodes according to the evaluation results.
In one embodiment, the target node obtaining module 1001 includes: the prestige acquisition unit is used for acquiring a plurality of historical evaluation records corresponding to the electric energy data nodes aiming at each electric energy data node; each historical evaluation record comprises a historical demander, a historical evaluation result and evaluation record time; obtaining an evaluation weight corresponding to each historical evaluation record according to the historical demander and the evaluation record time corresponding to each historical evaluation record; and obtaining the reputation of the electric energy data node according to the historical evaluation result and the evaluation weight corresponding to each historical evaluation record.
In one embodiment, model update data acquisition module 1002 includes: a model update data obtaining unit, configured to obtain gradient change data corresponding to the plurality of target nodes according to training round data of node models corresponding to the plurality of target nodes, respectively; and obtaining the model updating data according to the node identification and the gradient change data corresponding to the target nodes.
In one embodiment, the reliability assessment module 1004 includes: the evaluation index unit is used for determining an evaluation index for evaluating the initial training model and the intermediate verification model according to the model task corresponding to the federal learning; and the reliability evaluation unit is used for evaluating the initial training model and the intermediate training model according to the verification data sets and the evaluation indexes respectively corresponding to the target nodes to obtain the reliability evaluation results of the target nodes corresponding to the evaluation indexes.
In one embodiment, a reliability evaluation unit includes: the first/second evaluation subunit is configured to evaluate the intermediate verification model according to the verification data sets and the evaluation indexes respectively corresponding to the target nodes to obtain first evaluation results of the target nodes, and evaluate the initial training model to obtain second evaluation results of the target nodes; and the evaluation comparison unit is used for obtaining reliability evaluation results corresponding to the target nodes respectively according to the comparison result of the first evaluation result and the second evaluation result.
In an embodiment, the evaluation comparing unit is further configured to, for any one of the target nodes, take a preset reference value as a reliability evaluation result of the target node if the first evaluation result of the target node is smaller than the second evaluation result; and if the first evaluation result of the target node is greater than or equal to the second evaluation result, calculating to obtain a reliability evaluation result of the target node according to the quantitative relation between the first evaluation result and the second evaluation result.
In one embodiment, the apparatus 1000 further comprises: and the storage module is used for generating an encryption block by using the demander information, the reliability evaluation result and the evaluation recording time of the target nodes and sending the encryption block to a block chain for storage.
Specific limitations of the federal learning reliability assessment device for electric energy data can be referred to the above limitations of the federal learning reliability assessment method for electric energy data, and are not described herein again. All or part of each module in the federal learning reliability evaluation device of the electric energy data can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
The federal learning reliability assessment method for electric energy data provided by the application can be applied to computer equipment, wherein the computer equipment can be a server, and the internal structure diagram of the computer equipment can be as shown in fig. 11. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is for storing model data and validation set data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method for federal learned reliability assessment of electrical energy data.
Those skilled in the art will appreciate that the architecture shown in fig. 11 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the above-described method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the computer program is executed. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A federal learning reliability assessment method for electric energy data, which is characterized by comprising the following steps:
determining a plurality of target nodes for carrying out federal learning from each electric energy data node according to the prestige of each electric energy data node; the prestige of each electric energy data node is associated with the historical evaluation result of each electric energy data node participating in federal learning;
sending an initial training model to the target nodes, and acquiring model updating data obtained when each target node trains the initial training model according to a local training data set; the initial training model is determined according to a training task corresponding to the federal learning;
updating data according to the models respectively corresponding to the target nodes to obtain an intermediate verification model;
evaluating the initial training model and the intermediate verification model, and obtaining reliability evaluation results of the target nodes according to the evaluation results;
before determining a plurality of target nodes for federal learning from the electric energy data nodes according to the prestige of the electric energy data nodes, the method further comprises the following steps:
acquiring a plurality of historical evaluation records corresponding to the electric energy data nodes aiming at each electric energy data node; each historical evaluation record comprises a historical demander, a historical evaluation result and evaluation record time;
obtaining an evaluation weight corresponding to each historical evaluation record according to the historical demander and the evaluation record time corresponding to each historical evaluation record;
and obtaining the reputation of the electric energy data node according to the historical evaluation result and the evaluation weight corresponding to each historical evaluation record.
2. The method of claim 1, wherein the obtaining model update data obtained by each target node during training of the initial training model according to a local training data set comprises:
obtaining gradient change data corresponding to the target nodes respectively according to training round data of the node models corresponding to the target nodes respectively;
and obtaining the model updating data according to the node identification and the gradient change data corresponding to the target nodes.
3. The method of claim 1, wherein the evaluating the initial training model and the intermediate verification model and obtaining reliability evaluation results of the plurality of target nodes according to the evaluation results comprises:
determining an evaluation index for evaluating the initial training model and the intermediate verification model according to the model task corresponding to the federal learning;
and evaluating the initial training model and the intermediate verification model according to the verification data sets and the evaluation indexes corresponding to the target nodes respectively to obtain reliability evaluation results of the target nodes corresponding to the evaluation indexes.
4. The method according to claim 3, wherein the evaluating the initial training model and the intermediate verification model according to the verification data sets and the evaluation indexes respectively corresponding to the target nodes to obtain reliability evaluation results of the target nodes corresponding to the evaluation indexes comprises:
according to the verification data sets and the evaluation indexes corresponding to the target nodes respectively, evaluating the intermediate verification model to obtain first evaluation results of the target nodes, and evaluating the initial training model to obtain second evaluation results of the target nodes;
and obtaining reliability evaluation results corresponding to the target nodes respectively according to the comparison result of the first evaluation result and the second evaluation result.
5. The method according to claim 4, wherein obtaining the reliability evaluation results corresponding to the target nodes respectively according to the comparison result between the first evaluation result and the second evaluation result comprises:
for any target node in the target nodes, if the first evaluation result of the target node is smaller than the second evaluation result, taking a preset reference value as a reliability evaluation result of the target node;
and if the first evaluation result of the target node is greater than or equal to the second evaluation result, calculating to obtain a reliability evaluation result of the target node according to the quantitative relation between the first evaluation result and the second evaluation result.
6. The method according to any one of claims 1 to 5, wherein after obtaining the reliability evaluation results of the plurality of target nodes according to the evaluation results, the method further comprises:
and generating an encryption block by using the information of the demand side, the reliability evaluation result and the evaluation recording time of the target nodes, and sending the encryption block to a block chain for storage.
7. An apparatus for federally learned reliability evaluation of electric energy data, the apparatus comprising:
the target node acquisition module is used for determining a plurality of target nodes for carrying out federal learning from each electric energy data node according to the reputation of each electric energy data node; the prestige of each electric energy data node is associated with the historical evaluation result of each electric energy data node participating in federal learning;
the model updating data acquisition module is used for sending an initial training model to the target nodes and acquiring model updating data obtained when each target node trains the initial training model according to a local training data set; the initial training model is determined according to a training task corresponding to the federal learning;
the intermediate verification model generation module is used for updating data according to the models respectively corresponding to the target nodes to obtain an intermediate verification model;
the reliability evaluation module is used for evaluating the initial training model and the intermediate verification model and obtaining the reliability evaluation results of the target nodes according to the evaluation results;
wherein the apparatus further comprises:
the prestige acquisition module is used for acquiring a plurality of historical evaluation records corresponding to the electric energy data nodes aiming at each electric energy data node; each historical evaluation record comprises a historical demander, a historical evaluation result and evaluation record time; obtaining an evaluation weight corresponding to each historical evaluation record according to the historical demander and the evaluation record time corresponding to each historical evaluation record; and obtaining the reputation of the electric energy data node according to the historical evaluation result and the evaluation weight corresponding to each historical evaluation record.
8. The apparatus of claim 7, wherein the model update data acquisition module comprises:
a model update data obtaining unit, configured to obtain gradient change data corresponding to the plurality of target nodes according to training round data of node models corresponding to the plurality of target nodes, respectively; and obtaining the model updating data according to the node identification and the gradient change data corresponding to the target nodes.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN202110337306.6A 2021-03-29 2021-03-29 Federal learning reliability assessment method and device for electric energy data Active CN112732470B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110337306.6A CN112732470B (en) 2021-03-29 2021-03-29 Federal learning reliability assessment method and device for electric energy data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110337306.6A CN112732470B (en) 2021-03-29 2021-03-29 Federal learning reliability assessment method and device for electric energy data

Publications (2)

Publication Number Publication Date
CN112732470A CN112732470A (en) 2021-04-30
CN112732470B true CN112732470B (en) 2021-07-06

Family

ID=75596028

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110337306.6A Active CN112732470B (en) 2021-03-29 2021-03-29 Federal learning reliability assessment method and device for electric energy data

Country Status (1)

Country Link
CN (1) CN112732470B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113537518B (en) * 2021-07-19 2022-09-30 哈尔滨工业大学 Model training method and device based on federal learning, equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111553484A (en) * 2020-04-30 2020-08-18 同盾控股有限公司 Method, device and system for federal learning

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110334544B (en) * 2019-06-26 2023-07-25 深圳前海微众银行股份有限公司 Federal model degradation processing method and device, federal training system and storage medium
CN111861099A (en) * 2020-06-02 2020-10-30 光之树(北京)科技有限公司 Model evaluation method and device of federal learning model
CN111966698B (en) * 2020-07-03 2023-06-13 华南师范大学 Block chain-based trusted federation learning method, system, device and medium
CN111931242B (en) * 2020-09-30 2021-02-19 国网浙江省电力有限公司电力科学研究院 Data sharing method, computer equipment applying same and readable storage medium
CN112348204B (en) * 2020-11-05 2022-09-16 大连理工大学 Safe sharing method for marine Internet of things data under edge computing framework based on federal learning and block chain technology

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111553484A (en) * 2020-04-30 2020-08-18 同盾控股有限公司 Method, device and system for federal learning

Also Published As

Publication number Publication date
CN112732470A (en) 2021-04-30

Similar Documents

Publication Publication Date Title
CN112348204B (en) Safe sharing method for marine Internet of things data under edge computing framework based on federal learning and block chain technology
US11522706B2 (en) Method and system for publicly verifiable proofs of retrievability in blockchains
US20210329094A1 (en) Discovering signature of electronic social networks
CN109472596B (en) Alliance's chain common recognition method and system based on transaction assessment
CN109922032B (en) Method, device, equipment and storage medium for determining risk of logging in account
CN106682825A (en) System and method for evaluating credit of Social Internet of Things based on block chain
CN109242299A (en) Distribution digs mine method, digs mine machine and block catenary system
CN111860865B (en) Model construction and analysis method, device, electronic equipment and medium
CN112799708B (en) Method and system for jointly updating business model
CN113570065A (en) Data management method, device and equipment based on alliance chain and federal learning
CN110837653B (en) Label prediction method, apparatus and computer readable storage medium
CN108156235A (en) Online verification method, apparatus, computer equipment and storage medium
CN112732470B (en) Federal learning reliability assessment method and device for electric energy data
CN113034145A (en) Method and device for judging transaction category of user abnormal encrypted digital asset
Bilecki et al. A trust reputation architecture for cloud computing environment
CN113886817A (en) Host intrusion detection method and device, electronic equipment and storage medium
CN110874638B (en) Behavior analysis-oriented meta-knowledge federation method, device, electronic equipment and system
CN111159683B (en) Electronic voting method, device, computer and storage medium
CN110263106B (en) Collaborative public opinion fraud detection method and device
CN115687526A (en) Seismic data model sharing method based on block chain and federal learning
CN116226818A (en) Voting method based on block chain network, voting information storage method and device
CN113297310A (en) Method for selecting block chain fragmentation verifier in Internet of things
CN110910091A (en) Data processing method, device and medium
Yan et al. A Real-time Contribution Measurement Method for Participants in Federated Learning
CN116091188A (en) Risk identification method and device based on alliance chain

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant