With the development of artificial intelligence and Internet of Things (IoT), the era of industry 4.0 has come. According to the prediction of IBM, with the continuous popularization of 5G technology, the IoT technology will be more widely used in factories. In recent years, federated learning has become a hot topic for Industrial Internet of Things (IIoT) researchers. However, many devices in the IIoT currently have a problem of low computing power, so these devices cannot perform well facing the tasks of training and updating models in federated learning. In order to solve the above problems, we introduce edge computing into the IIot, so that the device can complete the federated learning operation. In order to ensure the security of data transmission, blockchain is introduced as the main algorithm of equipment authentication in the system. What’s more, in order to increase the efficiency and versatility of training model in IIoT, we introduce transfer learning to improve the system performance. The experimental results show that our algorithm can achieve high security and high training accuracy.