|
|
|
|
|
|
Prediction of Soil Total Nitrogen Based on NIR Spectroscopy and BiGRU Model With Attention Mechanism |
JU Wei-liang1, YANG Wei1, 2, SONG Ya-mei1, LIU Nan1, LI Hao1, LI Min-zan1, 2* |
1. Key Lab of Smart Agriculture System Integration, Ministry of Education, China Agricultural University, Beijing 100083, China
2. Key Lab of Agricultural Information Acquisition Technology, Ministry of Agriculture and Rural Affairs, China Agricultural University, Beijing 100083, China
|
|
|
Abstract Soil total nitrogen (STN) content is a key indicator for evaluating soil fertility, and its accurate measurement is of great significance for improving crop yield and quality. Predicting soil total nitrogen content using near-infrared spectroscopy has been proven to be an effective solution. However, due to the high dimensionality and complex time series characteristics of soil spectral data, traditional models often struggle to capture critical information, affecting prediction accuracy. Hence, based on near-infrared spectra (900~1 700 nm) of 600 soil samples, the method for predicting soil total nitrogen (STN) content was investigated,and a Bidirectional Gated Recurrent Unit based on an Attention Mechanism (BiGRU-Attention) model was proposed. First, the spectral data quality was optimized using SG filtering and SNV preprocessing methods. Then, using the CARS feature selection algorithm, the wavelengths for modeling were reduced from 198 to 30, thereby removing redundant information and decreasing the complexity of the modeling process. The BiGRU-Attention model effectively manages the flow of information using update and reset gates and enables the model to disregard the unimportant spectral data and retain the key information, which impacts the prediction accuracy. By leveraging the dual temporal sequence processing advantages of bidirectional GRU, the model can simultaneously handle forward and backward inputs of spectral sequences, thereby enhancing its ability to focus on edge data and comprehensively capture the dependencies present in soil spectral data. Additionally, the model employs an attention layer to compute the importance of each segment using the QKV matrix and dynamically determines which features should be emphasized based on the sequential interdependencies. This process calculates attention weight matrices to assign weights to each input data point, generating a more relevant context matrix that improves the model's predictive accuracy. Experimental results show that the BiGRU-Attention model can better understand the correlation between bands and perform better in prediction than other models, with the spectral data achieving an R2 of 0.87 and an RMSE of 0.20 g·kg-1 on the test dataset after feature selection. This study provides technical support for rapid soil nutrient detection and offers a method and reference for establishing high-accuracy STN prediction models.
|
Received: 2024-09-23
Accepted: 2025-02-25
|
|
Corresponding Authors:
LI Min-zan
E-mail: limz@cau.edu.cn
|
|
[1] BAI Zi-jin, PENG Jie, LUO De-fang, et al(白子金,彭 杰,罗德芳,等). Spectroscopy and Spectral Analysis(光谱学与光谱分析), 2022, 42(9): 2768.
[2] GAO Fei, CHEN Su-xian, DU Xiao-yu, et al(高 飞,陈素贤,杜晓玉,等). Tianjin Agricultural Sciences(天津农业科学), 2022, 28(9): 76.
[3] CHEN Hao-yu, XIANG Lei, GAO He, et al(陈昊宇,项 磊,高 贺,等). Remote Sensing for Natural Resources (自然资源遥感), 2023, 35(3): 170.
[4] ZHANG Xi-yu, LI Si-jia, WANG Xiang, et al(张锡煜,李思佳,王 翔,等). Transactions of the Chinese Society of Agricultural Engineering(农业工程学报), 2023, 39(15): 144.
[5] ZHANG Ke-di, GUO Hong-yun, SHAO Na, et al(张珂迪,郭洪云,邵 娜,等). Journal of Anhui Agricultural University(安徽农业大学学报), 2023, 50(6): 917.
[6] HUANG Ye-chang, ZENG Wei, DENG Li-zhang, et al. (黄业昌,曾 玮,邓力章,等). Journal of Zhejiang Agricultural Sciences (浙江农业科学), 2024, 65(3): 536.
[7] ZHOU Xu-dong, SHEN Yun-xin, PU Yong-yu, et al(周旭东,申云鑫,濮永瑜,等). Jiangsu Agricultural Sciences (江苏农业科学), 2024, 52(4): 231.
[8] TANG Ao-hua, YANG Gui-jun, YANG Yue, et al(唐澳华,杨贵军,杨 悦,等). Transactions of the Chinese Society for Agricultural Machinery(农业机械学报), 2024, 55(8): 382.
[9] Metzger K, Bragazza L. European Journal of Soil Science, 2024, 75(3): e13508.
[10] Sitorus A, Lapcharoensuk R. Sensors, 2024, 24(7): 2362.
[11] ZHOU Peng, KONG Yi-nuo, HAO Shan-shan, et al(周 鹏,孔一诺,郝珊珊,等). Transactions of the Chinese Society of Agricultural Engineering(农业工程学报), 2024, 40(16): 113.
[12] WEI Qing, LI Chang-yu, XU Meng-cao, et al(卫 青,李长昱,许孟操,等). Journal of Anhui Agricultural Sciences (安徽农业科学), 2023, 51(8): 6.
[13] Khammao P, Rattanapichai W, Pitakdantham R, et al. Soil Science and Plant Nutrition, 2024, 70(3): 197.
[14] QIN Wen-hu, DONG Kai-yue, DENG Zhi-chao(秦文虎,董凯月,邓志超). Soils(土壤), 2023, 55(6): 1347.
[15] HUANG Hai-xia, LI Yao-xiang, ZHANG Zhe-yu(黄海霞,李耀翔,张哲宇). Forest Engineering(森林工程), 2023, 39(6): 164.
[16] Tan A, Wang Y, Zhao Y, et al. Spectrochimica Acta Part A: Molecular and Biomolecular Spectroscopy, 2022, 283: 121759.
[17] Bai L, Zhang Z T, Guan H, et al. Talanta, 2024, 275: 126098.
[18] Zeng W, Qiu Y, Huang Y, et al. Journal of Innovative Optical Health Sciences, 2022, 15(4): 2250022.
[19] Bai Z, Chen S, Hong Y, et al. Geoderma, 2023, 437: 116589.
[20] Wang Y, Chen S, Hong Y, et al. Computers and Electronics in Agriculture, 2023, 212: 108067.
[21] Yuan Q, Wang J, Zheng M, et al. Construction and Building Materials, 2022, 350: 128799.
[22] Ji X, Huang H, Chen D, et al. Buildings, 2023, 13(1): 72.
[23] MAO Bai-hai, QIN Wu, XIAO Xian-bin, et al(毛百海,覃 吴,肖显斌,等). Energy Storage Science and Technology(储能科学与技术), 2023, 12(11): 3519.
[24] Pan S, Yang B, Wang S, et al. Energy, 2023, 284: 128701.
[25] Guo X, He J, Wang B, et al. Remote Sensing, 2022, 14(19): 4737.
[26] Kong F, Li J, Jiang B, et al. IEEE Transactions on Industrial Informatics, 2023, 19(1): 541.
[27] WANG Wei-chao, YANG Wei, CUI Yu-lu, et al(王炜超,杨 玮,崔玉露,等). Transactions of the Chinese Society for Agricultural Machinery(农业机械学报), 2021, 52(S1): 316.
[28] CAO Yong-yan, YANG Wei, WANG Dong, et al(曹永研,杨 玮,王 懂,等). Transactions of the Chinese Society for Agricultural Machinery (农业机械学报), 2022, 53(S1): 241.
|
[1] |
HU Shao-wen, HUANG Lang-xin*, YU Li-hui, WU Zhi-ping, LI Huai-yu, SHI Wei-li, LUO Hong-yu. Intelligent Recognition of Pure Milk Based on Near Infrared Spectroscopy[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2025, 45(07): 1827-1833. |
[2] |
YANG Guang-hui1, 3, ZHANG Yong-li1, 2, 3*, WANG Mei-pan1, 3, LIU Yan-de4, JIANG Xiao-gang4, SUN Jing2, 3, ZHOU Xin-qun2, 3, HAN Tai-lin1*. Determination of Soluble Solids Content in Fresh Corn by Near Infrared
Spectroscopy[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2025, 45(07): 1932-1939. |
[3] |
MAO Ya-chun, XIA An-ni*, CAO Wang, LIU Jing, WEN Jie, HE Li-ming, CHEN Xuan-he. Rapid Inversion of Gold Ore Grades Based on Hyperspectral Data and Stacking Ensemble Learning Algorithm[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2025, 45(07): 2061-2067. |
[4] |
LAN Xi-hua, WANG Zhi-guo*, LUAN Xiao-li, LIU Fei. Rapid Detection for Xylose Content Using Near-Infrared Spectroscopy Technology[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2025, 45(07): 1916-1923. |
[5] |
TAN Fang-ping1, LU Tong-suo1, 2*. Study of Near-Infrared Fingerprints of Ganoderma Lucidum in Different Growth Environments[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2025, 45(07): 1968-1978. |
[6] |
CHEN Bei, JIANG Si-yuan, ZHENG En-rang. Research on the Wavelength Attention 1DCNN Algorithm for Quantitative Analysis of Near-Infrared Spectroscopy[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2025, 45(06): 1598-1604. |
[7] |
LI Xiao-xing1, 2, XIAO Jin-feng1*, ZHANG Hong-ming2*, LÜ Bo2, 3*, YIN Xiang-hui1, ZHAO Ming4, MA Fei5, FU Jia2, HU Yan1, 2, LI Zhi-hao1, 2, WANG Fu-di2, SHEN Yong-cai6, DAI Shu-yu7. Study on Improving Stability of Near-Infrared Spectra by Normal
Distribution Screening Method[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2025, 45(06): 1566-1577. |
[8] |
LIU Wei1, TAN Hui-zhen1, JIANG Li-wen1, DU Guo-rong2*, LI Pao1, 3*, TANG Hui3. Nondestructive Identification of Lonicerae Japonicae Flos and Flos Lonicerae With Near Infrared Spectroscopy and New Variable
Selection-Partial Least Squares Discriminant Analysis[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2025, 45(06): 1605-1611. |
[9] |
WANG Jian-xu1, TAN Yin-yu1, QIN Dan2*, TANG Bin1, TANG Huan2, FAN Wen-qi2, YANG Wen1, ZHONG Nian-bing1, ZHAO Ming-fu1*. Research on Non-Destructive Detection of Moisture Content in Xuan Paper Based on Near-Infrared Reflectance Spectroscopy[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2025, 45(06): 1629-1638. |
[10] |
ZHANG Jia-lun1, 2, ZHANG Wei-gang2*, ZHUANG Yue-ting1, 2, ZHANG Qian-feng1. Construction and Performance Control of Low Infrared Emissivity
Coating Based on Visible and Near-Infrared Reflectance Spectra
of Green Vegetation[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2025, 45(06): 1663-1669. |
[11] |
PENG Jian-heng1, HU Xin-jun1, 2*, ZHANG Jia-hong1, TIAN Jian-ping1, CHEN Man-jiao1, HUANG Dan2, LUO Hui-bo2. Identification and Adulteration Detection of Lotus Root Starch Using
Hyperspectral Imaging Technology Combined With Deep Learning[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2025, 45(06): 1759-1767. |
[12] |
ZHU Zhi-hui1, 2, LI Wo-lin1, HAN Yu-tong1, YE Wen-jie1, JIN Yong-tao1, WANG Qiao-hua1, 2, MA Mei-hu3. Research on Identification of Non-Directional Doping of Egg White
Powder Based on Near Infrared Spectroscopy and LOF[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2025, 45(06): 1768-1775. |
[13] |
YAO Cheng-shuo1, 2, WANG Chang-kun1, 2*, LIU Jie1, 2, GUO Zhi-ying1, 2, MA Hai-yi1, 2, YUAN Zi-ran1, 2, WANG Xiao-pan1, 3, PAN Xian-zhang1, 2. Spectral Prediction of Soil Fertility Attributes in Typical Croplands of Sanjiang Plain Based on Band Selection[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2025, 45(05): 1422-1431. |
[14] |
LI Jia-qi1, 2, 3, TIAN Xi2, 3, WANG Qing-yan2, 3, HE Xin2, 3, HUANG Wen-qian2, 3*. Research on the Method of Online Detection of Hollow Watermelons Based on Full-Transmission Near-Infrared Spectroscopy[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2025, 45(05): 1440-1447. |
[15] |
CHEN Zhuo-ting1, WANG Qiao-hua1, 2*, WANG Dong-qiao1, CHEN Yan-bin1, LI Shi-jun1, 2. Non-Destructive Detection of Pre-Incubation Breeding Duck Egg Fertilization Information Based on Visible/Near Infrared Spectroscopy and Joint Optimization Strategy[J]. SPECTROSCOPY AND SPECTRAL ANALYSIS, 2025, 45(05): 1469-1475. |
|
|
|
|