融合MA-CapsNet的社交媒体短文本情感分类研究——基于脱氢乙酸钠微博数据
Research on Sentiment Classification of Social Media Short Texts Integrating MA-CapsNet—Based on the Weibo Data of Sodium Dehydroacetate
摘要: 针对传统情感分类模型在短文本语义捕捉、领域特异性处理及情感强度量化上的不足,本文提出融合多粒度注意力机制与胶囊网络的MA-CapsNet模型,用于社交媒体短文本情感分类研究。模型构建“双流–三阶”分析框架:输入表示层采用混合嵌入策略,融合预训练BERT向量和位置编码;多粒度注意力层通过字符级、词汇级、句子级三重特征提取与门控融合,增强对“零添加”等领域表达的识别;胶囊网络层利用动态路由算法建模特征间的层次关系,有效处理“并非不安全”等复杂否定结构;输出层实现情感五分类(非常消极至非常积极)与强度量化(1~10分),并采用联合损失函数来优化双任务性能。结果表明,MA-CapsNet在情感分类任务上准确率达87.6%,宏平均F1值0.857,显著优于SVM (72.1%)、TextCNN (78.9%)、BERT (84.2%)等模型;情感强度预测MAE为0.73,皮尔逊相关系数0.82,体现出对情感细微差异的精准捕捉能力。研究表明,MA-CapsNet能有效提升食品安全舆情的情感分析精度,为舆情监测与引导提供技术支撑,其领域自适应设计对其他专业领域的短文本分析具有借鉴意义。
Abstract: In view of the deficiencies of traditional sentiment classification models in semantic capture of short texts, domain-specific processing and quantification of sentiment intensity, this paper proposes the MA-CapsNet model integrating multi-granularity attention mechanism and capsule network for the research of sentiment classification of short texts in social media. Model constructs “dual-stream-third-order” analysis framework: The input representation layer adopts a hybrid embedding strategy, fusing pre-trained BERT vectors and position encodings; The multi-granularity attention layer enhances the recognition of expressions in fields such as “zero addition” through the fusion of triple feature extraction at the character level, vocabulary level, and sentence level with gating. The capsule network layer uses dynamic routing algorithms to model the hierarchical relationship between features, effectively handling complex negative structures such as “not insecure”. The output layer implements five-classification of emotions (from very negative to very positive) and intensity quantification (1~10 points), and a joint loss function is adopted to optimize the performance of the dual tasks. The results show that the accuracy rate of MA-CapsNet in the emotion classification task reaches 87.6%, and the macro average F1 value is 0.857, which is significantly better than models such as SVM (72.1%), TextCNN (78.9%), and BERT (84.2%). The MAE for emotional intensity prediction is 0.73, and the Pearson correlation coefficient is 0.82, demonstrating the precise ability to capture the subtle differences in emotions. Studies show that MA-CapsNet can effectively improve the accuracy of sentiment analysis of food safety public opinions, provide technical support for public opinion monitoring and guidance, and its domain adaptive design has reference significance for short text analysis in other professional fields.
文章引用:崔培东. 融合MA-CapsNet的社交媒体短文本情感分类研究——基于脱氢乙酸钠微博数据[J]. 应用数学进展, 2025, 14(9): 198-212. https://doi.org/10.12677/aam.2025.149413

参考文献

[1] 第55次《中国互联网络发展状况统计报告》发布[J]. 传媒论坛, 2025, 9(2): 121.
[2] 张辉, 贾敬敦, 王文月, 等. 国内食品添加剂研究进展及发展趋势[J]. 食品与生物技术学报, 2016, 35(3): 225-233.
[3] 徐彦英, 汪晓鹏, 吴亮. 食品添加剂的应用及安全性探究[J]. 农产品加工, 2022(1): 70-72.
[4] 关于发布《食品安全国家标准食品添加剂使用标准》(GB2760-2014)等37项食品安全国家标准的公告[J]. 中国食品添加剂, 2015(2): 186-187.
[5] 黄晓斌, 谭颖骞. 网络信息挖掘方法的效果评价[J]. 情报理论与实践, 2011, 34(6): 97-101.
[6] 张仰森, 段宇翔, 黄改娟, 等. 社交媒体话题检测与追踪技术研究综述[J]. 中文信息学报, 2019, 33(7): 1-10+30.
[7] Cantini, R. and Marozzo, F. (2023) Topic Detection and Tracking in Social Media Platforms. In: International Conference on Pervasive-Knowledge and Collective Intelligence on Web and Social Media, Springer, 41-56. [Google Scholar] [CrossRef
[8] Tran, T., Le, T. and Tran, T. (2019) A Machine Learning Approach for Hot Topic Detection in News. In: Proceedings of the 7th International Conference on FICTA, Springer, 179-188. [Google Scholar] [CrossRef
[9] Mamo, N., Azzopardi, J. and Layfield, C. (2021) An Automatic Participant Detection Framework for Event Tracking on Twitter. Algorithms, 14, Article No. 92. [Google Scholar] [CrossRef
[10] Kuttschreuter, M., Rutsaert, P., Hilverda, F., Regan, Á., Barnett, J. and Verbeke, W. (2014) Seeking Information about Food-Related Risks: The Contribution of Social Media. Food Quality and Preference, 37, 10-18. [Google Scholar] [CrossRef
[11] Wang, S., Liang, M.Y., Gao, T. and Du, J.P. (2010) Realization of Product Quality and Food Security Internet Public Opinion Supervision System. 2010 8th World Congress on Intelligent Control and Automation, Jinan, 7-9 July 2010, 2735-2740. [Google Scholar] [CrossRef
[12] Li, C. and Li, L. (2016). Study on the Monitoring and Intervention of Network Public Opinions of Food Safety. In: Proceedings of the 2nd International Conference on Electronics, Network and Computer Engineering (ICENCE 2016), Atlantis Press, 955-958.[CrossRef
[13] Li, S., Xu, Y., He, Y., Geng, Z., Jiang, Z. and Zhu, Q. (2017) Research on Public Opinion Warning Based on Analytic Hierarchy Process Integrated Back Propagation Neural Network. 2017 Chinese Automation Congress (CAC), Jinan, 20-22 October 2017, 2440-2445. [Google Scholar] [CrossRef
[14] Zheng, C., Song, Y. and Ma, Y. (2020) Public Opinion Prediction Model of Food Safety Events Network Based on BP Neural Network. IOP Conference Series: Materials Science and Engineering, 719, Article ID: 012078. [Google Scholar] [CrossRef
[15] Zhang, D., Zhang, T., Liu, S., Sun, D., Ding, S., Cheng, X., et al. (2020) SARS2020: An Integrated Platform for Identification of Novel Coronavirus by a Consensus Sequence-Function Model. Bioinformatics, 37, 1182-1183. [Google Scholar] [CrossRef] [PubMed]
[16] 杨维东, 董小玉. 基于多水平模型的教育舆情决策支持系统设计[J]. 教育研究, 2020, 41(8): 133-141.
[17] 傅丽芳, 裴城妍, 郭永瑞. 农产品安全网络舆情演化分析与导控策略[J]. 科学技术与工程, 2020, 20(7): 2801-2809.
[18] Li, H., Luo, J., Li, H., Han, S., Fang, S., Li, L., et al. (2022) Consumer Cognition Analysis of Food Additives Based on Internet Public Opinion in China. Foods, 11, Article No. 2070. [Google Scholar] [CrossRef] [PubMed]
[19] 李双, 张才明. 大数据时代的职工舆情监测分析——以网络大数据监测分析系统的构建与应用为中心[J]. 新视野, 2020(3): 94-100.
[20] Pande, S. and Chetty, M.S.R. (2018) Analysis of Capsule Network (Capsnet) Architectures and Applications. Journal of Advanced Research in Dynamical and Control Systems, 10, 2765-2771.
[21] 陈洁, 王思雨, 赵姝, 等. 基于多粒度用户偏好的文档级情感分析[J]. 中文信息学报, 2023, 37(7): 122-130.