A method and apparatus for measuring soil organic carbon density
By analyzing the spectral data characteristics and interference characteristics of soil samples, adjusting the filter window size, and constructing an organic carbon density measurement model, the measurement error problem caused by the deviation of reflectance spectral data was solved, and the accuracy of soil organic carbon density measurement was improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2026-03-27
AI Technical Summary
In existing technologies, biases in reflectance spectral data lead to low accuracy in soil organic carbon density measurements. Traditional filtering methods fail to effectively account for differences in interference levels at different locations and in different wavelengths, resulting in significant measurement errors.
By acquiring the spectral data feature values and interference feature values of each sampling point, adjusting the filter window size, and combining the spectral data with the measured organic carbon density value, an organic carbon density measurement model is constructed, and the measurement is performed using a random forest model.
It improves the accuracy of soil organic carbon density measurement, reduces the interference of spectral data, and enhances the reliability of measurement results.
Smart Images

Figure CN121068588B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of organic carbon density measurement, in particular to a soil organic carbon density measurement method and device. BACKGROUND
[0002] The organic carbon density in soil refers to the storage of soil organic carbon in a coating with a certain depth per unit area, and the soil carbon density is an important index for evaluating and measuring the storage of soil organic carbon. In recent years, in order to realize rapid, low-cost and non-destructive monitoring of soil organic carbon density, the soil organic carbon density (SOCD) is usually measured by using reflection spectrum data. Specifically, the reflection data of soil in the visible light, near-infrared light and infrared band are obtained, the soil spectrum data and the soil organic carbon density are correlated, and then the problem of low detection efficiency and high cost of soil organic carbon density caused by traditional chemical analysis method is reduced. The near-infrared spectrum technology can establish a direct relationship with the content of soil components in a specific spectral range, and realize high-precision measurement of soil organic carbon density.
[0003] However, in the process of measuring the soil organic carbon density by using the reflection spectrum data, the quality of the reflection spectrum directly determines the accuracy of the measurement of the soil organic carbon density, and the deviation of the spectrum data may cause the prediction error to increase in the actual measurement process. In the actual measurement and analysis process of the organic carbon density, due to the difference in particle distribution and the interference of instrument noise, the interference of the collected spectrum data is large, and the spectrum characteristics in different wave bands may be deviated, thereby affecting the accuracy of the measurement of the soil organic carbon density. Therefore, it is necessary to correct the measured reflection spectrum data. The traditional filtering method uses a fixed size filter window to filter the spectrum data, and does not consider the difference in the interference degree of soil at different positions in different wave bands, so that the spectrum data after filtering still has a large error, and the accuracy of the finally obtained soil organic carbon density measurement result is low. SUMMARY
[0004] In order to solve the above technical problems, the purpose of the application is to provide a soil organic carbon density measurement method and device, and the technical scheme adopted is as follows:
[0005] In a first aspect, the application embodiment provides a soil organic carbon density measurement method, which comprises the following steps:
[0006] Spectrum data of soil samples at each sampling point are obtained multiple times, and the measured values of the organic carbon density of the soil samples at each sampling point are obtained;
[0007] Based on the distance between each set of spectral data at each sampling point and other sets of spectral data at the same sampling point, the first feature value of each set of spectral data at each sampling point is obtained. Combined with the correlation between each set of spectral data at each sampling point and the spectral data at its nearest neighboring sampling points, as well as the degree of abnormality of each set of spectral data at each sampling point relative to other sets of spectral data, the interference feature value of each sampling point is obtained.
[0008] Based on the dispersion of reflectance data in the spectral data of neighboring sampling points of each sampling point, as well as the interference characteristic values of each sampling point and its neighboring sampling points, the comprehensive interference coefficient of each sampling point is obtained. Then, the initial value of the preset filtering window of each sampling point is adjusted to filter the spectral data of each sampling point.
[0009] By using the filtered spectral data from each sampling point and the corresponding measured organic carbon density values, an organic carbon density measurement model is obtained, thereby measuring the organic carbon density of the soil at the sampling location.
[0010] Preferably, the process of obtaining the first feature value of each set of spectral data at each sampling point is as follows: all reflectance data in each set of spectral data are arranged in ascending order of their wavelengths to obtain the reflectance sequence of each set of spectral data; the DTW distance between each set of spectral data at each sampling point and the reflectance sequences of other sets of spectral data corresponding to the same sampling point is calculated, and the average of all DTW distances is taken as the first feature value of each set of spectral data at each sampling point.
[0011] Preferably, the formula for calculating the interference feature value of each sampling point is: In the formula, Indicates the first Interference characteristic values of each sampling point; and They represent the first The sampling point of the first sampling point The first and second eigenvalues of the set of spectral data; Indicates the first The sampling point of the first sampling point Weights of the reflectance sequence of a set of spectral data; This represents the number of spectral data sets at the x-th sampling point.
[0012] Preferably, the second characteristic value of each set of spectral data at each sampling point refers to the mean of the absolute values of the Pearson correlation coefficients between each set of spectral data at each sampling point and the reflectance sequences of each set of spectral data at all its nearest neighbor sampling points.
[0013] Preferably, the process of obtaining the weights of the reflectance data of each group of spectral data is as follows: the reflectance sequence of all groups of spectral data at each sampling point is used as the input of the CRITIC algorithm to obtain the weights of the reflectance sequence of each group of spectral data.
[0014] Preferably, the formula for calculating the comprehensive interference coefficient of each sampling point is as follows: In the formula, Indicates the first The overall interference coefficient of each sampling point; Indicates the first Interference characteristic values of each sampling point; Indicates the first The sampling point of the first sampling point Interference characteristic values of the nearest neighbor sampling points; Indicates the first The sampling point of the first sampling point The variance of the reflectance mean sequence of the nearest neighbor sampling points; m represents the total number of nearest neighbor sampling points of the x-th sampling point; where the reflectance mean sequence of each sampling point refers to the sequence composed of the reflectance mean of all groups of spectral data of each sampling point at each wavelength arranged in ascending order according to their corresponding wavelengths.
[0015] Preferably, the calculation formula for adjusting the initial value of the preset filter window for each sampling point is as follows: In the formula, The size of the filter window after adjustment for the x-th sampling point; odd() is the odd-number function; The initial value of the preset filtering window; Set the upper limit of the preset filtering window; This represents the normalized result of the comprehensive interference coefficient at the x-th sampling point.
[0016] Preferably, during the process of filtering the spectral data of each sampling point, the size of the filtering window for each sampling point is the calculated and adjusted size of the filtering window for each sampling point.
[0017] Preferably, the specific process of obtaining the organic carbon density measurement model to measure the organic carbon density of the soil at the test location is as follows:
[0018] Each set of spectral data is divided into multiple bands, and the mean reflectance of all filtered spectral data at each sampling point in each band is calculated.
[0019] The mean reflectance of all sampling points in each band is arranged in the order of their sampling point numbers to obtain the reflectance filter sequence of each band. The measured organic carbon density of all sampling points is arranged in the order of their sampling point numbers to obtain the organic carbon density sequence.
[0020] a Pearson correlation coefficient between the reflectance filtering sequence and the organic carbon density sequence in each wave band is calculated, and a wave band with an absolute value of the Pearson correlation coefficient greater than or equal to a preset correlation threshold is recorded as a sensitive wave band;
[0021] spectrum data of all sensitive wave bands of all sampling points and corresponding measured values of the organic carbon density are taken as inputs of the random forest model to obtain an organic carbon density measurement model;
[0022] spectrum data of the soil at the to-be-measured position is input into the organic carbon density measurement model to obtain the organic carbon density of the soil at the to-be-measured position.
[0023] In a second aspect, the embodiments of the present application further provide a soil organic carbon density measurement device, which comprises a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements the steps of the soil organic carbon density measurement method according to any one of the above aspects when executing the computer program.
[0024] The present application has at least the following beneficial effects:
[0025] The present application provides a soil organic carbon density measurement method and device, which measures the organic carbon density of soil by using the correlation between soil reflectance spectrum data and the organic carbon density, and by comprehensively comparing and analyzing the interference degree differences of spectrum data of the same sampling point and neighboring sampling points, constructing a comprehensive interference coefficient to accurately represent the interference degree of each sampling point, adjusting the filtering window size of each sampling point based on the comprehensive interference coefficient, making the filtered spectrum data more accurate, and thus improving the measurement accuracy of the soil organic carbon density. BRIEF DESCRIPTION OF DRAWINGS
[0026] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0027] Figure 1 A step flowchart of a soil organic carbon density measurement method provided by an embodiment of the present application;
[0028] Figure 2 A flowchart of obtaining the adjusted filtering window size of each sampling point provided by an embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to further illustrate the technical means and effects taken by the present application to achieve the predetermined object of the application, the specific implementation, structure, characteristics and effects of the soil organic carbon density measurement method and device according to the present application are described in detail as follows in combination with the drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.
[0030] Unless otherwise defined, 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.
[0031] The specific scheme of the soil organic carbon density measurement method and device provided by the present application is described in detail below in combination with the drawings.
[0032] Please refer to Figure 1 which shows the step flowchart of the soil organic carbon density measurement method provided by one embodiment of the present application, which includes the following steps:
[0033] Step one: multiple times of acquiring the spectral data of the soil samples of each sampling point, and acquiring the measured value of the organic carbon density of the soil samples of each sampling point.
[0034] In the research area of soil organic carbon density, the method of stratified random sampling is used to set the monitoring sampling points. Specifically, first, the area is divided according to the soil type (such as black soil or moist soil), the terrain (slope and flat land) or the land use type (farmland and forest land). For each divided area, sampling points are arranged according to a 50m×50m grid. Soil samples within the depth range of 0~20cm are collected at each sampling point. The soil samples collected each time are mixed by 3 repeated samplings to avoid the influence of accidental factors. The position information (latitude and longitude) of the corresponding sampling point is recorded.
[0035] Further, for the soil samples collected at different sampling points, the spectrometer is used to obtain the spectral data of the soil samples, and the specific collection process is carried out in a darkroom. A 50W halogen lamp is used as a light source, and the optical fiber probe is vertically 15cm away from the surface of the soil sample. n groups of spectral data of the soil sample at each sampling point are collected, and n is 10 in this embodiment. The spectral data refers to the reflectivity data at different wavelengths. On the other hand, the measured value of the organic carbon density of the soil sample at each sampling point is collected, including measuring the bulk density by using the cutting ring method, measuring the organic carbon content by using the potassium dichromate oxidation method, and measuring the gravel volume ratio of the soil sample by using the screening method. Based on the measured parameters, the measured value of the soil organic carbon density of the soil sample at each sampling point is calculated. The process of calculating the organic carbon density by the bulk density, the organic carbon content and the gravel ratio is known to those skilled in the art, and the specific process will not be described here.
[0036] Step two: according to the distance between each group of spectral data of each sampling point and other groups of spectral data of the same sampling point, the first characteristic value of each group of spectral data of each sampling point is obtained, and the correlation degree between each group of spectral data of each sampling point and each group of spectral data of its neighboring sampling point is obtained, and the abnormal degree of each group of spectral data of each sampling point relative to other groups of spectral data is obtained. The interference characteristic value of each sampling point.
[0037] In the process of measuring and detecting the soil organic carbon density by using the reflectance spectral data, the uneven distribution of particles in the soil sample will cause large differences in the fluctuation and change of the spectral reflectivity, and thus mask the spectral signal of the organic carbon. In general, the particle distribution in the soil sample obtained at different sampling points is different, and there is instrument noise interference in the actual collection process, which causes the reflectance spectral data of the soil sample at different sampling points to have the characteristics of large fluctuation and change difference and random high-frequency interference, so that the quality of the collected spectral data of the soil sample is low.
[0038] Based on the above analysis, 10 groups of spectral data are obtained for the soil sample at each sampling point. For each group of spectral data, the distribution characteristics difference under the influence of particle distribution and instrument interference during the collection of each group of spectral data leads to large differences in the fluctuation and change characteristics of the reflectivity at different wavebands of the actually collected spectral data. Therefore, for the spectral data difference of the same sampling point and the spectral data characteristic comparison difference between its neighboring sampling points, the spectral data of the soil sample obtained at each sampling point is optimized and processed, and the specific processing and analysis process is as follows.
[0039] First, for each sampling point to obtain each group of spectral data, all the reflectance data in each group of spectral data is arranged in order of wavelength from small to large, to obtain the reflectance sequence of each group of spectral data. Due to the difference of soil particle distribution and the random high frequency interference characteristics of instrument interference, the reflection characteristics under different wave bands are quite different; therefore, based on the change difference of the spectral data collected multiple times at the same sampling point and the reflection characteristic correlation characteristics between different sampling points, the reflection characteristic deviation under different wavelengths caused by interference during the collection process is analyzed.
[0040] Specifically, taking the i-th group of spectral data of the x-th sampling point as an example, the DTW distance between the i-th group of spectral data of the x-th sampling point and the reflectance sequence of the other groups of spectral data corresponding to the same sampling point is calculated, and the mean of all DTW distances is taken as the first eigenvalue of the i-th group of spectral data of the x-th sampling point. The larger the first eigenvalue is, the greater the possibility of large data deviation of the group of spectral data due to local interference during the actual collection process. Further, considering the consistent change characteristics of the reflection characteristics of the soil samples of the neighboring sampling points, the position information of all sampling points is taken as input, and K nearest neighbor algorithm is used to obtain K nearest neighbor sampling points of each sampling point, and the value of K is 8 in this embodiment. The absolute value of the Pearson correlation coefficient between the i-th group of spectral data of the x-th sampling point and the reflectance sequence of each group of spectral data of each nearest neighbor sampling point is calculated, and the mean of all absolute values is taken as the second eigenvalue of the i-th group of spectral data of the x-th sampling point. The smaller the second eigenvalue is, the more significant the difference between the i-th group of spectral data of the x-th sampling point and the spectral data reflection characteristics of its neighboring sampling points, and the more likely the i-th group of spectral data of the x-th sampling point is interfered.
[0041] Further, the reflection characteristic difference of the same sampling point under the influence of local interference is comprehensively analyzed, and the deviation degree of the spectral data collected at different times of the same sampling point is considered. Therefore, the reflectance sequence of all groups of spectral data of the x-th sampling point is taken as input, and the weight of the reflectance sequence of each group of spectral data is obtained by using CRITIC algorithm. The larger the weight is, the stronger the volatility of the group data itself is, and the lower the correlation degree of the group data relative to other groups of spectral data is, and the more significant the data deviation of the group of spectral data caused by local interference.
[0042] As a preferred embodiment, the interference eigenvalue of each sampling point is obtained according to the first eigenvalue and the second eigenvalue of each group of spectral data of each sampling point, and the abnormal degree of each group of spectral data of each sampling point relative to other groups of spectral data, which is used to represent the interference degree of all spectral data corresponding to each sampling point.
[0043] In this embodiment, the first eigenvalue of the i-th group of spectral data of the x-th sampling point is taken as the interference eigenvalue of the x-th sampling point. The interference eigenvalue of the i-th sampling point is denoted as The specific expression is: ; wherein, denotes the interference eigenvalue of the i-th sampling point; denote the first eigenvalue and the second eigenvalue of the i-th group of spectral data of the i-th sampling point, respectively; denotes the weight of the reflectance sequence of the i-th group of spectral data of the i-th sampling point; denotes the number of groups of spectral data of the i-th sampling point. The greater the calculated
[0044] The greater the calculated , the greater the reflectance difference of the spectral data collected at different times of the i-th sampling point due to reflectance fluctuations and random high-frequency interference in the actual collection process, and the poorer the reflectance consistency between the adjacent sampling points.
[0045] Step three: According to the dispersion degree of the reflectance data in the spectral data of the adjacent sampling points of each sampling point, and the interference eigenvalue of each sampling point and the interference eigenvalue of the adjacent sampling points of each sampling point, the comprehensive interference coefficient of each sampling point is obtained, and then the initial value of the preset filter window of each sampling point is adjusted, so as to filter the spectral data of each sampling point.
[0046] Further, in the spectral data collection process of the soil sample, due to the influence of instrument noise, the spectral data reflectance characteristics of each sampling point and its adjacent sampling points will deviate, therefore, based on the deviation degree of the reflectance characteristics of the adjacent sampling points of each sampling point, the local interference influence degree of the spectral data of each sampling point can be evaluated.
[0047] Specifically, when the spectral data of each sampling point is subjected to random high-frequency interference of the instrument, the reflectance spectral data is prone to random error, and burr or jitter may occur. Therefore, the reflectance mean value of all groups of spectral data corresponding to each wavelength of each sampling point is calculated, and all reflectance mean values are arranged in order of their corresponding wavelengths from small to large to obtain the reflectance mean value sequence of each sampling point.
[0048] As a preferred embodiment, according to the dispersion degree of the reflectance data in the spectral data of the adjacent sampling points of each sampling point, and the interference eigenvalue of each sampling point and the interference eigenvalue of the adjacent sampling points of each sampling point, the comprehensive interference coefficient of each sampling point is obtained, which is used to represent the interference degree of the spectral data of each sampling point.
[0049] In this embodiment, the i-th group of spectral data of the i-th sampling point is denoted as The overall interference coefficient of each sampling point is denoted as . Its specific expression is: In the formula, Indicates the first The overall interference coefficient of each sampling point; Indicates the first Interference characteristic values of each sampling point; Indicates the first The sampling point of the first sampling point Interference characteristic values of the nearest neighbor sampling points; Indicates the first The sampling point of the first sampling point The variance of the mean reflectance sequence of x nearest neighbor sampling points; m represents the total number of nearest neighbor sampling points for each xth sampling point.
[0050] Right now The larger the value, the higher the value. The sampling point of the first sampling point The more significant the discrete characteristics of the reflectance data of the nearest neighbor sampling points due to soil particle distribution and instrument noise interference, the greater the possibility that the x-th sampling point is affected by local interference. The larger the calculated comprehensive interference coefficient, the more significant the differences in reflectance characteristics in different bands due to local particle distribution and random high-frequency interference from the instrument during the detection and analysis of spectral data of soil samples.
[0051] Furthermore, based on the comprehensive interference coefficient of each sampling point, the spectral data of each sampling point is optimized and corrected. Specifically, this embodiment uses the Savitzky-Golay filtering algorithm to correct the spectral data of each collected sampling point. The filter window size in the Savitzky-Golay filtering algorithm is a key parameter; a larger window better suppresses random interference and instrument noise in the data, while a smaller window has weaker noise suppression capabilities and retains more minute fluctuations. Therefore, for sampling points with greater interference, a larger window should be set during data filtering to better suppress noise in the spectral data corresponding to the sampling point.
[0052] As a preferred implementation, the filter window size for each sampling point during the filtering correction process is optimized and adjusted based on the comprehensive interference coefficient of each sampling point. The adjustment relationship is as follows: In the formula, The size of the filter window after adjustment for the x-th sampling point; odd() is the odd-number function used to take odd numbers from the input data; The initial value of the preset filtering window is set to 5 in this embodiment; To prevent data distortion caused by overcorrection, a preset upper limit for the filtering window is set to 15 in this embodiment. a normalized result of the comprehensive interference coefficient of the xth sampling point. The acquisition process of the adjusted filter window size of each sampling point is as shown in Figure 2
[0053] That is, the greater the comprehensive interference coefficient, the more significant the interference degree of the spectral data of the corresponding sampling point, the more noise in the spectral data, and the greater the filter window size of the sampling point should be set to reduce the influence of noise on the spectral data.
[0054] Each set of spectral data obtained by each sampling point is respectively taken as the input of the Savitzky-Golay filtering algorithm, and the spectral data of each sampling point is filtered, wherein the filter window size of each sampling point adopts the adjusted filter window size of each sampling point calculated, to obtain the spectral data after filtering processing of each sampling point. Thus, the interference influence of particle distribution and instrument noise on the spectral data is reduced, and the accuracy of the reflectance spectrum data is improved. The Savitzky-Golay filtering algorithm is known to those skilled in the art, and the specific process will not be described in detail.
[0055] Step four: using the spectral data after filtering processing of each sampling point and the corresponding measured value of organic carbon density, an organic carbon density measurement model is obtained, so as to measure the organic carbon density of the soil at the to-be-measured position.
[0056] Based on the above processing, the spectral data after filtering processing of the soil samples of different sampling points is obtained, and the spectral data bands are uniformly divided based on the detection range of the spectrometer. Specifically, in an embodiment of the present application, the number of divided bands is 500. Further, according to the spectral data after filtering processing of each sampling point and the pre-measured soil organic carbon density, a data set is constructed, which is used for subsequent training of a neural network model capable of measuring soil organic carbon density. In the spectral data after filtering processing, the reflectivity data of some bands has little correlation with the soil organic carbon density, and each sampling point contains multiple sets of spectral data, so the data is redundant and the data dimension is complex. Therefore, the data of the bands capable of representing the soil organic carbon density needs to be selected from the spectral data after filtering processing, so that the spectral data in the constructed data set can more accurately reflect the change of the soil organic carbon density, and the model prediction accuracy is improved.
[0057] The greater the correlation between the reflectivity of each waveband of each sampling point and the measured value of soil organic carbon density, the more significant the influence of soil organic carbon density on the reflectivity of the waveband, and the more effectively the reflectivity of the waveband reflects the level of soil organic carbon density. Therefore, the mean reflectivity of all the filtered spectral data of each sampling point at each waveband is calculated, the mean reflectivity of all the sampling points at each waveband is arranged in order of the sampling point number to obtain a reflectivity filtering sequence of each waveband, and the measured values of the organic carbon density of all the sampling points are arranged in order of the sampling point number to obtain an organic carbon density sequence; the Pearson correlation coefficient between the reflectivity filtering sequence at each waveband and the organic carbon density sequence is calculated, and the waveband with an absolute value of the Pearson correlation coefficient greater than or equal to a preset correlation threshold is recorded as a sensitive waveband. In this embodiment, the preset correlation threshold is set to 0.7.
[0058] Further, the dataset composed of the spectral data of all the sensitive wavebands of all the sampling points and the corresponding measured values of the organic carbon density is taken as a total dataset, and the total dataset is divided into a training set and a test set according to a ratio of 7:3; a random forest model is used for model training for measuring soil organic carbon density based on spectral data, wherein the loss function is a mean square error function, and the optimizer is an Adam optimizer, and the soil organic carbon density measurement model based on soil spectral data is obtained after the training is completed, and the specific model training process is known to those skilled in the art and will not be described here.
[0059] Based on the above trained model, the soil organic carbon density is measured, and the specific measurement process is as follows: spectral data of a soil sample at a to-be-measured position is collected, and the collected spectral data is filtered by using the spectral data filtering process in this application, the spectral data of the filtered sensitive waveband is input into the trained model, and the organic carbon density data of the soil sample at the to-be-measured position is obtained through the model; in addition, to improve the reliability of the soil organic carbon density measurement, the spectral data of the same to-be-measured position is collected multiple times, and the mean value of the multiple soil organic carbon density measurement results is taken as the final soil organic carbon density measurement value. In this embodiment, the number of data collection times of the same to-be-measured position is 10. Furthermore, the measured value and the measurement value of the model are compared regularly, the deviation between the measured value and the measurement value is calculated, and the model is fine-tuned. Specifically, new training samples can be added to improve the detection accuracy.
[0060] Based on the same inventive concept as the above method, the embodiment of the present application also provides a soil organic carbon density measurement device, which comprises a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements the steps of any one of the above soil organic carbon density measurement methods when executing the computer program.
[0061] It should be noted that the above-mentioned order of the embodiments of the present application is merely for description, and does not represent the advantages and disadvantages of the embodiments. Moreover, the above-mentioned describes the specific embodiments of the present application. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are also possible or can be advantageous.
[0062] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments.
[0063] The above-mentioned is only the preferred embodiment of the present application, and does not limit the present application. Any modification, equivalent replacement, improvement, etc. made within the principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method of measuring soil organic carbon density, characterized by, The method includes the following steps: Spectral data of soil samples from each sampling point were acquired multiple times, and the measured values of organic carbon density of soil samples from each sampling point were obtained. Based on the distance between each set of spectral data at each sampling point and other sets of spectral data at the same sampling point, the first feature value of each set of spectral data at each sampling point is obtained. Combined with the correlation between each set of spectral data at each sampling point and the spectral data at its nearest neighboring sampling points, as well as the degree of abnormality of each set of spectral data at each sampling point relative to other sets of spectral data, the interference feature value of each sampling point is obtained. Based on the dispersion of reflectance data in the spectral data of neighboring sampling points of each sampling point, as well as the interference characteristic values of each sampling point and its neighboring sampling points, the comprehensive interference coefficient of each sampling point is obtained. Then, the initial value of the preset filtering window of each sampling point is adjusted to filter the spectral data of each sampling point. By using the filtered spectral data from each sampling point and the corresponding measured organic carbon density, an organic carbon density measurement model is obtained, thereby measuring the organic carbon density of the soil at the sampling location. The process of obtaining the first feature value of each set of spectral data at each sampling point is as follows: arrange all reflectance data in each set of spectral data in ascending order of wavelength to obtain the reflectance sequence of each set of spectral data; calculate the DTW distance between each set of spectral data at each sampling point and the reflectance sequences of other sets of spectral data corresponding to the same sampling point, and take the average of all DTW distances as the first feature value of each set of spectral data at each sampling point. The calculation formula of the interference eigenvalue of each sampling point is: ; In the formula, Indicates the first Interference characteristic values of each sampling point; and They represent the first The sampling point of the first sampling point The first and second eigenvalues of the set of spectral data; Indicates the first The sampling point of the first sampling point Weights of the reflectance sequence of a set of spectral data; This represents the number of spectral data sets at the x-th sampling point; The second characteristic value of each set of spectral data at each sampling point refers to the mean of the absolute values of the Pearson correlation coefficients between each set of spectral data at each sampling point and the reflectance sequences of each set of spectral data at all its nearest neighboring sampling points. The process of obtaining the weights of the reflectance data of each group of spectral data is as follows: the reflectance sequence of all groups of spectral data at each sampling point is used as the input of the CRITIC algorithm to obtain the weights of the reflectance sequence of each group of spectral data; The formula for calculating the overall interference coefficient of each sampling point is as follows: In the formula, Indicates the first The overall interference coefficient of each sampling point; Indicates the first Interference characteristic values of each sampling point; Indicates the first The sampling point of the first sampling point Interference characteristic values of the nearest neighbor sampling points; Indicates the first The sampling point of the first sampling point The variance of the reflectance mean sequence of the nearest neighbor sampling points; m represents the total number of nearest neighbor sampling points of the x-th sampling point; where the reflectance mean sequence of each sampling point refers to the sequence composed of the reflectance mean of all groups of spectral data of each sampling point at each wavelength arranged in ascending order according to their corresponding wavelengths; The calculation formula for adjusting the preset filter window initial value of each sampling point is: ; wherein, is the adjusted filter window size of the xth sampling point; odd() is an odd function; is the preset filter window initial value; is the preset filter window upper limit; represents the normalized result of the comprehensive interference coefficient of the xth sampling point.
2. The method of claim 1, wherein, During the filtering process of the spectral data of each sampling point, the size of the filtering window for each sampling point is the adjusted size of the filtering window for each sampling point obtained through calculation.
3. The method of claim 1, wherein, The specific process of obtaining the organic carbon density measurement model and measuring the organic carbon density of the soil at the test location is as follows: Each set of spectral data is divided into multiple bands, and the mean reflectance of all filtered spectral data at each sampling point in each band is calculated. The mean reflectance of all sampling points in each band is arranged in the order of their sampling point numbers to obtain the reflectance filter sequence of each band. The measured organic carbon density of all sampling points is arranged in the order of their sampling point numbers to obtain the organic carbon density sequence. Calculate the Pearson correlation coefficient between the reflectance filter sequence and the organic carbon density sequence in each band, and define the bands whose absolute value of the Pearson correlation coefficient is greater than or equal to the preset correlation threshold as sensitive bands; The spectral data of all sensitive bands of all sampling points and the corresponding measured values of organic carbon density are used as inputs to the random forest model to obtain the organic carbon density measurement model. The spectral data of the soil at the to-be-tested position is input into the organic carbon density measurement model to obtain the organic carbon density of the soil at the to-be-tested position.
4. A soil organic carbon density measuring apparatus comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, The processor implements the steps of the soil organic carbon density measurement method according to any one of claims 1-3 when executing the computer program.
Citation Information
Patent Citations
Soil organic carbon content determination method and system
CN119915758A
Lithium battery energy storage system fire-fighting ventilation and explosion venting safety assessment method based on multi-dimensional simulation
CN120372996A