基于改进粒子群优化的LSTM土壤温湿度预测模型研究
Research on LSTM Soil Temperature and Humidity Prediction Model Based on Optimized Particle Swarm Optimization Attention Mechanism
摘要: 随着全球气候变化加剧与粮食安全需求增长,农业生产向精细化、智能化转型成为必然趋势。土壤温湿度作为直接影响作物生长、水资源利用及温室气体排放的关键环境变量,其精准预测是实施智慧农业管理决策的核心依据。但其面临多因素耦合、非线性强、时空异质性显著等挑战。为提高预测准确性以支持灌溉优化、产量预估与灾害预警,文章聚焦深度学习技术在土壤环境预测中的应用,融合智能优化算法对土壤温湿度预测方法展开深入研究,针对传统长短期记忆网络超参数依赖经验设定、模型性能受限的问题,提出一种基于改进粒子群优化算法的LSTM超参数自适应整定方法(OPT-PSO-LSTM)。首先,构建包含气象、时间、土壤属性等多源特征的东北地区专用数据集并进行标准化处理;其次,利用粒子群算法的全局寻优能力,以验证集损失最小化为目标,对LSTM的关键超参数进行自动化搜索与优化。实验结果表明,该方法在寻优效率与效果上均表现优异。具体而言,OPT-PSO-LSTM获得最佳验证损失0.1638,显著优于网格搜索(0.1704)、随机搜索(0.1741)、遗传算法(0.1646)和粒子群算法(0.1693),其收敛过程也快速稳定。优化后的模型在测试集上取得土壤温度预测R2 = 0.8304、土壤湿度预测R2 = 0.7565的可靠性能,有效提升预测精度,为构建适用于区域农业气象的鲁棒预测模型奠定自适应的参数基础。
Abstract: With the intensification of global climate change and the increasing demand for food security, the transformation of agricultural production towards precision and intelligence has become an inevitable trend. Soil temperature and humidity, as key environmental variables that directly affect crop growth, water resource utilization, and greenhouse gas emissions, require precise prediction to support the implementation of smart agricultural management decisions. However, the precise prediction of soil temperature and humidity faces challenges such as multi-factor coupling, strong nonlinearity, and significant spatial heterogeneity. To improve the prediction accuracy and support irrigation optimization, yield estimation, and disaster warning, this paper focuses on the application of deep learning technology in soil environment prediction, integrates intelligent optimization algorithms to conduct in-depth research on the prediction method of soil temperature and humidity, and addresses the problems of traditional long short-term memory networks’ reliance on empirical settings for hyperparameters and limited model performance by proposing an LSTM hyperparameter adaptive tuning method based on improved particle swarm optimization algorithm (OPT-PSO-LSTM). First, a dedicated dataset for Northeast China, containing multiple source features such as meteorology, time, and soil properties, is constructed and standardized. Secondly, using the global optimization ability of the particle swarm algorithm, with the goal of minimizing the loss in the validation set, the key hyperparameters of LSTM are automatically searched and optimized. Experimental results show that this method performs exceptionally well in terms of optimization efficiency and effectiveness. Specifically, OPT-PSO-LSTM achieves the best validation loss of 0.1638, significantly outperforming grid search (0.1704), random search (0.1741), genetic algorithm (0.1646), and particle swarm algorithm (0.1693). Its convergence process is also fast and stable. The optimized model achieves reliable performance on the test set, with a soil temperature prediction R2 of 0.8304 and a soil humidity prediction R2 of 0.7565, effectively improving the prediction accuracy and laying an adaptive parameter foundation for building a robust predictive model applicable to regional agricultural meteorology.
文章引用:付锦山, 王丹. 基于改进粒子群优化的LSTM土壤温湿度预测模型研究[J]. 计算机科学与应用, 2026, 16(5): 139-152. https://doi.org/10.12677/csa.2026.165171

参考文献

[1] Li, M.X., Yao, Y. and Yu, M. (2022) Improved Daily SMAP Satellite Soil Moisture Prediction over China Using a Deep Learning Model with Transfer Learning. Journal of Hydrology, 607, Article 127124.
[2] Celik, M.F., Isik, M.S., Yuzugullu, O., Fajraoui, N. and Erten, E. (2022) Soil Moisture Prediction from Remote Sensing Images Coupled with Climate, Soil Texture and Topography via Deep Learning. Remote Sensing, 14, Article 5584. [Google Scholar] [CrossRef
[3] Zhao, L., Luo, T., Jiang, X. and Zhang, B. (2023) https://peerj.com/articles/15851/
[4] Wang, Y., Shi, L., Hu, Y., Hu, X., Song, W. and Wang, L. (2024) A Comprehensive Study of Deep Learning for Soil Moisture Prediction. Hydrology and Earth System Sciences, 28, 917-943. [Google Scholar] [CrossRef
[5] Huang, F., Zhang, Y., Zhang, Y., Shangguan, W., Li, Q., Li, L., et al. (2023) Interpreting Conv-LSTM for Spatio-Temporal Soil Moisture Prediction in China. Agriculture, 13, Article 971. [Google Scholar] [CrossRef
[6] Li, Q., Zhu, Y., Shangguan, W., Wang, X., Li, L. and Yu, F. (2022) An Attention-Aware LSTM Model for Soil Moisture and Soil Temperature Prediction. Geoderma, 409, Article 115651. [Google Scholar] [CrossRef
[7] Quy, V.K., Hau, N.V., Anh, D.V., Quy, N.M., Ban, N.T., Lanza, S., et al. (2022) IoT-Enabled Smart Agriculture: Architecture, Applications, and Challenges. Applied Sciences, 12, Article 3396. [Google Scholar] [CrossRef
[8] Jawad, M., Wahid, F., Ali, S., Ma, Y., Alkhyyat, A., Khan, J., et al. (2025) Energy Optimization and Plant Comfort Management in Smart Greenhouses Using the Artificial Bee Colony Algorithm. Scientific Reports, 15, Article No. 1752. [Google Scholar] [CrossRef] [PubMed]
[9] Sungmin, O. and Orth, R. (2021) Global Soil Moisture Data Derived through Machine Learning Trained with In-Situ Measurements. Scientific Data, 8, Article No. 170. [Google Scholar] [CrossRef] [PubMed]
[10] Badgujar, C., Das, S., Figueroa, D.M. and Flippo, D. (2023) Application of Computational Intelligence Methods in Agricultural Soil-Machine Interaction: A Review. Agriculture, 13, Article 357. [Google Scholar] [CrossRef
[11] Geng, Q., Yan, S., Li, Q. and Zhang, C. (2024) Enhancing Data-Driven Soil Moisture Modeling with Physically-Guided LSTM Networks. Frontiers in Forests and Global Change, 7, Article 1353011. [Google Scholar] [CrossRef
[12] Jiang, P., Niu, G.Z. and Li, G.M. (2024) Soil Moisture Prediction Based on Long Short-Term Memory Networks and Meteorological Data. [Google Scholar] [CrossRef
[13] Li, L., Wu, S.G., Dai, Y.J., et al. (2022) Attention-Based Convolutional LSTM Model for Multistep Soil Moisture Forecasting. Journal of Hydrometeorology, 23, 337-350.
[14] 高鹏, 谢家兴, 孙道, 等. 基于物联网和LSTM的柑橘园土壤含水量和电导率预测模型[J]. 华南农业大学学报(自然科学版), 2020, 41(6): 134-144.
[15] 王钥, 郑方元, 雍婷, 查元源, 等. 基于Transformer和LSTM算法的河套灌区土壤水分预测研究[J]. 农业水土资源与生态环境, 2025, 10(2): 1-8.
[16] Shen, C. (2018) A Transdisciplinary Review of Deep Learning Research and Its Relevance for Water Resources Scientists. Water Resources Research, 54, 8558-8593. [Google Scholar] [CrossRef
[17] Reichstein, M., Camps-Valls, G., Stevens, B., Jung, M., Denzler, J., Carvalhais, N., et al. (2019) Deep Learning and Process Understanding for Data-Driven Earth System Science. Nature, 566, 195-204. [Google Scholar] [CrossRef] [PubMed]
[18] Yu, J., Zhang, X., Xu, L., Dong, J. and Zhangzhong, L. (2021) A Hybrid CNN-GRU Model for Predicting Soil Moisture in Maize Root Zone. Agricultural Water Management, 245, Article 106649. [Google Scholar] [CrossRef
[19] Shi, X., Chen, Z., Wang, H., et al. (2015) Convolutional LSTM Network: A Machine Learning Approach for Precipitation Nowcasting. Advances in Neural Information Processing Systems, 28, 802-810.
[20] Dorigo, W., Wagner, W., Albergel, C., Albrecht, F., Balsamo, G., Brocca, L., et al. (2017) ESA CCI Soil Moisture for Improved Earth System Understanding: State-of-the Art and Future Directions. Remote Sensing of Environment, 203, 185-215. [Google Scholar] [CrossRef
[21] Van den Bergh, J., De Ceuster, G. and Van Hulle, S. (2022) A Temporal-Decomposition LSTM Model for Hyperlocal Forecasting. IEEE Transactions on Intelligent Transportation Systems, 23, 21005-21014.
[22] Dorigo, W.A., Brocca, L., Beck, H.E., et al. (2020) Soil Moisture Spatio-Temporal Variability in SMAP and CCI Products: Insights from Machine Learning. Remote Sensing of Environment, 242, Article 111752.
[23] Zeng, L., Gao, X., Shi, B., et al. (2021) Deep Learning for Predicting Soil Moisture: A Case Study in Agricultural Fields. Agricultural and Forest Meteorology, 306, Article 108475.
[24] Wang, L., Liu, Q. and Qiao, L. (2023) Short-Term Soil Moisture Forecast Using LSTM and Gradient Boosting. Soil and Tillage Research, 230, Article 105467.