Under the times of the Industrial Internet of Things (IIoT), the traditional centralized machine learning management method can not deal with such a large number of data streams, and problem of data privacy has aroused widespread concern. In view of these difficulties, this paper uses the advantages of edge computing (EC) and federated learning (FL), combined with the outstanding characteristics of blockchain, proposes a secure data transmission method. Firstly, we separate local model updating process from mobile device independent process; Secondly, we increase edge server, so that most of the computing is carried out on the server, which improves learning efficiency; Finally, we use distributed architecture of blockchain to protect data security and privacy. Extensive simulation experiments show that the accuracy of our model can reach 98
$\%$
. And in terms of security, the defensive ability of this scheme is maintained at 0.8, which can ensure the security of data information.