广西师范大学学报(自然科学版) ›› 2026, Vol. 44 ›› Issue (2): 115-131.doi: 10.16088/j.issn.1001-6600.2025041802

• 智能信息处理 • 上一篇    下一篇

基于改进PatchTST的多步水质预测模型

罗缘, 朱文忠*, 王文, 吴宇浩   

  1. 四川轻化工大学 计算机科学与工程学院,四川 宜宾 644000
  • 收稿日期:2025-04-18 修回日期:2025-06-12 发布日期:2026-02-03
  • 通讯作者: 朱文忠(1971—),男,四川自贡人,四川轻化工大学教授。E-mail: zwz@suse.edu.cn
  • 基金资助:
    四川省科技计划重点研发项目(2023YFS0371);企业信息化与物联网测控技术四川省高校重点实验室开放基金(2024WYJ03);四川省智慧旅游研究基地(ZHYJ24-01)

A Multi-step Water Quality Prediction Model Based on Improved PatchTST

LUO Yuan, ZHU Wenzhong*, WANG Wen, WU Yuhao   

  1. School of Computer Science and Engineering, Sichuan University of Science & Engineering, Yibin Sichuan 644000, China
  • Received:2025-04-18 Revised:2025-06-12 Published:2026-02-03

摘要: 随着城镇化和工业化进程的持续推进,水资源污染问题愈发凸显,提高水质预测模型的精度对有效管理水资源和保护生态环境至关重要。针对水质时间序列多步预测面临的复杂非线性关系建模与计算效率问题,本文提出一种改进PatchTST模型。该模型通过3个关键模块优化:1)设计轻量级CMixer编码器替代传统Transformer编码器,通过一维卷积和残差连接高效提取时序特征,降低计算负担;2)引入自适应中频能量优化器(AMEO),增强时序中频谱信息,提高对水质参数周期性变化的感知能力;3)设计基于切比雪夫多项式与Kolmogorov-Arnold表示定理的CKAHead预测头,增强对复杂非线性关系的建模能力。在长江流域宜宾市石门子断面溶解氧预测中,改进模型的MSE较PatchTST降低12.9%,较iTransformer降低14.0%,同时计算效率与资源消耗也得到平衡。此外,在5个不同监测断面的泛化验证中,48 h预见期任务上MSE较次优模型平均降低约10%。实验结果表明,改进模型有效提高了水质多步预测的精度与计算效率,对环境时间序列分析与水质预测研究有一定的参考价值。

关键词: 水质预测, 时序预测, PatchTST, 深度学习, 水质监测

Abstract: Water pollution issues in China are becoming increasingly prominent, making improvements in the accuracy of water quality prediction models crucial for effective water resource management and ecological protection. This study addresses the challenges of complex nonlinear relationship modeling and computational efficiency in multi-step water quality time series prediction by proposing an improved PatchTST model. The model incorporates three key module optimizations: 1) a lightweight CMixer encoder replacing the traditional Transformer encoder, which efficiently extracts temporal features through one-dimensional convolution and residual connections while reducing computational burden; 2) an Adaptive Mid-Frequency Energy Optimizer (AMEO) that enhances mid-frequency spectral information, improving the model’s ability to detect periodic changes in water quality parameters; and 3) a CKAHead prediction module based on Chebyshev polynomials and the Kolmogorov-Arnold representation theorem, strengthening the modeling of complex nonlinear relationships. In dissolved oxygen prediction at the Shimenzi section, the improved model achieves an MSE reduction of 12.9% compared with PatchTST and 14.0% compared with iTransformer, while maintaining a balance between computational efficiency and resource consumption. Furthermore, in generalization tests across five different monitoring sections, the model reduces MSE by approximately 10% compared with the next-best model for 48-hour forecasting tasks. Experimental results demonstrate that the improved model effectively enhances the accuracy and computational efficiency of multi-step water quality prediction, offering reference value for environmental time series analysis and water quality prediction research.

Key words: water quality prediction, time series forecasting, PatchTST, deep learning, water quality monitoring

中图分类号:  X832; X52; TP391

[1] YAN X, XIA Y Q, TI C P, et al.Thirty years of experience in water pollution control in Taihu Lake:a review[J].Science of the Total Environment, 2024, 914:169821.DOI:10.1016/j.scitotenv.2023.169821.
[2] 程浩淼, 杨富康, 张健, 等.基于机器学习的河湖水质评估的研究进展[J].环境科学, 2025, 46(6):3349-3360.DOI:10.13227/j.hjkx.202406089.
[3] 国家环境保护总局,国家质量监督检验检疫总局.地表水环境质量标准:GB 3838—2002[S].北京:中国环境科学出版社, 2002.
[4] XU C, LUO P C, WU P, et al.Detection of periodicity, aperiodicity, and corresponding driving factors of river dissolved oxygen based on high-frequency measurements[J].Journal of Hydrology, 2022, 609:127711.DOI:10.1016/j.jhydrol.2022.127711.
[5] 许泽婷, 余香英, 徐闯, 等.广东省7大流域地表水溶解氧分布特征及影响因素[J].水生态学杂志, 2025, 46(2):52-61.DOI:10.15928/j.1674-3075.202404030110.
[6] ANMALA J, TURUGANTI V.Comparison of the performance of decision tree (DT) algorithms and extreme learning machine (ELM) model in the prediction of water quality of the Upper Green River watershed[J].Water Environment Research, 2021, 93(11):2360-2373.DOI:10.1002/wer.1642.
[7] LU H F, MA X.Hybrid decision tree-based machine learning models for short-term water quality prediction[J].Chemosphere, 2020, 249:126169.DOI:10.1016/j.chemosphere.2020.126169.
[8] LI L, RONG S M, WANG R, et al.Recent advances in artificial intelligence and machine learning for nonlinear relationship analysis and process control in drinking water treatment:a review[J].Chemical Engineering Journal, 2021, 405:126673.DOI:10.1016/j.cej.2020.126673.
[9] LIANG W Z, LIU T C, WANG Y T, et al.Spatiotemporal-aware machine learning approaches for dissolved oxygen prediction in coastal waters[J].Science of the Total Environment, 2023, 905:167138.DOI:10.1016/j.scitotenv.2023.167138.
[10] 张建奇, 冯乐源, 李东鹤, 等.采用堆叠长短期记忆神经网络的水质连续预测方法[J].西安交通大学学报, 2025, 59(6):93-102.DOI:10.7652/xjtuxb202506010.
[11] 张海霞, 李瑞, 王霞, 等.基于VMD和GA-BiLSTM组合模型的河流水质预测[J].环境工程技术学报, 2025, 15(4):1181-1188.
[12] LIN Y Z, QIAO J F, BI J, et al.Transformer-based water quality forecasting with dual patch and trend decomposition[J].IEEE Internet of Things Journal, 2025, 12(8):10987-10997.DOI:10.1109/JIOT.2024.3514133.
[13] HUANG X Y, TANG J, SHEN Y M.Long time series of ocean wave prediction based on PatchTST model[J].Ocean Engineering, 2024, 301:117572.DOI:10.1016/j.oceaneng.2024.117572.
[14] YU G, LI Y, WANG J, et al.ReFocus:reinforcing mid-frequency and key-frequency modeling for multivariate time series forecasting[EB/OL].(2025-03-03)[2025-06-10].https://arxiv.org/abs/2502.16890.
[15] DONG C, ZHENG L W, CHEN W T.Kolmogorov-arnold networks (KAN) for time series classification and robust analysis[C]//Advanced Data Mining and Applications.Cham:Springer, 2025:342-355.DOI:10.1007/978-981-96-0840-9_24.
[16] CORDES D, LATIFI S, MORRISON G M.Systematic literature review of the performance characteristics of Chebyshev polynomials in machine learning applications for economic forecasting in low-income communities in sub-Saharan Africa[J].SN Business & Economics, 2022, 2(12):184.DOI:10.1007/s43546-022-00328-w.
[17] BHATT S, MISHRA A P, CHANDRA N, et al.Characterizing seasonal, environmental and human-induced factors influencing the dynamics of Rispana River’s water quality:Implications for sustainable river management[J].Results in Engineering, 2024, 22:102007.DOI:10.1016/j.rineng.2024.102007.
[18] LIU Y, WU H, WANG J, et al.Non-stationary transformers:exploring the stationarity in time series forecasting[J].Advances in neural information processing systems, 2022, 35:9881-9893.
[19] 杨信廷, 郭向阳, 韩佳伟, 等.基于TiDE-PatchTST模型的柑橘冷藏效率时序预测模型优化[J].农业机械学报, 2024, 55(7):396-404.DOI:10.6041/j.issn.1000-1298.2024.07.039.
[20] 王舒雨, 李豪, 马刚, 等.基于TCN和DLinear的光伏发电功率多步预测模型[J].电力建设, 2025, 46(4):173-184.DOI:10.12204/j.issn.1000-7229.2025.04.015.
[21] ZOU Y J, CHEN Y B, XU Y J, et al.Short-term freeway traffic speed multistep prediction using an iTransformer model[J].Physica A:Statistical Mechanics and Its Applications, 2024, 655:130185.DOI:10.1016/j.physa.2024.130185.
[22] 刘智锋, 王继民.可解释机器学习在信息资源管理领域的应用研究综述[J].数据分析与知识发现, 2024, 8(1):16-29.
[1] 田晟, 冯帅涛, 李嘉. 一种基于复合框架的城市道路场景车辆轨迹提取方法[J]. 广西师范大学学报(自然科学版), 2026, 44(2): 31-51.
[2] 吕辉, 司可. 基于改进RT-DETR的光伏板缺陷检测[J]. 广西师范大学学报(自然科学版), 2026, 44(2): 52-64.
[3] 王旭阳, 梁宇航. 多尺度非对称注意力遥感去雾Transformer[J]. 广西师范大学学报(自然科学版), 2026, 44(2): 77-89.
[4] 韩华彬, 高丙朋, 蔡鑫, 孙凯. 基于HO-CNN-BiLSTM-Transformer模型的风机叶片结冰故障诊断[J]. 广西师范大学学报(自然科学版), 2025, 43(6): 13-28.
[5] 魏梓书, 陈志刚, 王衍学, 哈斯铁尔·马德提汗. 基于SBSI-YOLO11的轻量化轴承外观缺陷检测算法[J]. 广西师范大学学报(自然科学版), 2025, 43(6): 80-91.
[6] 黎宗孝, 张健, 罗鑫悦, 赵嶷飞, 卢飞. 基于K-means和Adam-LSTM的机场进场航迹预测研究[J]. 广西师范大学学报(自然科学版), 2025, 43(4): 15-23.
[7] 石天怡, 南新元, 郭翔羽, 赵濮, 蔡鑫. 基于改进ConvNeXt的苹果叶片病害分类算法[J]. 广西师范大学学报(自然科学版), 2025, 43(4): 83-96.
[8] 苏春海, 夏海英. 抗噪声双约束网络的面部表情识别[J]. 广西师范大学学报(自然科学版), 2025, 43(2): 70-82.
[9] 李欣, 宁静. 基于时空特征融合的电力系统暂态稳定评估[J]. 广西师范大学学报(自然科学版), 2024, 42(6): 89-100.
[10] 侯海燕, 谭玉枚, 宋树祥, 夏海英. 头部姿态鲁棒的面部表情识别[J]. 广西师范大学学报(自然科学版), 2024, 42(6): 126-137.
[11] 卢家辉, 陈庆锋, 王文广, 余谦, 何乃旭, 韩宗钊. 基于多尺度注意力的器官图像分割方法[J]. 广西师范大学学报(自然科学版), 2024, 42(6): 138-148.
[12] 杜帅文, 靳婷. 基于用户行为特征的深度混合推荐算法[J]. 广西师范大学学报(自然科学版), 2024, 42(5): 91-100.
[13] 易见兵, 彭鑫, 曹锋, 李俊, 谢唯嘉. 多尺度特征融合的点云配准算法研究[J]. 广西师范大学学报(自然科学版), 2024, 42(3): 108-120.
[14] 肖宇庭, 吕晓琪, 谷宇, 刘传强. 基于拆分残差网络的糖尿病视网膜病变分类[J]. 广西师范大学学报(自然科学版), 2024, 42(1): 91-101.
[15] 高飞, 郭晓斌, 袁冬芳, 曹富军. 改进PINNs方法求解边界层对流占优扩散方程[J]. 广西师范大学学报(自然科学版), 2023, 41(6): 33-50.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
[1] 田晟, 赵凯龙, 苗佳霖. 基于改进YOLO11n模型的自动驾驶道路交通检测算法研究[J]. 广西师范大学学报(自然科学版), 2026, 44(1): 1 -9 .
[2] 徐秀虹, 张进燕, 卢羽玲, 梁小平, 廖广凤, 卢汝梅. 萝藦科药用植物中新C21甾体的研究进展(Ⅱ)[J]. 广西师范大学学报(自然科学版), 2026, 44(2): 1 -16 .
[3] 王星宇, 郑浩楠, 刘肖, 崔世龙, 蔡进军. 壳聚糖基吸附材料的制备及其吸附去除水中污染物的研究进展[J]. 广西师范大学学报(自然科学版), 2026, 44(2): 17 -30 .
[4] 田晟, 冯帅涛, 李嘉. 一种基于复合框架的城市道路场景车辆轨迹提取方法[J]. 广西师范大学学报(自然科学版), 2026, 44(2): 31 -51 .
[5] 吕辉, 司可. 基于改进RT-DETR的光伏板缺陷检测[J]. 广西师范大学学报(自然科学版), 2026, 44(2): 52 -64 .
[6] 宋冠武, 李建军. 基于自蒸馏边缘细化的遥感图像语义分割[J]. 广西师范大学学报(自然科学版), 2026, 44(2): 65 -76 .
[7] 王旭阳, 梁宇航. 多尺度非对称注意力遥感去雾Transformer[J]. 广西师范大学学报(自然科学版), 2026, 44(2): 77 -89 .
[8] 张胜伟, 曹洁. 融合傅里叶卷积与差异感知的钢材表面微小缺陷检测算法[J]. 广西师范大学学报(自然科学版), 2026, 44(2): 90 -102 .
[9] 王巍, 李智威, 张赵阳, 张洪, 周蠡, 王振, 黄放, 王灿. 基于IFA-BP神经网络模型的变电站碳排放预测[J]. 广西师范大学学报(自然科学版), 2026, 44(2): 103 -114 .
[10] 陈斯淋, 刘佳飞, 周何馨, 吴璟莉, 李高仕. 复杂网络中基于多特征引力模型的关键节点识别方法[J]. 广西师范大学学报(自然科学版), 2026, 44(2): 132 -144 .
版权所有 © 广西师范大学学报(自然科学版)编辑部
地址:广西桂林市三里店育才路15号 邮编:541004
电话:0773-5857325 E-mail: gxsdzkb@mailbox.gxnu.edu.cn
本系统由北京玛格泰克科技发展有限公司设计开发