| With the development of computer science and the improvement of chip computing power,machine learning algorithms have become one of the main ways to achieve artificial intelligence.Machine learning algorithms rely on a large amount of data to continuously improve the model accuracy,but the protection of individual data privacy has also become particularly important.In 2016,Google proposed the federated learning technology,which can complete distributed model training by only exchanging intermediate model parameters without exchanging individual sample data,realizing the availability of data without visibility and protecting individual data privacy.Although federated learning technology has achieved distributed model training,the federated learning process is still controlled by a central service node.The distrust of participating nodes to the central service node makes it difficult to carry out reward and punishment mechanisms,which leads to malicious nodes in the system acting without cost and threatening the availability of the federated learning system.One solution to this problem is to decentralize federated learning.A decentralized federated learning system can break the absolute control of the central service node on the system and obtain the trust of participating nodes by using mechanisms to constrain the system.However,in the research on decentralized federated learning at home and abroad,it has been found that the system is too closed and the performance is poor,which is still a problem that urgently needs to be improved.Through analysis,it is found that the introduction of smart contracts can solve the problem of system closure,but due to the poor performance of smart contracts,they are easily a performance bottleneck for the system.Therefore,this thesis proposes the PBFT-SC consensus algorithm,which achieves the isolation between participating nodes and smart contracts through off-chain consensus based on practical byzantine fault-tolerant algorithms,thereby improving the system efficiency.At the same time,the on-chain consensus based on smart contracts also breaks the system’s closure.In addition,based on the PBFT-SC algorithm,this thesis also describes the design principles of the reward and punishment mechanism and other related auxiliary mechanisms applied to horizontal federated learning.Finally,this thesis demonstrates the performance of the system,the effectiveness of the core reward and punishment mechanism,and the application of differential privacy technology in the system through experiments.The experimental results show that the system has great advantages in terms of performance compared to similar systems;the core reward and punishment mechanism can effectively reflect the quality of local sample data of participating nodes;and differential privacy technology is successfully applied in the system.This thesis first summarizes relevant technologies and related research at home and abroad,providing readers with background and theoretical foundations.Subsequently,the PBFT-SC algorithm based on practical byzantine fault-tolerant algorithm and Ethereum smart contract implementation is introduced,and the relationship between consensus mechanism and incentive mechanism,algorithm security,and performance in this algorithm are discussed in detail.In the requirement analysis section,the thesis describes the system’s functions and roles,and in the overview design,it elaborates on the overall architecture design of the system,functional module interface design,entity relationship design,and interface design.Next,in the detailed design and implementation chapter,the thesis uses class diagrams and timing diagrams to describe the specific details of the system’s functional design,accompanied by text explanations.In terms of functional testing,the thesis describes the test cases and results for each functional module of the system.At the same time,in terms of non-functional testing,the thesis describes the performance measurement experiments of the system.Finally,this thesis summarizes the system,including its shortcomings and possible improvement strategies,and looks forward to the system’s future development prospects. |