Please wait a minute...
Advanced Search
数据分析与知识发现  2023, Vol. 7 Issue (11): 46-55     https://doi.org/10.11925/infotech.2096-3467.2022.0751
  研究论文 本期目录 | 过刊浏览 | 高级检索 |
基于提示嵌入的突发公共卫生事件微博文本情感分析*
赖宇斌1,陈燕1(),胡小春2,黄欣3
1广西大学计算机与电子信息学院 南宁 530004
2广西财经学院大数据与人工智能学院 南宁 530007
3广西农业职业技术大学信息工程学院 南宁 530007
Sentiment Analysis of Micro-blog on Public Health Emergency with Prompt Embedding
Lai Yubin1,Chen Yan1(),Hu Xiaochun2,Huang Xin3
1School of Computer, Electronics and Information, Guangxi University, Nanning 530004, China
2School of Big Data and Artificial Intelligence, Guangxi University of Finance and Economics, Nanning 530007, China
3College of Information Engineering, Guangxi Vocational University of Agriculture, Nanning 530007, China
全文: PDF (1082 KB)   HTML ( 12
输出: BibTeX | EndNote (RIS)      
摘要 

目的】 为解决突发公共卫生事件初期微博数据量较少和口语化表达较多导致情感分析效果不佳的问题,提出一种基于提示嵌入和情感特征融合的微博情感分析模型。【方法】 根据构建的情感词典提取微博文本情感信息;使用RoBERTa预训练模型提取语义向量和情感向量,将提示作为前缀嵌入语义向量,使用Transformer编码器和注意力机制分别提取语义特征与情感特征;然后使用焦点损失函数计算样本特征权重;最后,将语义特征与情感特征融合得到情感分析结果。【结果】 以突发公共卫生事件中深圳新型冠状病毒感染疫情微博评论数据为例,所提情感分析模型的准确率和F1值分别达到93.46%和93.49%,较基准模型BERT分别提升6.78和6.97个百分点。【局限】 微博数据存在大量图片和视频内容,未融合多个模态进行情感分析。【结论】 所提模型基于提示嵌入与情感特征融合,可提升样本数据少时的情感分类效果,对其他同类情感分析研究具有借鉴意义。

服务
把本文推荐给朋友
加入引用管理器
E-mail Alert
RSS
作者相关文章
赖宇斌
陈燕
胡小春
黄欣
关键词 提示嵌入特征融合少样本情感分析突发公共卫生事件    
Abstract

[Objective] At the early stage of public health emergencies, limited Weibo posts and informal expressions lead to ineffective sentiment analysis. We propose a sentiment analysis model for Weibo posts based on prompt embedding and emotion feature fusion to address this issue. [Methods] First, we extracted the sentiment information from Weibo posts based on the emotional dictionary. Then, we used the pre-trained RoBERTa model to establish semantic and sentiment vectors. We also embedded prompts as prefixes for the semantic vectors. Third, we utilized the Transformer encoder and attention mechanism to extract semantic and emotional features. We also computed the sample feature weights using the focal loss function. Finally, we combined the semantic and emotional features to conduct sentiment analysis. [Results] We examined the new model with Weibo comments on the outbreak of COVID-19 in Shenzhen. The accuracy and F1 score of the model reached 93.46% and 93.49%, which were 6.78% and 6.97% higher than the baseline BERT model. [Limitations] Weibo data contains a large amount of images and videos. However, our model did not include multi-modal fusion for sentiment analysis. [Conclusions] The proposed model could improve the effectiveness of sentiment classification with a small sample data size.

Key wordsPrompt Embedding    Feature Fusion    Few Shot    Sentiment Analysis    Public Health Emergency
收稿日期: 2022-07-19      出版日期: 2023-03-22
ZTFLH:  G350  
基金资助:*广西科学研究与技术开发计划项目(桂科AA20302002-3);广西自然科学基金项目的研究成果之一(2020GXNSFAA159090)
通讯作者: 陈燕, ORCID:0000-00002-9950-684X,E-mail:cy@gxu.edu.cn。   
引用本文:   
赖宇斌, 陈燕, 胡小春, 黄欣. 基于提示嵌入的突发公共卫生事件微博文本情感分析*[J]. 数据分析与知识发现, 2023, 7(11): 46-55.
Lai Yubin, Chen Yan, Hu Xiaochun, Huang Xin. Sentiment Analysis of Micro-blog on Public Health Emergency with Prompt Embedding. Data Analysis and Knowledge Discovery, 2023, 7(11): 46-55.
链接本文:  
https://manu44.magtech.com.cn/Jwk_infotech_wk3/CN/10.11925/infotech.2096-3467.2022.0751      或      https://manu44.magtech.com.cn/Jwk_infotech_wk3/CN/Y2023/V7/I11/46
Fig.1  MESA模型结构
Fig.2  情感信息提取流程
Fig.3  自注意力计算过程
原始数据 处理后数据 标签
#深圳疫情#这核酸做的不是很地道啊,说好的一米一个距离呢 kk钢铁侠911的微博视频 这核酸做的不是很地道啊说好的一米一个距离呢 -1
#深圳疫情# 3月18日0-24时深圳新增77例病例,其中7例在社区筛查中发现,4例在重点人群筛查中发现,22例在重点区域筛查中发现,44例在隔离观察的密接人员排查中发现;46例诊断为新型冠状病毒感染确证病例,31例诊断为新冠病毒无症状感染者。详情请见下图↓↓↓ 3月18日0-24时深圳新增77例病例其中7例在社区筛查中发现4例在重点人群筛查中发现22例在重点区域筛查中发现44例在隔离观察的密接人员排查中发现46例诊断为新型冠状病毒感染确证病例31例诊断为新冠病毒无症状感染者 0
#深圳疫情# 加油深圳 @深圳卫健委 深圳·深圳市宝安区体育中心 加油深圳 1
Table 1  数据处理样例
模型 P/% R/% F1/% Acc/%
BERT 87.01 86.72 86.52 86.68
ERNIE 87.67 87.50 87.26 87.72
MacBERT 87.50 89.07 88.14 88.64
RoBERTa 89.91 89.06 89.23 89.06
MESA 93.60 93.45 93.49 93.46
Table 2  不同分类模型对比结果
模型 P/% R/% F1/% Acc/%
B-MESA 88.80 88.66 88.61 88.61
E-MESA 89.28 89.18 89.19 89.19
M-MESA 89.21 90.39 88.36 90.30
MESA 93.60 93.45 93.49 93.46
Table 3  词向量工具的对比结果
Fig.3  降采样前后数据分布对比
数据集 模型 P/% R/% F1/% Acc/%
SED RoBERTa 89.91 89.06 89.23 89.06
MESA 93.60 93.45 93.49 93.46
SED0.8 RoBERTa 87.63 87.50 87.60 87.60
MESA 91.05 91.03 91.03 91.03
SED0.5 RoBERTa 84.38 84.59 84.16 84.38
MESA 88.92 89.03 88.89 89.03
SED0.2 RoBERTa 79.97 77.42 76.31 81.05
MESA 88.12 87.37 87.47 87.37
Table4  降采样对比结果
模型 提示嵌入 情感特征分支 损失函数 P/% R/% F1/% Acc/%
RoBERTa - - C 89.91 89.06 89.23 89.06
R-P - C 90.97 90.94 90.93 90.93
R-F - FL 91.40 91.38 91.37 91.38
M-C C 92.92 92.83 92.84 92.83
MESA FL 93.60 93.45 93.49 93.46
Table5  消融实验对比结果
[1] 赵宏. 疫情防控下个人的权利限缩与边界[J]. 比较法研究, 2020(2): 11-24.
[1] (Zhao Hong. Contraction and Boundary of the Individual’s Right under the Epidemic Prevention and Control[J]. Journal of Comparative Law, 2022(2): 11-24.)
[2] 刘忠宝, 秦权, 赵文娟. 微博环境下新型冠状病毒感染疫情事件对网民情绪的影响分析[J]. 情报杂志, 2021, 40(2): 138-145.
[2] (Liu Zhongbao, Qin Quan, Zhao Wenjuan. Research on the Influence of COVID-19 Event on the Netizen Emotion under the Microblog Environment[J]. Journal of Intelligence, 2021, 40(2): 138-145.)
[3] 周宁, 钟娜, 靳高雅, 等. 基于混合词嵌入的双通道注意力网络中文文本情感分析[J]. 数据分析与知识发现, 2023, 7(3): 58-68.
[3] (Zhou Ning, Zhong Na, Jin Gaoya, et al. Chinese Text Sentiment Analysis Based on Dual Channel Attention Network with Hybrid Word Embedding[J]. Data Analysis and Knowledge Discovery, 2023, 7(3): 58-68.)
[4] 韩普, 张伟, 张展鹏, 等. 基于特征融合和多通道的突发公共卫生事件微博情感分析[J]. 数据分析与知识发现, 2021, 5(11): 68-79.
[4] (Han Pu, Zhang Wei, Zhang Zhanpeng, et al. Sentiment Analysis of Weibo Posts on Public Health Emergency with Feature Fusion and Multi-Channel[J]. Data Analysis and Knowledge Discovery, 2021, 5(11): 68-79.)
[5] Liu P F, Yuan W Z, Fu J L, et al. Pre-Train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processing[OL]. arXiv Preprint, arXiv: 2107.13586.
[6] Brown T B, Mann B, Ryder N, et al. Language Models are Few-Shot Learners[C]// Proceedings of the 34th International Conference on Neural Information Processing Systems. 2020: 1877-1901.
[7] Liu Y H, Ott M, Goyal N, et al. RoBERTa: A Robustly Optimized BERT Pretraining Approach[OL]. arXiv Preprint, arXiv: 1907.11692.
[8] 沈彬, 严馨, 周丽华, 等. 基于ERNIE和双重注意力机制的微博情感分析[J]. 云南大学学报(自然科学版), 2022, 44(3): 480-489.
[8] Shen Bin, Yan Xin, Zhou Lihua, et al. Microblog Sentiment Analysis Based on ERNIE and Dual Attention Mechanism[J]. Journal of Yunnan University(Natural Sciences Edition), 2022, 44(3): 480-489.)
[9] 钟佳娃, 刘巍, 王思丽, 等. 文本情感分析方法及应用综述[J]. 数据分析与知识发现, 2021, 5(6): 1-13.
[9] (Zhong Jiawa, Liu Wei, Wang Sili, et al. Review of Methods and Applications of Text Sentiment Analysis[J]. Data Analysis and Knowledge Discovery, 2021, 5(6): 1-13.)
[10] 王婷, 杨文忠. 文本情感分析方法研究综述[J]. 计算机工程与应用, 2021, 57(12): 11-24.
doi: 10.3778/j.issn.1002-8331.2101-0022
[10] (Wang Ting, Yang Wenzhong. Review of Text Sentiment Analysis Methods[J]. Computer Engineering and Applications, 2021, 57(12): 11-24.)
doi: 10.3778/j.issn.1002-8331.2101-0022
[11] Kim Y. Convolutional Neural Networks for Sentence Classification[OL]. arXiv Preprint, arXiv:1408.5882.
[12] 岳增营, 叶霞, 刘睿珩. 基于语言模型的预训练技术研究综述[J]. 中文信息学报, 2021, 35(9): 15-29.
[12] (Yue Zengying, Ye Xia, Liu Ruiheng. A Survey of Language Model Based Pre-Training Technology[J]. Journal of Chinese Information Processing, 2021, 35(9): 15-29.)
[13] Munikar M, Shakya S, Shrestha A. Fine-Grained Sentiment Classification Using BERT[OL]. arXiv Preprint, arXiv: 1910.03474.
[14] 齐梦娜, 朱丽平, 李宁. 基于ERNIE和CNN的在线评论情感分析模型[J]. 计算机应用, 2022, 42(S1): 7-11.
[14] (Qi Mengna, Zhu Liping, Li Ning. Sentiment Analysis Model of Commodity Reviews Based on ERNIE and CNN[J]. Journal of Computer Applications, 2022, 42(S1): 7-11.)
[15] 王曙燕, 原柯. 基于RoBERTa-WWM的大学生论坛情感分析模型[J]. 计算机工程, 2022, 48(8): 292-298.
doi: 10.19678/j.issn.1000-3428.0062008
[15] (Wang Shuyan, Yuan Ke. Sentiment Analysis Model of College Student Forum Based on RoBERTa-WWM[J]. Computer Engineering, 2022, 48(8): 292-298.)
doi: 10.19678/j.issn.1000-3428.0062008
[16] Gu Y, Han X, Liu Z, et al. PPT: Pre-trained Prompt Tuning for Few-shot Learning[OL]. arXiv Preprint, arXiv: 2109.04332.
[17] 张博旭, 蒲智, 程曦. 基于提示学习的维吾尔语文本分类研究[J]. 计算机工程, 2023, 49(6): 292-299.
doi: 10.19678/j.issn.1000-3428.0064892
[17] (Zhang Boxu, Pu Zhi, Cheng Xi. Research on Uyghur Text Classification Based on Prompt Learning[J]. Computer Engineering, 2023, 49(6): 292-299.)
doi: 10.19678/j.issn.1000-3428.0064892
[18] 陈诺, 李旭辉. 一种基于模板提示学习的事件抽取方法[J]. 数据分析与知识发现, 2023, 7(6): 86-98.
[18] (Chen Nuo, Li Xuhui. An Event Extraction Method Based on Template Prompt Learning[J]. Data Analysis and Knowledge Discovery, 2023, 7(6): 86-98.)
[19] 苏杭, 胡亚豪, 谢艺菲, 等. 利用提示调优实现两阶段模型复用的关系实体抽取方法[J]. 计算机应用研究, 2022, 39(12): 3598-3604.
[19] (Su Hang, Hu Yahao, Xie Yifei, et al. Model-Reused Method of Two-Stage Relations and Entities Extraction with Prompt Tuning[J]. Application Research of Computers, 2022, 39(12): 3598-3604.)
[20] Liu X, Zheng Y N, Du Z X, et al. GPT Understands, too[OL]. arXiv Preprint, arXiv: 2103.10385.
[21] Lester B, Al-Rfou R, Constant N. The Power of Scale for Parameter-Efficient Prompt Tuning[OL]. arXiv Preprint, arXiv: 2104.08691.
[22] Liu X, Ji K X, Fu Y C, et al. P-Tuning v2: Prompt Tuning can be Comparable to Fine-Tuning Universally Across Scales and Tasks[OL]. arXiv Preprint, arXiv: 2110.07602.
[23] Li X L, Liang P. Prefix-Tuning: Optimizing Continuous Prompts for Generation[OL]. arXiv Preprint, arXiv: 2101.00190.
[24] Lei Z Y, Yang Y J, Yang M, et al. A Multi-Sentiment-Resource Enhanced Attention Network for Sentiment Classification[C]// Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics(Volume 2:Short Papers). 2018: 758-763.
[25] 张仰森, 郑佳, 黄改娟, 等. 基于双重注意力模型的微博情感分析方法[J]. 清华大学学报(自然科学版), 2018, 58(2): 122-130.
[25] (Zhang Yangsen, Zheng Jia, Huang Gaijuan, et al. Microblog Sentiment Analysis Method Based on a Double Attention Model[J]. Journal of Tsinghua University (Science and Technology), 2018, 58(2): 122-130.)
[26] Lin T Y, Goyal P, Girshick R, et al. Focal Loss for Dense Object Detection[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020, 42(2): 318-327.
doi: 10.1109/TPAMI.34
[27] Devlin J, Chang M W, Lee K, et al. BERT: Pre-Training of Deep Bidirectional Transformers for Language Understanding[C]// Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics:Human Language Technologies, Volume 1(Long and Short Papers). 2019: 4171-4186.
[28] Sun Y, Wang S H, Li Y K, et al. ERNIE: Enhanced Representation Through Knowledge Integration[OL]. arXiv Preprint,arXiv:1904.09223.
[29] Cui Y, Che W, Liu T, et al. Revisiting Pre-Trained Models for Chinese Natural Language Processing[OL]. arXiv Preprint,arXiv: 2004.13922.
[1] 普祥和, 王红斌, 线岩团. 结合类型感知注意力的少样本知识图谱补全*[J]. 数据分析与知识发现, 2023, 7(9): 51-63.
[2] 李锴君, 牛振东, 时恺泽, 邱萍. 基于学术知识图谱及主题特征嵌入的论文推荐方法*[J]. 数据分析与知识发现, 2023, 7(5): 48-59.
[3] 邓娜, 何昕洋, 陈伟杰, 陈旭. MPMFC:一种融合网络邻里结构特征和专利语义特征的中药专利分类模型*[J]. 数据分析与知识发现, 2023, 7(4): 145-158.
[4] 闫尚义, 王靖亚, 刘晓文, 崔雨萌, 陶知众, 张晓帆. 基于多头自注意力池化与多粒度特征交互融合的微博情感分析*[J]. 数据分析与知识发现, 2023, 7(4): 32-45.
[5] 张昱, 张海军, 刘雅情, 梁科晋, 王月阳. 基于双向掩码注意力机制的多模态情感分析*[J]. 数据分析与知识发现, 2023, 7(4): 46-55.
[6] 潘华莉, 谢珺, 高婧, 续欣莹, 王长征. 融合多模态特征的深度强化学习推荐模型*[J]. 数据分析与知识发现, 2023, 7(4): 114-128.
[7] 李浩君, 吕韵, 汪旭辉, 黄诘雅. 融入情感分析的多层交互深度推荐模型研究*[J]. 数据分析与知识发现, 2023, 7(3): 43-57.
[8] 周宁, 钟娜, 靳高雅, 刘斌. 基于混合词嵌入的双通道注意力网络中文文本情感分析*[J]. 数据分析与知识发现, 2023, 7(3): 58-68.
[9] 王昊, 龚丽娟, 周泽聿, 范涛, 王永生. 融合语义增强的社交媒体虚假信息检测方法研究*[J]. 数据分析与知识发现, 2023, 7(2): 48-60.
[10] 曾子明,张瑜. 基于数据增强和多任务学习的突发公共卫生事件谣言识别研究*[J]. 数据分析与知识发现, 2023, 7(11): 56-67.
[11] 林哲, 陈平华. 基于块注意力机制和Involution的文本情感分析模型*[J]. 数据分析与知识发现, 2023, 7(11): 37-45.
[12] 吴思思, 马静. 基于感知融合的多任务多模态情感分析模型*[J]. 数据分析与知识发现, 2023, 7(10): 74-84.
[13] 徐月梅, 曹晗, 王文清, 杜宛泽, 徐承炀. 跨语言情感分析研究综述*[J]. 数据分析与知识发现, 2023, 7(1): 1-21.
[14] 肖宇晗, 林慧苹. 基于CWSA方面词提取模型的差异化需求挖掘方法研究——以京东手机评论为例*[J]. 数据分析与知识发现, 2023, 7(1): 63-75.
[15] 边晓慧, 徐童. 重大突发公共卫生事件下的公众情感演进分析:基于新冠肺炎疫情的考察*[J]. 数据分析与知识发现, 2022, 6(7): 128-140.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
版权所有 © 2015 《数据分析与知识发现》编辑部
地址:北京市海淀区中关村北四环西路33号 邮编:100190
电话/传真:(010)82626611-6626,82624938
E-mail:jishu@mail.las.ac.cn