Soil organic carbon content determination method and system

By analyzing the mutation points and correction coefficients of the soil spectral data, weighted fusion and correction of the spectral data are solved, and the problem of the impact of spectral signal mutations affecting the determination accuracy is achieved, achieving higher accuracy and reliability of soil organic carbon content measurement.

CN119915758AInactive Publication Date: 2025-05-02LULIANG UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510413432.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-05-02
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing soil organic carbon content measurement method based on spectral technology is easily disturbed by external factors such as detection instruments and the environment, resulting in a mutation of the spectral signal and affecting the measurement accuracy.

Method used

By obtaining the spectral curves of the soil to be tested and known soil samples, analyzing the differences between the true value and predicted value of the spectral data and the distribution of local mutation points, determining the spectral mutation interference coefficient, and combining the impact of soil pH on organic carbon content measurement, calculating the spectral abnormality correction coefficient, weighted fusion and correction of the spectral data, and finally measuring the organic carbon content of the soil through the training model.

Benefits of technology

It improves the accuracy and reliability of soil organic carbon content measurement, and reduces the impact of external interference on the measurement results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119915758A_ABST
    Figure CN119915758A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of carbon content measurement, in particular to a soil organic carbon content measurement method and system.The method comprises the steps that soil to be measured and a preset number of soil samples with known soil PH and soil organic carbon content are obtained; collecting a spectral curve of each position in each soil sample; recording each wavelength on the spectrum curve as each sampling point; determining a spectrum mutation interference coefficient of each sampling point; acquiring a spectral anomaly correction coefficient of each sampling point on each spectral curve; performing weighted fusion on all the spectral curves of each soil sample based on the spectral anomaly correction coefficient to obtain a corrected spectral curve of each soil sample; forming a training set by utilizing the correction spectrum curves, the organic carbon contents and the PH values of all the soil samples, and training the prediction model; and measuring the organic carbon content of the to-be-measured soil through the trained prediction model. Therefore, the accuracy of measuring the organic carbon content of the soil is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of carbon content determination, and in particular to a method and system for determining soil organic carbon content. Background Art

[0002] Soil organic carbon (COS) content is one of the important components of soil fertility. Soil organic carbon content directly affects the soil's nutrient supply capacity, soil structure, soil microbial activity, etc. Measuring soil organic carbon content can help understand the soil fertility status and guide fertilization and farmland management.

[0003] At present, the soil organic carbon content determination method based on spectral technology is widely used due to its advantages of non-destructiveness, rapidity and no need for complex sample pretreatment. However, in actual scenarios, due to the influence of external factors such as detection instruments and detection environment, it is easy to interfere with the spectral signal, causing the spectral signal to mutate, thereby affecting the determination accuracy of the organic carbon content in the soil. Summary of the invention

[0004] In order to solve the above technical problems, the purpose of this application is to provide a method and system for determining soil organic carbon content. The technical solutions adopted are as follows: In a first aspect, an embodiment of the present application provides a method for determining soil organic carbon content, the method comprising the following steps: Obtain the soil to be tested and a preset number of soil samples with known soil pH and soil organic carbon content; collect spectral curves at each position in each soil sample; Each wavelength on the spectrum curve is recorded as each sampling point; based on the historical spectrum data before each sampling point, the spectrum data prediction value of each sampling point is obtained; the difference between the true value of the spectrum data of each sampling point and the predicted value of the spectrum data, as well as the distribution of mutation points in the local neighborhood of each sampling point, is analyzed to determine the spectrum mutation interference coefficient of each sampling point; The sampling points at the same position on all spectral curves in each soil sample are recorded as co-located sampling points. Based on the gap between the spectral data of each sampling point on each spectral curve and its co-located sampling point, and the similarity of the spectral data of each sampling point and its co-located sampling point in the local neighborhood, the spectral anomaly correction coefficient of each sampling point on each spectral curve is obtained by combining the influence of the spectral mutation interference coefficient and the soil pH value on the determination of soil organic carbon content. Based on the spectral anomaly correction coefficient, all spectral curves of each soil sample are weightedly fused to obtain a corrected spectral curve of each soil sample; a training set is composed of the corrected spectral curves, organic carbon content, and pH value of all soil samples to train the prediction model; and the organic carbon content of the soil to be tested is measured using the trained prediction model.

[0005] In one embodiment, the determination of the spectrum mutation interference coefficient includes: Obtain the maximum value of the spectral data in the local neighborhood of each sampling point, calculate the distance between each maximum value and the corresponding sampling point, calculate the sum of the distance and a preset value greater than 0, and obtain the ratio of the kurtosis of each maximum value to the sum; The spectrum mutation interference coefficient is determined based on the ratio and the difference, and the spectrum mutation interference coefficient is positively correlated with all the ratios of each sampling point and the difference.

[0006] In one embodiment, the spectrum mutation interference coefficient is the product of the difference of each sampling point and the sum of all the ratios.

[0007] In one embodiment, determining the spectral anomaly correction coefficient includes: The spectral data of all the co-located sampling points of each sampling point are combined into a data point set, the local density of each data point in the data point set is calculated, and the difference between each sampling point and the data point with the largest local density in the data point set is recorded as the mutation degree; The cumulative sum of the similarities of the spectral data of each sampling point and all its co-located sampling points in the local neighborhood is calculated, and the multiplication result of the spectral mutation interference coefficient and the mutation degree of each sampling point is calculated. The spectral anomaly correction coefficient is determined by combining the cumulative sum, the multiplication result, and the influence degree.

[0008] In one embodiment, determining the impact degree includes: A soil sample with a neutral soil pH value is randomly selected and recorded as soil sample 1. The soil sample 1 is evenly divided into X parts, and acidic solutions of different concentrations are added to X-1 parts thereof, so that the pH values ​​of the X-1 parts of the soil sample are located in a preset acidic range and are different from each other. The organic carbon content of the X-1 parts of the soil sample is measured, and the difference between the organic carbon content of the X-1 parts of the soil sample and the organic carbon content of a soil sample to which the acidic solution is not added is calculated, and recorded as the acid difference; wherein X is a preset value; In addition to soil sample 1, a soil sample with a neutral soil pH value is selected and recorded as soil sample 2. The same operation steps as soil sample 1 are adopted, except that alkaline solutions of different concentrations are added dropwise to obtain the corresponding alkalinity differences; The acidity difference and its corresponding pH value, the alkalinity difference and its corresponding pH value are respectively composed into two-dimensional arrays, and all the two-dimensional arrays are fitted to obtain the fitting curve of the influence of soil pH on soil organic carbon content; the pH value of each soil sample is combined with the influence fitting curve to obtain the influence degree of the soil pH value of each soil sample on the determination of soil organic carbon content.

[0009] In one embodiment, the spectral anomaly correction coefficient is: calculating the addition result of the cumulative sum and a preset value greater than 0, calculating the ratio of the multiplication result to the addition result, recorded as the isotope ratio, and determining the product of the isotope ratio and the influence degree as the spectral anomaly correction coefficient.

[0010] In one embodiment, the determination of the correction spectrum curve comprises: For all spectral curves of each soil sample, the normalized value of the reciprocal of the spectral anomaly correction coefficient of each sampling point is used as the weight, and the spectral data of all sampling points at the same position are weighted and averaged to obtain the corrected spectral curve.

[0011] In one embodiment, the use of the calibrated spectral curves, organic carbon content, and pH value of all soil samples to form a training set includes: The continuous projection algorithm was used to obtain the characteristic bands of the corrected spectral curve. The characteristic bands and pH values ​​of each soil sample were used as training data, and the organic carbon content of each soil sample was used as a label.

[0012] In one embodiment, the organic carbon content of the soil to be tested is measured by the trained prediction model, including: For the soil to be tested, the same acquisition method as that of the soil sample is adopted to obtain the characteristic band and pH value of the soil to be tested, and use them as the input of the prediction model, and the output is the organic carbon content of the soil to be tested.

[0013] In a second aspect, an embodiment of the present application also provides a soil organic carbon content determination system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of any one of the above-mentioned methods when executing the computer program.

[0014] This application has at least the following beneficial effects: The present application obtains the soil to be tested and a preset number of soil samples with known soil pH and soil organic carbon content; collects spectral curves at various positions in each soil sample; records each wavelength on the spectral curve as each sampling point; obtains the predicted value of the spectral data of each sampling point based on the historical spectral data before each sampling point; analyzes the difference between the true value of the spectral data of each sampling point and the predicted value of the spectral data, as well as the distribution of mutation points in the local neighborhood of each sampling point, to determine the spectral mutation interference coefficient of each sampling point; the spectral mutation interference coefficient reflects the possibility of the existence of accidental mutation points in the local neighborhood of each sampling point, and reflects the degree of interference of the accidental mutation points on each sampling point, thereby improving the accuracy of measuring the degree of interference of the spectral data of each sampling point; the sampling points at the same position on all spectral curves in each soil sample are recorded as co-located sampling points, and based on the gap between the spectral data of each sampling point and its co-located sampling point on each spectral curve, as well as the distribution of each sampling point and its co-located sampling point, the spectral mutation interference coefficient is determined. The similarity of the spectral data of the sampling points in the local neighborhood is combined with the influence of the spectral mutation interference coefficient and the soil pH value on the determination of soil organic carbon content to obtain the spectral anomaly correction coefficient of each sampling point on each spectral curve; the spectral anomaly correction coefficient reflects the possibility of anomalies in the spectral data corresponding to each sampling point, reflects the degree of influence of the spectral data of each sampling point on the interference of external factors, and improves the accuracy and reliability of the correction of the spectral data of each sampling point; based on the spectral anomaly correction coefficient, all spectral curves of each soil sample are weightedly fused to obtain the corrected spectral curve of each soil sample; the corrected spectral curve removes error interference and ensures the accuracy of the spectral data, and the prediction model is trained using the corrected spectral curves, organic carbon content, and pH value of all soil samples to form a training set; the organic carbon content of the soil to be tested is measured by the trained prediction model, and ultimately the accuracy and convenience of the determination of soil organic carbon content are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0016] Figure 1 A flow chart of the steps of a method for determining soil organic carbon content provided in one embodiment of the present application; Figure 2 Determine a flow chart for correcting spectral curves. DETAILED DESCRIPTION

[0017] In order to further explain the technical means and effects adopted by the present application to achieve the predetermined invention purpose, the following is a detailed description of a soil organic carbon content determination method and system proposed in accordance with the present application, its specific implementation method, structure, characteristics and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0018] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.

[0019] The following is a detailed description of a method and system for determining soil organic carbon content provided by the present application in conjunction with the accompanying drawings.

[0020] See also Figure 1 , which shows a flow chart of a method for determining soil organic carbon content provided by an embodiment of the present application, the method comprising the following steps: S1, obtaining the soil to be tested and a preset number of soil samples with known soil pH and soil organic carbon content; collecting the spectral curve of each position in each soil sample.

[0021] Farmland topsoil is the soil layer most affected by human activities and is also the main place for soil organic matter input, transformation and output. It can cause significant changes in soil carbon pool through reasonable utilization in a short period of time. Therefore, it is necessary to quickly and accurately measure the organic carbon content of farmland topsoil.

[0022] In this embodiment, N soil samples with known soil pH and soil organic carbon content are first selected, wherein the selected N soil samples include at least 2 soil samples with soil pH=7. In addition, a soil to be tested is obtained; in this embodiment, N=100, and the implementer can set it according to the actual situation, and this embodiment does not limit it here.

[0023] For each soil sample, this embodiment selects a near-infrared spectrometer as a data acquisition device, air-dries and grinds the soil sample, puts the ground soil sample into a sample pool, and uses a near-infrared spectrometer to collect spectral data at different positions of each soil sample. In this embodiment, for each soil sample, K positions are evenly selected, and the near-infrared spectrometer is used to collect spectral data at K positions of each soil sample, respectively, to obtain the spectral curve of each position in each soil sample. In this embodiment, K=10, which can be set by the implementer according to the actual situation; the wavelength range of the spectral data is 700-2400nm, and the spectral resolution is 10nm.

[0024] S2, based on the historical spectral data before each sampling point, obtain the predicted value of the spectral data of each sampling point; analyze the difference between the true value of the spectral data of each sampling point and the predicted value of the spectral data, as well as the distribution of mutation points in the local neighborhood of each sampling point, and determine the spectral mutation interference coefficient of each sampling point.

[0025] Near-infrared spectroscopy is a commonly used method in the detection of soil organic carbon content. Near-infrared spectra are mainly produced when the non-resonant nature of molecular vibration causes molecules to transition from the ground state to a high energy level. When near-infrared light is irradiated onto soil samples, hydrogen-containing groups in the soil absorb near-infrared light of a specific wavelength, producing an absorption spectrum. Different molecular structures and compositions will result in differences in the position and intensity of their absorption peaks in the near-infrared region. By measuring the absorbance of soil samples at various wavelengths in the near-infrared region, a quantitative relationship between absorbance and the organic carbon content in the soil can be established, thereby achieving the determination of soil organic carbon content. However, due to factors such as instrument noise, environmental interference, and the inhomogeneity of the soil sample itself, the collected spectral data will be interfered with, so it is necessary to first denoise the spectral data to improve the accuracy of the determination of the organic carbon content in the soil.

[0026] Due to the interference of external factors on spectral data, occasional mutation interference points will appear in the normal smooth spectral data. The existence of interference points will cause obvious spikes to appear locally in the spectral curve. In addition, due to the occasional mutation interference points on the spectral curve, the consistency between the local data of the interference points is reduced, making the predictability of data points near the interference points poor. Therefore, this embodiment first analyzes based on the local characteristics of the soil sample spectral curve.

[0027] Each wavelength position on the spectrum curve is recorded as each sampling point. The nth spectrum curve of the i-th soil sample is taken as an example for analysis. With each sampling point of the nth spectrum curve as the center, a local neighborhood with a length of L is obtained. In this embodiment, L=16. When the number of spectrum data in the local neighborhood of a sampling point is less than L, the mean filling method is used to fill it to ensure that there are L spectrum data in the local neighborhood of each sampling point. Among them, the implementer can choose other existing feasible data filling methods at will, and this embodiment does not limit it here.

[0028] Secondly, for each sampling point, an automatic multi-scale peak search algorithm is used to obtain the maximum values ​​in the local neighborhood of each sampling point, and the distance between each maximum value and the sampling point is calculated. The distance is calculated using the Euclidean distance. Furthermore, the spectral data corresponding to the P sampling points before each sampling point are used as the input of the AR (Autoregressive model) model to obtain the predicted value of the spectral data corresponding to each sampling point.

[0029] It should be noted that the automatic multi-scale peak search algorithm and the AR model are both existing publicly known technologies, and the implementer can choose other existing feasible peak search algorithms and prediction models. In this embodiment, P=10. When the number of sampling points before the existing sampling point is less than P, the mean filling method is used for filling processing.

[0030] Based on the above analysis, the spectral mutation interference coefficient of each sampling point in each spectral curve is calculated. The specific calculation method is: ; In the formula, is the spectral mutation interference coefficient of the jth sampling point in the nth spectral curve, is the spectral data of the jth sampling point in the nth spectral curve, is the predicted value of the spectral data of the jth sampling point in the nth spectral curve, is the kurtosis of the mth maximum in the local neighborhood of the jth sampling point in the nth spectral curve, is the distance between the mth maximum and the jth sampling point in the local neighborhood of the jth sampling point in the nth spectral curve, M is the number of maxima in the local neighborhood of the jth sampling point in the nth spectral curve, To preset a value greater than 0 to avoid the denominator being 0, in this embodiment The implementer can set it according to the actual situation, and this embodiment does not limit it here.

[0031] It should be noted that the calculation of kurtosis is a well-known technology, and the specific process is not described in detail. The larger the kurtosis of the maximum value, the more likely it is that the maximum value is an occasional mutation point caused by external factors, and the closer the maximum value is to the center point of the local window, the more likely the occasional mutation point is to the spectral curve. Therefore, when the first sampling point of the soil sample spectrum curve is When there are occasional mutation points in the local neighborhood of a sampling point, the occasional mutation points will appear as obvious peaks on the spectral curve, which will make the calculated The greater the kurtosis of the local maximum value in the local neighborhood of the sampling point, the greater the distance between the local maximum value and the The closer the sampling points are, the better the calculated The smaller the value of is, the less likely it is that the data points near the mutation point will be unpredictable due to the uncertainty of the occasional mutation point, which will make the calculated The difference between the predicted spectral data and the actual spectral data of the sampling points The bigger; eventually Spectral mutation interference coefficient of sampling points The larger the value of The more serious the interference of each sampling point is.

[0032] S3, recording the sampling points at the same position on all spectral curves in each soil sample as co-located sampling points, based on the metric distance between each sampling point on each spectral curve and its co-located sampling point, and the similarity of the spectral data of each sampling point and its co-located sampling point in the local neighborhood, combined with the influence of the spectral mutation interference coefficient and the soil pH value on the determination of soil organic carbon content, the spectral anomaly correction coefficient of each sampling point on each spectral curve is obtained.

[0033] Furthermore, for the same soil sample, under ideal conditions, the There should be a high degree of consistency between the spectral curves. However, in practical applications, due to the influence of environmental factors, the collected There is inevitably occasional signal interference in the spectrum curve, which makes different spectrum curves of the same soil sample show differences at the same sampling point. Therefore, this embodiment further analyzes the consistency between different spectrum curves of the same soil sample.

[0034] Specifically, for each soil sample, the sampling points at the same position in its K spectral curves are recorded as co-located sampling points, and the spectral data in the local neighborhood of the jth sampling point in the nth spectral curve is recorded as the spectral set , use the same method to obtain the spectrum set of all co-located sampling points of the jth sampling point, and use the SAM (Spectral AngleMapper) algorithm to obtain the spectrum set The spectral similarity with the spectral set of all its co-located sampling points; secondly, for the j-th sampling point in the n-th spectral curve, the spectral data of the remaining K-1 co-located sampling points are combined into a data point set, and all the spectral data in the data point set are clustered using the Density Peaks clustering algorithm to obtain the local density of each spectral data in the data point set, and the spectral data with the largest local density is recorded as the reference spectral data, and then the difference between the spectral data of the j-th sampling point and the reference spectral data is recorded as the mutation degree of the j-th sampling point. The greater the mutation degree, the more likely the j-th sampling point is to be an accidental mutation point.

[0035] It should be noted that the difference represents the degree of difference between two variables, which can be calculated by the absolute value of the difference, the square of the difference, the ratio, etc. This embodiment uses the absolute value of the difference as the calculation method of the difference. The SAM algorithm and the Density Peaks clustering algorithm are both existing publicly known technologies, and the specific process will not be described in detail.

[0036] Furthermore, since soil pH affects the activity of soil microorganisms and the decomposition rate of organic matter, and thus affects the organic carbon content, this embodiment further analyzes the effect of different soil pH values ​​on the determination of soil organic carbon content of the same soil sample.

[0037] Specifically, in this embodiment, a soil sample with a neutral soil pH value is randomly selected from N soil samples, which is recorded as soil sample 1. The soil sample 1 is evenly decomposed into X parts, and one of the X parts is retained without operation. Acidic solutions of different concentrations are added to the remaining X-1 soil samples. During the dropping process, a pH meter is used to measure the pH value of the X-1 soil samples in real time, so that the pH value of the X-1 soil samples is finally evenly distributed between 4.5 and 7, and the pH values ​​of the X-1 soil samples are different. Then, the organic carbon content of the X-1 soil samples and the organic carbon content of the remaining soil sample in the X soil samples to which the acid washing solution is not added are respectively measured by the dry burning method in the prior art, and the organic carbon content of the remaining soil sample is recorded as the standard organic carbon content. The difference between the organic carbon content of the X-1 soil samples and the standard organic carbon content is calculated and recorded as the acid difference. The pH value of the X-1 soil samples and the acid difference form a two-dimensional array.

[0038] In addition, soil sample 1 is removed, and another soil sample with a neutral soil pH value is selected from the remaining N-1 soil samples, recorded as soil sample 2, and soil sample 2 is evenly decomposed into Y parts. The same processing steps as soil sample 1 are adopted, and alkaline solutions of different concentrations are added to make the pH values ​​of the final Y-1 soil samples evenly distributed between 7 and 9.5. The difference between the organic carbon content of the Y-1 soil samples and the standard organic carbon content is recorded as the alkalinity difference, and the pH values ​​of the Y-1 soil samples and the alkalinity difference are composed of a two-dimensional array.

[0039] It should be noted that, in this embodiment, X=50, Y=50, the pickling solution is a dilute hydrochloric acid solution, the alkaline solution is a sodium hydroxide solution, the pickling difference is the absolute value of the difference between the organic carbon content of the X-1 soil samples and their standard organic carbon content, the alkaline difference is the absolute value of the difference between the organic carbon content of the Y-1 soil samples and their standard organic carbon content, the dry burning method is an existing well-known technology, and the specific process is not repeated.

[0040] For all two-dimensional arrays composed of acidity differences and two-dimensional arrays composed of alkalinity differences, the least squares method was used to obtain the fitting curve, which was recorded as the fitting curve of the effect of soil pH on soil organic carbon content, where the abscissa of the fitting curve was the pH value, and the ordinate was the absolute value of the difference between the organic carbon content of the soil sample after the above decomposition and the standard organic carbon content.

[0041] For the N soil samples of this embodiment, the pH value of each soil sample is substituted into the influence fitting curve to obtain the influence degree of the soil pH value of each soil sample on the determination of soil organic carbon content, where the influence degree refers to the ordinate of the pH value in the influence fitting curve.

[0042] Based on the above analysis, this embodiment calculates the spectral anomaly correction coefficient of each sampling point in each spectral curve. The specific calculation method is: ; In the formula, is the spectral anomaly correction coefficient of the jth sampling point in the nth spectral curve of the qth soil sample, is the influence of soil pH value of the qth soil sample on the determination of soil organic carbon content, is the spectral mutation interference coefficient of the jth sampling point in the nth spectral curve of the qth soil sample, is the mutation degree of the jth sampling point in the nth spectral curve of the qth soil sample, is the spectral similarity between the spectral set of the jth sampling point in the nth spectral curve of the qth soil sample and the spectral set of its kth co-located sampling point, K is the total number of spectral curves of the qth soil sample, To preset a value greater than 0 to avoid the denominator being 0, in this embodiment , implementers can set it according to actual conditions. Recorded as isotopic ratio.

[0043] It should be understood that when the soil sample The spectral curve When there is an occasional mutation point in the local neighborhood of a sampling point, the occasional mutation point will change the local shape of the spectral curve, making the first The spectral curve is compared with other spectral curves of the same soil sample in The difference of the spectral curves in the local neighborhood of the sampling points increases, that is, the calculated The smaller the value of The spectral curve The spectral data of the sampling point are compared with the other spectral curves of the same soil sample at The difference between the spectral data of the sampling points increases, that is, The value becomes larger; further, if the influence of soil pH on the determination of soil organic carbon content is greater, it means that the error in the determination of soil organic carbon content is greater, the possibility of abnormality in spectral data is greater, and the final spectral anomaly correction coefficient is larger.

[0044] Based on the above analysis and calculation, the spectral anomaly correction coefficient of all spectral curves collected from each soil sample at each sampling point can be obtained.

[0045] S4, performing weighted fusion on all spectral curves of each soil sample based on the spectral anomaly correction coefficient to obtain a corrected spectral curve of each soil sample; using the corrected spectral curves, organic carbon content, and pH value of all soil samples to form a training set to train the prediction model; and measuring the organic carbon content of the soil to be tested by using the trained prediction model.

[0046] The spectral anomaly correction coefficient takes into account the local fluctuation characteristics of the spectral curve and the consistency between different spectral curves when occasional mutation points are generated during the spectral curve acquisition process due to the influence of external factors. According to the spectral anomaly correction coefficient, it is possible to accurately determine whether the spectral curve sampling point is interfered by external factors, thereby identifying abnormal sampling points.

[0047] Since the calculated spectral anomaly correction coefficient is larger, the sampling point of the corresponding spectral curve is more likely to be an abnormal point, the corresponding spectral data has a lower confidence level, and should be given a smaller weight. Therefore, this embodiment further takes the inverse of the spectral anomaly correction coefficient of each sampling point in each spectral curve of each soil sample and normalizes it to obtain For example, Take the reciprocal and normalized value as the weight, calculate the product of the weight and the spectral data of the jth sampling point in the nth spectral curve of the qth soil sample, record it as the corrected spectral data of the jth sampling point, then calculate the average value of the corrected spectral data of the jth sampling point in all spectral curves of the qth soil sample, and use the same method to obtain the average value of all sampling points of the qth soil sample, and form the corrected spectral curve of the qth soil sample. Correspondingly, the corrected spectral curve of each soil sample can be obtained. The flow chart for determining the corrected spectral curve is as follows: Figure 2 shown.

[0048] It should be noted that this embodiment adopts the maximum-minimum normalization method when normalizing the spectral anomaly correction coefficient after taking the inverse. The implementer can choose other existing feasible normalization methods at will, and this embodiment does not limit it here.

[0049] For the calibrated spectral curve of each soil sample, this embodiment adopts the successive projections algorithm (SPA) to obtain the characteristic band of the calibrated spectral curve, and the characteristic band and pH value of each soil sample are used as training data. The organic carbon content of each soil sample is used as a label to form a training set, and the random forest regression model is trained. After the training is completed, for the soil to be tested, the same acquisition method as that of each soil sample is adopted to obtain the characteristic band of the soil to be tested, and the pH value of the soil to be tested is measured by a pH meter. The characteristic band and pH value of the soil to be tested are used as the input of the trained random forest regression model, and the output is the organic carbon content of the soil to be tested.

[0050] It should be noted that the SPA algorithm and the random forest regression model are both existing publicly known technologies, and the specific process will not be described in detail. For the random forest regression model adopted in this embodiment, the implementer can select other existing feasible prediction models according to actual conditions, and this embodiment does not limit this.

[0051] Based on the same inventive concept as the above method, an embodiment of the present application also provides a soil organic carbon content determination system, including a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the computer program, the steps of any one of the above-mentioned methods for determining the soil organic carbon content are implemented.

[0052] It should be noted that the above sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above is a description of a specific embodiment of this specification. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0053] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0054] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application should be included in the protection scope of the present application.

Claims

1. A method for determining soil organic carbon content, characterized in that: The method comprises the following steps: Obtain the soil to be tested and a preset number of soil samples with known soil pH and soil organic carbon content; collect spectral curves at each position in each soil sample; Each wavelength on the spectrum curve is recorded as each sampling point; based on the historical spectrum data before each sampling point, the spectrum data prediction value of each sampling point is obtained; the difference between the true value of the spectrum data of each sampling point and the predicted value of the spectrum data, as well as the distribution of mutation points in the local neighborhood of each sampling point, is analyzed to determine the spectrum mutation interference coefficient of each sampling point; The sampling points at the same position on all spectral curves in each soil sample are recorded as co-located sampling points. Based on the gap between the spectral data of each sampling point on each spectral curve and its co-located sampling point, and the similarity of the spectral data of each sampling point and its co-located sampling point in the local neighborhood, the spectral anomaly correction coefficient of each sampling point on each spectral curve is obtained by combining the influence of the spectral mutation interference coefficient and the soil pH value on the determination of soil organic carbon content. Based on the spectral anomaly correction coefficient, all spectral curves of each soil sample are weightedly fused to obtain a corrected spectral curve of each soil sample; a training set is composed of the corrected spectral curves, organic carbon content, and pH value of all soil samples to train the prediction model; and the organic carbon content of the soil to be tested is measured using the trained prediction model.

2. A method for determining soil organic carbon content according to claim 1, characterized in that: The determination of the spectrum mutation interference coefficient includes: Obtain the maximum value of the spectral data in the local neighborhood of each sampling point, calculate the distance between each maximum value and the corresponding sampling point, calculate the sum of the distance and a preset value greater than 0, and obtain the ratio of the kurtosis of each maximum value to the sum; The spectrum mutation interference coefficient is determined based on the ratio and the difference, and the spectrum mutation interference coefficient is positively correlated with all the ratios of each sampling point and the difference.

3. A method for determining soil organic carbon content according to claim 2, characterized in that: The spectrum mutation interference coefficient is the product of the difference at each sampling point and the sum of all the ratios.

4. The method for determining soil organic carbon content according to claim 1, wherein: The determination of the spectral anomaly correction coefficient includes: The spectral data of all the co-located sampling points of each sampling point are combined into a data point set, the local density of each data point in the data point set is calculated, and the difference between each sampling point and the data point with the largest local density in the data point set is recorded as the mutation degree; The cumulative sum of the similarities of the spectral data of each sampling point and all its co-located sampling points in the local neighborhood is calculated, and the multiplication result of the spectral mutation interference coefficient and the mutation degree of each sampling point is calculated. The spectral anomaly correction coefficient is determined by combining the cumulative sum, the multiplication result, and the influence degree.

5. The method for determining soil organic carbon content according to claim 1, characterized in that: The determination of the degree of impact includes: A soil sample with a neutral soil pH value is randomly selected and recorded as soil sample 1. The soil sample 1 is evenly divided into X parts, and acidic solutions of different concentrations are added to X-1 parts thereof, so that the pH values ​​of the X-1 parts of the soil sample are located in a preset acidic range and are different from each other. The organic carbon content of the X-1 parts of the soil sample is measured, and the difference between the organic carbon content of the X-1 parts of the soil sample and the organic carbon content of a soil sample to which the acidic solution is not added is calculated, and recorded as the acid difference; wherein X is a preset value; In addition to soil sample 1, a soil sample with a neutral soil pH value is selected and recorded as soil sample 2. The same operation steps as soil sample 1 are adopted, except that alkaline solutions of different concentrations are added dropwise to obtain the corresponding alkalinity differences; The acidity difference and its corresponding pH value, the alkalinity difference and its corresponding pH value are respectively composed into two-dimensional arrays, and all the two-dimensional arrays are fitted to obtain the fitting curve of the influence of soil pH on soil organic carbon content; the pH value of each soil sample is combined with the influence fitting curve to obtain the influence degree of the soil pH value of each soil sample on the determination of soil organic carbon content.

6. A method for determining soil organic carbon content according to claim 4, characterized in that: The spectral anomaly correction coefficient is: calculating the addition result of the cumulative sum and a preset value greater than 0, calculating the ratio of the multiplication result to the addition result, recorded as the isotope ratio, and determining the product of the isotope ratio and the degree of influence as the spectral anomaly correction coefficient.

7. A method for determining soil organic carbon content according to claim 1, characterized in that: The determination of the correction spectrum curve comprises: For all spectral curves of each soil sample, the normalized value of the reciprocal of the spectral anomaly correction coefficient of each sampling point is used as the weight, and the spectral data of all sampling points at the same position are weighted and averaged to obtain the corrected spectral curve.

8. A method for determining soil organic carbon content according to claim 1, characterized in that: The training set is composed of the calibrated spectral curves, organic carbon content, and pH value of all soil samples, including: The continuous projection algorithm was used to obtain the characteristic bands of the corrected spectral curve. The characteristic bands and pH values ​​of each soil sample were used as training data, and the organic carbon content of each soil sample was used as a label.

9. A method for determining soil organic carbon content according to claim 8, characterized in that: The trained prediction model measures the organic carbon content of the soil to be tested, including: For the soil to be tested, the same acquisition method as that of the soil sample is adopted to obtain the characteristic band and pH value of the soil to be tested, and use them as the input of the prediction model, and the output is the organic carbon content of the soil to be tested.

10. A soil organic carbon content determination system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Cited By

  • Method and equipment for measuring density of organic carbon in soil

    CN121068588A

  • A method and apparatus for measuring soil organic carbon density

    CN121068588B