| Electrocardiogram(ECG)detection is a hot topic in clinical research,which has important medical significance.Existing studies have shown that the accuracy of using machine learning,neural network and other algorithms to model ECG data to detect arrhythmia events has reached the level of ECG experts.However,the traditional machine learning detection methods need to collect a large number of private ECG data for model training,which destroys the principle of private data not sharing.To end this,an algorithm for ECG anomaly detection using federated learning is proposed,which can train the neural network model distributed without collecting ECG privacy data and achieves ideal model accuracy.On the other hand,medical data are often non-independent and identically distributed(Non-IID)in the actual scene,which makes the accuracy of the federated learning(FL)model decline.In view of this situation,this paper studies an improved federal learning model which can achieve good training effect under any Non-IID conditions.The key contributions of this work are as follows:Firstly,an ECG anomaly detection algorithm based on FL is proposed.Using federated learning distributed training model,instead of traditional centralized machine learning,makes the data of each distributed node stored locally,avoids data sharing,and ensures the privacy and security of medical data.The simulation results show that when the ECG data are independent and identically distributed(IID),the performance of the FL model is close to that of centralized machine learning model,while maintaining the advantage of data privacy.Secondly,aiming at the problem that the accuracy of Federated learning model declines when the data is seriously Non-IID,a federated learning model which combines data sharing strategy and dynamic weight aggregation(EWC)algorithm is proposed.The data sharing strategy is improved in our algorithm which could be named global data strategy.The global data is placed in the central server to complete the initialization of the model without sharing between clients.In addition,EWC algorithm is used when the model is trained locally on the client.The simulation results show that when the data is Non-IID,the improved federal learning model can effectively overcome the model precision decrease,and the training efficiency is also improved when the data is IID.The balance between data privacy and model performance is achieved by the improved federal learning model. |