After the COVID-19 epidemic leveled off in China, many provinces have started to resume schooling. Long-term contact between students and teachers in such a closed environment in schooling can increase the possibility of the outbreak. Although the school closure can effectively alleviate the epidemic, large-scale students’ isolation not only causes social panic but also brings huge social and economic burden, so before the emergence of school epidemics, one should select and adopt more scientific prevention and control measures. In this study, according to the virus excretion of COVID-19 patients in the disease period, the infectious capacity of patients is redefined. After introducing it into the traditional suspected-exposed-infected-removed (SEIR) model, a continuous infection model that is more consistent with the actual transmission of COVID-19 patients is proposed. Secondly, the effective distance between students is calculated through real contact data. Based on the analysis of the effective distance, three types of isolation area prevention and control measures are proposed and compared with the recently proposed digital contact tracking prevention and control measures. Simulating the spread of COVID-19 in schools through real student contact data and continuous infection models, in order to compare the preventions and control effects of various prevention and control measures in the school epidemic situation, and evaluating the social influence of measures by accumulating the number of quarantines when prevention and control measures are adopted, we find that the COVID-19 can lead the cases to happen on a larger scale in the continuous infection model than in the traditional SEIR model, and the prevention and control measures verified in the continuous infection model are more convincing. Using digital contact tracking prevention and control measures in schools can achieve similar results to those in closed schools with the smallest number of quarantines. The research in this paper can help schools choose appropriate prevention and control measures, and the proposed continuous infection model can help researchers more accurately simulate the spread of COVID-19.