The COVID?19 epidemic is facing the influence of a variety of complex practical factors, which makes the development of the epidemic uncertain. In order to overcome the problem of large error in epidemic forecasting results due to the limitations of many ideal assumptions based on the infectious disease compartment model, a time series forecasting model based on deep learning is adopted to predict the epidemic development, and an informer model based on transformer model is established. Attention mechanism and distillation mechanism are applied to the time series forecasting of epidemic data. The threshold autoregressive (TAR) model and a variety of mainstream recurrent neural time series prediction models are used as comparison models. Through simulation experiments, the current number of remaining infections in the epidemic data of China, America and Britain is predicted in the short term, and RMSE and MAE are used as evaluation indicators, and then the best model is selected for medium ? and long?term prediction. The experimental results show that the indicator value of the informer model is optimal in both RMSE and MAE, further indicating that the prediction accuracy of the informer model is higher than that of other comparative models in China, America and Britain. Finally, the Informer model is used for the development of the epidemic in China,America and Britain medium and long?term prediction.