A red soil organic matter spectrum inversion method and equipment for removing the influence of free iron
A red soil organic matter prediction model was constructed by using the MODWT decomposition and characteristic band screening methods, which solved the problem of the influence of free iron oxide in red soil and improved the spectral inversion accuracy and efficiency of organic matter content.
Patent Information
- Application Number
- CN202411749088.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2024-11-28
- Filing Date
- 2024-12-02
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2044-12-02
AI Technical Summary
Existing technologies are costly and inefficient in eliminating the impact of free iron oxide in red soil on visible-near-infrared spectral estimation of organic matter, and it is difficult to obtain a large amount of data in a short period of time.
Maximum overlap discrete wavelet transform (MODWT) was used to decompose soil spectral reflectance data. A red soil organic matter prediction model was constructed by screening characteristic bands with stronger correlation between organic matter and free iron. The influence of free iron was eliminated, and the organic matter content was predicted using a linear support vector machine.
It achieves low-cost and high-efficiency removal of the influence of free iron, improves the accuracy of spectral inversion of red soil organic matter content, and reduces data requirements.
Smart Images

Figure CN119619047B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to soil spectroscopy technology, and in particular to a red soil organic matter spectral inversion method and equipment for removing the influence of free iron. Background Art
[0002] To prevent soil degradation and achieve sustainable soil management, soil monitoring at various spatial and temporal scales is necessary. Soil organic matter, the collective term for carbon-containing organic compounds in the soil, is essential for plant growth. Traditional laboratory methods for measuring organic matter typically involve multiple processing, extraction, and analysis steps. These methods are complex and costly, making it difficult to quickly obtain the large amounts of data required for soil monitoring.
[0003] Soil diffuse reflectance spectroscopy provides an economical, time-saving, repeatable, non-destructive, and environmentally friendly alternative to traditional laboratory analysis. Visible and infrared spectra of soil can effectively characterize the chemical, physical, and mineralogical composition of soil. Soil spectroscopy analyzes the spectral absorption position, absorption intensity, and shape characteristics of different soil components, correlating the spectral reflectance of known soil samples with their physical and chemical properties to construct a calibration model. This calibration model is then used to predict the physical and chemical properties of unknown soil samples. In-depth analysis and simulation of soil visible and infrared reflectance spectral characteristics are the foundation for multi-scale, multi-factor soil remote sensing monitoring using multispectral / hyperspectral imaging remote sensing technologies.
[0004] The soil spectrum is a mixed spectrum, and the overall reflectance is a complex superposition of the spectral reflectances of its various components. Organic matter and free iron oxide are both important soil components that affect the spectral reflectance characteristics of soil. Organic matter is mainly composed of humus (humic acid and fulvic acid), mostly in the form of CH, CH2, CH3 and C=O. Generally speaking, as the organic matter increases, the soil spectral reflectance decreases. Researchers have found that organic matter has responses in the regions of 500nm-1200nm, 900nm-1220nm, around 800nm, 640nm-720nm, 1702-2052nm, 1726-2426nm, etc. Soil free iron oxide refers to iron in the form of oxides and their hydrates in soil clay, including iron oxides such as hematite (Fe2O3) and goethite (FeOOH). Its reflectance spectrum usually shows the same as Fe 2+ 、Fe 3+ Specific features related to induced absorption are primarily located near 480nm, 870nm, and 920nm. Multiple studies have shown that the spectral characteristics of soil organic matter and free iron oxide significantly interact in the visible-short near-infrared band (390-950nm), commonly used by drone- and satellite-borne imaging sensors.
[0005] Red soil, a vital soil resource in southern China, typically contains high levels of free iron oxide, which suppresses the response signals of organic matter and other components in soil spectral reflectance. To address this issue, several researchers have proposed methods to eliminate the influence of free iron oxide on organic matter visible-near-infrared spectral estimation, primarily including external parameter orthogonalization (EPO) and machine learning (ML) methods. Both methods require large numbers of soil samples, after measuring their free iron content, for model training, resulting in high investment, high costs, and low efficiency. Summary of the Invention
[0006] In view of the problems existing in the prior art, the purpose of the present invention is to provide a red soil organic matter spectral inversion method, equipment, storage medium and program product that can eliminate the influence of free iron oxide and has low cost, high efficiency and strong applicability.
[0007] In order to achieve the above-mentioned object of the invention, the present invention provides the following technical solutions:
[0008] A red soil organic matter spectral inversion method that removes the influence of free iron includes:
[0009] (1) obtaining sample data of a number of red soil survey samples and typical red soil samples, wherein the sample data of the red soil survey samples include visible-short near-infrared spectral reflectance data and organic matter content data, and the sample data of the typical red soil samples include visible-short near-infrared spectral reflectance data, free iron content data, and organic matter content data, storing the organic matter data of the red soil survey samples and the typical red soil samples into a set P, storing the free iron content data of the typical red soil samples into a set F, storing the spectral reflectance data of the red soil survey samples into a set H, and storing the spectral reflectance data of the typical red soil samples into a set D;
[0010] (2) The spectral reflectance data in set H and set D are decomposed using the maximum overlap discrete wavelet MODWT algorithm, thereby generating the hierarchical discrete detail coefficient set CH of the spectral reflectance data of red soil survey samples and the hierarchical discrete detail coefficient set CD of the spectral reflectance data of typical red soil samples;
[0011] (3) Based on the layered discrete detail coefficient set CD, the multi-scale entropy of each layer is calculated, and the noise layer is determined according to the difference in the multi-scale entropy of adjacent layers. The noise layer is removed to obtain the effective layer discrete detail coefficient set C;
[0012] (4) Calculate the correlation coefficients of each element in the effective layer discrete detail coefficient set C with the set F and the set P, screen out the spectral bands whose organic matter correlation coefficient is greater than the free iron correlation coefficient, and remove the spectral bands with significant free iron correlation to obtain the characteristic band set CDG;
[0013] (5) According to the characteristic band set CDG, the detail coefficients located on the characteristic band are selected from the layered discrete detail coefficient set CH and stored in the sample set CHG;
[0014] (6) Construct a prediction model for organic matter in red soil survey samples, and use the detail coefficient in the sample set CHG as the independent variable and the organic matter content of the corresponding red soil survey samples as the dependent variable to train the prediction model for organic matter in red soil survey samples;
[0015] (7) Calculate the detail coefficient of the visible-short near-infrared spectral reflectance data of the red soil survey sample to be estimated, and input it into the trained red soil survey sample organic matter prediction model to predict the organic matter content.
[0016] Furthermore, step (1) includes:
[0017] (1-1) Obtain sample data of N red soil survey samples, including visible-short near-infrared spectral reflectance data and organic matter content data of the red soil survey samples, where N is a positive integer greater than 1;
[0018] (1-2) obtaining sample data of M typical red soil samples, including visible-short near-infrared spectral reflectance data, free iron content data, and organic matter content data of the typical red soil samples, where M is a positive integer greater than 1;
[0019] (1-3) Obtain the organic matter content data of all red soil survey samples and typical red soil samples, and store them in the organic matter content data set P = {p i |i=1,...,n},p i is the organic matter content of the i-th soil sample, n is the number of soil samples, where n = N + M;
[0020] (1-4) Obtain the spectral reflectance data of all red soil survey samples and store them in the set H = {h i1 |i1=1,...,N}, obtain the spectral reflectance data of all typical red soil samples and store them in the set D={d i2 |i2=1,,..,M}, the i1th data h in the set H i1 ={h i1,j |j=1,...,m}, the i2th data d in set D i2 ={d i2,j |j=1,...,m},h i1,jis the reflectance of the jth band of the i1th red soil survey sample, d i2,j is the reflectance of the jth band of the i2th typical red soil sample, and m is the total number of spectral bands;
[0021] (1-5) Obtain the free iron content data of typical red soil samples and store them in the set F = {f i2 |i2=1,2,...,M},f i2 is the free iron content of the ith typical red soil sample.
[0022] Furthermore, step (2) includes:
[0023] (2-1) According to the total number of spectral bands m, the number of MODWT decomposition levels t is calculated as follows:
[0024] t=log2 m:
[0025] (2-2) For the spectral reflectance data of each red soil survey sample in set H and the spectral reflectance data of each typical red soil sample in set D, the MODWT algorithm is used to decompose the t layer to obtain the high-frequency detail coefficient sequence of each layer;
[0026] (2-3) The high-frequency detail coefficients of the spectral reflectance data of all red soil survey samples are stored in the hierarchical discrete detail coefficient set CH = {ch i1,j |i1=1,...,N,j=1,...,t},ch i1,j represents the high-frequency detail coefficient sequence of the jth layer of the spectral reflectance of the i1th red soil survey sample, and N is the number of red soil survey samples;
[0027] (2-4) The high-frequency detail coefficient sequence of the spectral reflectance data of all typical red soil samples is stored in the layered discrete detail coefficient set CD = {cd i2,j |i2=1,...,M,j=1,...,t},cd i2,j represents the high-frequency detail coefficient sequence of the jth layer of the spectral reflectance of the i2th typical red soil sample, and M is the number of typical red soil samples.
[0028] Furthermore, step (2-2) includes:
[0029] (2-2-1) Select any data h from the set H i1 , calculate the data h i1 A collection of high-pass filters and low-pass filter set
[0030]
[0031] Among them, h l and gl is the lth high-pass filter and low-pass filter in discrete wavelet transform, S is the length of the filter;
[0032] (2-2-2) The high-frequency detail coefficient sequence is calculated using the following formula:
[0033]
[0034]
[0035] v=(ul)mod m
[0036] ch i1,j ={ch i1,j,u}
[0037] Where ch i1,1,u 、ch i1,j,u They represent the uth spectral band component of the 1st and jth layers of the high-frequency detail coefficient sequence of the spectral reflectance of the i1th red soil survey sample, wh i1,1,u 、wh i1,j,u They represent the uth spectral band component of the approximate coefficient sequence of the 1st and jth layers of the spectral reflectance of the i1th red soil survey sample, wh i1,j-1,v represents the vth spectral band component of the j-1th layer approximate coefficient sequence of the spectral reflectance of the i1th red soil survey sample, h i1,v Indicates h i1 The u-th spectral band component, mod is the remainder operation, and v is the remainder;
[0038] (2-2-3) The spectral reflectance data of other red soil survey samples and the spectral reflectance data of all typical red soil samples in set D are calculated according to step (2-2-2), thereby obtaining the high-frequency detail coefficient sequence of the spectral reflectance data of all red soil survey samples and the spectral reflectance data of all typical red soil samples.
[0039] Furthermore, step (3) includes:
[0040] (3-1) Set the band scale τ to different values, for each high-frequency detail coefficient sequence cd in the layered discrete detail coefficient set CD i2,j , recalibrate at different band scales τ according to the following formula:
[0041]
[0042] Where, is the detail coefficient sequence cd i2,j The αth element in the coarse-grained sequence obtained after recalibration at the band scale τ, cd i2,j,d Indicates CD i2,jThe u-th spectral band component in , M is the number of typical red soil samples, and t is the number of decomposition layers;
[0043] (3-2) According to Calculate the detail coefficient sequence cd under different band scales τ i2,j The sample entropy of
[0044] (3-3) According to the high-frequency detail coefficient sequence cd under different band scales τ i2,j Sample entropy, calculate the high-frequency detail coefficient sequence cd i2,j Multiscale entropy of;
[0045] (3-4) For the layered discrete detail coefficient set CD, calculate the difference in multi-scale entropy between every two adjacent layers;
[0046] (3-5) If the difference in multi-scale entropy between the xth layer and the x-1th layer is less than the difference in multi-scale entropy between adjacent layers before the x-1th layer, then the layers from x to t are regarded as effective layers, and the remaining layers are regarded as noise layers. The high-frequency detail coefficient sequence of the effective layer is stored in the effective layer discrete detail coefficient set C = {cd i2,j′ |j′=x,...,t},where cd i2,j′ represents the high-frequency detail coefficient sequence of the j′th layer of the spectral reflectance of the i2th typical red soil sample, and t is the number of decomposition layers.
[0047] Furthermore, step (4) includes:
[0048] (4-1) For each high-frequency detail coefficient sequence cd in the effective layer discrete detail coefficient set C i2,j′ , according to cd i2,j′ The Spearman correlation coefficient is calculated for the free iron content corresponding to the set F as the high-frequency detail coefficient sequence cd i2,j′ The correlation coefficient of free iron fd i2,j′ Store in collection FD:
[0049]
[0050]
[0051] Among them, rg(cd i2,j′,u ) is a CD i2,j′ After the spectral band components are sorted by numerical value, cd i2,j′,u The rank of cd i2,j′,u Indicates CD i2,j′ The uth spectral band component, rg(f i2 ) is the set F after the elements are sorted by numerical value. i2 The rank of f i2 represents the free iron content of the i2th typical red soil sample, represents the difference in ranking related to free iron, b represents cd i2,j′ The sum of all spectral band components in ;
[0052] (4-2) For each high-frequency detail coefficient sequence cd in the effective layer discrete detail coefficient set C i2,j′ , according to cd i2,j′ Calculate the Spearman correlation coefficient with the corresponding organic matter content in set P as the high-frequency detail coefficient sequence cd i2,j′ The organic matter correlation coefficient pd i2,j′ Deposit into collection PD:
[0053]
[0054]
[0055] Among them, rg(p i2 ) is the set P after the elements are sorted by numerical size. i2 The rank of p i2 represents the organic matter content of the i2th typical red soil sample, It indicates the difference in ranking related to organic matter;
[0056] (4-3) Based on the set FD and the set PD, the spectral band ccdg in each layer j′ whose organic matter correlation coefficient is greater than the free iron correlation coefficient is screened. i2,j′ , stored in set YZ;
[0057] (4-4) Remove the spectral bands whose free iron correlation coefficient is greater than the preset threshold in the set YZ, and store the remaining spectral bands in the characteristic band set CDG = {cdg i2,j′ |j′=x,…,t}.
[0058] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above method.
[0059] A computer-readable storage medium having a computer program / instruction stored thereon, which implements the above method when executed by a processor.
[0060] A computer program product comprises a computer program / instruction, wherein the computer program / instruction implements the above method when executed by a processor.
[0061] Compared with existing technologies, the present invention offers the following advantages: Based on the use of discrete wavelet decomposition of spectral reflectance, the present invention screens the layered wavelet detail data to identify bands where the organic matter response is greater than the free iron response, and then eliminates bands with significant free iron. Based on the selected characteristic band parameters, the present invention can achieve red soil organic matter spectral inversion without the influence of free iron. This method only requires the analysis of a small amount of typical red soil sample data, resulting in low cost and significantly improved accuracy in spectral inversion of red soil organic matter content. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 Schematic diagram of the process of the red soil organic matter spectrum inversion method for removing the influence of free iron provided in this embodiment;
[0063] Figure 2 is a spectral reflectance curve diagram of a typical red soil sample in this embodiment;
[0064] Figure 3-Figure 11 is the detail coefficient map after decomposition from the 1st layer to the 9th layer in this embodiment;
[0065] Figure 12 is a multi-scale entropy result diagram in this embodiment;
[0066] Figure 13 is a graph showing the correlation coefficient between the original spectral reflectance and organic matter in this embodiment;
[0067] Figures 14-18 is a graph showing the correlation coefficient between the detail coefficient and the organic matter coefficient after decomposition from the 5th to the 9th layer in this embodiment;
[0068] Figure 19 It is a scatter plot comparing the true value and predicted value of the validation set samples in this embodiment. DETAILED DESCRIPTION
[0069] The technical solutions in the embodiments of the present invention will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present invention.
[0070] Example 1
[0071] The red soil samples used in this embodiment are from red soil profiles of soil surveys in some southern provinces and typical red soil profiles collected in Jiangxi Province. The red soil survey samples are soil samples collected from the occurrence layer of 81 red soil profiles, totaling 316 pieces. The visible-near infrared band (350-2500nm) diffuse reflectance spectrum of the red soil survey samples was measured using a Cary 5000 spectrophotometer, with a spectral sampling interval of 1nm. Before measurement, the soil samples were air-dried, ground, sieved (0.25mm) and dried (45°C). The organic matter data of the red soil survey samples were obtained from the soil survey reports of various provinces. The typical red soil samples include 12 soil samples of 3 fixed depths (0-10cm, 10-20cm and 40-50cm) of 4 profiles developed on different parent materials in a county in Jiangxi Province, and 24 samples of free iron, iron oxide and organic matter removed based on these soil samples, totaling 36 pieces. Diffuse reflectance spectra of typical red soil samples in the visible-near-infrared band (350-2500 nm) were measured in a darkroom using an ASD FieldSpec 3 spectrometer with a spectral sampling interval of 1 nm. Before measurement, the soil samples were air-dried, ground, sieved (2 mm), and oven-dried (45°C). Organic matter content in typical red soil samples was determined using the potassium dichromate-sulfuric acid digestion method, and free iron was extracted using a sodium dithionite-sodium citrate-sodium bicarbonate solution (DCB) and determined colorimetrically.
[0072] like Figure 1 As shown, the method for estimating the organic matter content in red soil based on visible-short near-infrared (350-950 nm) spectral reflectance while eliminating the influence of free iron in this embodiment includes the following steps:
[0073] (1) Obtain sample data of several red soil survey samples and typical red soil samples.
[0074] The sample data of the red soil survey sample includes visible-short near-infrared spectral reflectance data and organic matter content data, and the sample data of the typical red soil sample includes visible-short near-infrared spectral reflectance data, free iron content data and organic matter content data. The organic matter data of the red soil survey sample and the typical red soil sample are stored in set P, the free iron content data of the typical red soil sample is stored in set F, the spectral reflectance data of the red soil survey sample is stored in set H, and the spectral reflectance data of the typical red soil sample is stored in set D. In this embodiment, the spectral reflectance of the typical red soil sample in the visible-short near-infrared range of 350-950nm is shown as follows Figure 2 shown.
[0075] Specifically, this step includes:
[0076] Step (1) includes:
[0077] (1-1) Obtaining sample data of N red soil survey samples, including visible-short near-infrared spectral reflectance data and organic matter content data of the red soil survey samples. In this embodiment, N=316;
[0078] (1-2) Obtaining sample data of M typical red soil samples, including visible-short near-infrared spectral reflectance data, free iron content data, and organic matter content data of the typical red soil samples. In this embodiment, M=36;
[0079] (1-3) Obtain the organic matter content data of all red soil survey samples and typical red soil samples, and store them in the organic matter content data set P = {p i |i=1,…,n},p i is the organic matter content of the i-th soil sample, n is the number of soil samples, where n = N + M;
[0080] (1-4) Obtain the spectral reflectance data of all red soil survey samples and store them in the set H = {h i1 |i1=1,…,N}, obtain the spectral reflectance data of all typical red soil samples and store them in the set D={d i2 |i2=1,…,M}, the i1th data h in the set H i1 ={h i1,j |j=1,…,m}, the i2th data d in set D i2 ={d i2,j |j=1,…,m},h i1,j is the reflectance of the jth band of the i1th red soil survey sample, d i2,j is the reflectance of the jth band of the i2th typical red soil sample, and m is the total number of spectral bands;
[0081] (1-5) Obtain the free iron content data of typical red soil samples and store them in the set F = {f i2 |i2=1,2,...,M},f i2 is the free iron content of the ith typical red soil sample.
[0082] (2) The spectral reflectance data in set H and set D were decomposed using the maximum overlap discrete wavelet MODWT algorithm, respectively, to generate the hierarchical discrete detail coefficient set CH of the spectral reflectance data of red soil survey samples and the hierarchical discrete detail coefficient set CD of the spectral reflectance data of typical red soil samples.
[0083] This step specifically includes:
[0084] (2-1) The number of MODWT decomposition levels t is calculated according to the following formula based on the total number of spectral bands m. In this embodiment, t=9:
[0085] t = log2 m;
[0086] (2-2) For the spectral reflectance data of each red soil survey sample in set H and the spectral reflectance data of each typical red soil sample in set D, the MODWT algorithm (the basis function is "sym5") is used to decompose the t layer to obtain the high-frequency detail coefficient sequence of each layer;
[0087] (2-3) The high-frequency detail coefficients of the spectral reflectance data of all red soil survey samples are stored in the hierarchical discrete detail coefficient set CH = {ch i1,j |i1=1,...,N,j=1,...,t},ch i1,j represents the high-frequency detail coefficient sequence of the jth layer of the spectral reflectance of the i1th red soil survey sample, and N is the number of red soil survey samples;
[0088] (2-4) The high-frequency detail coefficient sequence of the spectral reflectance data of all typical red soil samples is stored in the layered discrete detail coefficient set CD = {cd i2,j |i2=1,...,M,j=1,...,t},cd i2,j represents the high-frequency detail coefficient sequence of the jth layer of the spectral reflectance of the i2th typical red soil sample, and M is the number of typical red soil samples. In this embodiment, the detail coefficient results of each layer after the MODWT decomposition of the spectral reflectance of a certain sample are as follows Figures 3 to 11 shown.
[0089] Step (2-2) includes:
[0090] (2-2-1) Select any data h from the set H i1 , calculate the data h i1 A collection of high-pass filters and low-pass filter set
[0091]
[0092] Among them, h l and g l is the th high-pass filter and low-pass filter in discrete wavelet transform, S is the length of the filter;
[0093] (2-2-2) The high-frequency detail coefficient sequence is calculated using the following formula:
[0094]
[0095]
[0096] v=(ul)mod m
[0097] ch i1,j ={ch i1,j,u}
[0098] Where ch i1,1,u 、ch i1,j,u They represent the uth spectral band component of the 1st and jth layers of the high-frequency detail coefficient sequence of the spectral reflectance of the i1th red soil survey sample, wh i1,1,u 、wh i1,j,u They represent the uth spectral band component of the approximate coefficient sequence of the 1st and jth layers of the spectral reflectance of the i1th red soil survey sample, wh i1,j-1,v represents the vth spectral band component of the j-1th layer approximate coefficient sequence of the spectral reflectance of the i1th red soil survey sample, h i1,v Indicates h i1 The u-th spectral band component, mod is the remainder operation, and v is the remainder;
[0099] (2-2-3) Calculate the spectral reflectance data for the remaining red soil survey samples, as well as the spectral reflectance data for all typical red soil samples in set D, according to step (2-2-2). This yields a sequence of high-frequency detail coefficients for the spectral reflectance data for all surveyed red soil samples and all typical red soil samples. In this embodiment, each soil sample has nine layers of detail coefficients.
[0100] (3) Based on the hierarchical discrete detail coefficient set CD, the multi-scale entropy of each layer is calculated, and the noise layer is determined according to the size of the difference in multi-scale entropy between adjacent layers. The noise layer is removed to obtain the effective layer discrete detail coefficient set C.
[0101] Step (3) includes:
[0102] (3-1) Set the band scale τ to different values, for each high-frequency detail coefficient sequence cd in the layered discrete detail coefficient set CD i2,j , recalibrate at different band scales τ according to the following formula:
[0103]
[0104] Where, is the detail coefficient sequence cd i2,j The αth element in the coarse-grained sequence obtained after recalibration at the band scale τ, cd i2,j,d Indicates CD i2,j The u-th spectral band component in , M is the number of typical red soil samples, and t is the number of decomposition layers;
[0105] (3-2) According to Calculate the detail coefficient sequence cd under different band scales τ i2,j The sample entropy of
[0106] (3-3) According to the high-frequency detail coefficient sequence cd under different band scales τi2,j Sample entropy, calculate the high-frequency detail coefficient sequence cd i2,j In this embodiment, the multi-scale entropy result is as follows: Figure 12 As shown;
[0107] (3-4) For the layered discrete detail coefficient set CD, calculate the difference in multi-scale entropy between every two adjacent layers;
[0108] (3-5) If the difference in multi-scale entropy between the xth layer and the x-1th layer is less than the difference in multi-scale entropy between adjacent layers before the x-1th layer, then the layers from x to t are regarded as effective layers, and the remaining layers are regarded as noise layers. The high-frequency detail coefficient sequence of the effective layer is stored in the effective layer discrete detail coefficient set C = {cd i2,j′ |j′=x,...,t},where cd i2,j′ represents the high-frequency detail coefficient sequence of the j′th layer of the spectral reflectance of the i2th typical red soil sample, where t is the number of decomposition layers. In this embodiment, x=5.
[0109] (4) Calculate the correlation coefficients of each element in the effective layer discrete detail coefficient set C with the set F and the set P respectively, screen out the spectral bands whose organic matter correlation coefficient is greater than the free iron correlation coefficient, and remove the spectral bands with significant free iron correlation to obtain the characteristic band set CDG.
[0110] Step (4) includes:
[0111] (4-1) For each high-frequency detail coefficient sequence cd in the effective layer discrete detail coefficient set C i2,j′ , according to cd i2,j′ The Spearman correlation coefficient is calculated for the free iron content corresponding to the set F as the high-frequency detail coefficient sequence cd i2,j′ The correlation coefficient of free iron fd i2,j′ Store in collection FD:
[0112]
[0113]
[0114] Among them, rg(cd i2,j′,u ) is a CD i2,j′ After the spectral band components are sorted by numerical value, cd i2,j′,u The rank of cd i2,j′,u Indicates CD i2,j′ The uth spectral band component, rg(f i2 ) is the set F after the elements are sorted by numerical value. i2 The rank of f i2 represents the free iron content of the i2th typical red soil sample, represents the difference in ranking related to free iron, b represents cd i2,j′ The sum of all spectral band components in ;
[0115] (4-2) For each high-frequency detail coefficient sequence cd in the effective layer discrete detail coefficient set C i2,j′ , according to cd i2,j′ Calculate the Spearman correlation coefficient with the corresponding organic matter content in set P as the high-frequency detail coefficient sequence cd i2,j′ The organic matter correlation coefficient pd i2,j′ Deposit into collection PD:
[0116]
[0117]
[0118] Among them, rg(p i2 ) is the set P after the elements are sorted by numerical value. i2 The rank of P i2 represents the organic matter content of the i2th typical red soil sample, Indicates the difference in organic matter related ranking; in this embodiment, the correlation coefficient between the original spectral reflectance and organic matter of a soil sample is as follows Figure 13 As shown, the correlation coefficients between the detail coefficients of layers 5-9 and organic matter are as follows Figure 14-18 As shown;
[0119] (4-3) Based on the set FD and the set PD, the spectral bands ccdgi2,j, whose organic matter correlation coefficient is greater than the free iron correlation coefficient in each layer j′ are screened and stored in the set YZ;
[0120] (4-4) Remove the spectral bands whose free iron correlation coefficient is greater than the preset threshold in the set YZ, and store the remaining spectral bands in the characteristic band set CDG = {cdg i2,j′ |j′=x,...,t}.
[0121] (5) According to the characteristic band set CDG, detail coefficients located on the characteristic band are selected from the hierarchical discrete detail coefficient set CH and stored in the sample set CHG.
[0122] (6) Construct an organic matter prediction model for red soil survey samples, and use the detail coefficient in the sample set CHG as the independent variable and the organic matter content of the corresponding red soil survey samples as the dependent variable to train the organic matter prediction model for red soil survey samples.
[0123] The organic matter prediction model for red soil survey samples is specifically a linear support vector machine, and may also be other types of neural networks.
[0124] The sample set CHG was divided into a training set and a test set. The linear support vector machine regression method was used to perform organic matter content inversion modeling on the training set. The model parameters were optimized through ten-fold internal cross-validation to obtain the red soil organic matter prediction model. The above model was then used to estimate the organic matter content of each sample in the validation set. The estimation accuracy was calculated, and the root mean square error (RMSE) and coefficient of determination (R) of the prediction were taken. 2 ), the ratio of standard deviation to RMSE (RPD) of the validation set standard deviation and the predicted root mean square error (RMSE) as the accuracy evaluation method. In this embodiment, the true value and predicted value results obtained by each independent validation set are as follows Figure 19 shown.
[0125] (7) Calculate the detail coefficient of the visible-short near-infrared spectral reflectance data of the red soil survey sample to be estimated, and input it into the trained red soil survey sample organic matter prediction model to predict the organic matter content.
[0126] Organic matter estimation models were constructed using raw spectral reflectance (Raw), continuum removal spectral reflectance (CR), maximum overlap discrete wavelet reconstruction spectral reflectance (MODWT) with noise removal, and the patented organic matter characteristic band screening based on maximum overlap discrete wavelet to eliminate free iron influence (MODWT-SR) preprocessing method to compare and verify their accuracy. The model accuracy obtained by different preprocessing methods is shown in Table 1:
[0127] Table 1 Prediction accuracy of different spectral preprocessing methods
[0128]
[0129] From Table 1, we can see that relative to the original spectrum, the verification R 2 A 79% decrease in the MODWT pre-processing validation R 2 Improved by 3%, validation of MODWT-SR pretreatment R 2 Increased by 40%.
[0130] Example 2
[0131] An embodiment of the present invention provides a computer device, which provides services for the implementation of the method of the above-mentioned embodiment 1 of the present invention. The device may include: a memory storing a computer executable program; a processor coupled to the memory 301; the processor calls the computer executable program stored in the memory to execute the steps in the method described in the embodiment 1. The memory may include a computer system readable medium in the form of a volatile memory, such as a random access memory (RAM) and / or a cache memory. The processor executes various functional applications and data processing by running the program stored in the memory, such as implementing the method provided in the embodiment 1 of the present invention. The code of the computer executable program can be written in one or more programming languages or a combination thereof, and the programming language includes an object-oriented programming language, such as Java, Smalltalk, C++, and also includes a conventional procedural programming language, such as "C" language or similar programming language.
[0132] Example 3
[0133] An embodiment of the present invention provides a storage medium containing a computer-executable program. When executed by a computer processor, the computer-executable program is used to perform the method of embodiment 1. The storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or any combination thereof.
[0134] Example 4
[0135] An embodiment of the present invention further provides a computer product, such as an app on a mobile phone or tablet, or an installation program on a computer, comprising a computer program / instructions that, when executed by a processor, implement the method described in Example 1. The code for the computer executable program for performing the operations of the present invention can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages.
[0136] It should be understood that the above embodiments and descriptions only describe the principles, main features and advantages of the present invention. Without departing from the spirit and scope of the present invention, the present invention may be subject to various changes and improvements, and these changes and improvements all fall within the scope of protection of the present invention.
Claims
1. A red soil organic matter spectrum inversion method for removing the influence of free iron, characterized in that: include: (1) obtaining sample data of a number of red soil survey samples and typical red soil samples, wherein the sample data of the red soil survey samples include visible-short near-infrared spectral reflectance data and organic matter content data, and the sample data of the typical red soil samples include visible-short near-infrared spectral reflectance data, free iron content data, and organic matter content data, storing the organic matter data of the red soil survey samples and the typical red soil samples into a set P, storing the free iron content data of the typical red soil samples into a set F, storing the spectral reflectance data of the red soil survey samples into a set H, and storing the spectral reflectance data of the typical red soil samples into a set D; (2) The spectral reflectance data in set H and set D are decomposed using the maximum overlap discrete wavelet MODWT algorithm, thereby generating the hierarchical discrete detail coefficient set CH of the spectral reflectance data of red soil survey samples and the hierarchical discrete detail coefficient set CD of the spectral reflectance data of typical red soil samples; (3) Based on the layered discrete detail coefficient set CD, the multi-scale entropy of each layer is calculated, and the noise layer is determined according to the difference in the multi-scale entropy of adjacent layers. The noise layer is removed to obtain the effective layer discrete detail coefficient set C; (4) Calculate the correlation coefficients of each element in the effective layer discrete detail coefficient set C with the set F and the set P, screen out the spectral bands whose organic matter correlation coefficient is greater than the free iron correlation coefficient, and remove the spectral bands with significant free iron correlation to obtain the characteristic band set CDG; (5) According to the characteristic band set CDG, the detail coefficients located on the characteristic band are selected from the layered discrete detail coefficient set CH and stored in the sample set CHG; (6) Construct a prediction model for organic matter in red soil survey samples, and use the detail coefficient in the sample set CHG as the independent variable and the organic matter content of the corresponding red soil survey samples as the dependent variable to train the prediction model for organic matter in red soil survey samples; (7) Calculate the detail coefficient of the visible-short near-infrared spectral reflectance data of the red soil survey sample to be estimated, and input it into the trained red soil survey sample organic matter prediction model to predict the organic matter content; Wherein, step (3) comprises: (3-1) Set the band scale τ to different values, for each high-frequency detail coefficient sequence cd in the layered discrete detail coefficient set CD i2,j , recalibrate at different band scales τ according to the following formula: Where, is the detail coefficient sequence cd i2,j The αth element in the coarse-grained sequence obtained after recalibration at the band scale τ, cd i2,j,d Indicates CD i2,j The u-th spectral band component, M is the number of typical red soil samples, and t is the number of decomposition layers; (3-2) According to Calculate the detail coefficient sequence cd under different band scales τ i2,j The sample entropy of (3-3) According to the high-frequency detail coefficient sequence cd under different band scales τ i2,j Sample entropy, calculate the high-frequency detail coefficient sequence cd i2,j Multiscale entropy of (3-4) For the layered discrete detail coefficient set CD, calculate the difference in multi-scale entropy between every two adjacent layers; (3-5) If the difference in multi-scale entropy between the xth layer and the x-1th layer is less than the difference in multi-scale entropy between adjacent layers before the x-1th layer, then the layers from x to t are regarded as effective layers, and the remaining layers are regarded as noise layers. The high-frequency detail coefficient sequence of the effective layer is stored in the effective layer discrete detail coefficient set C = {cd i2,j′ |j′=x,…,t}, where cd i2,j′ represents the high-frequency detail coefficient sequence of the j′th layer of the spectral reflectance of the i2th typical red soil sample, and t is the number of decomposition layers.
2. The red soil organic matter spectrum inversion method for removing the influence of free iron according to claim 1 is characterized in that: Step (1) includes: (1-1) Obtain sample data of N red soil survey samples, including visible-short near-infrared spectral reflectance data and organic matter content data of the red soil survey samples, where N is a positive integer greater than 1; (1-2) obtaining sample data of M typical red soil samples, including visible-short near-infrared spectral reflectance data, free iron content data, and organic matter content data of the typical red soil samples, where M is a positive integer greater than 1; (1-3) Obtain the organic matter content data of all red soil survey samples and typical red soil samples, and store them in the organic matter content data set P = {p i |i=1,…,n},p i is the organic matter content of the i-th soil sample, n is the number of soil samples, where n = N + M; (1-4) Obtain the spectral reflectance data of all red soil survey samples and store them in the set H = {h i1 |i1=1,…,N}, obtain the spectral reflectance data of all typical red soil samples and store them in the set D={d i2 |i2=1,…,M}, the i1th data h in the set H i1 ={h i1,j |j=1,…,m}, the i2th data d in set D i2 ={d i2,j |j=1,…,m},h i1,j is the reflectance of the jth band of the i1th red soil survey sample, d i2,j is the reflectance of the jth band of the i2th typical red soil sample, and m is the total number of spectral bands; (1-5) Obtain the free iron content data of typical red soil samples and store them in the set F = {f i2 |i2=1,2,…,M},f i2 is the free iron content of the ith typical red soil sample.
3. The red soil organic matter spectrum inversion method for removing the influence of free iron according to claim 1 is characterized in that: Step (2) includes: (2-1) According to the total number of spectral bands m, the number of MODWT decomposition levels t is calculated as follows: t = log2m; (2-2) For the spectral reflectance data of each red soil survey sample in set H and the spectral reflectance data of each typical red soil sample in set D, the MODWT algorithm is used to decompose the t layer to obtain the high-frequency detail coefficient sequence of each layer; (2-3) The high-frequency detail coefficients of the spectral reflectance data of all red soil survey samples are stored in the hierarchical discrete detail coefficient set CH = {ch i1,j |i1=1,…,N,j=1,…,t},ch i1,j represents the high-frequency detail coefficient sequence of the jth layer of the spectral reflectance of the i1th red soil survey sample, and N is the number of red soil survey samples; (2-4) The high-frequency detail coefficient sequence of the spectral reflectance data of all typical red soil samples is stored in the layered discrete detail coefficient set CD = {cd i2,j |i2=1,…,M,j=1,…,t},cd i2,j represents the high-frequency detail coefficient sequence of the jth layer of the spectral reflectance of the i2th typical red soil sample, and M is the number of typical red soil samples.
4. The red soil organic matter spectrum inversion method for removing the influence of free iron according to claim 3 is characterized in that: Step (2-2) includes: (2-2-1) Select any data h from the set H i1 , calculate the data h i1 A collection of high-pass filters and low-pass filter set Among them, h l and g l is the lth high-pass filter and low-pass filter in discrete wavelet transform, S is the length of the filter; (2-2-2) The high-frequency detail coefficient sequence is calculated using the following formula: v=(ul)mod m ch i1,j ={ch i1,j,u } Where ch i1,1,u 、ch i1,j,u They represent the uth spectral band component of the 1st and jth layers of the high-frequency detail coefficient sequence of the spectral reflectance of the i1th red soil survey sample, wh i1,1,u 、wh i1,j,u They represent the uth spectral band component of the approximate coefficient sequence of the 1st and jth layers of the spectral reflectance of the i1th red soil survey sample, wh i1,j-1,v represents the vth spectral band component of the j-1th layer approximate coefficient sequence of the spectral reflectance of the i1th red soil survey sample, h i1,v Indicates h i1 The u-th spectral band component, mod is the remainder operation, and v is the remainder; (2-2-3) The spectral reflectance data of other red soil survey samples and the spectral reflectance data of all typical red soil samples in set D are calculated according to step (2-2-2), thereby obtaining the high-frequency detail coefficient sequence of the spectral reflectance data of all red soil survey samples and the spectral reflectance data of all typical red soil samples.
5. The red soil organic matter spectrum inversion method for removing the influence of free iron according to claim 1 is characterized in that: Step (4) includes: (4-1) For each high-frequency detail coefficient sequence cd in the effective layer discrete detail coefficient set C i2,j′ , according to cd i2,j′ Calculate the Spearman correlation coefficient with the corresponding free iron content in set F as the high-frequency detail coefficient sequence cd i2,j′ The correlation coefficient of free iron fd i2,j′ Store in collection FD: Among them, rg(cd i2,j′,u ) is a CD i2,j′ After the spectral band components are sorted by numerical value, cd i2,j′,u The rank of cd i2,j′,u Indicates CD i2,j′ The uth spectral band component, rg(f i2 ) is the set F after the elements are sorted by numerical value. i2 The rank of f i2 represents the free iron content of the i2th typical red soil sample, represents the difference in ranking related to free iron, b represents cd i2,j′ The sum of all spectral band components in ; (4-2) For each high-frequency detail coefficient sequence cd in the effective layer discrete detail coefficient set C i2,j′ , according to cd i2,j′ Calculate the Spearman correlation coefficient with the corresponding organic matter content in set P as the high-frequency detail coefficient sequence cd i2,j′ The organic matter correlation coefficient pd i2,j′ Deposit into collection PD: Among them, rg(p i2 ) is the set P after the elements are sorted by numerical size. i2 The rank of p i2 represents the organic matter content of the i2th typical red soil sample, It indicates the difference in ranking related to organic matter; (4-3) Based on the set FD and the set PD, the spectral band ccdg in each layer j′ whose organic matter correlation coefficient is greater than the free iron correlation coefficient is screened. i2,j′ , stored in set YZ; (4-4) Remove the spectral bands whose free iron correlation coefficient is greater than the preset threshold in the set YZ, and store the remaining spectral bands in the characteristic band set CDG = {cdg i2,j′ |j′=x,…,t}.
6. The red soil organic matter spectrum inversion method for removing the influence of free iron according to claim 1 is characterized in that: The red soil survey sample organic matter prediction model is specifically a linear support vector machine.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: The processor executes the computer program to implement the method according to any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: The computer program / instructions, when executed by a processor, implement the method of any one of claims 1 to 6.
9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method for quantitatively analyzing content of free ion in soil sediment sample
CN106979930A
Method for determining free iron in soil
CN117740509A