A motor failure diagnosis model based on deep learning and federated learning is proposed.Transformer model was used to analyze the running data of motor and classify the failure diagnosis.Fed Prox federated learning algorithm was adopted,different data were used to train the model on multiple clients before the trained model was uploaded to the central server for aggregation,and the aggregated model was used to carry out failure diagnose.The results show that the proposed model has good performance,and the failure classification accuracy of data can meet the relevant requirements of motor failure diagnosis.In addition,federated learning helps the model to obtain more data features,improve the quality of model failure diagnosis,and also plays a certain role in protecting data privacy.