基于注意力机制融合的CNN-LSTM-Transformer模型水质分类研究——以甘肃省为例
—A Case Study of Gansu Province
DOI: 10.12677/aep.2026.167127, PDF,    科研立项经费支持
作者: 蒋智超, 杨占山*:青海民族大学数学与统计学院,青海 西宁
关键词: 异常值处理注意力机制CNN-LSTM-Transformer模型水质分类Outlier Processing Attention Mechanism CNN-LSTM-Transformer Model Water Quality Classification
摘要: 为了解决单一机器学习模型对非线性、有周期性的水质数据的分类效果不理想的问题,本文提出了一种用注意力机制融合的CNN-LSTM-Transformer模型。本研究选取了甘肃省2023年的十个水质观测站的时序数据,结合实际进行了数据合并。在处理异常值方面,本文先对异常值进行识别,根据不同的情况采用不同的方法处理异常值;而后进行了特征筛选,选择了跟水质类别关联性最高的4个特征。在模型构建方面,通过串联加注意力机制融合了CNN-LSTM-Transformer这三个模型。实验结果表明,与传统的单一模型相比,该模型具有更好的分类效果和更小的误差,精确率达到了96.2%。消融实验进一步表明,融合后的模型的准确率,精确率,召回率均提升了10%左右,并且在其他数据集上的验证实验也展现了该模型较强的鲁棒性。通过注意力机制融合的该模型,本身具有一定的自我动态调整能力,对不同的数据都有着较好的适应性,对现实中水质分类提供了一定的理论参考意义。
Abstract: To tackle the problem of unsatisfactory classification performance of single machine learning models in processing nonlinear and periodic water quality data, this paper proposes a CNN-LSTM-Transformer model integrated via an attention mechanism. This study selects time-series data from ten water quality monitoring stations in Gansu Province in 2023 and carries out data integration in combination with practical scenarios. In terms of outlier processing, outliers are first identified and addressed with tailored methods according to different situations; feature selection is then implemented to extract four features with the strongest correlation to water quality categories. For model construction, the CNN, LSTM and Transformer models are fused through serial connection combined with the attention mechanism. Experimental results show that the proposed model delivers better classification performance and smaller errors than traditional single models, with a precision rate reaching 96.2%. Further ablation experiments demonstrate that the accuracy, precision and recall rates of the fused model are all improved by approximately 10%. In addition, validation experiments on other datasets verify the strong robustness of the model. Benefiting from the attention mechanism-based fusion, the proposed model possesses a certain self-dynamic adjustment ability and favorable adaptability to diverse datasets, providing a valuable theoretical reference for practical water quality classification.
文章引用:蒋智超, 杨占山. 基于注意力机制融合的CNN-LSTM-Transformer模型水质分类研究——以甘肃省为例[J]. 环境保护前沿, 2026, 16(7): 1257-1271. https://doi.org/10.12677/aep.2026.167127

参考文献

[1] 徐祖信. 我国河流单因子水质标识指数评价方法研究[J]. 同济大学学报(自然科学版), 2005(3): 321-325.
[2] 罗芳, 伍国荣, 王冲, 等. 内梅罗污染指数法和单因子评价法在水质评价中的应用[J]. 环境与可持续发展, 2016, 41(5): 87-89.
[3] 邓峰. 大气环境质量综合评价的一种新方法——模糊综合指数法[J]. 干旱环境监测, 1991(2): 118-122+137.
[4] 周林飞, 高云彪, 许士国. 模糊数学在湿地水质评价中应用的研究[J]. 水利水电技术, 2005(1): 35-38.
[5] 侯玉婷, 周忠发, 王历, 等. 基于改进模糊综合评价法的喀斯特山区水质评价研究[J]. 水利水电技术, 2018, 49(7): 129-135.
[6] 谢艾玉, 吕承, 秦梦怡, 等. 变异系数动态赋权-混合隶属度函数耦合的湖泊水质模糊评价[J]. 环境科学学报, 2026, 46(1): 464-474.
[7] 贺北方, 王效宇, 贺晓菊, 等. 基于灰色聚类决策的水质评价方法[J]. 郑州大学学报(工学版), 2002(1): 10-13.
[8] 敖成欢, 钟九生, 赵梦, 等. 基于模糊综合法和灰色关联法的百花湖水质评价[J]. 水土保持通报, 2020, 40(1): 116-122+129.
[9] 葛新越, 王宜怀, 周欣. GA-BP神经网络在NB-IoT水质监测系统中的应用研究[J]. 现代电子技术, 2020, 43(24): 30-33+37.
[10] 方志豪, 李正权, 张铭玮. 基于加权朴素贝叶斯的水质数据分类研究[J]. 物联网学报, 2022, 6(1): 113-122.
[11] 徐玲, 景向楠, 杨英, 等. 基于SMOTE-GA-CatBoost算法的全国地表水水质分类评价[J]. 中国环境科学, 2023, 43(7): 3848-3856.
[12] 项新建, 颜超龙, 费正顺, 等. 一种基于多分类器和证据理论融合的水质分类方法[J]. 人民黄河, 2024, 46(1): 109-113.
[13] 刘凯, 刘锋, 彭英湘, 等. 基于机器学习模型的流域水质评价与预测[J]. 环境污染与防治, 2025, 47(7): 1-10.