基于朴素贝叶斯算法的中文垃圾短信过滤模型研究
Research on Chinese Spam SMS Filtering Model Based on Naive Bayes Algorithm
摘要: 针对传统关键词过滤方法在中文垃圾短信识别中自适应差、误报率高的问题,本文实现并评估了一套基于朴素贝叶斯算法的高效、轻量级过滤工具。首先,构建中文短信语料库,并进行分词、去停用词等预处理;其次,采用TF-IDF结合N-gram进行特征提取,并通过消融实验量化各处理步骤的贡献;最后,基于Scikit-learn实现多项式朴素贝叶斯分类器,通过网格搜索进行参数调优。实验结果表明,该工具在测试集上准确率达88.2%,F1值为0.897,误报率仅6.6%,在训练效率和资源占用上相较对比算法具有一定优势。该工作为垃圾短信治理提供了一种工程上可行、易于部署的轻量级技术参考。
Abstract: To address the issues of poor adaptability and high false-positive rates in traditional keyword-based filtering methods for Chinese spam SMS identification, this paper implements and evaluates an efficient and lightweight filtering tool based on the Naive Bayes algorithm. First, a Chinese SMS corpus is constructed and preprocessed through tokenization and stop-word removal. Second, TF-IDF combined with N-gram is employed for feature extraction, with the contribution of each preprocessing step quantified through ablation studies. Finally, a Multinomial Naive Bayes classifier is implemented using Scikit-learn and optimized via grid search for parameter tuning. Experimental results show that the tool achieves an accuracy of 88.2% and an F1-score of 0.897 on the test set, with a false-positive rate of 6.6%, demonstrating certain advantages over comparison algorithms in training efficiency and resource consumption. This work provides a lightweight, practically feasible, and easily deployable technical solution for spam SMS governance.
文章引用:荀夕园, 杨馨悦. 基于朴素贝叶斯算法的中文垃圾短信过滤模型研究[J]. 数据挖掘, 2026, 16(3): 79-89. https://doi.org/10.12677/hjdm.2026.163008

参考文献

[1] 刘诚, 黄凯方, 吴文波. “短信轰炸”与手机病毒短信治理技术研究[J]. 广东通信技术, 2022, 42(8): 77-79.
[2] 王九九, 狄秋燕, 马永亮. 基于流式计算的垃圾短信治理关键技术研究[J]. 邮电设计技术, 2024(5): 56-61.
[3] 陈兴望, 辛阔, 孙雁斌, 等. 基于加权朴素贝叶斯算法的调度指挥态势感知模块设计[J]. 计算技术与自动化, 2022, 41(3): 121-127.
[4] 张鸷, 王浩, 冯建辉, 等. 基于XGBoost算法的垃圾短信分层分级治理体系[J]. 电信工程技术与标准化, 2021, 34(12): 57-62.
[5] Zhou, C., Meng, X. and Shen, Z. (2024) Microblog Negative Comments Data Analysis Model Based on Multi-Scale Convolutional Neural Network and Weighted Naive Bayes Algorithm. Neural Processing Letters, 56, Article No. 229. [Google Scholar] [CrossRef
[6] Maheshwari, S., Aggarwal, S. and Kaushal, R. (2024) A Novel SMS Spam Dataset and Bi-Directional Transformer Based Short-Text Representations for SMS Spam Detection. International Journal of Information and Decision Sciences, 16, 341-359. [Google Scholar] [CrossRef
[7] Paul, P., Sarkar, S. and Manju, G. (2024) Cognitive Information-Based SMS Spam Detection and Filtering of Transliterated Messages. International Journal of Public Sector Performance Management, 14, 245-261. [Google Scholar] [CrossRef
[8] 马文, 陈庚, 李昕洁, 等. 基于朴素贝叶斯算法的中文评论分类[J]. 计算机应用, 2021, 41(S2): 31-35.