Soil water content prediction method based on spectral analysis technology and related device

Through the coupled calculation and model fusion of spectral analysis technology, the real-time and accuracy issues of soil moisture detection are solved, and efficient and accurate prediction between different soil types is achieved.

CN120721660APending Publication Date: 2025-09-30TIANJIN ENVIRONMENT MONITORING CENT +2
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510897066.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

Existing soil moisture detection methods have problems such as cumbersome operation, high cost, inability to monitor in real time, and insufficient model generalization ability, especially when applied between different soil types, the accuracy decreases.

Method used

A method based on spectral analysis technology is adopted. By collecting the spectral data of the target soil area and coupling the spectral data of the standard after drying, the competitive adaptive reweighted sampling and continuous projection algorithm are combined to screen the wavelength, and the partial least squares regression and convolutional neural network models are integrated for prediction.

Benefits of technology

It effectively eliminates soil type differences and environmental noise interference, improves the accuracy and applicability of soil moisture prediction, and realizes real-time monitoring and high-precision soil moisture prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120721660A_ABST
    Figure CN120721660A_ABST
Patent Text Reader

Abstract

The invention discloses a soil water content prediction method, a soil water content prediction device, soil water content prediction equipment and a computer readable storage medium based on a spectral analysis technology. The method comprises the following steps: acquiring target spectral data of a target soil area and standard spectral data of the target soil area after drying; performing optimal coupling spectrum calculation based on the target spectrum data and the standard spectrum data to obtain optimal coupling spectrum data; carrying out wavelength screening processing on the optimal coupling spectrum data by adopting a wavelength optimization algorithm to obtain model input data; wherein the wavelength optimization algorithm is a hybrid algorithm of a competitive adaptive reweighted sampling algorithm and a continuous projection algorithm; reasoning model input data based on the fusion prediction model to obtain a soil water content estimation value; wherein the fusion prediction model is a prediction model obtained by training and fusing an initial partial least square regression model and an initial convolutional neural network model based on spectrum training data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of environmental information technology, and more specifically, relates to a soil moisture content prediction method based on spectral analysis technology, a soil moisture content prediction device, a soil moisture content prediction equipment, and a computer-readable storage medium. Background Art

[0002] Soil moisture content is a core parameter for agricultural resource management, ecosystem monitoring, and disaster warning. Traditional detection methods, such as drying (gravimetric), neutron scattering (which requires a radioactive source), or electrical resistance (which is susceptible to salt interference), while highly accurate in laboratory settings, often suffer from cumbersome operation, high costs, and the inability to monitor in real time. For example, the drying method requires soil sampling and takes hours to days to complete, making it difficult to meet the needs of dynamic monitoring of large-scale farmland. Neutron methods have been gradually phased out due to radiation risks. In recent years, technologies based on soil dielectric constant measurement (such as TDR and FDR) have improved real-time performance but are still limited by equipment installation depth, soil texture variations, and long-term stability.

[0003] Among related technologies, spectral analysis technology has become a research hotspot due to its advantages such as non-contact, fast response and high resolution, but existing methods still face significant bottlenecks: environmental noise interference: factors such as atmospheric water vapor absorption and soil surface roughness will cause fluctuations in reflectance spectral data, reducing modeling reliability; characteristic wavelength selection relies on experience: most studies use fixed sensitive bands (such as 1400–1450 nm, 1900–1950 nm), and do not combine multi-scale spectral features with machine learning algorithms to optimize the feature space; insufficient model generalization ability: the lack of adaptive modeling mechanisms for different soil types leads to decreased accuracy when applied across regions.

[0004] Therefore, how to improve the accuracy of soil moisture prediction is a key issue that technicians in this field are concerned about. Summary of the Invention

[0005] The purpose of this application is to provide a soil moisture prediction method, a soil moisture prediction device, a soil moisture prediction equipment, and a computer-readable storage medium based on spectral analysis technology to improve the accuracy of soil moisture prediction.

[0006] In response to the above defects or improvement needs of the existing technology, the present invention provides a soil moisture prediction method based on spectral analysis technology, comprising: Collecting target spectral data of a target soil area and standard spectral data of the target soil area after drying; performing an optimal coupling spectrum calculation based on the target spectrum data and the standard spectrum data to obtain optimal coupling spectrum data; A wavelength optimization algorithm is used to perform wavelength screening processing on the optimal coupling spectrum data to obtain model input data; wherein the wavelength optimization algorithm is a hybrid algorithm of a competitive adaptive reweighted sampling algorithm and a continuous projection algorithm; The model input data is inferred based on the fusion prediction model to obtain an estimated value of soil moisture content; wherein, the fusion prediction model is a prediction model obtained by fusing an initial partial least squares regression model and an initial convolutional neural network model after training based on spectral training data.

[0007] Optionally, collecting target spectral data of a target soil area and standard spectral data of the target soil area after drying includes: collecting initial target spectral data of the target soil area; Collecting initial standard spectral data of the target soil area after drying; Data preprocessing is performed on the initial target spectrum data and the initial standard spectrum data respectively to obtain the target spectrum data and the standard spectrum data.

[0008] Optionally, performing optimal coupling spectrum calculation based on the target spectrum data and the standard spectrum data to obtain optimal coupling spectrum data includes: performing coupling spectrum calculation based on the target spectrum data and the standard spectrum data to obtain a difference coupling spectrum, a ratio coupling spectrum, and a normalized coupling spectrum; Determine the optimal coupling spectrum data from the difference coupling spectrum, the ratio coupling spectrum, and the normalized coupling spectrum based on the soil type of the target soil area. Optionally, a wavelength selection algorithm is used to perform wavelength screening processing on the optimal coupling spectrum data to obtain model input data, including: Screening out candidate bands from the optimal coupled spectrum data based on the competitive adaptive reweighted sampling algorithm; Redundant bands are eliminated from the candidate bands by using the continuous projection algorithm to obtain the model input data.

[0009] Optionally, the training process of the fusion prediction model includes: The partial least squares regression model is fused with the convolutional neural network model to obtain the initial fusion model; The initial fusion model is trained based on the spectral training data to obtain the fusion prediction model.

[0010] Optionally, reasoning the model input data based on the fusion prediction model to obtain an estimated soil moisture content includes: Inputting the model input data into the partial least squares regression model and the convolutional neural network model respectively to obtain corresponding prediction results; The prediction results of the partial least squares regression model and the prediction results of the convolutional neural network model are fused and calculated to obtain the estimated value of the soil moisture content.

[0011] The present application also provides a soil moisture content prediction device based on spectral analysis technology, comprising: A data acquisition module, configured to acquire target spectral data of a target soil region and standard spectral data of the target soil region after drying; A coupling spectrum calculation module, configured to perform optimal coupling spectrum calculation based on the target spectrum data and the standard spectrum data to obtain optimal coupling spectrum data; A wavelength screening module, configured to perform wavelength screening processing on the optimal coupling spectrum data using a wavelength optimization algorithm to obtain model input data; wherein the wavelength optimization algorithm is a hybrid algorithm of a competitive adaptive reweighted sampling algorithm and a continuous projection algorithm; A prediction and reasoning module is used to infer the model input data based on a fusion prediction model to obtain an estimated soil moisture content; wherein the fusion prediction model is a prediction model obtained by fusing an initial partial least squares regression model and an initial convolutional neural network model after training based on spectral training data.

[0012] Optionally, the data acquisition module is specifically used to collect initial target spectral data of the target soil area; collect initial standard spectral data of the target soil area after drying; and perform data preprocessing on the initial target spectral data and the initial standard spectral data respectively to obtain the target spectral data and the standard spectral data.

[0013] The present application also provides a soil moisture content prediction device, comprising: Memory for storing computer programs; A processor is used to implement the steps of the soil moisture prediction method as described above when executing the computer program.

[0014] The present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the soil moisture prediction method described above are implemented.

[0015] The present application provides a soil moisture prediction method based on spectral analysis technology, comprising: collecting target spectral data of a target soil area and standard spectral data of the target soil area after drying; performing optimal coupling spectrum calculation based on the target spectral data and the standard spectral data to obtain optimal coupling spectrum data; performing wavelength screening processing on the optimal coupling spectrum data using a wavelength optimization algorithm to obtain model input data; wherein the wavelength optimization algorithm is a hybrid of a competitive adaptive reweighted sampling algorithm and a continuous projection algorithm; reasoning the model input data based on a fusion prediction model to obtain a soil moisture content estimate; wherein the fusion prediction model is a prediction model obtained by fusing an initial partial least squares regression model and an initial convolutional neural network model trained based on spectral training data.

[0016] It has the following beneficial effects: By coupling the target spectrum with the dried standard spectrum, soil type differences and environmental noise interference can be effectively eliminated, reducing the cross-validation RMSE of the red soil and black soil models from 0.045 / 0.042 to 0.028 / 0.026, respectively. Secondly, the CARS-SPA hybrid algorithm is used to dynamically select sensitive wavelengths and focus on the moisture absorption peak. Combined with a fusion model of PLSR and CNN, it can be seen that the accuracy and applicability of soil moisture prediction are significantly improved by adaptively adapting to different soil types. This solves the problem of traditional fixed-band reliance on experience, and through multi-model collaborative optimization, it balances real-time and precision requirements, providing highly reliable technical support for scenarios such as precision agricultural irrigation and disaster warning. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.

[0018] Figure 1 A flow chart of a soil moisture prediction method based on spectral analysis technology provided in an embodiment of the present application; Figure 2 A schematic diagram of the structure of a soil moisture prediction device based on spectral analysis technology provided in an embodiment of the present application; Figure 3 This is a schematic diagram of the structure of the soil moisture prediction device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0019] The core of this application is to provide a soil moisture prediction method, soil moisture prediction device, soil moisture prediction equipment, and computer-readable storage medium based on spectral analysis technology to improve the accuracy of soil moisture prediction.

[0020] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only intended to illustrate the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.

[0021] The following describes a soil moisture prediction method based on spectral analysis technology provided by the present application through an embodiment.

[0022] Please refer to Figure 1 , Figure 1 This is a flow chart of a soil moisture prediction method based on spectral analysis technology provided in an embodiment of the present application.

[0023] In this embodiment, the method may include: S101, collecting target spectrum data of a target soil area and standard spectrum data of the target soil area after drying; In specific scenarios, soil reflectance spectral data is susceptible to various interference factors during the acquisition process, such as atmospheric water vapor absorption, sensor noise, and scattering effects caused by soil surface roughness. This noise can obscure the true spectral characteristics of soil moisture content, especially the absorption valleys in moisture-sensitive bands (such as 1400–1450 nm and 1900–1950 nm). Directly using the raw data for modeling can lead to reduced model accuracy and even introduce erroneous predictions. Therefore, denoising is essential to extract pure spectral signals and provide high-quality input for subsequent modeling. The core principle of this process is to separate noise from valid signals, retaining the physical and chemical characteristics related to soil moisture content while suppressing irrelevant interference.

[0024] This step may include the following: Hardware Configuration: Utilizes a high-resolution spectral sensor covering the 350–2500 nm range, capable of capturing key moisture-sensitive features from the visible to shortwave infrared wavelengths. The equipment requires calibration to eliminate instrumental errors.

[0025] Environmental control: The measurement was conducted at noon on a clear day, when the solar radiation was stable and the atmospheric conditions were relatively uniform, which could reduce the impact of light fluctuations on the reflectivity.

[0026] Wavelet transform denoising: Decomposes the original spectral signal into multiple layers of wavelet coefficients. Thresholding is used to retain low-frequency signals (primarily key features such as moisture absorption peaks) while removing high-frequency noise (such as sensor thermal noise). For example, using a six-layer "db4" wavelet basis function for decomposition, retaining the low-frequency coefficients of the first three layers, significantly improves the signal-to-noise ratio of the reconstructed signal.

[0027] Moving Average Smoothing (MAS): A sliding window average calculation (window size 5) is performed on the preprocessed spectral curve to further eliminate local random jitter. For example, the reflectance fluctuation at 778 nm is reduced from ±0.05 to ±0.01, significantly improving data stability.

[0028] It can be seen that this step, through the combined application of wavelet transform and moving average smoothing, can significantly reduce the interference of noise on spectral data. For example, in the red soil sample test, the standard deviation of the 1900 nm absorption valley depth of the unprocessed data was 0.12, while the standard deviation was reduced to 0.03 after denoising, indicating a clearer moisture signature. Furthermore, this method can preserve the spectral response of components such as soil organic matter and clay minerals, avoiding the loss of important information due to over-filtering. Ultimately, the preprocessed spectral data provides a reliable foundation for subsequent dynamic feature wavelength selection and model construction, improving the robustness and generalization ability of the prediction model.

[0029] S102, performing optimal coupling spectrum calculation based on the target spectrum data and the standard spectrum data to obtain optimal coupling spectrum data; Building on S101, factors such as soil texture (e.g., sand, clay), surface roughness, and organic matter content in this step can alter the baseline reflectance, leading to significant differences in the spectral curves of different soil types at the same moisture content. For example, clay, due to its fine particles, easily absorbs water, resulting in an overall lower reflectance than sand, which can mislead the selection of moisture-sensitive bands. By constructing coupled spectra (difference, ratio, and normalized combinations), environmental interference can be separated from the moisture signal, enhancing the model's sensitivity to moisture changes. The core of this process is to use laboratory-dried spectra as a benchmark to quantify the differences between the original field spectra and the dry state, thereby eliminating the influence of inherent soil properties.

[0030] This step may include the following: Data source: Simultaneous collection of original field spectra (target spectrum data) and laboratory drying spectra (standard spectrum data) (reflectance curve when SMC=0%).

[0031] Coupled spectrum generation: Differential coupling is used to eliminate constant background interference. For example, at a wavelength of 1420 nm, differential coupling reduces the reflectance baseline shift from 0.15 to 0.03.

[0032] Ratio coupling can amplify the contrast of the water absorption valley. For example, at a wavelength of 1920 nm, ratio coupling increases the absorption peak depth by 40%.

[0033] The normalized reflectivity of the normalized coupling ranges to [0, 1] to facilitate cross-region comparison.

[0034] Adaptive selection: Selects the optimal coupling spectrum based on soil type (red soil / black soil). For example, differential coupling is used for red soil due to the high reflectivity of surface iron oxide, while ratio coupling is used for black soil due to the strong light absorption of organic matter.

[0035] It can be seen that this step can significantly reduce the interference of soil type on modeling through the construction of coupled spectra. For example, in the test in the cotton-growing area of ​​Xinjiang, when the coupled spectrum was not used, the cross-validation RMSE of the red soil and black soil models were 0.045 and 0.042, respectively. After the adaptive coupling was adopted, the RMSE dropped to 0.028 and 0.026, respectively. In addition, the ratio coupling enhanced the contrast of the water absorption valley, which increased the efficiency of the characteristic wavelength selection of the PLSR model by 30%. Normalized coupling solves the problem of inconsistent reflectance scales of different samples, which greatly improves the feasibility of cross-regional soil moisture prediction.

[0036] S103, using a wavelength optimization algorithm to perform wavelength screening processing on the optimal coupling spectrum data to obtain model input data; wherein the wavelength optimization algorithm is a hybrid algorithm of a competitive adaptive reweighted sampling algorithm and a continuous projection algorithm; Traditional fixed wavelength selection relies on experience and fails to consider the differences in spectral response between different soil types. For example, the moisture-sensitive wavelength of red soil may be concentrated in the 1400–1450 nm range, while that of black soil may be more sensitive to the 1900–1950 nm range.

[0037] Therefore, dynamically selecting sensitive wavelengths in this step optimizes the feature space, reduces redundant information (such as soil organic matter absorption zones), and improves model accuracy. The core of the CARS-SPA hybrid algorithm lies in its dual screening mechanism: CARS iteratively samples and retains highly correlated bands, while SPA further eliminates collinear bands, ultimately focusing on the set of wavelengths most sensitive to water changes.

[0038] This step may include the following: CARS algorithm: Iteratively screens the entire wavelength range (350–2500 nm), assigning weights to the best-performing wavelengths after each iteration (based on the PLS regression coefficients). For example, if the initial number of wavelengths is 2150, 300 candidate wavelengths will be retained after 10 iterations.

[0039] SPA algorithm: In the CARS initial screening results, the contribution of redundant bands is calculated using the projection matrix, eliminating highly collinear bands. For example, out of 300 candidate bands, the 10 optimal wavelengths (such as 695 nm, 778 nm, and 1420 nm) are ultimately retained.

[0040] Adaptive adaptation: Adjusts the band priority based on soil type. For example, red soil prioritizes the water molecule absorption peak at 1400–1450 nm, while black soil prioritizes the hydrogen-oxygen bond vibration peak at 1900–1950 nm.

[0041] This step uses the CARS-SPA algorithm to make the characteristic wavelength set more consistent with actual moisture variations. Furthermore, the addition of SPA reduces multicollinearity, lowering the variance inflation factor (VIF) of the PLSR model from 8.5 to 2.1, significantly reducing the risk of overfitting. Ultimately, the dynamic characteristic wavelength selection strategy improves the model's generalization ability by over 15% in complex soil scenarios.

[0042] S104, inferring the model input data based on the fusion prediction model to obtain an estimated value of soil moisture content; wherein the fusion prediction model is a prediction model obtained by fusing an initial partial least squares regression model and an initial convolutional neural network model after training based on spectral training data.

[0043] Building on S103, this step is due to the limitations of single models (such as PLSR or CNN): PLSR is inadequate for modeling nonlinear relationships, while CNN requires large amounts of labeled data and is computationally expensive. Fusion of the two approaches balances accuracy and efficiency, adapting to complex scenarios. For example, in irrigation decision-making, PLSR can quickly provide preliminary estimates, while CNN can capture global patterns in spectral curves. A weighted fusion of the two approaches can meet real-time requirements while improving prediction accuracy.

[0044] This step may include the following: PLSR modeling: The input variables are reflectance or spectral indices (such as NDVI and NDWI) at preferred characteristic wavelengths. Principal component analysis (PCA) is used to reduce the dimensionality and establish a regression model. For example, setting the number of principal components in PLSR to 5 explains 92% of the total variance.

[0045] CNN modeling: The input is a preprocessed spectral curve (1×N vector). The network structure consists of two convolutional layers (kernel size = 3, filters = 32) and two fully connected layers. The activation function is ReLU and the loss function is MSE. For example, on the training set, CNN converges three times faster than PLSR.

[0046] Fusion strategy: A weighted average of the PLSR and CNN predictions is performed, with the weights dynamically adjusted based on the validation set RMSE. For example, in the red soil sample, the PLSR weight w1 = 0.6, the CNN weight w2 = 0.4, and the combined RMSE = 0.025.

[0047] This step, through weighted fusion, significantly improves model accuracy compared to a single model. Furthermore, the low computational cost of PLSR (a single prediction takes 0.1 seconds) complements the high accuracy of CNN, enabling real-time monitoring on embedded devices. Ultimately, this fusion strategy balances model performance and resource consumption, providing a viable solution for large-scale farmland deployment.

[0048] In summary, coupling the target spectrum with the dried standard spectrum (difference, ratio, and normalization) effectively eliminates soil type differences and environmental noise interference, reducing the cross-validation RMSE for the red soil and black soil models from 0.045 / 0.042 to 0.028 / 0.026, respectively. Secondly, the CARS-SPA hybrid algorithm dynamically selects sensitive wavelengths, focusing on the moisture absorption peak. Combined with a fusion model of PLSR and CNN, the algorithm adaptively adapts to different soil types, significantly improving the accuracy and applicability of soil moisture prediction. This overcomes the empirical reliance on traditional fixed-band models, and through multi-model collaborative optimization, balances real-time performance and accuracy requirements, providing highly reliable technical support for scenarios such as precision agricultural irrigation and disaster early warning.

[0049] Optionally, target spectral data of the target soil area and standard spectral data of the target soil area after drying are collected, including: Step 1: Collect initial target spectral data of the target soil area; Step 2: Collecting the initial standard spectrum data of the target soil area after drying; Step 3: Preprocess the initial target spectrum data and the initial standard spectrum data to obtain target spectrum data and standard spectrum data.

[0050] The soil reflectance spectral data collected in this alternative are susceptible to interference from factors such as atmospheric water vapor absorption, sensor noise, and surface roughness. This noise can obscure the true spectral characteristics of soil moisture, particularly absorption valleys in moisture-sensitive bands (such as 1400–1450 nm and 1900–1950 nm). Directly using the raw data for modeling can lead to reduced accuracy and even erroneous predictions. Therefore, denoising is essential to extract a pure spectral signal to provide high-quality input for subsequent modeling. The core principle of this process is to separate noise from the valid signal, preserving the physical and chemical characteristics related to soil moisture while suppressing irrelevant interference.

[0051] This option may include the following: Hardware configuration: Use a high-resolution spectral sensor (such as the ASD FieldSpec 3) covering the 350–2500 nm range, capable of capturing key moisture-sensitive features from the visible to the shortwave infrared. The device requires calibration to eliminate instrumental errors.

[0052] Environmental control: The measurements were performed during the noon period (12:00–14:00) on clear days, when the solar radiation is stable and the atmospheric conditions are relatively uniform, which can reduce the impact of light fluctuations on reflectivity.

[0053] Wavelet transform denoising: Decomposes the original spectral signal into multiple layers of wavelet coefficients. Thresholding is used to retain low-frequency signals (primarily key features such as moisture absorption peaks) while removing high-frequency noise (such as sensor thermal noise). For example, using a six-layer "db4" wavelet basis function for decomposition, retaining the low-frequency coefficients of the first three layers, significantly improves the signal-to-noise ratio of the reconstructed signal.

[0054] Moving Average Smoothing (MAS): A sliding window average calculation (window size 5) is performed on the preprocessed spectral curve to further eliminate local random jitter. For example, the reflectance fluctuation at 778 nm is reduced from ±0.05 to ±0.01, significantly improving data stability.

[0055] This alternative, through the combined application of wavelet transform and moving average smoothing, can significantly reduce the impact of noise on spectral data. For example, in red soil samples tested, the standard deviation of the 1900 nm absorption valley depth was 0.12 for the unprocessed data, but this standard deviation dropped to 0.03 after denoising, indicating a clearer moisture signature. Furthermore, this method preserves the spectral responses of components such as soil organic matter and clay minerals, avoiding the loss of important information due to over-filtering. Ultimately, the preprocessed spectral data provides a reliable foundation for subsequent dynamic feature wavelength selection and model construction, enhancing the robustness and generalization capabilities of the prediction model.

[0056] Optionally, an optimal coupling spectrum is calculated based on the target spectrum data and the standard spectrum data to obtain optimal coupling spectrum data, including: Step 1: Calculate the coupling spectrum based on the target spectrum data and the standard spectrum data to obtain the difference coupling spectrum, the ratio coupling spectrum, and the normalized coupling spectrum; Step 2: Determine the optimal coupling spectrum data from the difference coupling spectrum, ratio coupling spectrum, and normalized coupling spectrum based on the soil type of the target soil area. In this option, factors such as soil texture (such as sand and clay), surface roughness, and organic matter content will change the baseline level of reflectance, resulting in significant differences in the spectral curves of different soil types at the same moisture content. For example, clay easily absorbs water due to its fine particles, and its overall reflectance is lower than that of sand, which can mislead the selection of moisture-sensitive bands. By constructing coupled spectra (difference, ratio, and normalized combination), environmental interference and moisture signals can be separated, enhancing the model's sensitivity to moisture changes. The core of this process is to use laboratory drying spectra as a benchmark to quantify the difference between the original field spectrum and the dry state, thereby eliminating the influence of the inherent properties of the soil type.

[0057] This option may include the following: Data source: Simultaneously collected target spectrum data and standard spectrum data (reflectance curve when SMC = 0%). For example, in the Yellow River Delta fluvo-aquic soil experiment, the drying spectrum was obtained by treating it in a 105°C constant temperature oven for 24 hours.

[0058] Coupled spectrum generation: Differential coupling: Used to eliminate constant background interference. For example, at a wavelength of 1420 nm, differential coupling reduces the reflectance baseline shift from 0.15 to 0.03.

[0059] Ratio Coupling: Amplifies the contrast of the water absorption valley. For example, at 1920 nm, ratio coupling increases the absorption peak depth by 40%.

[0060] Normalized coupling: Normalizes the reflectivity range to [0,1] to facilitate comparison across regions.

[0061] Adaptive selection: Selects the optimal coupling spectrum based on soil type (red soil / black soil). For example, differential coupling is used for red soil due to the high reflectivity of surface iron oxide, while ratio coupling is used for black soil due to the strong light absorption of organic matter.

[0062] It can be seen that this optional solution can significantly reduce the interference of soil type on modeling through the construction of coupled spectra. For example, in the test in the cotton-growing area of ​​Xinjiang, when the coupled spectra were not used, the cross-validation RMSE of the red soil and black soil models were 0.045 and 0.042, respectively. After adopting adaptive coupling, the RMSE dropped to 0.028 and 0.026, respectively. In addition, ratio coupling enhances the contrast of the water absorption valley, which improves the efficiency of the characteristic wavelength selection of the PLSR model by 30%. Normalized coupling solves the problem of inconsistent reflectance scales of different samples, greatly improving the feasibility of cross-regional soil moisture prediction.

[0063] Optionally, a wavelength selection algorithm is used to perform wavelength screening on the optimal coupling spectrum data to obtain model input data, including: Step 1: Select candidate bands from the optimal coupled spectral data based on a competitive adaptive reweighted sampling algorithm; Step 2: Use the continuous projection algorithm to remove redundant bands from the candidate bands to obtain the model input data.

[0064] The traditional fixed wavelength selection method in this step relies on empirical experience and fails to consider the spectral response differences between different soil types. For example, the moisture-sensitive wavelengths of red soil may be concentrated in the 1400–1450 nm range, while black soil is more sensitive to the 1900–1950 nm range. Dynamic selection of sensitive wavelengths optimizes the feature space, reduces redundant information (such as the absorption zone of soil organic matter), and improves model accuracy. The core of the CARS-SPA hybrid algorithm lies in a dual screening mechanism: CARS iteratively samples to retain highly correlated wavelengths, while SPA further eliminates collinear bands, ultimately focusing on the wavelength set most sensitive to moisture changes.

[0065] This option may include the following: CARS algorithm: Iteratively screens the entire wavelength range (350–2500 nm), assigning weights to the best-performing wavelengths after each iteration (based on the PLS regression coefficients). For example, if the initial number of wavelengths is 2150, 300 candidate wavelengths will be retained after 10 iterations.

[0066] SPA algorithm: In the CARS initial screening results, the contribution of redundant bands is calculated using the projection matrix, eliminating highly collinear bands. For example, out of 300 candidate bands, the 10 optimal wavelengths (such as 695 nm, 778 nm, and 1420 nm) are ultimately retained.

[0067] Adaptive adaptation: Adjusts the band priority based on soil type. For example, red soil prioritizes the water molecule absorption peak at 1400–1450 nm, while black soil prioritizes the hydrogen-oxygen bond vibration peak at 1900–1950 nm.

[0068] As can be seen, this alternative solution, through the CARS-SPA algorithm, produces a characteristic wavelength set that better reflects actual moisture variations. Furthermore, the addition of SPA reduces multicollinearity, lowering the variance inflation factor (VIF) of the PLSR model from 8.5 to 2.1, significantly reducing the risk of overfitting. Ultimately, the dynamic characteristic wavelength selection strategy improves the model's generalization ability by over 15% in complex soil scenarios.

[0069] Optional, fusion prediction model training process, including: Step 1: fuse the partial least squares regression model with the convolutional neural network model to obtain an initial fusion model; Step 2: Train the initial fusion model based on the spectral training data to obtain a fusion prediction model.

[0070] This option is primarily due to the limitations of single models (such as PLSR or CNN): PLSR is inadequate for modeling nonlinear relationships, while CNN requires large amounts of labeled data and is computationally expensive. Fusion of the two approaches offers a balanced approach to accuracy and efficiency, adapting to complex scenarios. For example, in irrigation decision-making, PLSR can quickly provide preliminary estimates, while CNN can capture global patterns in spectral curves. A weighted fusion of the two approaches can meet real-time requirements while improving prediction accuracy.

[0071] This option may include the following: PLSR modeling: The input variables are reflectance or spectral indices (such as NDVI and NDWI) at preferred characteristic wavelengths. Principal component analysis (PCA) is used to reduce the dimensionality and establish a regression model. For example, setting the number of principal components in PLSR to 5 explains 92% of the total variance.

[0072] CNN modeling: The input is a preprocessed spectral curve (1×N vector). The network structure consists of two convolutional layers (kernel size = 3, filters = 32) and two fully connected layers. The activation function is ReLU and the loss function is MSE. For example, on the training set, CNN converges three times faster than PLSR.

[0073] Fusion strategy: A weighted average of the PLSR and CNN predictions is performed, with the weights dynamically adjusted based on the validation set RMSE. For example, in the red soil sample, the PLSR weight w1 = 0.6, the CNN weight w2 = 0.4, and the combined RMSE = 0.025.

[0074] As can be seen, this alternative, through weighted fusion, achieves significantly better model accuracy than a single model. Furthermore, the low computational cost of PLSR (a single prediction takes 0.1 seconds) complements the high accuracy of CNN, enabling real-time monitoring on embedded devices. Ultimately, this fusion strategy balances model performance and resource consumption, providing a viable solution for large-scale farmland deployment.

[0075] Optionally, the model input data is inferred based on the fusion prediction model to obtain an estimated soil moisture value, including: Step 1: Input the model input data into the partial least squares regression model and the convolutional neural network model respectively to obtain the corresponding prediction results; Step 2: Fusion calculation is performed on the prediction results of the partial least squares regression model and the convolutional neural network model to obtain the estimated value of soil moisture content.

[0076] The final output of this option needs to meet the actual needs of agricultural management (such as irrigation decisions), and the prediction results need to be converted into actionable information through visualization and real-time feedback mechanisms.

[0077] Optionally, performing optimal coupling spectrum calculation based on the target spectrum data and the standard spectrum data to obtain optimal coupling spectrum data includes: Step 1: preprocessing the target spectrum data and the standard spectrum data to obtain target spectrum characteristics and standard spectrum characteristics; Step 2: using a spectrum selection classifier to classify the target spectral features and the standard spectral features to obtain an optimal coupling method; wherein the spectrum selection classifier is a classifier trained based on historical spectral data, and the label of the classifier is the optimal coupling method manually annotated; Step 3: Process the target spectrum data and the standard spectrum data based on the optimal coupling method to obtain the optimal coupling spectrum data.

[0078] This optional solution solves the problem of low data processing accuracy in spectral analysis due to the reliance on manual experience in the selection of coupling methods, by preprocessing the target spectrum and standard spectrum data, using a classifier to identify the optimal coupling strategy, and ultimately achieving efficient fusion of spectral data.

[0079] Step 1 is primarily due to interference from noise, baseline drift, and other factors in the raw spectral data, as well as significant differences in data scale. Preprocessing eliminates this interference and standardizes features, ensuring the accuracy of subsequent classification. Preprocessing improves spectral data quality, avoids the interference of noise and scale deviation on classification, lays the foundation for accurate feature extraction, and ensures the reliability of subsequent coupling method selection.

[0080] Step 2 uses historical spectral data to train a classifier, learning the mapping between spectral features and optimal coupling methods. This replaces manual experience with automated classification, improving the efficiency and accuracy of strategy selection. This can include: collecting historical spectral data and manually annotating the corresponding optimal coupling methods (such as fused coupling and fiber coupling) as training labels; training the classifier using supervised learning algorithms such as random forests and support vector machines, and optimizing parameters through cross-validation; inputting target and standard spectral features, and having the classifier output the coupling method with the highest matching score.

[0081] It can be seen that through the classifier driven by machine learning, the subjectivity and lag of manual judgment can be avoided, and the coupling strategy can be matched quickly and accurately, providing data-driven decision support for spectral data processing and improving processing efficiency.

[0082] Step 3 primarily considers the different spectral data fusion logics of different coupling methods. Applying the corresponding method based on the classification results maximizes the matching of spectral information and achieves efficient data fusion. By applying the optimal coupling method output by the classifier, spectral data can be accurately fused and matched, improving the accuracy of spectral analysis, reducing data bias and resource waste caused by inappropriate method selection, and improving the efficiency of spectral application scenarios (such as detection and communication).

[0083] The following is an introduction to a soil moisture prediction device based on spectral analysis technology provided in an embodiment of the present application. The soil moisture prediction device based on spectral analysis technology and the soil moisture prediction method based on spectral analysis technology described below can be referenced to each other.

[0084] Please refer to Figure 2 , Figure 2 This is a schematic diagram of the structure of a soil moisture prediction device based on spectral analysis technology provided in an embodiment of the present application.

[0085] In this embodiment, the device may include: The data acquisition module 100 is used to collect target spectral data of the target soil area and standard spectral data of the target soil area after drying; A coupling spectrum calculation module 200 is used to calculate an optimal coupling spectrum based on target spectrum data and standard spectrum data to obtain optimal coupling spectrum data; The wavelength screening module 300 is used to perform wavelength screening processing on the optimal coupling spectrum data using a wavelength optimization algorithm to obtain model input data; wherein the wavelength optimization algorithm is a hybrid algorithm of a competitive adaptive reweighted sampling algorithm and a continuous projection algorithm; The prediction and reasoning module 400 is used to infer the model input data based on the fusion prediction model to obtain the estimated value of soil moisture content; wherein, the fusion prediction model is a prediction model obtained by fusing the initial partial least squares regression model and the initial convolutional neural network model after training based on spectral training data.

[0086] Optionally, the data acquisition module is specifically used to collect initial target spectral data of the target soil area; collect initial standard spectral data of the target soil area after drying; and perform data preprocessing on the initial target spectral data and the initial standard spectral data respectively to obtain target spectral data and standard spectral data.

[0087] This application also provides soil moisture prediction equipment, please refer to Figure 3 , Figure 3 This is a schematic diagram of the structure of a soil moisture prediction device provided in an embodiment of the present application. The soil moisture prediction device may include: Memory for storing computer programs; The processor is configured to implement any of the steps of the above-mentioned soil moisture prediction method based on spectral analysis technology when executing the computer program.

[0088] like Figure 3 FIG. 1 is a schematic diagram of the structure of a soil moisture prediction device, which may include a processor 10, a memory 11, a communication interface 12, and a communication bus 13. The processor 10, the memory 11, and the communication interface 12 communicate with each other via the communication bus 13.

[0089] In the embodiment of the present application, the processor 10 may be a central processing unit (CPU), an application-specific integrated circuit, a digital signal processor, a field programmable gate array, or other programmable logic devices.

[0090] The processor 10 may call a program stored in the memory 11 . Specifically, the processor 10 may execute the operations in the embodiment of the abnormal IP identification method.

[0091] The memory 11 is used to store one or more programs. The program may include program code, and the program code includes computer operating instructions. In the embodiment of the present application, the memory 11 stores at least a program for implementing the following functions: Collect target spectral data of the target soil area and standard spectral data of the target soil area after drying; Calculate the optimal coupling spectrum based on the target spectrum data and the standard spectrum data to obtain the optimal coupling spectrum data; The wavelength selection algorithm is used to process the optimal coupling spectrum data to obtain the model input data; the wavelength selection algorithm is a hybrid algorithm of the competitive adaptive reweighted sampling algorithm and the continuous projection algorithm; The model input data is inferred based on the fusion prediction model to obtain the estimated value of soil moisture content; among them, the fusion prediction model is a prediction model obtained by fusing the initial partial least squares regression model and the initial convolutional neural network model after training based on spectral training data.

[0092] In one possible implementation, the memory 11 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.

[0093] In addition, the memory 11 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.

[0094] The communication interface 12 may be an interface of a communication module, and is used to connect to other devices or systems.

[0095] Of course, it needs to be explained that Figure 3 The structure shown does not constitute a limitation on the soil moisture prediction device in the embodiment of the present application. In actual application, the soil moisture prediction device may include Figure 3 More or fewer components than shown, or combinations of certain components.

[0096] The present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of any of the above-mentioned soil moisture prediction methods based on spectral analysis technology can be implemented.

[0097] The computer-readable storage medium may include any medium capable of storing program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0098] For an introduction to the computer-readable storage medium provided in this application, please refer to the above method embodiment, and this application will not go into details here.

[0099] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.

[0100] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0101] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0102] The above is a detailed introduction to the soil moisture prediction method based on spectral analysis technology, soil moisture prediction device, soil moisture prediction equipment, and computer-readable storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A soil moisture prediction method based on spectral analysis technology, characterized in that: include: Collecting target spectral data of a target soil area and standard spectral data of the target soil area after drying; performing an optimal coupling spectrum calculation based on the target spectrum data and the standard spectrum data to obtain optimal coupling spectrum data; A wavelength optimization algorithm is used to perform wavelength screening processing on the optimal coupling spectrum data to obtain model input data; wherein the wavelength optimization algorithm is a hybrid algorithm of a competitive adaptive reweighted sampling algorithm and a continuous projection algorithm; The model input data is inferred based on the fusion prediction model to obtain an estimated value of soil moisture content; wherein, the fusion prediction model is a prediction model obtained by fusing an initial partial least squares regression model and an initial convolutional neural network model after training based on spectral training data.

2. The soil moisture prediction method according to claim 1, characterized in that: Collecting target spectral data of a target soil area and standard spectral data of the target soil area after drying, including: collecting initial target spectral data of the target soil area; Collecting initial standard spectral data of the target soil area after drying; Data preprocessing is performed on the initial target spectrum data and the initial standard spectrum data respectively to obtain the target spectrum data and the standard spectrum data.

3. The soil moisture prediction method according to claim 2, characterized in that: Calculating an optimal coupling spectrum based on the target spectrum data and the standard spectrum data to obtain optimal coupling spectrum data includes: performing coupling spectrum calculation based on the target spectrum data and the standard spectrum data to obtain a difference coupling spectrum, a ratio coupling spectrum, and a normalized coupling spectrum; The optimal coupling spectrum data is determined from the difference coupling spectrum, the ratio coupling spectrum, and the normalized coupling spectrum based on the soil type of the target soil area.

4. The soil moisture prediction method according to claim 2, characterized in that: Calculating an optimal coupling spectrum based on the target spectrum data and the standard spectrum data to obtain optimal coupling spectrum data includes: Preprocessing the target spectrum data and the standard spectrum data to obtain target spectrum characteristics and standard spectrum characteristics; A spectral selection classifier is used to classify the target spectral features and the standard spectral features to obtain an optimal coupling method; wherein the spectral selection classifier is a classifier trained based on historical spectral data, and the label of the classifier is an optimal coupling method manually annotated; The target spectrum data and the standard spectrum data are processed based on the optimal coupling method to obtain the optimal coupling spectrum data.

5. The soil moisture prediction method according to claim 3, characterized in that: The wavelength selection algorithm is used to perform wavelength screening processing on the optimal coupling spectrum data to obtain model input data, including: Screening out candidate bands from the optimal coupled spectrum data based on the competitive adaptive reweighted sampling algorithm; Redundant bands are eliminated from the candidate bands by using the continuous projection algorithm to obtain the model input data.

6. The soil moisture prediction method according to claim 5, characterized in that: The training process of the fusion prediction model includes: The partial least squares regression model is fused with the convolutional neural network model to obtain the initial fusion model; The initial fusion model is trained based on the spectral training data to obtain the fusion prediction model.

7. The soil moisture prediction method according to claim 6, characterized in that: The model input data is inferred based on the fusion prediction model to obtain an estimated value of soil moisture content, including: Inputting the model input data into the partial least squares regression model and the convolutional neural network model respectively to obtain corresponding prediction results; The prediction results of the partial least squares regression model and the prediction results of the convolutional neural network model are fused and calculated to obtain the estimated value of the soil moisture content.

8. A soil moisture prediction device based on spectral analysis technology, characterized in that: include: A data acquisition module, configured to acquire target spectral data of a target soil region and standard spectral data of the target soil region after drying; A coupling spectrum calculation module, configured to perform optimal coupling spectrum calculation based on the target spectrum data and the standard spectrum data to obtain optimal coupling spectrum data; A wavelength screening module, configured to perform wavelength screening processing on the optimal coupling spectrum data using a wavelength optimization algorithm to obtain model input data; wherein the wavelength optimization algorithm is a hybrid algorithm of a competitive adaptive reweighted sampling algorithm and a continuous projection algorithm; A prediction and reasoning module is used to infer the model input data based on a fusion prediction model to obtain an estimated soil moisture content; wherein the fusion prediction model is a prediction model obtained by fusing an initial partial least squares regression model and an initial convolutional neural network model after training based on spectral training data.

9. A soil moisture prediction device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the soil moisture prediction method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the soil moisture prediction method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Method for estimating water content of various crops based on hyperspectrum

    CN121191042A

  • A hyperspectral-based method for estimating water content in multiple crops

    CN121191042B