As a major public health emergency, the COVID-19 pandemic has some uncertainties. Coupling of the uncertainties and anti-epidemic policies easily leads to the spread of negative emotions. It is challenging to maintain the sustainability of anti-epidemic measures. Therefore, this paper aimed to analyze the challenges that the sustainability of anti-epidemic measures is faced with. A topic clustering extension method was proposed, which integrated Latent Dirichlet Allocation (LDA) topic information with Bidirectional Encoder Representations from Transformers (BERT) contextual information through aspect-based sentiment analysis. In addition, this paper constructed a thesaurus of aspect words from the two stages of dynamic zero-COVID and orderly relaxation of epidemic control. This paper established the BERT-pair-ABSA model for semantic expansion of auxiliary sentences and calculated sentiment polarity to gain insight into the changes in netizens' concerns, emotional states and evolution trends at different stages. The research results showed: (1) Compared with the benchmark model, the proposed sentiment analysis model had better classification accuracy and was applicable to the sentiment classification of short texts in the epidemic situation; (2) During the dynamic zero-COVID stage, netizens paid attention to grassroots epidemic management and the scope of lockdown and epidemic control, which were closely related to both specific lockdown and control management, and the implementation of regional epidemic management; and (3) in the orderly relaxation stage of epidemic control, netizens were concerned about drug guarantee, medical care guarantee, personal health protection and health protection of special population groups, and negative emotions always dominated in drug guarantee, medical care guarantee and health protection of special groups. The negative sentiment of drug guarantee, medical care guarantee and health protection of special groups always dominated. The results provided an empirical basis for the optimization and adjustment of the anti-epidemic policies.