Multi-Level Online Public Opinion Sentiment Analysis Method Based on Text Features
With the rapid development of social media and online interactive platforms, online public opinion has become a vital information source for public emotional expression, social risk perception, and decision support. However, public opinion texts are typically characterized by short length, obscure semantics, complex emotional expressions, and strong context dependence, making it difficult for traditional lexicon-based or shallow neural network methods to achieve stable and robust performance in sentiment discrimination tasks. To address these issues, this paper proposes BERT-BiLSTM-MHSA-Capsule (BBMC), hereafter referred to as BBMC, an online public opinion sentiment analysis model based on multi-level semantic feature fusion. The model first utilizes the pretrained language model BERT to extract dynamic semantic representations with context-aware capabilities; subsequently, a Bidirectional Long Short-Term Memory (BiLSTM) network is employed to model the bidirectional temporal dependencies within the texts, while a Multi-Head Self-Attention (MHSA) mechanism is introduced to achieve adaptive focusing on key emotional information. Building upon this, a three-layer cascaded capsule network is constructed to achieve structured modeling of high-order emotional attributes through vector neurons and dynamic routing mechanisms, effectively mitigating the loss of spatial feature information caused by traditional pooling and fully connected structures. Experimental results on a manually annotated online public opinion dataset show that BBMC achieves better performance than the evaluated baseline models in terms of accuracy, recall, and F1-score. These results indicate the empirical effectiveness of the proposed task-oriented feature-integration strategy and capsule-based classification head for online public opinion sentiment analysis.