The article uses web crawling to obtain public opinion data after the Sichuan Luding MS6.8 earthquake and preprocesses this data. Aiming at the limitations of the traditional LDA topic model, an improved topic model based on LDA, TT-LDA, is proposed. the BERT model is used to encode the public opinion data, and on the basis of the BERT embedding, the BiLSTM model is used for contextualized word representation for deep feature extraction to complete the modeling of public opinion sentiment evolution. Combining the crawled data and the model, we analyze the public opinion after the Sichuan Luding MS6.8 earthquake. Three days after the earthquake, positive sentiment, neutral sentiment, and negative sentiment increase to 488498, 466832, and 516560, respectively, a total of 1471890 sentiment data, and after time evolution, the sentiment polarity intensity increases from -0.178 to – 0.886, indicating that when the official announcement of the number of casualties of the accident is made, the netizens’ negative sentiment fully erupts to show the post-earthquake public opinion sentiment evolution process.