Farmland soil heavy metal inversion method fusing spectrum layering and machine learning

By integrating spectral stratification and machine learning methods, a soil heavy metal inversion model was constructed, which solved the problems of high cost, time-consuming and low accuracy of monitoring of heavy metal concentration in farmland in the existing technology, and achieved high accuracy and low cost and real-time monitoring of the effects.

CN119442864AInactive Publication Date: 2025-02-14INST OF AGRI RESOURCES & REGIONAL PLANNING CHINESE ACADEMY OF AGRI SCI

Patent Information

Application Number
CN202411469503.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-02-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art has problems of high cost, time-consuming and low accuracy when monitoring heavy metal concentrations in farmland soil.

Method used

Using the method of fusion spectral stratification and machine learning, a soil heavy metal inversion model based on calibration sample set and verification sample set is constructed to generate a spatial distribution map of heavy metal predicted concentration in farmland by obtaining the spectral variables to measure the soil. Spatial distribution map.

Benefits of technology

It significantly improves the accuracy of soil heavy metal concentration monitoring, reduces monitoring costs and time, and realizes real-time and accurate monitoring of heavy metal concentrations in large-scale farmland soil.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119442864A_ABST
    Figure CN119442864A_ABST
Patent Text Reader

Abstract

The invention discloses a farmland soil heavy metal inversion method fusing spectrum layering and machine learning, and belongs to the technical field of image processing. The method comprises the following steps: acquiring a to-be-measured spectral variable of soil in a survey area; and inputting the to-be-detected spectrum variable into the soil heavy metal inversion model, generating a heavy metal prediction concentration spatial distribution diagram of the investigation area output by the soil heavy metal inversion model, and constructing the soil heavy metal inversion model based on the calibration sample set and the verification sample set. The calibration sample set and the verification sample set perform stratified sampling determination on a plurality of training samples based on soil component information of sample soil, and the training samples comprise important spectral variables and heavy metal concentrations of the sample soil; and determining a heavy metal concentration spatial distribution diagram of the farmland in the investigation area according to the heavy metal predicted concentration spatial distribution diagram. According to the method, the accuracy of soil heavy metal concentration monitoring is remarkably improved, and the monitoring cost and time are effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of image processing technology, and in particular relates to a method for inverting heavy metals in farmland soil by integrating spectral stratification and machine learning. Background Art

[0002] Heavy metal pollution in farmland soil can have many negative impacts on the ecological environment and human health. Therefore, there is an urgent need to conduct high-precision monitoring of heavy metal concentrations in a large area of ​​farmland soil to achieve early warning of soil pollution and effective risk control.

[0003] At present, the monitoring of heavy metal concentrations in farmland soil mainly relies on collecting a large number of field soil samples and laboratory chemical analysis to determine their heavy metal concentrations. By analyzing the heavy metal concentrations in farmland soil of known samples and combining geostatistical techniques to interpolate the heavy metal concentrations in farmland soil of unsampled areas, the spatial distribution of heavy metal concentrations in farmland soil of the entire survey area can be inferred.

[0004] However, the above method has the disadvantages of high cost, long time consumption and low accuracy. Summary of the invention

[0005] This application aims to solve at least one of the technical problems existing in the prior art. To this end, this application proposes a farmland soil heavy metal inversion method that integrates spectral stratification and machine learning, which significantly improves the accuracy of soil heavy metal concentration monitoring and effectively reduces monitoring costs and time.

[0006] In a first aspect, the present application provides a method for inverting heavy metals in farmland soil by integrating spectral stratification and machine learning, the method comprising:

[0007] Obtain the spectral variables to be measured of the soil in the investigation area;

[0008] Inputting the spectral variables to be measured into a soil heavy metal inversion model, generating a spatial distribution map of the predicted heavy metal concentrations of the survey area output by the soil heavy metal inversion model, wherein the soil heavy metal inversion model is constructed based on a calibration sample set and a validation sample set, wherein the calibration sample set and the validation sample set are determined by stratified sampling of a plurality of training samples based on soil composition information of sample soils, and the training samples include important spectral variables and heavy metal concentrations of the sample soils;

[0009] According to the predicted heavy metal concentration spatial distribution map, the heavy metal concentration spatial distribution map of the farmland in the survey area is determined.

[0010] According to the farmland soil heavy metal inversion method of the present application that integrates spectral stratification and machine learning, a calibration sample set and a verification sample set are obtained through stratified sampling, and the established soil heavy metal inversion model has accurate prediction ability and high generalization performance. This method significantly improves the accuracy of farmland soil heavy metal concentration monitoring in the survey area, reduces monitoring costs and time, and can achieve real-time and accurate monitoring of heavy metal concentrations in a large range of farmland soils, providing a scientific basis for environmental protection and sustainable agricultural development.

[0011] According to one embodiment of the present application, the soil heavy metal inversion model is obtained based on the following steps:

[0012] Acquiring the soil composition information, the heavy metal concentration, the spectral band and the spectral index of a plurality of the sample soils;

[0013] Determine the important spectral variables corresponding to the plurality of soil samples according to the correlation coefficients between the spectral bands, the spectral indices and the heavy metal concentrations of the soil samples, and the importance of the spectral bands and the spectral indices of the soil samples in the inversion of the heavy metal concentrations;

[0014] Determining the calibration sample set and the verification sample set of the sample soil according to the important spectral variables, the heavy metal concentration and the soil composition information of the sample soil;

[0015] The multiple machine learning models are trained by the calibration sample set, and the multiple machine learning models are verified by the verification sample set to construct the optimal soil heavy metal inversion model.

[0016] According to an embodiment of the present application, when the soil composition information includes soil organic matter content or pH value, determining the calibration sample set and the verification sample set of the sample soil according to the important spectral variables, the heavy metal concentration and the soil composition information of the sample soil includes:

[0017] constructing a data set according to the important spectral variables and the heavy metal concentrations of the sample soil;

[0018] Based on the heavy metal concentrations of the sample soils, the data sets corresponding to the plurality of sample soils are sorted and divided into multiple categories;

[0019] Extracting one sample soil corresponding to each category from the divided data set to construct the verification sample set;

[0020] Using the sample soil in the extracted data set as the calibration sample set;

[0021] Based on the soil organic matter content or pH value corresponding to the data set, the calibration sample set and the verification sample set in the data set are stratified to determine the calibration sample set and the verification sample set of the sample soil.

[0022] According to one embodiment of the present application, the multiple machine learning models are trained by the calibration sample set, the multiple machine learning models are verified by the verification sample set, and the optimal soil heavy metal inversion model is constructed, including:

[0023] Obtaining the multiple machine learning models;

[0024] Training the multiple machine learning models using the training samples in the calibration sample set;

[0025] The training samples in the verification sample set are respectively input into each of the machine learning models to evaluate the accuracy of the machine learning models, and the optimal soil heavy metal inversion model is determined from the multiple machine learning models.

[0026] According to one embodiment of the present application, the machine learning model is constructed based on any one of an extreme learning machine algorithm, a random forest algorithm, a light gradient boosting machine algorithm, a cube algorithm, an extreme gradient boosting algorithm and a convolutional neural network algorithm.

[0027] According to one embodiment of the present application, the accuracy evaluation index of the machine learning model includes at least one of the coefficient of determination, the root mean square error, the ratio of model performance to interquartile range, and Lin's consistency correlation coefficient.

[0028] According to an embodiment of the present application, determining the important spectral variables corresponding to the plurality of sample soils according to the correlation coefficient between the spectral band of the sample soil, the spectral index and the heavy metal concentration, and the importance of the spectral band and the spectral index of the sample soil in the inversion of the heavy metal concentration includes:

[0029] Analyzing the Pearson correlation between the spectral band of the sample soil, the spectral index and the heavy metal concentration to obtain a correlation coefficient;

[0030] Analyzing the importance of the spectral band and the spectral index of the sample soil in the inversion of the heavy metal concentration to obtain an importance ranking result;

[0031] Based on the correlation coefficient and the importance ranking result, important spectral variables of the sample soil are determined.

[0032] According to one embodiment of the present application, the spectral band and the spectral index of the sample soil are obtained based on the following steps:

[0033] converting the spectral band of the sample soil into surface reflectance data;

[0034] Performing a first-order differential transformation on the surface reflectance data of the sample soil to obtain a conversion spectral band corresponding to the sample soil;

[0035] A spectral index of the sample soil is extracted in the converted spectral band of the sample soil.

[0036] According to an embodiment of the present application, determining the spatial distribution map of heavy metal concentrations in farmland in the survey area according to the predicted spatial distribution map of heavy metal concentrations includes:

[0037] By interpolating the residuals between the predicted values ​​and the measured values ​​of the heavy metal concentrations, a spatial distribution map of the predicted residuals of the heavy metal concentrations in the survey area is obtained;

[0038] The predicted heavy metal concentration spatial distribution map is superimposed with the corresponding predicted heavy metal concentration residual spatial distribution map to generate a heavy metal concentration spatial distribution map of the survey area;

[0039] The spatial distribution map of heavy metal concentrations in the survey area is mapped to the farmland patch data in the survey area to obtain the spatial distribution map of heavy metal concentrations in the farmland in the survey area.

[0040] In a second aspect, the present application provides a farmland soil heavy metal inversion device integrating spectral stratification and machine learning, the device comprising:

[0041] An acquisition module is used to acquire the spectral variables to be measured of the soil in the survey area;

[0042] A first processing module is used to input the spectral variables to be measured into a soil heavy metal inversion model to generate a spatial distribution map of the predicted heavy metal concentrations of the survey area output by the soil heavy metal inversion model, wherein the soil heavy metal inversion model is constructed based on a calibration sample set and a validation sample set, wherein the calibration sample set and the validation sample set are determined by stratified sampling of a plurality of training samples based on soil composition information of sample soils, and the training samples include important spectral variables and heavy metal concentrations of the sample soils;

[0043] The second processing module is used to determine the spatial distribution map of heavy metal concentrations in the farmland in the survey area according to the predicted spatial distribution map of heavy metal concentrations.

[0044] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the computer program, it implements a method for inverting heavy metals in farmland soil that integrates spectral stratification and machine learning as described in the first aspect above.

[0045] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for inverting heavy metals in farmland soil that integrates spectral stratification and machine learning as described in the first aspect above.

[0046] In a fifth aspect, the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement a method for inverting heavy metals in farmland soil that integrates spectral stratification and machine learning as described in the first aspect.

[0047] In a sixth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements a method for inverting heavy metals in farmland soil by integrating spectral stratification and machine learning as described in the first aspect above.

[0048] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0050] Figure 1 It is a flow chart of a method for inverting heavy metals in farmland soil by integrating spectral stratification and machine learning provided in an embodiment of the present application;

[0051] Figure 2 It is a schematic diagram of the structure of a farmland soil heavy metal inversion device integrating spectral stratification and machine learning provided in an embodiment of the present application;

[0052] Figure 3 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0054] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0055] Heavy metals are stable in the soil and difficult to degrade naturally. Long-term accumulation will lead to soil degradation, ecosystem destruction and biodiversity reduction. Heavy metal pollution not only directly affects soil microorganisms and plant growth, but also spreads through the food chain, threatening food security and human health.

[0056] Therefore, rapid and accurate inversion of heavy metal concentrations in farmland soil is crucial to controlling soil pollution, protecting the ecological environment and ensuring food security.

[0057] The embodiment of the present application provides a method for inverting heavy metals in farmland soil by integrating spectral stratification and machine learning, which can quickly and accurately monitor the concentration of heavy metals in the soil, and provide a scientific basis for accurately grasping the degree of heavy metal pollution in the soil and formulating corresponding solutions.

[0058] In combination with the accompanying drawings, the following detailed description is made of a method for inverting heavy metals in farmland soil integrating spectral stratification and machine learning, a device for inverting heavy metals in farmland soil integrating spectral stratification and machine learning, an electronic device and a readable storage medium provided in an embodiment of the present application through specific embodiments and their application scenarios.

[0059] Among them, a farmland soil heavy metal inversion method integrating spectral stratification and machine learning can be applied to the terminal, and can be specifically executed by hardware or software in the terminal.

[0060] The terminal includes, but is not limited to, a portable communication device such as a mobile phone or tablet computer with a touch-sensitive surface (e.g., a touch screen display and / or a touch pad). It should also be understood that in some embodiments, the terminal may not be a portable communication device, but a desktop computer with a touch-sensitive surface (e.g., a touch screen display and / or a touch pad).

[0061] In the following various embodiments, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, a mouse and a joystick.

[0062] An embodiment of the present application provides a method for inverting heavy metals in farmland soil by integrating spectral stratification and machine learning. The executor of the method may be an electronic device or a functional module or functional entity in the electronic device that can implement the method for inverting heavy metals in farmland soil by integrating spectral stratification and machine learning. The electronic devices mentioned in the embodiment of the present application include but are not limited to mobile phones, tablet computers, computers, cameras, and wearable devices. The following describes an example of an inverting heavy metal method in farmland soil by integrating spectral stratification and machine learning provided in an embodiment of the present application, taking an electronic device as an example of the executor.

[0063] like Figure 1 As shown, the farmland soil heavy metal inversion method integrating spectral stratification and machine learning includes: steps 110 to 130.

[0064] Step 110: Obtain the spectral variables to be measured of the soil in the survey area.

[0065] It is understandable that the spectral variable to be measured can be obtained based on the satellite remote sensing data to be measured collected by satellite remote sensing technology.

[0066] The spectral variables to be measured may include spectral bands and spectral indices.

[0067] Among them, spectral bands can detect and record radiation in a specific wavelength range through remote sensing sensors, and each spectral band covers a specific wavelength range.

[0068] The spectral index is a numerical value calculated based on multiple spectral bands of the satellite remote sensing data to be measured. It is used to extract indicators of specific ground features to enhance the contrast or visibility of some features.

[0069] Satellite remote sensing technology has the advantages of high timeliness, wide coverage and low cost, and can effectively obtain the spatiotemporal dynamic distribution information of heavy metals in soil over a large area.

[0070] In this step, the satellite remote sensing data covering the survey area is obtained. The satellite remote sensing data may include multispectral images, thermal infrared images, radar data, etc.

[0071] The satellite remote sensing data to be measured may be Sentinel-2 satellite data.

[0072] The multispectral image data in the satellite remote sensing data to be measured are subjected to radiometric calibration and atmospheric correction, and the corrected multispectral image data are converted into surface reflectance data. Then, the satellite remote sensing data to be measured that have been subjected to radiometric and atmospheric correction are geometrically corrected using the geographic coordinates measured by the global positioning system (GPS) to accurately calibrate the satellite remote sensing data to the corresponding geographic coordinate system. The satellite remote sensing data to be measured are clipped by the vector boundary of the survey area to obtain the surface reflectance data of the area. Finally, the surface reflectance data that are highly correlated with the heavy metal concentration and have significant importance and the spectral index extracted therefrom are selected as the important spectral variables to be measured.

[0073] The level of correlation can be determined by Pearson correlation analysis, and the importance can be evaluated by the Extreme Gradient Boosting (XGBoost) algorithm.

[0074] Step 120: input the spectral variables to be measured into the soil heavy metal inversion model to generate a spatial distribution map of the predicted heavy metal concentrations in the survey area output by the soil heavy metal inversion model. The soil heavy metal inversion model is constructed based on a calibration sample set and a verification sample set. The calibration sample set and the verification sample set are determined by stratified sampling of multiple training samples based on the soil composition information of the sample soil. The training samples include important spectral variables and heavy metal concentrations of the sample soil.

[0075] Among them, the soil heavy metal inversion model can be used to predict the concentration of one or more heavy metals in the soil. The heavy metal concentration is monitored using arsenic (As) as an example below, which is not regarded as a limitation on the protection scope of the present application. Correspondingly, the heavy metal concentration is the As concentration in the sample soil.

[0076] It is understandable that the soil heavy metal inversion model can be built based on machine learning algorithms, which can effectively mine and analyze patterns and trends in remote sensing data, and provide strong support for the inversion of soil heavy metal concentrations. The soil heavy metal inversion model is constructed by training the calibration sample set and verifying it using the validation sample set. Each training sample contains a set of important spectral variables and heavy metal concentrations of the sample soil. During the calibration and verification process, the soil heavy metal inversion model can identify the quantitative relationship between important spectral variables and heavy metal concentrations, and achieve accurate prediction of soil heavy metal concentrations over a wide range.

[0077] The soil composition information of the sample soil may include soil organic matter (SOM) content and pH value of the sample soil.

[0078] In the process of constructing the calibration sample set and the validation sample set, all training samples are first sorted and divided into multiple categories based on the heavy metal concentration of the sample soil. One training sample is selected from each category as the validation sample set, and the remaining training samples are used as the calibration sample set. Furthermore, the calibration sample set and the validation sample set can be divided into non-overlapping levels based on the soil composition information (such as SOM content or pH value) of each training sample.

[0079] In actual implementation, the spectral variables to be measured in the survey area are input into the soil heavy metal inversion model. The soil heavy metal inversion model performs feature mining on the spectral variables to be measured, predicts the heavy metal concentration in the survey area, and generates the corresponding spatial distribution map as the spatial distribution map of the predicted heavy metal concentration in the survey area.

[0080] Among them, the spatial distribution map of predicted heavy metal concentrations can reflect the spatial distribution of soil heavy metal concentrations in the survey area, for example, the spatial distribution characteristics of As concentration in the survey area.

[0081] Step 130: Determine the spatial distribution map of heavy metal concentrations in the farmland in the survey area based on the predicted spatial distribution map of heavy metal concentrations.

[0082] It can be understood that the farmland in the survey area is the farmland in the survey area. The spatial distribution map of heavy metal concentrations shows the spatial distribution of heavy metal concentrations in the soil of the farmland in the survey area. Different colors, symbols or graphics can be used to represent the differences in As concentrations in different farmlands in the survey area.

[0083] In this step, the predicted spatial distribution map of As concentration in the survey area is mapped to the farmland patch data in the survey area to generate a spatial distribution map of As concentration in the farmland in the survey area as the spatial distribution map of heavy metal concentration in the farmland in the survey area.

[0084] In related technologies, soil heavy metal surveys usually rely on collecting a large number of field soil samples and determining the concentration of heavy metals in the soil through laboratory analysis. Although this method has high accuracy, it has the disadvantages of high cost and long time consumption, and it is difficult to achieve large-scale coverage and real-time monitoring.

[0085] According to a farmland soil heavy metal inversion method that integrates spectral stratification and machine learning provided in the embodiment of the present application, a calibration sample set and a verification sample set are obtained through stratified sampling, and the established soil heavy metal inversion model has accurate prediction ability and high generalization performance. This method significantly improves the accuracy of heavy metal concentration monitoring of farmland soil in the survey area, reduces monitoring costs and time, and can achieve real-time and accurate monitoring of heavy metal concentrations in farmland soil over a large range, providing a scientific basis for environmental protection and sustainable agricultural development.

[0086] In some embodiments, the soil heavy metal inversion model is obtained based on the following steps:

[0087] Obtain soil composition information, heavy metal concentrations, spectral bands and spectral indices of multiple soil samples;

[0088] According to the correlation coefficients between the spectral bands, spectral indices and heavy metal concentrations of the sample soils, as well as the importance of the spectral bands and spectral indices of the sample soils in the inversion of heavy metal concentrations, the important spectral variables corresponding to the multiple sample soils are determined;

[0089] Determine the calibration sample set and the verification sample set of the sample soil according to the important spectral variables, heavy metal concentration and soil composition information of the sample soil;

[0090] Multiple machine learning models are trained through calibration sample sets, and multiple machine learning models are verified through verification sample sets to construct the optimal soil heavy metal inversion model.

[0091] Among them, the spectral band of the sample soil is the surface reflectance information obtained through satellite remote sensing technology, which is used to describe the spectral characteristics of the sample soil at different wavelengths or frequencies.

[0092] The spectral index of the sample soil is a numerical value calculated based on multiple spectral bands of the satellite remote sensing data to be tested. It is used to extract indicators of specific land features to enhance the contrast or visibility of some features.

[0093] The correlation coefficient can be used to characterize the correlation between each band in the spectral band of the sample soil and each spectral index in the spectral index and the heavy metal concentration. The importance is used to characterize the contribution of each band in the spectral band of the sample soil and each spectral index in the spectral index to the inversion of heavy metal concentration.

[0094] The important spectral variables of the sample soil may include spectral variables extracted from the spectral bands and spectral indices of the sample soil, which are highly correlated with the heavy metal concentrations and have significant importance.

[0095] In actual implementation, a grid sampling scheme was used to collect soil samples at a depth of 0-20 cm from agricultural fields without vegetation cover. Five sub-samples were collected within a 10-meter radius of each sampling point, and these sub-samples were mixed as one soil sample. At the same time, the geographical coordinates of each sample were recorded using a handheld GPS device.

[0096] In the laboratory, the soil samples were naturally air-dried and then ground using a 2 mm mesh to remove crop roots, stones and other impurities. They were then further screened using a 0.15 mm polyethylene sieve.

[0097] The sample soil was digested by hot plate acid (HCl–HNO3–HClO4), and then the As concentration was measured by inductively coupled plasma atomic emission spectrometry as the heavy metal concentration of the sample soil. The SOM content of the sample soil was measured by sulfuric acid–potassium dichromate oxidation method, and the pH value was measured by potentiometric method. The SOM content and pH value were used as soil composition information of the sample soil.

[0098] The satellite remote sensing data of the survey area are calibrated by radiation and atmospheric correction, and the multispectral image data are converted into surface reflectance data. Then, the satellite remote sensing data that have been corrected by radiation and atmosphere are geometrically corrected using the geographic coordinates measured by GPS to accurately calibrate the satellite remote sensing data to the corresponding geographic coordinate system. Finally, the satellite remote sensing data are clipped using the vector boundary of the survey area to obtain the preprocessed satellite remote sensing data of the area.

[0099] The satellite remote sensing data may be Sentinel-2 images.

[0100] According to the geographic coordinates of the sample soil sampling points, the surface reflectance data of the corresponding pixels of each sampling point were extracted from the preprocessed satellite remote sensing data of the survey area.

[0101] In some embodiments, the spectral bands and spectral indices of the sample soil are obtained based on the following steps:

[0102] Convert the spectral bands of sample soil into surface reflectance data;

[0103] Perform first-order differential transformation on the surface reflectance data of the sample soil to obtain the conversion spectral band corresponding to the sample soil;

[0104] The spectral index of the sample soil is extracted in the converted spectral band of the sample soil.

[0105] In actual implementation, the surface reflectance data of the sample soil is transformed by first-order differential conversion to enhance the difference in spectral characteristics between the sample soils and obtain the converted spectral band of the sample soil. The first-order differential conversion formula is:

[0106]

[0107] Among them, FD(λ i ) is the band λ i The converted spectral band of the sample soil after the first-order differential; λ i is the i-th band in the spectrum; R λi is the corresponding band λ i The reflectivity value at .

[0108] The spectral indices such as normalized difference vegetation index (NDVI), soil adjusted vegetation index (SAVI), enhanced vegetation index (EVI), normalized difference water index (NDWI), modified normalized water index (MNDWI), normalized difference vegetation index red edge 1 (NDVIre1), normalized difference vegetation index red edge 2 (NDVIre2), normalized difference vegetation index red edge 3 (NDVIre3), chlorophyll index red edge (CIre), clay mineral ratio (CMR) and iron oxide ratio (IOR) were extracted from the converted spectral bands of the sample soil.

[0109] The calculation formula of the spectral index of the sample soil is as follows:

[0110] NDVI=(b8-b4) / (b8+b4)

[0111] EVI=2.5(b8-b4) / (b8+6b4-7.5b2+1)

[0112] NDWI=(b8-b3) / (b8+b3)

[0113] MNDWI=(b3-b11) / (b3+b11)

[0114] NDVIre1=(b8-b5) / (b8+b5)

[0115] NDVI re2=(b8-b6) / (b8+b6)

[0116] NDVI re3=(b8-b7) / (b8+b7)

[0117] CIre=b7 / b5-1

[0118] CMR=b11 / b12

[0119] IOR=b4 / b2

[0120] Among them, b2, b3, b4, b5, b6, b7, b8, b11, and b12 are the blue, green, red, red edge, red edge, red edge, near infrared, short wave infrared, and short wave infrared bands of the satellite remote sensing data of the area where the sample soil is located, respectively.

[0121] In this embodiment, by performing a first-order differential transformation on the surface reflectance data of the sample soil, the difference in spectral characteristics between the sample soils can be enhanced, thereby improving the accuracy and generalization ability of the soil heavy metal inversion model.

[0122] In some embodiments, based on the correlation coefficients between the spectral bands, spectral indices and heavy metal concentrations of the sample soils, and the importance of the spectral bands and spectral indices of the sample soils in the inversion of heavy metal concentrations, important spectral variables corresponding to a plurality of sample soils are determined, including:

[0123] The Pearson correlation between the spectral bands, spectral indices and heavy metal concentrations of the sample soil was analyzed to obtain the correlation coefficient;

[0124] The importance of the spectral bands and spectral indices of the sample soil in the inversion of heavy metal concentrations was analyzed, and the importance ranking results were obtained;

[0125] Based on the correlation coefficients and importance ranking results, the important spectral variables of the sample soil were determined.

[0126] The correlation coefficient is obtained based on the following steps:

[0127] The correlation analysis was performed on the spectral bands, spectral indices and heavy metal concentrations of the sample soil, and the correlation coefficients were calculated.

[0128] In the actual implementation, Pearson correlation analysis was used to calculate the correlation coefficient between each spectral band or spectral index of the sample soil and the As concentration in the soil under the condition of a significance level of 0.05. The correlation coefficient between the i-th band or spectral index and the As concentration r i The calculation formula is:

[0129]

[0130] In the formula, represents the value of the i-th spectral band or spectral index in the j-th sample soil, j = 1, 2, ..., n; represents the average value of all samples of the i-th spectral band or spectral index; s j represents the As concentration of the jth sample soil; It represents the average As concentration of n soil samples.

[0131] In this embodiment, by performing correlation analysis on the spectral bands and spectral indices of the sample soil and the heavy metal concentrations, the spectral bands and spectral indices that are highly correlated with the heavy metal concentrations can be identified, which helps to reduce the complexity of the spectral information and thus improve the explanatory and predictive capabilities of the soil heavy metal inversion model.

[0132] It can be understood that the importance ranking results are ranked from high to low according to their contribution to the prediction ability based on the spectral bands and spectral indices of the sample soil.

[0133] In the actual implementation, the extreme gradient boost (XGBoost) model was used to quantitatively evaluate the importance of each spectral band and spectral index for the prediction of As concentration, with the spectral band and spectral index of the calibration sample set as the independent variable x and the As concentration as the dependent variable y.

[0134] During the model training process, the XGBoost model evaluates the contribution of each spectral band and spectral index to the model's prediction ability by cumulatively calculating the gain of each spectral band and spectral index at the split node, thereby determining the importance of each spectral band and spectral index for the prediction of As concentration.

[0135] After the model training is completed, the feature importance function provided by the XGBoost model is used to sort these spectral bands and spectral indices from high to low. Among them, the splitting gain (Gain) of the jth spectral band or spectral index on the As concentration in the soil is expressed as Gain(j), and its calculation formula is:

[0136]

[0137] Where Gain l and Gain r are the sum of the gradients on the left subset and the right subset respectively; H l and H r are the sum of the second-order derivatives on the left and right subsets, respectively, which are used to approximate the H matrix of the loss function; λ is the regularization term (L2 regularization parameter); γ is the regularization parameter of the XGBoost model, which is used to control the complexity of the split.

[0138] In this embodiment, the spectral band or spectral index with the largest correlation coefficient with the As concentration is first selected, and the spectral band or spectral index is combined with the spectral bands or spectral indices of the top four items sorted by the XGBoost model to determine the final important spectral variables. This method combines correlation analysis with feature importance evaluation, can deeply analyze the relationship between important spectral variables and As concentration, effectively reduce the uncertainty that may be generated by relying on a single method, and improve the reliability and interpretability of the model.

[0139] The sensitivity of soil heavy metals to spectra is usually low, and they are greatly affected by spatial variability and scale dependence, showing strong nonlinear characteristics, which may have a negative impact on the accuracy of the model. At the same time, soil composition information is an important indicator for determining the spatial distribution of soil heavy metals, and the change of soil spectrum can reflect the relationship between soil composition information and heavy metals. Therefore, stratifying heavy metals based on soil composition information is an effective strategy to help better capture the complex association between heavy metals and spectral variables.

[0140] The soil composition information may include soil organic matter (SOM) content and pH value.

[0141] By stratifying sample soils according to this soil composition information, the variability in the data can be reduced, thereby improving the performance of the inversion model.

[0142] Different stratification strategies may have different effects on the performance of the model. In order to select the best stratification strategy to more effectively capture the variability between heavy metals and important spectral variables, a systematic comparison and evaluation of each stratification strategy is needed.

[0143] In some embodiments, when the soil composition information includes soil organic matter content or pH value, determining a calibration sample set and a verification sample set of the sample soil according to important spectral variables, heavy metal concentrations and soil composition information of the sample soil includes:

[0144] The dataset was constructed based on the important spectral variables and heavy metal concentrations of the sample soil;

[0145] Based on the heavy metal concentrations of the sample soils, the data sets corresponding to the multiple sample soils are sorted and divided into multiple categories;

[0146] A sample soil corresponding to each category is extracted from the divided data set to construct a verification sample set;

[0147] The sample soil in the extracted data set is used as the calibration sample set;

[0148] Based on the soil organic matter content or pH value corresponding to the data set, the calibration sample set and the verification sample set in the data set are stratified to determine the calibration sample set and the verification sample set of the sample soil.

[0149] It can be understood that the training sample consists of a spectral band, a spectral index and an As concentration of a sample soil, wherein the As concentration is the label of the training sample.

[0150] All training samples are arranged in ascending order according to their corresponding As concentrations and divided into multiple categories. In each category, one soil sample is selected as the validation sample set, and the remaining soil samples are selected as the calibration sample set. For example, the number of soil samples in the calibration sample set accounts for 75% of the data set, and the number of soil samples in the validation sample set accounts for 25% of the data set.

[0151] When the soil composition information includes soil organic matter (SOM) content, the data set can be stratified according to the SOM content. For example, the calibration sample set and the training samples in the validation sample set in the data set can be divided into three levels according to the SOM content: SOM < 10 g / kg, 10 g / kg ≤ SOM ≤ 20 g / kg, and SOM > 20 g / kg.

[0152] Similarly, when the soil composition information includes pH value, the data set can be stratified according to the pH value. For example, the calibration sample set and the validation sample set are divided into three categories according to the pH value: pH < 5.5, 5.5 ≤ pH ≤ 6.5, and pH > 6.5.

[0153] In this embodiment, through stratified sampling based on soil organic matter (SOM) content, the spatial variability of soil heavy metals can be better captured, so that the soil heavy metal inversion model is suitable for spectral prediction of soil heavy metal concentrations in complex soil environments.

[0154] It is understandable that the spectral variables to be measured of the soil to be measured can be obtained in the same way as the important spectral variables of the sample soil, which will not be described in detail here.

[0155] Machine learning has the ability to automatically extract abstract features in the context of complex variables and can accurately capture the complex relationship between soil heavy metals and spectral features. Without explicit artificial feature engineering, machine learning can directly learn and model from raw spectral data, thereby improving the accuracy of inversion and the robustness of the model. Therefore, combining spectral stratification strategies with machine learning algorithms is crucial to improving the performance of soil heavy metal spectral inversion. By comparing different modeling algorithms and establishing a general model, it is helpful to deeply understand the changing laws of the soil environment.

[0156] In some embodiments, multiple machine learning models are trained by calibration sample sets, multiple machine learning models are verified by verification sample sets, and an optimal soil heavy metal inversion model is constructed, including:

[0157] Get multiple machine learning models;

[0158] Train multiple machine learning models using training samples from the calibration sample set;

[0159] The training samples in the validation sample set were input into each machine learning model respectively to evaluate the accuracy of the machine learning model and determine the optimal soil heavy metal inversion model from multiple machine learning models.

[0160] In some embodiments, the machine learning model can be constructed based on any one of the extreme learning machine (ELM) algorithm, the random forest (RF) algorithm, the light gradient boosting machine (LightGBM) algorithm, the Cubist algorithm, the extreme gradient boosting (XGBoost) algorithm and the convolutional neural network (CNN) algorithm.

[0161] In this embodiment, the machine learning model is constructed by the extreme learning machine (ELM) algorithm, the random forest (RF) algorithm, the light gradient boosting machine (LightGBM) algorithm, the Cubist algorithm, the extreme gradient boosting (XGBoost) algorithm and the convolutional neural network (CNN) algorithm. In the calibration sample set (unstratified), the important spectral variables of the sample soil are used as independent variables, and the As concentration of the sample soil is used as the dependent variable. The machine learning model is trained to construct a global soil heavy metal inversion model.

[0162] In this embodiment, after SOM stratification and pH stratification, the number of available samples in some categories is limited, so convolutional neural network (CNN) modeling is not used, but extreme learning machine (ELM) algorithm, random forest (RF) algorithm, light gradient boosting machine (LightGBM) algorithm, Cubist algorithm and extreme gradient boosting (XGBoost) algorithm are used for modeling. In the correction sample set (stratification), the important spectral variables of the sample soil are used as independent variables, and the As concentration of the sample soil is used as the dependent variable for model training to construct a stratified soil heavy metal inversion model.

[0163] In some embodiments, the accuracy evaluation index of the machine learning model includes the coefficient of determination (R 2 ), root mean square error (RMSE), ratio of model performance to interquartile range (RPIQ), and Lin's consistency correlation coefficient (LCCC).

[0164] In actual implementation, each soil sample in the validation sample set is input into each trained machine learning model in turn. According to the prediction value output by each trained machine learning model, the accuracy of the machine learning model is evaluated using evaluation indicators such as the coefficient of determination (R2), root mean square error (RMSE), ratio of model performance to interquartile range (RPIQ), and Lin's consistency correlation coefficient (LCCC). The calculation formula of the evaluation indicators is as follows:

[0165]

[0166] Where m is the number of training samples in the validation sample set; y j To verify the heavy metal concentration of the jth training sample in the sample set, j = 1, 2, ..., m, To verify the predicted value of the jth training sample in the sample set; is the average value of the heavy metal concentrations of the m training samples in the verification sample set; Q3 is the 75th percentile of the predicted values ​​corresponding to the m training samples, that is, the third quartile; Q1 is the 25th percentile of the predicted values ​​corresponding to the m training samples, that is, the first quartile; is the average value of heavy metal concentrations of m training samples in the validation sample set; is the mean of the predicted values ​​of the m training samples in the validation sample set; ρ is the Pearson correlation coefficient between the measured values ​​and predicted values ​​of the sample heavy metals in the m training samples in the validation sample set; σ y To verify the variance of heavy metal concentrations of m training samples in the sample set; is the variance of the predicted values ​​of m training samples in the validation sample set.

[0167] In actual implementation, by comparing and analyzing the accuracy of six global (non-hierarchical) machine learning models using evaluation indicators, it can be found that the convolutional neural network (CNN) model performs best. It is understandable that as a mainstream deep learning algorithm, the convolutional neural network (CNN) model can effectively extract local features in spectral bands and comprehensively consider the complex correlations between different spectral bands, thereby enhancing the generalization ability of the model and achieving high-precision prediction of As concentration in soil.

[0168] In actual implementation, by comparing and analyzing the accuracy evaluation indicators of five hierarchical machine learning models, it can be found that combining soil organic matter (SOM) stratification with Cubist modeling can provide the best prediction effect, and its prediction accuracy is significantly better than the convolutional neural network (CNN) global model. Therefore, combining soil organic matter (SOM) stratification with Cubist modeling can be used as the optimal soil heavy metal inversion model.

[0169] It is understandable that the soil organic matter (SOM) stratification effectively captures soil characteristics at different levels and enhances the model's sensitivity to changes in heavy metal concentrations. At the same time, the Cubist model flexibly adapts to the nonlinear relationship of these stratified data, improving the interpretability and stability of predictions through simple rules.

[0170] In this embodiment, a high-precision soil heavy metal inversion model was established through the coupling of spectral stratification and machine learning algorithm modeling, which effectively improved the prediction accuracy of soil heavy metal concentrations at the regional scale.

[0171] In some embodiments, determining the spatial distribution map of heavy metal concentrations in farmland in the survey area according to the predicted spatial distribution map of heavy metal concentrations includes:

[0172] By interpolating the residuals between the predicted and measured values ​​of heavy metal concentrations, the spatial distribution map of the predicted residuals of heavy metal concentrations in the survey area was obtained;

[0173] The spatial distribution map of heavy metal concentration prediction is superimposed with the corresponding spatial distribution map of heavy metal concentration prediction residual to generate a spatial distribution map of heavy metal concentration in the survey area;

[0174] The spatial distribution map of heavy metal concentrations in the survey area is mapped to the farmland patch data in the survey area to obtain the spatial distribution map of heavy metal concentrations in the farmland in the survey area.

[0175] In the actual implementation, based on the important spectral variables to be measured, the As concentration in the survey area is predicted by the soil heavy metal inversion model to generate a predicted spatial distribution map of As concentration in the soil of the area.

[0176] The residuals between the predicted and measured As concentrations were interpolated using the Bayesian Kriging (BK) method, and the spatial distribution of the As concentration prediction residuals in the survey area was drawn.

[0177] The predicted spatial distribution map of As concentration in the survey area is superimposed with the corresponding predicted residual spatial distribution map to generate the As concentration spatial distribution map of the survey area.

[0178] The survey area may include a variety of land use types, such as farmland, garden, grassland, forest and construction land. This application takes farmland as an example to illustrate a farmland soil heavy metal inversion method that integrates spectral stratification and machine learning.

[0179] The farmland patch data of the survey area were extracted from the latest national land survey database, and the As concentration spatial distribution map of the survey area was masked using the farmland patch data to obtain the As concentration spatial distribution map of the farmland in the survey area.

[0180] In related technologies, the spatial interpolation method is used to estimate the distribution of heavy metals in unknown locations based on known data. However, the model is simple and highly sensitive to data distribution, and the estimation results have high uncertainty. In particular, when the distribution of heavy metals in soil is complex and affected by multiple factors, traditional interpolation methods may not be able to effectively capture spatial variation.

[0181] In this embodiment, by superimposing the spatial distribution map of heavy metal predicted concentrations generated based on the soil heavy metal inversion model with the corresponding spatial distribution map of predicted residuals, not only the overall prediction trend of the soil heavy metal inversion model is retained, but also the deviation introduced by local errors is corrected, thereby enhancing the accuracy and stability of the spatial distribution map of heavy metal concentrations.

[0182] This application converts the spectral bands, comprehensively uses Pearson correlation analysis and XGBoost model, evaluates the importance of the spectral bands and spectral indices of the sample soil, selects important spectral bands and spectral indices to participate in the training of the machine learning model, and significantly improves the quality of spectral data. In addition, by combining the soil organic matter (SOM) content to stratify the training samples, it can more effectively capture the spatial variability of soil characteristics, and combine with the machine learning algorithm, thereby further improving the accuracy of the soil heavy metal inversion model.

[0183] In an embodiment of the present application, a method for inverting heavy metals in farmland soil that integrates spectral stratification and machine learning is provided, and the execution subject can be a device for inverting heavy metals in farmland soil that integrates spectral stratification and machine learning. In an embodiment of the present application, a device for inverting heavy metals in farmland soil that integrates spectral stratification and machine learning is used to perform a method for inverting heavy metals in farmland soil that integrates spectral stratification and machine learning, to illustrate a device for inverting heavy metals in farmland soil that integrates spectral stratification and machine learning provided in an embodiment of the present application.

[0184] An embodiment of the present application also provides a farmland soil heavy metal inversion device that integrates spectral stratification and machine learning.

[0185] like Figure 2 As shown, the farmland soil heavy metal inversion device integrating spectral stratification and machine learning includes: an acquisition module 210, a first processing module 220 and a second processing module 230.

[0186] An acquisition module 210 is used to acquire the spectral variables to be measured of the soil in the survey area;

[0187] The first processing module 220 is used to input the spectral variables to be measured into the soil heavy metal inversion model, and generate a spatial distribution map of the predicted heavy metal concentrations of the survey area output by the soil heavy metal inversion model, wherein the soil heavy metal inversion model is constructed based on a calibration sample set and a validation sample set, and the calibration sample set and the validation sample set are determined by stratified sampling of multiple training samples based on soil composition information of the sample soil, and the training samples include important spectral variables and heavy metal concentrations of the sample soil;

[0188] The second processing module 230 is used to determine the spatial distribution map of heavy metal concentrations in the farmland in the survey area according to the predicted spatial distribution map of heavy metal concentrations.

[0189] According to the farmland soil heavy metal inversion device that integrates spectral stratification and machine learning provided in the embodiment of the present application, a calibration sample set and a verification sample set are obtained through stratified sampling, and the established soil heavy metal inversion model has accurate prediction ability and high generalization performance. This method significantly improves the accuracy of monitoring the heavy metal concentration of farmland soil in the survey area, reduces the monitoring cost and time, and can realize real-time and accurate monitoring of the heavy metal concentration of farmland soil in a large range, providing a scientific basis for environmental protection and sustainable agricultural development.

[0190] A farmland soil heavy metal inversion device integrating spectral stratification and machine learning in the embodiment of the present application can be an electronic device, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplary, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (Augmented Reality, AR) / virtual reality (Virtual Reality, VR) device, a robot, a wearable device, a super mobile personal computer (Ultra-Mobile Personal Computer, UMPC), a netbook or a personal digital assistant (Personal Digital Assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (Personal Computer, PC), a television (Television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application is not specifically limited.

[0191] In the embodiment of the present application, a farmland soil heavy metal inversion device integrating spectral stratification and machine learning can be a device with an operating system. The operating system can be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0192] The farmland soil heavy metal inversion device provided in the embodiment of the present application that integrates spectral stratification and machine learning can achieve Figure 1 The various processes implemented in the embodiment of a method for inverting heavy metals in farmland soil by integrating spectral stratification and machine learning will not be described here to avoid repetition.

[0193] In some embodiments, Figure 3As shown, an embodiment of the present application also provides an electronic device 300, including a processor 301, a memory 302, and a computer program stored in the memory 302 and executable on the processor 301. When the program is executed by the processor 301, each process of an embodiment of a method for inverting heavy metals in farmland soil by integrating spectral stratification and machine learning is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0194] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.

[0195] An embodiment of the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned embodiment of the farmland soil heavy metal inversion method integrating spectral stratification and machine learning are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0196] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0197] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the above-mentioned farmland soil heavy metal inversion method integrating spectral stratification and machine learning.

[0198] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0199] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, which are coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned embodiment of the farmland soil heavy metal inversion method integrating spectral stratification and machine learning, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0200] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0201] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0202] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application can essentially or partly contribute to the prior art in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including several instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute a method for inverting heavy metals in farmland soil that integrates spectral stratification and machine learning in each embodiment of the present application.

[0203] In the description of this application, "first feature" or "second feature" may include one or more of the features.

[0204] In the description of the present application, “plurality” means two or more.

[0205] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

[0206] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0207] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.

Claims

1. A method for inversion of heavy metals in farmland soil by integrating spectral stratification and machine learning, characterized in that: include: Obtain the spectral variables to be measured of the soil in the investigation area; Inputting the spectral variables to be measured into a soil heavy metal inversion model, generating a spatial distribution map of the predicted heavy metal concentrations of the survey area output by the soil heavy metal inversion model, wherein the soil heavy metal inversion model is constructed based on a calibration sample set and a validation sample set, wherein the calibration sample set and the validation sample set are determined by stratified sampling of a plurality of training samples based on soil composition information of sample soils, and the training samples include important spectral variables and heavy metal concentrations of the sample soils; According to the predicted heavy metal concentration spatial distribution map, the heavy metal concentration spatial distribution map of the farmland in the survey area is determined.

2. The farmland soil heavy metal inversion method integrating spectral stratification and machine learning according to claim 1 is characterized in that: The soil heavy metal inversion model is obtained based on the following steps: Acquiring the soil composition information, the heavy metal concentration, the spectral band and the spectral index of a plurality of the sample soils; Determine the important spectral variables corresponding to the plurality of soil samples according to the correlation coefficients between the spectral bands, the spectral indexes and the heavy metal concentrations of the soil samples, and the importance of the spectral bands and the spectral indexes of the soil samples in the inversion of the heavy metal concentrations; Determining the calibration sample set and the verification sample set of the sample soil according to the important spectral variables, the heavy metal concentration and the soil composition information of the sample soil; The multiple machine learning models are trained by the calibration sample set, and the multiple machine learning models are verified by the verification sample set to construct the optimal soil heavy metal inversion model.

3. The farmland soil heavy metal inversion method integrating spectral stratification and machine learning according to claim 2 is characterized in that: In the case where the soil composition information includes soil organic matter content or pH value, determining the calibration sample set and the verification sample set of the sample soil according to the important spectral variables, the heavy metal concentration and the soil composition information of the sample soil includes: constructing a data set according to the important spectral variables and the heavy metal concentrations of the sample soil; Based on the heavy metal concentrations of the sample soils, the data sets corresponding to the plurality of sample soils are sorted and divided into multiple categories; Extracting one sample soil corresponding to each category from the divided data set to construct the verification sample set; Using the sample soil in the extracted data set as the calibration sample set; Based on the soil organic matter content or pH value corresponding to the data set, the calibration sample set and the verification sample set in the data set are stratified to determine the calibration sample set and the verification sample set of the sample soil.

4. The farmland soil heavy metal inversion method integrating spectral stratification and machine learning according to claim 2 is characterized in that: The method of training a plurality of machine learning models by using the calibration sample set, verifying the plurality of machine learning models by using the verification sample set, and constructing the optimal soil heavy metal inversion model comprises: Obtaining the multiple machine learning models; Training the multiple machine learning models using the training samples in the calibration sample set; The training samples in the verification sample set are respectively input into each of the machine learning models to evaluate the accuracy of the machine learning models, and the optimal soil heavy metal inversion model is determined from the multiple machine learning models.

5. The farmland soil heavy metal inversion method integrating spectral stratification and machine learning according to claim 4 is characterized in that: The machine learning model is constructed based on any one of an extreme learning machine algorithm, a random forest algorithm, a light gradient boosting machine algorithm, a cube algorithm, an extreme gradient boosting algorithm and a convolutional neural network algorithm.

6. The farmland soil heavy metal inversion method integrating spectral stratification and machine learning according to claim 4 is characterized in that: The accuracy evaluation index of the machine learning model includes at least one of the coefficient of determination, root mean square error, ratio of model performance to interquartile range and Lin's consistency correlation coefficient.

7. The farmland soil heavy metal inversion method integrating spectral stratification and machine learning according to claim 2 is characterized in that: Determining the important spectral variables corresponding to the plurality of soil samples according to the correlation coefficient between the spectral band of the soil sample, the spectral index and the heavy metal concentration, and the importance of the spectral band and the spectral index of the soil sample in the inversion of the heavy metal concentration includes: Analyzing the Pearson correlation between the spectral band of the sample soil, the spectral index and the heavy metal concentration to obtain a correlation coefficient; Analyzing the importance of the spectral band and the spectral index of the sample soil in the inversion of the heavy metal concentration to obtain an importance ranking result; Based on the correlation coefficient and the importance ranking result, important spectral variables of the sample soil are determined.

8. The farmland soil heavy metal inversion method integrating spectral stratification and machine learning according to claim 7 is characterized in that: The spectral band and the spectral index of the sample soil are obtained based on the following steps: converting the spectral band of the sample soil into surface reflectance data; Performing a first-order differential transformation on the surface reflectance data of the sample soil to obtain a conversion spectral band corresponding to the sample soil; A spectral index of the sample soil is extracted in the converted spectral band of the sample soil.

9. The farmland soil heavy metal inversion method integrating spectral stratification and machine learning according to claim 1 is characterized in that: Determining the spatial distribution map of heavy metal concentrations in farmland in the survey area according to the predicted spatial distribution map of heavy metal concentrations includes: By interpolating the residuals between the predicted values ​​and the measured values ​​of the heavy metal concentrations, a spatial distribution map of the predicted residuals of the heavy metal concentrations in the survey area is obtained; The predicted heavy metal concentration spatial distribution map is superimposed with the corresponding predicted heavy metal concentration residual spatial distribution map to generate a heavy metal concentration spatial distribution map of the survey area; The spatial distribution map of heavy metal concentrations in the survey area is mapped to the farmland patch data in the survey area to obtain the spatial distribution map of heavy metal concentrations in the farmland in the survey area.

10. A farmland soil heavy metal inversion device integrating spectral stratification and machine learning, characterized in that: include: An acquisition module is used to acquire the spectral variables to be measured of the soil in the survey area; A first processing module is used to input the spectral variables to be measured into a soil heavy metal inversion model to generate a spatial distribution map of the predicted heavy metal concentrations of the survey area output by the soil heavy metal inversion model, wherein the soil heavy metal inversion model is constructed based on a calibration sample set and a validation sample set, wherein the calibration sample set and the validation sample set are determined by stratified sampling of a plurality of training samples based on soil composition information of sample soils, and the training samples include important spectral variables and heavy metal concentrations of the sample soils; The second processing module is used to determine the spatial distribution map of heavy metal concentrations in the farmland in the survey area according to the predicted spatial distribution map of heavy metal concentrations.

Citation Information

Patent Citations

  • Method for establishing soil organic matter spectrum inversion model correction sample set

    CN107132190A

  • Biomass remote sensing mapping method combining random forest and collaborative Kriging

    CN112395808A

  • Soil heavy metal content inversion method fusing multi-source environment variables and spectral information

    CN114814167A

  • Soil texture inversion method based on satellite hyperspectral image

    CN115235997A

  • Method and system for optical and microwave synergistic retrieval of aboveground biomass

    US20200225075A1

Cited By

  • Chinese herbal medicine planting soil detection method and system

    CN120084981A

  • Sewage organic matter concentration online rapid detection method based on deep learning

    CN120992878A

  • Soil metal content detection method for heavy metal soil remediation

    CN122150547A