Soil physical and chemical parameter spectrum inversion method based on SVM and BP neural network

Through the soil physical and chemical parameter spectral inversion method based on SVM and BP neural networks, the existing near-infrared spectral inversion model has been solved in terms of accuracy and applicability, and high-precision soil physical and chemical parameter analysis is realized, which is suitable for soil samples in different regions.

CN119845896APending Publication Date: 2025-04-18NEI MENG GU XIAO CAO SHU ZI SHENG TAI CHAN YE GU FEN YOU XIAN GONG SI

Patent Information

Application Number
CN202510058521.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The existing near-infrared spectral inversion models have shortcomings in accuracy, generalization ability, model complexity and interpretability, and it is difficult to apply to soil samples in different regions.

Method used

Using the soil physical and chemical parameter spectral inversion method based on SVM and BP neural networks, a high-precision soil physical and chemical parameter inversion model suitable for specific regions is constructed by obtaining the near-infrared spectral data of soil samples and the measured values ​​of physical and chemical parameters.

Benefits of technology

It improves the accuracy and efficiency of soil physical and chemical index analysis, is suitable for soil samples in different regions, and provides scientific basis for agricultural production and environmental protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119845896A_ABST
    Figure CN119845896A_ABST
Patent Text Reader

Abstract

The invention discloses a soil physical and chemical parameter spectrum inversion method based on an SVM and a BP neural network. The method comprises the steps that near infrared spectrum data of soil samples with different water contents are collected and preprocessed; training and verifying a pre-constructed dry and wet soil sample classification model based on an SVM (Support Vector Machine) by utilizing the near infrared spectrum data of the preprocessed soil samples with different water contents, and dividing the soil samples into dry soil and wet soil by utilizing the trained dry and wet soil sample classification model; and respectively training and verifying a pre-constructed soil physical and chemical parameter prediction model based on a BP neural network by using the near infrared spectrum data after the pretreatment of the dry soil and wet soil samples and the measured values of the physical and chemical parameters of the soil samples to obtain soil physical and chemical parameter prediction models corresponding to the dry soil and wet soil samples respectively. The model not only can improve the accuracy and efficiency of soil physical and chemical index analysis, but also can provide a scientific basis for agricultural production and environmental protection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of soil physical and chemical index analysis, and in particular to a soil physical and chemical parameter spectral inversion method based on SVM and BP neural network. Background Art

[0002] At present, traditional soil physical and chemical index analysis methods mainly rely on laboratory chemical analysis, such as pH determination, organic matter content analysis, etc. These methods usually require complex sample processing and long analysis time, and are costly. In addition, due to the limitations of laboratory equipment, this method is difficult to achieve large-scale and rapid soil testing.

[0003] In comparison, near-infrared spectroscopy provides a fast, non-destructive and low-cost alternative. Near-infrared spectroscopy is a fast and cost-effective soil physical and chemical index detection technology. It combines knowledge of soil science, optics, statistics and other disciplines for analysis and processing. It is an analysis method based on the absorption of specific wavelength spectra by molecular vibrations. It is widely used in food, agriculture, environmental monitoring and other fields. In recent years, with the development of spectral technology, its application in the analysis of soil physical and chemical indicators has gradually received attention. By measuring the spectral data of soil samples in the near-infrared band, the established mathematical model can be used to invert various physical and chemical indicators of the soil, such as organic matter content, moisture content, pH value, etc. This method not only improves the analysis efficiency, but also reduces the use of chemical reagents, and has the dual advantages of environmental protection and economy.

[0004] However, the existing near-infrared spectral inversion models still have some shortcomings. First, the accuracy and generalization ability of the model need to be improved. Due to the large differences in soil composition in different regions, a single model may not be applicable to soil samples in all regions. Second, the model establishment and optimization process is relatively complicated, requiring a large amount of experimental data and professional data analysis skills. In addition, the model's low interpretability and transparency make it difficult for users to understand the working principle of the model and the reliability of the results. Summary of the invention

[0005] The present application provides a soil physical and chemical parameter spectral inversion method based on SVM and BP neural network to solve the problems existing in the above-mentioned existing near-infrared spectral inversion model.

[0006] According to the first aspect, an embodiment provides a soil physical and chemical parameter spectral inversion method based on SVM and BP neural network, the method comprising: Obtain soil samples with different water contents, measure the actual values ​​of the physical and chemical parameters of the soil samples by laboratory methods, and collect near-infrared spectral data of soil samples with different water contents and perform preprocessing; The pre-constructed SVM-based dry and wet soil sample classification model was trained and verified using the pre-processed near-infrared spectral data of soil samples with different water contents. The soil samples were classified into dry soil and wet soil using the trained dry and wet soil sample classification model. The pre-constructed soil physical and chemical parameter prediction model based on BP neural network was trained and verified by using the near-infrared spectral data of pre-processed dry soil and wet soil samples and the measured values ​​of soil sample physical and chemical parameters, and the soil physical and chemical parameter prediction models corresponding to dry soil and wet soil samples were obtained.

[0007] Furthermore, soil samples with different water contents are obtained, including: Collect soil samples and sieve the obtained soil samples; Weigh an appropriate amount of sieved soil sample and add deionized water to control the different moisture content gradients of the soil samples; Use a mortar to mix the sample with deionized water evenly and then take out the sample. Use a customized sample pressing tool to press the prepared soil sample into a sample with a smooth surface for testing.

[0008] Furthermore, the measured values ​​of the physical and chemical parameters of the soil samples were obtained by laboratory measurement, including: pH: measured by pH meter; organic matter: measured by potassium dichromate method; total nitrogen: measured by Kjeldahl method; total phosphorus: measured by molybdenum blue colorimetry; total potassium: measured by flame spectrophotometer; available phosphorus: measured by ultraviolet spectrophotometer; fast-acting potassium: measured by flame spectrophotometer; slow-acting potassium: measured by flame spectrophotometer; EC: measured by conductivity meter method.

[0009] Furthermore, near infrared spectral data of soil samples with different water contents are collected and preprocessed, including: The PCHIP interpolation method is used to fill in the missing points of the spectral data to make the data more continuous; Then, the SNV standard state transformation is applied to eliminate scattering effects and baseline drift, or the Savitzky-Golay smoothing method is used to improve the signal-to-noise ratio and reduce noise.

[0010] Furthermore, the pre-built SVM-based dry and wet soil sample classification model was trained and verified using the pre-processed near-infrared spectral data of soil samples with different moisture contents, including: Filter out soil sample data with moisture content values ​​within a preset range, thereby excluding abnormal values ​​or invalid samples; define label adding rules after excluding abnormal data, and define classification labels according to the moisture content range: label "0" represents dry soil, and label "1" represents wet soil; The labeled soil sample spectral dataset is divided into a training set and a validation set. The divided training set and validation set are used to train and validate the SVM-based dry and wet soil sample classification model. The input of the SVM-based dry and wet soil sample classification model is the preprocessed soil sample spectral data, and the output is the dry soil and wet soil classification results.

[0011] Furthermore, the pre-built SVM-based dry and wet soil sample classification model is trained and verified using the pre-processed near-infrared spectral data of soil samples with different water contents, including: An iterative optimization strategy is adopted to select the classification model with the best performance by randomly dividing the training set and the validation set multiple times, repeating the training process and recording the results of each training.

[0012] Furthermore, the pre-built soil physical and chemical parameter prediction model based on BP neural network was trained and verified by using the near infrared spectral data of dry soil and wet soil samples after pretreatment and the measured values ​​of soil sample physical and chemical parameters, including: The input of the soil physical and chemical parameter prediction model based on BP neural network is the pre-processed dry soil or wet soil sample spectral data, the measured value of the soil sample physicochemical parameter is the label, the output is the relationship between the spectral data, and the calculation result is the predicted value of the soil physical and chemical parameter; The soil samples were randomly divided into training sets or validation sets by using the retention method or K-fold cross-validation method, and the soil physical and chemical parameter prediction model based on BP neural network was trained and validated using the divided training sets and validation sets.

[0013] Furthermore, the pre-built soil physical and chemical parameter prediction model based on BP neural network was trained and verified by using the near infrared spectral data of dry soil and wet soil samples after pretreatment and the measured values ​​of soil sample physical and chemical parameters, including: The BP neural network includes an input layer, a hidden layer, and an output layer. The loss function adopts the cross entropy loss function, and uses the stochastic gradient descent SGD or Adam optimizer to adjust the parameters. The model calculates the output through forward propagation, updates the parameters through back propagation, and continuously iterates and optimizes until the model converges.

[0014] Furthermore, the method further comprises: The near-infrared spectrum and moisture content data of wet soil samples were used to train the moisture content inversion prediction model based on BP neural network.

[0015] According to the second aspect, an embodiment provides a soil physical and chemical parameter spectral inversion method system based on SVM and BP neural network, the system comprising: The data acquisition module is used to obtain soil samples with different water contents, obtain the measured values ​​of the physical and chemical parameters of the soil samples through laboratory methods, and collect near-infrared spectral data of soil samples with different water contents and perform preprocessing; A dry and wet soil classification model building module is used to train and verify a pre-built SVM-based dry and wet soil sample classification model using pre-processed near-infrared spectral data of soil samples with different water contents, and to classify soil samples into dry soil and wet soil using the trained dry and wet soil sample classification model; The soil physical and chemical parameter prediction model construction module is used to use the near-infrared spectral data of pre-processed dry soil and wet soil samples and the measured values ​​of the physical and chemical parameters of the soil samples to train and verify the pre-constructed soil physical and chemical parameter prediction model based on the BP neural network, and obtain the soil physical and chemical parameter prediction model corresponding to the dry soil and wet soil samples respectively.

[0016] The present application provides a soil physical and chemical parameter spectral inversion method based on SVM and BP neural network. By collecting different types of soil samples in Inner Mongolia and combining their corresponding physical and chemical index data, a high-precision soil physical and chemical parameter inversion model suitable for the region is constructed using a machine learning algorithm. This model can not only improve the accuracy and efficiency of soil physical and chemical index analysis, but also provide a scientific basis for agricultural production and environmental protection. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A flow chart of a soil physical and chemical parameter spectral inversion method based on SVM and BP neural network provided by one embodiment of the present invention; Figure 2 An overall roadmap of a soil physical and chemical parameter spectral inversion method based on SVM and BP neural network provided by one embodiment of the present invention; Figure 3 The accuracy result of the dry and wet soil SVM classification algorithm in a soil physical and chemical parameter spectral inversion method based on SVM and BP neural network provided by one embodiment of the present invention; Figure 4 A schematic diagram of the logical structure of a soil physical and chemical parameter spectral inversion method system based on SVM and BP neural network is provided for one embodiment of the present invention. DETAILED DESCRIPTION

[0018] The present invention is further described in detail below by specific embodiments in conjunction with the accompanying drawings. Wherein similar elements in different embodiments adopt associated similar element numbers. In the following embodiments, many detailed descriptions are for making the present application better understood. However, those skilled in the art can easily recognize that some features can be omitted in different situations, or can be replaced by other elements, materials, methods. In some cases, some operations related to the present application are not shown or described in the specification, this is to avoid the core part of the present application being overwhelmed by too much description, and for those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations according to the description in the specification and the general technical knowledge in the art.

[0019] In addition, the features, operations or characteristics described in the specification can be combined in any appropriate manner to form various implementations. At the same time, the steps or actions in the method description can also be interchanged or adjusted in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a required sequence, unless otherwise specified that a certain sequence must be followed.

[0020] The first embodiment of the present invention provides a spectral inversion method for soil physical and chemical parameters based on SVM and BP neural network. The embodiment of the present invention obtains 835 soil samples by laboratory chemical method to determine pH, organic matter, total nitrogen, total phosphorus, total potassium, available phosphorus, quick-acting potassium, slow-acting potassium and EC, and the measured values ​​of 9 basic soil physical and chemical indicators are obtained by spectrometer at the same time in the near infrared 900-1700nm band range; finally, a machine learning algorithm is used to construct a prediction model of 9 soil physical and chemical indicators based on near infrared spectral data. Since the soil moisture content will also affect the change of spectral data in actual conditions, the collected soil samples are used to establish a moisture gradient, and a prediction model for estimating soil moisture content by near infrared spectroscopy is constructed. In the modeling process, by comparing the inversion accuracy of not distinguishing between dry and wet soil, that is, putting all data into the model training together, and the accuracy of the dry soil inversion model and the wet soil inversion soil physical and chemical property model separated by support vector machine classification (SVM), the results show that the accuracy of dry soil and wet soil modeling is higher than that of mixed modeling. Therefore, the operation process is to first use the support vector machine classification method to classify the obtained soil samples into dry soil and wet soil, and then use the backpropagation neural network (BP neural network) to build a regression estimation model based on near-infrared spectroscopy to predict soil physical and chemical parameters. Figure 1 and Figure 2 Provide detailed explanation.

[0021] like Figure 1 As shown, in step S100, soil samples with different water contents are obtained, the actual values ​​of the physical and chemical parameters of the soil samples are measured by laboratory methods, and near-infrared spectral data of the soil samples with different water contents are collected and preprocessed.

[0022] In this embodiment, data acquisition is specifically as follows: 1) Spectral data acquisition The near-infrared 900-1700nm band covers a wider range and can obtain richer and more accurate spectral information of ground objects, thereby reducing the phenomenon of "different objects with the same spectrum" and "same spectrum with different objects" and has higher inversion accuracy.

[0023] This project collected 835 soil samples from Hohhot, Baotou and Bayannur in Inner Mongolia Autonomous Region. The soil samples were pre-treated and passed through an 18-mesh (1mm sieve). Then, 50g of the sieved soil sample was weighed and deionized water was added to control the moisture content gradient of the soil sample to 0, 15%, 20% and 25%. The sample was mixed with deionized water in a mortar and then taken out. The prepared wet soil sample was pressed into a flat sample piece using a customized sample pressing tool for testing. Then the near-infrared spectroscopy acquisition equipment was preheated to collect spectral data of soil samples at 900-1700 nm under four moisture gradients.

[0024] 2) Spectral data preprocessing The PCHIP interpolation method is used to fill in the missing points of the spectral data to make the data more continuous, and then SNV (standard state transformation) is applied to eliminate scattering effects and baseline drift or SG smoothing (Savitzky-Golay smoothing) is used to improve the signal-to-noise ratio and reduce noise.

[0025] Among them, the PCHIP interpolation algorithm, namely the piecewise cubic Hermite interpolating polynomial, is a shape-preserving interpolation method for data interpolation. It achieves interpolation by creating a smooth curve between given data points while maintaining the shape and monotonicity of the data. It is widely used in fields such as signal processing, image processing, and numerical analysis. Its main feature is that it uses a cubic polynomial for interpolation in each subinterval and ensures that the first-order derivative of the interpolation function is continuous, while the second-order derivative may be discontinuous. This feature enables PCHIP to avoid overfitting when processing data with local extreme values, thereby maintaining the shape of the data.

[0026] Standard Normal Variate (SNV) is a commonly used spectral data preprocessing method, which is mainly used to eliminate systematic offsets and scaling effects in spectral data. The core idea is to center the mean and normalize the standard deviation of each spectral data point, so as to convert the data into a standard normal distribution with a mean of 0 and a variance of 1. This processing method can effectively eliminate systematic offsets and scale changes in the spectrum, improve the comparability and interpretability of the data, and is simple and easy to use without complex parameter settings. Savitzky-Golay (SG) smoothing is a digital signal processing technique for data smoothing and noise reduction, proposed by Abraham Savitzky and Marcel JE Golay in 1964. This method estimates the underlying trend or pattern by sliding a window on the data and fitting a polynomial, thereby achieving data smoothing.

[0027] 3) Laboratory method for obtaining soil physical and chemical parameters a. pH: pH meter; b. Organic matter: potassium dichromate method; c. Total nitrogen: Kjeldahl method; d. Total phosphorus: molybdenum blue colorimetric method; e. Total potassium: flame spectrophotometer method; f. Available phosphorus: UV spectrophotometry; g. Fast-acting potassium: flame spectrophotometer method; h. Slow-release potassium: flame spectrophotometer method; i. EC: Electrical conductivity meter method.

[0028] Near-infrared spectroscopy can obtain key multi-component information in soil, with fast analysis speed, simple operation and low detection cost, providing a new way to detect soil physical and chemical properties. Near-infrared spectroscopy inversion of soil total nitrogen is mainly based on the absorption characteristics of hydrogen-containing groups (such as CH, OH, NH, etc.) in the soil to near-infrared light of specific wavelengths; when near-infrared light is irradiated to soil samples, these groups will absorb near-infrared light of specific wavelengths and produce absorption spectra; the spectrum acquisition range is 900-1700nm, mainly 945, 1007, 1045, 1128, 1200, 1300, 1360, 1450, 1535, 1596, 1615, 1696, 1836, 2149, 2262 nm and other wavelengths are more sensitive. In the spectral range, water molecules have two main absorption peaks, located at 1440 nm and 1900 nm respectively. The spectrum also has the ability to invert models for indicators such as soil total phosphorus, total potassium, available phosphorus, effective potassium, pH, organic matter and electrical conductivity (EC). It mainly uses methods such as correlation analysis and principal component analysis to clarify the correlation between the spectrum and each indicator.

[0029] like Figure 1 As shown, in step S200, the pre-constructed SVM-based dry and wet soil sample classification model is trained and verified using the pre-processed near-infrared spectral data of soil samples with different moisture contents, and the soil samples are classified into dry soil and wet soil using the trained dry and wet soil sample classification model.

[0030] In this embodiment, dry and wet soil are classified as follows: Support Vector Machine (SVM) is a generalized linear classifier that performs binary classification of data in a supervised learning manner. Its decision boundary is the maximum-margin hyperplane solved for the learning samples. The core idea is to classify data by finding an optimal hyperplane that aims to maximize the interval between two categories, thereby improving the accuracy and generalization ability of classification. The specific process is: 1) Loading data and adding labels: The process of using support vector machine to classify dry soil and wet soil is to load a CSV file containing soil sample near-infrared spectral data and corresponding moisture content values ​​in the programming software for support vector machine (SVM) modeling data input. In order to ensure data quality, it is necessary to filter out data with moisture content values ​​within a specific range (0 to 50%) to exclude outliers or invalid samples. After eliminating abnormal data, define label adding rules, and define classification labels according to the moisture content range: label "0" represents soil samples with moisture content between 0 and 1% (defined as dry soil here), and label "1" represents soil samples with moisture content between 1% and 50% (defined as wet soil here). Finally, add classification label columns to the data according to the added rules and fill in the labels for subsequent model training.

[0031] 2) Dataset division The data columns in the CSV file are divided into feature columns (spectral data) and label columns ("0" or "1"). The spectral data is used as the model input, and the classification labels corresponding to the moisture content range are used as the model output. The data of all soil samples are further randomly divided into training sets and validation sets with a ratio of 9:1, that is, 90% of the soil sample data is used as the training set for training the support vector machine model, and 10% of the soil sample data is used as the validation set for evaluating the model performance. This division ensures the generalization ability of the model and its adaptability to unknown data.

[0032] 3) Model training and optimization Classification is achieved by constructing a maximum margin hyperplane, which effectively distinguishes samples with different moisture content ranges. In the model training phase, the training set data is used to learn the relationship between the input features (soil spectral data) and the classification label ("0" or "1"). The model is then evaluated with the validation set, and indicators such as accuracy, recall, and precision are calculated to comprehensively measure the model performance. In order to further improve the model performance, an iterative optimization strategy is adopted (the number of iterations can be selected by yourself, such as 500 or 1000). By randomly dividing the training set and validation set multiple times, repeating the training process and recording each training result, the model with the best performance is selected.

[0033] The input of the support vector machine model is the filtered spectral data, and the output is the classification label. The classification label is divided into two categories (0, 1) according to the moisture content range, which is used to predict which range the sample belongs to. The HingeLoss function is used as the target optimization function.

[0034] In summary, the support vector machine model was used to classify dry and wet soil samples within a certain moisture content range. The experimental process included data preprocessing, label construction, model training, and performance optimization. The final model was able to accurately predict the dry and wet soil categories of unknown soil samples.

[0035] like Figure 1 As shown, in step S300, the pre-constructed soil physical and chemical parameter prediction model based on BP neural network is trained and verified using the pre-processed near-infrared spectral data of the dry soil and wet soil samples and the measured values ​​of the physical and chemical parameters of the soil samples, so as to obtain the soil physical and chemical parameter prediction models corresponding to the dry soil and wet soil samples respectively.

[0036] In this embodiment, the prediction model is constructed as follows: Backpropagation Neural Network (BP Neural Network) optimizes weights and biases through the backpropagation algorithm to minimize prediction errors. In this model building, BP Neural Network is used to process dry soil spectrum and wet soil spectrum data and build models, and finally used to predict various physical and chemical parameters of soil. The specific process is: 1) Data processing and data set division The input data of the model is the spectral data of soil samples, and the measured physical and chemical parameter values ​​are labels. In order to ensure the generalization ability of the model, the retention method or K-fold cross-validation method can be selected to randomly divide all soil samples into training sets or validation sets. The retention method randomly divides the data set into 90% of the soil sample data into training sets and 10% of the soil sample data into validation sets; while the principle of the K-fold cross-validation method is to divide the data into K parts on average, select one of them as the validation set each time, and the remaining K-1 parts as the training set, and repeat this K times to ensure that each piece of data is used as a validation set once, and finally take the average of all validation results as the model performance. The training set is used to optimize the model parameters, and the validation set is used to verify the performance of the model.

[0037] 2) Model input and output The input of the BP neural network is the preprocessed soil spectral data. The final output of each soil parameter model is the nonlinear relationship of the soil spectral data (900-1700nm), and the calculation result is the predicted value of the soil parameter.

[0038] 3) Model structure and training The structure of the BP neural network includes an input layer (consistent with the spectral data dimension), one or more hidden layers (with Tanh activation function) and an output layer (with Sigmoid activation function). The loss function uses the cross entropy loss function, and the parameters are adjusted using the stochastic gradient descent (SGD) or Adam optimizer. The model calculates the output through forward propagation, updates the parameters through back propagation, and continuously iterates the optimization (100 iterations) until the model converges.

[0039] In summary, the optimal inversion prediction models of pH, organic matter, total nitrogen, total phosphorus, total potassium, available phosphorus, fast-acting potassium, slow-acting potassium and EC in dry soil and wet soil were constructed based on the back propagation neural network algorithm; among them, the wet soil spectral data can also construct a moisture content inversion model. In the soil spectral data modeling, the data is first interpolated and preprocessed (SNV or SG smoothing), and then the retention method or K-fold cross validation is used to divide the data set. The input of the model is the spectral data of the soil sample, the output is the relationship between the spectral data, and the calculation result is the predicted value of the soil parameter. The BP neural network includes an input layer, a hidden layer (the activation function is Tanh) and an output layer (the activation function is Sigmoid). The loss function uses cross entropy, the optimizer is SGD or Adam, and the parameters are optimized through iterative training.

[0040] Based on the use of advanced technology, the present invention mainly obtains soil samples from Bayannur City and Hohhot City in Inner Mongolia Autonomous Region, collects spectral data and completes the model inversion work to improve and clarify the universality and robustness of the soil physical and chemical index model inverted based on support vector machine classification and back propagation neural network algorithm in Inner Mongolia. Among them, the use of support vector machine classification algorithm to divide soil samples into dry soil and wet soil separately has a better modeling accuracy ( Figure 3 ).

[0041] Therefore, the following soil physical and chemical parameter modeling results are divided into dry soil modeling results and wet soil modeling results: 1. Inversion results of dry soil spectral data model (1) pH The pH range of the soil samples in this modeling is 7.5-10.1. The R of the training set in the prediction results is 2 , RASE were 0.75 and 0.19 respectively; R 2 , RASE are 0.81 and 0.16 respectively.

[0042] (2) Total nitrogen The total nitrogen content of the soil samples in this modeling ranged from 0.19 to 3.89 g / kg. The R 2 , RASE were 0.897 and 0.26 g / kg respectively; R 2 , RASE were 0.900 and 0.23 g / kg respectively.

[0043] (3) Organic matter The organic matter range of the soil samples in this modeling is 2.66-78.7 g / kg. The R 2 , RASE were 0.93 and 5.27 g / kg respectively; R 2 , RASE were 0.96 and 4.87 g / kg respectively.

[0044] (4) Total phosphorus The total phosphorus content of the soil samples in this modeling ranged from 0.26 to 2.02 g / kg. The R 2 , RASE were 0.83 and 0.12 g / kg respectively; R 2 , RASE were 0.93 and 0.08 g / kg respectively.

[0045] (5) Total potassium The total potassium content of the soil samples in this modeling is in the range of 6.31-33.1 g / kg. The R 2 , RASE were 0.91 and 2.38 g / kg respectively; R 2, RASE were 0.91 and 2.20 g / kg respectively.

[0046] (6) Available phosphorus The available phosphorus range of the soil samples in this modeling is 0.42-48.1 mg / kg. The R 2 , RASE were 0.42 and 8.30 mg / kg respectively; R 2 , RASE were 0.45 and 7.80 mg / kg respectively.

[0047] Due to the low accuracy, the support vector machine (SVM) classification method was used to conduct a qualitative analysis of the available phosphorus in soil samples, which can be roughly divided into three categories: 2-20 mg / kg, 20-40 mg / kg, and 40-50 mg / kg.

[0048] (7) Slow-release potassium The slow-release potassium range of the soil samples in this modeling is 148-1836.17 mg / kg. The R 2 , RASE were 0.72 and 136.95 mg / kg respectively; R 2 , RASE were 0.79 and 104.24 mg / kg respectively.

[0049] (8) Fast-Acting Potassium The available potassium range of the soil samples in this modeling is 42-481 mg / kg. The R 2 , RASE were 0.51 and 60.53 mg / kg respectively; R 2 , RASE were 0.55 and 70.68 mg / kg respectively.

[0050] In the wet soil spectral data model, also due to the low accuracy, the support vector machine (SVM) classification method was used to conduct a qualitative analysis of the available potassium in the soil samples, which can be roughly divided into three categories: 30-90 mg / kg, 90-300 mg / kg, and 300-500 mg / kg.

[0051] (9) EC The EC range of the soil samples modeled in this study is 0.04-2.63 mS / cm. The R 2 , RASE were 0.55 and 0.27 mS / cm respectively; R 2 , RASE are 0.63 and 0.32 mS / cm respectively.

[0052] 2. Wet soil spectral data model inversion results (1) pH The pH range of the soil samples in this modeling is 7.5-10.1. The R of the training set in the prediction results is 2 , RASE were 0.48 and 0.28 respectively; R 2 , RASE are 0.56 and 0.25 respectively.

[0053] (2) Total nitrogen The total nitrogen content of the soil samples in this modeling ranged from 0.19 to 3.89 g / kg. The R 2 , RASE were 0.86 and 0.29 g / kg respectively; R 2 , RASE were 0.91 and 0.25 g / kg respectively.

[0054] (3) Organic matter The organic matter range of the soil samples in this modeling is 2.66-78.7 g / kg. The R 2 , RASE were 0.93 and 4.81 g / kg respectively; R 2 , RASE were 0.93 and 3.80 g / kg respectively.

[0055] (4) Total phosphorus The total phosphorus content of the soil samples in this modeling ranged from 0.26 to 2.02 g / kg. The R 2 , RASE were 0.78 and 0.15 g / kg respectively; R 2 , RASE were 0.85 and 0.12 g / kg respectively.

[0056] (5) Total potassium The total potassium content of the soil samples in this modeling is in the range of 6.31-33.1 g / kg. The R 2 , RASE were 0.81 and 2.77 g / kg respectively; R 2 , RASE were 0.84 and 3.09 g / kg respectively.

[0057] (6) Available phosphorus The available phosphorus range of the soil samples in this modeling is 0.42-48.1 mg / kg. The R 2 , RASE were 0.58 and 10.02 mg / kg respectively; R 2 , RASE were 0.57 and 8.66 mg / kg respectively.

[0058] In the wet soil spectral data model, also due to the low accuracy, the support vector machine (SVM) classification method was used to conduct a qualitative analysis of the available phosphorus in the soil samples, which can be roughly divided into three categories: 2-20 mg / kg, 20-40 mg / kg, and 40-50 mg / kg.

[0059] (7) Slow-release potassium The slow-release potassium range of the soil samples in this modeling is 148-1836.17 mg / kg. The R 2 , RASE were 0.69 and 173.32 mg / kg respectively; R 2 , RASE were 0.73 and 161.15 mg / kg respectively.

[0060] (8) Fast-Acting Potassium The available potassium range of the soil samples in this modeling is 42-481 mg / kg. The R 2 , RASE were 0.55 and 64.40 mg / kg respectively; R 2 , RASE were 0.60 and 60.12 mg / kg respectively.

[0061] In the wet soil spectral data model, also due to the low accuracy, the support vector machine (SVM) classification method was used to conduct a qualitative analysis of the available potassium in the soil samples, which can be roughly divided into three categories: 30-90 mg / kg, 90-300 mg / kg, and 300-500 mg / kg.

[0062] (9) EC The EC range of the soil samples modeled in this study is 0.04-2.63 mS / cm. The R 2 , RASE were 0.42 and 0.35 mS / cm respectively; R 2 , RASE are 0.42 and 0.34 mS / cm respectively.

[0063] (10) Water content The moisture content of the soil samples in this modeling ranges from 0 to 32%. The R 2 , RASE were 0.80 and 0.03% respectively; R 2 , RASE were 0.83 and 0.03% respectively.

[0064] Corresponding to the above-disclosed soil physical and chemical parameter spectral inversion method based on SVM and BP neural network, the embodiment of the present invention further discloses a soil physical and chemical parameter spectral inversion method system based on SVM and BP neural network, such as Figure 4 As shown, it specifically includes: The data acquisition module is used to obtain soil samples with different water contents, obtain the measured values ​​of the physical and chemical parameters of the soil samples through laboratory methods, and collect near-infrared spectral data of soil samples with different water contents and perform preprocessing; A dry and wet soil classification model building module is used to train and verify a pre-built SVM-based dry and wet soil sample classification model using pre-processed near-infrared spectral data of soil samples with different water contents, and to classify soil samples into dry soil and wet soil using the trained dry and wet soil sample classification model; The soil physical and chemical parameter prediction model construction module is used to use the near-infrared spectral data of pre-processed dry soil and wet soil samples and the measured values ​​of the physical and chemical parameters of the soil samples to train and verify the pre-constructed soil physical and chemical parameter prediction model based on the BP neural network, and obtain the soil physical and chemical parameter prediction model corresponding to the dry soil and wet soil samples respectively.

[0065] It should be noted that, for the detailed description of a soil physical and chemical parameter spectral inversion method system based on SVM and BP neural network provided in an embodiment of the present invention, reference can be made to the relevant description of a soil physical and chemical parameter spectral inversion method based on SVM and BP neural network provided in an embodiment of the present application, which will not be repeated here.

[0066] The above specific examples are used to illustrate the present invention, which is only used to help understand the present invention and is not intended to limit the present invention. For those skilled in the art, according to the concept of the present invention, some simple deductions, modifications or substitutions can be made.

Claims

1. A soil physical and chemical parameter spectral inversion method based on SVM and BP neural network, characterized in that: The method comprises: Obtain soil samples with different water contents, measure the actual values ​​of the physical and chemical parameters of the soil samples by laboratory methods, and collect near-infrared spectral data of soil samples with different water contents and perform preprocessing; The pre-constructed SVM-based dry and wet soil sample classification model was trained and verified using the pre-processed near-infrared spectral data of soil samples with different water contents. The soil samples were classified into dry soil and wet soil using the trained dry and wet soil sample classification model. The pre-constructed soil physical and chemical parameter prediction model based on BP neural network was trained and verified by using the near-infrared spectral data of pre-processed dry soil and wet soil samples and the measured values ​​of soil sample physical and chemical parameters, and the soil physical and chemical parameter prediction models corresponding to dry soil and wet soil samples were obtained.

2. A soil physical and chemical parameter spectral inversion method based on SVM and BP neural network as claimed in claim 1, characterized in that: Obtain soil samples of varying moisture content, including: Collect soil samples and sieve the obtained soil samples; Weigh an appropriate amount of sieved soil sample and add deionized water to control the different moisture content gradients of the soil samples; Use a mortar to mix the sample with deionized water evenly and then take out the sample. Use a customized sample pressing tool to press the prepared soil sample into a sample with a smooth surface for testing.

3. A soil physical and chemical parameter spectral inversion method based on SVM and BP neural network as claimed in claim 1, characterized in that: The actual values ​​of the physical and chemical parameters of soil samples were obtained by laboratory measurement, including: pH: measured by pH meter; organic matter: measured by potassium dichromate method; total nitrogen: measured by Kjeldahl method; total phosphorus: measured by molybdenum blue colorimetry; total potassium: measured by flame spectrophotometer; available phosphorus: measured by ultraviolet spectrophotometer; fast-acting potassium: measured by flame spectrophotometer; slow-acting potassium: measured by flame spectrophotometer; EC: measured by conductivity meter method.

4. The soil physicochemical parameter spectral inversion method based on SVM and BP neural network as claimed in claim 1, characterized in that: Collect near infrared spectral data of soil samples with different water contents and perform preprocessing, including: The PCHIP interpolation method is used to fill in the missing points of the spectral data to make the data more continuous; Then, the SNV standard state transformation is applied to eliminate scattering effects and baseline drift, or the Savitzky-Golay smoothing method is used to improve the signal-to-noise ratio and reduce noise.

5. The soil physical and chemical parameter spectral inversion method based on SVM and BP neural network as claimed in claim 1, characterized in that: The pre-built SVM-based dry and wet soil sample classification model was trained and verified using the pre-processed near-infrared spectral data of soil samples with different moisture contents, including: Filter out soil sample data with moisture content values ​​within a preset range, thereby excluding abnormal values ​​or invalid samples; define label adding rules after excluding abnormal data, and define classification labels according to the moisture content range: label "0" represents dry soil, and label "1" represents wet soil; The labeled soil sample spectral dataset is divided into a training set and a validation set. The divided training set and validation set are used to train and validate the SVM-based dry and wet soil sample classification model. The input of the SVM-based dry and wet soil sample classification model is the preprocessed soil sample spectral data, and the output is the dry soil and wet soil classification results.

6. A soil physical and chemical parameter spectrum inversion method based on SVM and BP neural network as claimed in claim 5, characterized in that: The pre-built SVM-based dry and wet soil sample classification model was trained and verified using the pre-processed near-infrared spectral data of soil samples with different moisture contents, including: An iterative optimization strategy is adopted to select the classification model with the best performance by randomly dividing the training set and the validation set multiple times, repeating the training process and recording the results of each training.

7. The soil physical and chemical parameter spectrum inversion method based on SVM and BP neural network as claimed in claim 1, characterized in that: The pre-built soil physical and chemical parameter prediction model based on BP neural network was trained and verified by using the near infrared spectral data of dry soil and wet soil samples after pretreatment and the measured values ​​of soil sample physical and chemical parameters, including: The input of the soil physical and chemical parameter prediction model based on BP neural network is the pre-processed dry soil or wet soil sample spectral data, the measured value of the soil sample physicochemical parameter is the label, the output is the relationship between the spectral data, and the calculation result is the predicted value of the soil physical and chemical parameter; The soil samples were randomly divided into training sets or validation sets by using the retention method or K-fold cross-validation method, and the soil physical and chemical parameter prediction model based on BP neural network was trained and validated using the divided training sets and validation sets.

8. The soil physical and chemical parameter spectrum inversion method based on SVM and BP neural network as claimed in claim 6, characterized in that: The pre-built soil physical and chemical parameter prediction model based on BP neural network was trained and verified by using the near infrared spectral data of dry soil and wet soil samples after pretreatment and the measured values ​​of soil sample physical and chemical parameters. Specifically, it also includes: The BP neural network includes an input layer, a hidden layer, and an output layer. The loss function adopts the cross entropy loss function, and uses the stochastic gradient descent SGD or Adam optimizer to adjust the parameters. The model calculates the output through forward propagation, updates the parameters through back propagation, and continuously iterates and optimizes until the model converges.

9. The soil physical and chemical parameter spectrum inversion method based on SVM and BP neural network as claimed in claim 1, characterized in that: The method further comprises: The near-infrared spectrum and moisture content data of wet soil samples were used to train the moisture content inversion prediction model based on BP neural network.

10. A soil physical and chemical parameter spectrum inversion method system based on SVM and BP neural network, characterized in that: The system comprises: The data acquisition module is used to obtain soil samples with different water contents, obtain the measured values ​​of the physical and chemical parameters of the soil samples through laboratory methods, and collect near-infrared spectral data of soil samples with different water contents and perform preprocessing; A dry and wet soil classification model building module is used to train and verify a pre-built SVM-based dry and wet soil sample classification model using pre-processed near-infrared spectral data of soil samples with different water contents, and to classify soil samples into dry soil and wet soil using the trained dry and wet soil sample classification model; The soil physical and chemical parameter prediction model construction module is used to use the near-infrared spectral data of pre-processed dry soil and wet soil samples and the measured values ​​of the physical and chemical parameters of the soil samples to train and verify the pre-constructed soil physical and chemical parameter prediction model based on the BP neural network, and obtain the soil physical and chemical parameter prediction model corresponding to the dry soil and wet soil samples respectively.

Citation Information

Patent Citations

  • Method for simultaneously predicting multiple soil attributes in soil wet state

    CN114004147A

  • Soil component detection method, equipment and system

    CN114813709A

  • Farmland soil micro-plastic detection method based on hyperspectral imaging technology

    CN115931741A

Cited By

  • Soil physical and chemical parameter inversion method based on artificial neural network

    CN121410817A

  • Prediction method and device for judging soil organic matters based on in-situ wet soil spectrum availability

    CN121808523A

  • Method and device for predicting soil organic matter based on in-situ wet soil spectrum availability discrimination

    CN121808523B