Research Article
A Blockchain-Enabled Trading Framework for Distributed Photovoltaic Power Using Federated Learning
Input: | Output: The global model | 1 begin | 2 ; ; ; | 3 while global model training has not yet been completed do | 4 use and for local model training; | 5 obtained by Equation (4); | 6 nodeID; epochNum localParm ; | 7 store {nodeID, epochNum, localParm} to the ledger; | 8 while flag = true do | 9 sleep ; | 10 amount of records where in the ledger; | 11 if totalNum = then | 12 false; | 13 end | 14 end | 15 for do | 16 localParm of node where in the ledger; | 17 end | 18 obtained by Equation (5); | 19 update with ; | 20 ; | 21 ; | 22 end | 23 return | 24 end |
|