Soil heavy metal estimation method, device and equipment based on multi-angle reflectivity
By adopting multi -angle reflectivity data and integrating multi -angle stratification learning models in soil heavy metal estimation, the problem of low soil heavy metal estimation accuracy under a single observation angle is solved, and higher soil heavy metal content estimates and accuracy and accuracy and accuracy and accuracy and accuracy of heavy metal content and accuracy and accuracy and accuracy and accuracy of soil heavy metal content and accuracy and accuracy and accuracy and accuracy and accuracy of soil heavy metal content and accuracy and accuracy and accuracy and accuracy and accuracy Model generalization ability.
Patent Information
- Application Number
- CN202411272965.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-09-12
AI Technical Summary
Since heavy metals in soil are trace elements, the spectral response is weak, and the soil surface is only observed using a vertical direction or a single observation angle. The spectral characteristics of heavy metals are easily obscured by soil organic matter, clay minerals and other substances, resulting in the estimation of the soil heavy metal content Not high accuracy.
Using a multi -angle reflectance soil heavy metal estimation method, by determining the representative point in the area to be tested, based on multiple observation orientation angles and multiple observations of the spectral reflectance of the surface soil to collect the surface soil, multi -angle soil reflection is obtained Rate the dataset and estimate the integrated multi -angle learning model of the pre -trained input to obtain the soil heavy metal content value. The model is based on the first layer of random forest model and the second layer of linear regression model.
Through the integration of multi -angle reflectivity data and the construction of machine learning models, the preparation accuracy of soil spectral characteristics of different angles can be effectively extracted, and the estimated accuracy of soil heavy metal content is improved. Stable and generalization of models.
Smart Images

Figure CN118980668B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of soil heavy metal content detection, and in particular to a soil heavy metal estimation method, device and equipment based on multi-angle reflectivity. Background Art
[0002] With the development of social economy, the discharge of industrial waste, the use of pesticides and fertilizers, atmospheric deposition and other issues, the content of heavy metal elements in the soil continues to increase. Accurate estimation of heavy metal content plays a very important role in the classification of soil pollution levels and the effect of remediation and treatment. Visible-near infrared (Vis-NIR) spectroscopy technology is widely used in soil heavy metal pollution investigation and monitoring due to its low cost, easy collection, rapid and non-destructive advantages.
[0003] In the related art, the soil surface is observed in a vertical direction or at a single observation angle. However, the applicant realizes that since heavy metals in soil are trace elements with weak spectral response, the spectral characteristics of heavy metals are easily obscured by soil organic matter, clay minerals and other substances when the soil surface is observed only in a vertical direction or at a single observation angle, making it difficult to obtain a highly accurate and universal estimation model, resulting in low estimation accuracy of the heavy metal content in soil. Summary of the invention
[0004] In view of this, the present application provides a soil heavy metal estimation method, device and equipment based on multi-angle reflectivity, the main purpose of which is to solve the following problem: since soil heavy metals are trace elements with weak spectral response, the spectral characteristics of heavy metals are easily obscured by soil organic matter, clay minerals and other substances when only the soil surface is observed in the vertical direction or at a single observation angle, making it difficult to obtain a highly accurate and universal estimation model, resulting in low estimation accuracy of the soil heavy metal content.
[0005] According to the first aspect of the present application, a soil heavy metal estimation method based on multi-angle reflectivity is provided, the method comprising:
[0006] Determine representative points in the area to be measured, and collect surface soil of a preset depth at the representative points using a collection instrument;
[0007] The spectral reflectance of the surface soil is collected based on multiple observation azimuth angles and multiple observation zenith angles to obtain a multi-angle soil reflectance data set;
[0008] The multi-angle soil reflectance data set is input into a pre-trained integrated multi-angle hierarchical learning model for estimation to obtain the soil heavy metal content value. The integrated multi-angle hierarchical learning model is constructed based on a first-layer random forest model and a second-layer linear regression model.
[0009] Optionally, collecting the spectral reflectance of the surface soil based on multiple observation azimuth angles and multiple observation zenith angles to obtain a multi-angle soil reflectance data set includes:
[0010] Obtaining the surface soil after a first pretreatment, wherein the first pretreatment includes drying, grinding, and screening the surface soil;
[0011] Determine a plurality of observation angles using the plurality of observation azimuth angles and the plurality of observation zenith angles;
[0012] Collecting target soil spectral reflectance data at each observation angle under laboratory conditions to obtain a plurality of target soil spectral reflectance data;
[0013] Acquire target soil spectral reflectance data with an observation zenith angle of 0° from the plurality of target soil spectral reflectance data as soil vertical spectral data;
[0014] The multiple target soil spectral reflectance data and the soil vertical spectral data are used as the multi-angle soil reflectance data set.
[0015] Optionally, the determining a plurality of observation angles using the plurality of observation azimuth angles and the plurality of observation zenith angles comprises:
[0016] For each of the observation azimuth angles, the observation azimuth angle is respectively combined with the multiple observation zenith angles to obtain multiple angles, wherein the observation azimuth angle is one of 0°, 90°, 180°, and 270°, and the multiple observation zenith angles include 0°, 30°, and 60°;
[0017] Based on the combination of each observation azimuth angle and the multiple observation zenith angles, multiple angles corresponding to each observation azimuth angle are obtained, and the multiple angles corresponding to each observation azimuth angle are used as the multiple observation angles.
[0018] Optionally, acquiring the target soil spectral reflectance data at each observation angle under laboratory conditions to obtain a plurality of target soil spectral reflectance data includes:
[0019] For each observation angle, multiple visible light-near infrared spectra are collected on the treated surface soil based on the observation angle under laboratory conditions to obtain multiple soil spectral reflectance data;
[0020] An average value of the plurality of soil spectral reflectance data is calculated, and the average value of the plurality of soil spectral reflectance data is used as the target soil spectral reflectance data at the observation angle.
[0021] Optionally, before inputting the multi-angle soil reflectance dataset into a pre-trained integrated multi-angle hierarchical learning model for estimation, the method further comprises:
[0022] Collecting spectral reflectance of soil samples based on the multiple observation azimuth angles and the multiple observation zenith angles to obtain a soil sample reflectance data set;
[0023] Performing smoothing preprocessing on the soil sample reflectance data set, and randomly dividing the soil sample reflectance data set after the smoothing preprocessing into a training sample set and a verification sample set;
[0024] Obtaining the soil sample after the second pretreatment, wherein the second pretreatment includes drying, grinding, digesting, removing acid, diluting, and fixing the volume of the soil sample;
[0025] Measuring the metal content of the pretreated soil sample using a measuring instrument to obtain the heavy metal content of the soil sample, and using the heavy metal content of the soil sample as a metal element label;
[0026] The integrated multi-angle hierarchical learning model is obtained by training with the training sample set, the verification sample set and the metal element labels.
[0027] Optionally, the step of using the training sample set, the verification sample set and the metal element label to train the integrated multi-angle hierarchical learning model includes:
[0028] The training sample set is divided twice, and based on a five-fold cross-validation method, a first-layer random forest model is constructed using the divided training sample set and the validation sample set;
[0029] Obtain a new training subset and a new validation subset for each observation angle obtained in the process of constructing the first-layer random forest model, obtain multiple new training subsets and multiple new validation subsets, use the multiple new training subsets as new training sample sets, and use the multiple new validation subsets as new validation sample sets;
[0030] Acquire an initial linear regression model, and train the initial linear regression model using the new training sample set and the new verification sample set to obtain a second-layer linear regression model;
[0031] The first-layer random forest model and the second-layer linear regression model are used to construct the integrated multi-angle hierarchical learning model.
[0032] Optionally, the five-fold cross validation method is used to construct a first-layer random forest model using the divided training sample set and the validation sample set, including:
[0033] Determine a plurality of observation angles using the plurality of observation azimuth angles and the plurality of observation zenith angles;
[0034] For each of the observation angles, a target verification sample set corresponding to the observation angle is read from the verification sample set, a target training sample set corresponding to the observation angle is read from the training sample set, and the target training sample set is divided into 5 subsets;
[0035] Obtaining an initial random forest model, and based on the five-fold cross-validation method, using the target validation sample set, validation subset, and training subset to perform cyclic training on the initial random forest model to obtain the random forest model of the observation angle, wherein the validation subset is one subset randomly selected from the five subsets, and the training subset is four subsets randomly selected from the five subsets;
[0036] Acquire multiple training set prediction results outputted in a process of performing cyclic training on the initial random forest model based on the five-fold cross validation method, and use the multiple training set prediction results as new training subsets of the observation angles;
[0037] Obtaining five validation set prediction results outputted during the cyclic training of the initial random forest model based on the five-fold cross-validation method, and taking the average value of the five validation set prediction results as a new validation subset of the observation angle;
[0038] Obtain a random forest model for each of the observation angles to obtain multiple random forest models, and use the multiple random forest models as the first-layer random forest models.
[0039] Optionally, after the first-layer random forest model and the second-layer linear regression model are used to construct the integrated multi-angle hierarchical learning model, the method further includes:
[0040] The training sample set and the verification sample set are input into the integrated multi-angle hierarchical learning model, and the predicted value of soil heavy metal content output by the integrated multi-angle hierarchical learning model is obtained, and the predicted value of soil heavy metal content and the metal element label are used for calculation to obtain the prediction accuracy, wherein,
[0041]
[0042] in, is the prediction accuracy, is the sample size, is the predicted value of soil heavy metal content, is the metal element label, is the observation angle;
[0043] Obtaining a preset model prediction accuracy, and comparing the prediction accuracy with the preset model prediction accuracy;
[0044] If the prediction accuracy is greater than or equal to the preset model prediction accuracy, the integrated multi-angle hierarchical learning model is stored.
[0045] According to a second aspect of the present application, a soil heavy metal estimation device based on multi-angle reflectivity is provided, the device comprising:
[0046] A determination module, used to determine representative points in the area to be measured, and collect surface soil of a preset depth at the representative points based on the collection instrument;
[0047] A calculation module, used for collecting the spectral reflectance of the surface soil based on multiple observation azimuth angles and multiple observation zenith angles to obtain a multi-angle soil reflectance data set;
[0048] The estimation module is used to input the multi-angle soil reflectance data set into a pre-trained integrated multi-angle hierarchical learning model for estimation to obtain the soil heavy metal content value. The integrated multi-angle hierarchical learning model is constructed based on a first-layer random forest model and a second-layer linear regression model.
[0049] Optionally, the calculation module is used to obtain the surface soil after a first pretreatment, the first pretreatment including drying, grinding and screening the surface soil; determining multiple observation angles using the multiple observation azimuths and the multiple observation zenith angles; collecting target soil spectral reflectance data for each of the observation angles under laboratory conditions to obtain multiple target soil spectral reflectance data; obtaining target soil spectral reflectance data with an observation zenith angle of 0° from the multiple target soil spectral reflectance data as soil vertical spectral data; and using the multiple target soil spectral reflectance data and the soil vertical spectral data as the multi-angle soil reflectance data set.
[0050] Optionally, the calculation module is used to combine the observation azimuth with the multiple observation zenith angles for each observation azimuth to obtain multiple angles, where the observation azimuth is one of 0°, 90°, 180°, and 270°, and the multiple observation zenith angles include 0°, 30°, and 60°; based on combining each observation azimuth with the multiple observation zenith angles, obtain multiple angles corresponding to each observation azimuth, and use the multiple angles corresponding to each observation azimuth as the multiple observation angles.
[0051] Optionally, the calculation module is used to perform multiple visible light-near infrared spectrum acquisitions on the treated surface soil based on the observation angle under laboratory conditions for each observation angle to obtain multiple soil spectral reflectance data; calculate the average value of the multiple soil spectral reflectance data, and use the average value of the multiple soil spectral reflectance data as the target soil spectral reflectance data for the observation angle.
[0052] Optionally, the device further comprises:
[0053] The model training module is used to collect the spectral reflectance of the soil sample based on the multiple observation azimuths and the multiple observation zenith angles to obtain a soil sample reflectance data set; perform smoothing preprocessing on the soil sample reflectance data set, and randomly divide the soil sample reflectance data set after the smoothing preprocessing into a training sample set and a verification sample set; obtain the soil sample after a second preprocessing, the second preprocessing includes drying, grinding, digesting, removing acid, diluting, and constant volume treatment of the soil sample; measure the metal content of the pretreated soil sample based on a measuring instrument to obtain the heavy metal content of the soil sample, and use the heavy metal content of the soil sample as a metal element label; use the training sample set, the verification sample set and the metal element label to train to obtain the integrated multi-angle hierarchical learning model.
[0054] Optionally, the model training module is used to perform a secondary division on the training sample set, and based on the five-fold cross-validation method, use the divided training sample set and the verification sample set to construct a first-layer random forest model; obtain a new training subset and a new verification subset for each observation angle obtained in the process of constructing the first-layer random forest model, obtain multiple new training subsets and multiple new verification subsets, use the multiple new training subsets as new training sample sets, and use the multiple new verification subsets as new verification sample sets; obtain an initial linear regression model, use the new training sample set and the new verification sample set to train the initial linear regression model to obtain a second-layer linear regression model; use the first-layer random forest model and the second-layer linear regression model to construct the integrated multi-angle hierarchical learning model.
[0055] Optionally, the model training module is used to determine multiple observation angles using the multiple observation azimuths and the multiple observation zenith angles; for each of the observation angles, read a target verification sample set corresponding to the observation angle in the verification sample set, read a target training sample set corresponding to the observation angle in the training sample set, and divide the target training sample set into 5 subsets; obtain an initial random forest model, and based on the five-fold cross-validation method, use the target verification sample set, the verification subset, and the training subset to perform cyclic training on the initial random forest model to obtain the random forest model of the observation angle, wherein the verification subset is 1 subset randomly selected from the 5 subsets. The method comprises the following steps: obtaining a plurality of training set prediction results outputted during the cyclic training of the initial random forest model based on the five-fold cross-validation method, and taking the plurality of training set prediction results as the new training subset of the observation angle; obtaining five validation set prediction results outputted during the cyclic training of the initial random forest model based on the five-fold cross-validation method, and taking the average of the five validation set prediction results as the new validation subset of the observation angle; obtaining a random forest model for each of the observation angles to obtain a plurality of random forest models, and taking the plurality of random forest models as the first-layer random forest model.
[0056] Optionally, the model training module is used to input the training sample set and the verification sample set into the integrated multi-angle hierarchical learning model, and obtain the predicted value of soil heavy metal content output by the integrated multi-angle hierarchical learning model, and use the predicted value of soil heavy metal content and the metal element label to calculate to obtain the prediction accuracy, wherein,
[0057]
[0058] in, is the prediction accuracy, is the sample size, is the predicted value of soil heavy metal content, is the metal element label, is the observation angle; obtaining the prediction accuracy of the preset model, and comparing the prediction accuracy with the prediction accuracy of the preset model; if the prediction accuracy is greater than or equal to the prediction accuracy of the preset model, storing the integrated multi-angle hierarchical learning model.
[0059] According to a third aspect of the present application, a device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.
[0060] By means of the above technical scheme, the present application provides a soil heavy metal estimation method, device and equipment based on multi-angle reflectivity. The present application determines representative points in the area to be measured, collects surface soil of preset depth at representative points based on the acquisition instrument, collects the spectral reflectivity of the surface soil based on multiple observation azimuths and multiple observation zenith angles, obtains a multi-angle soil reflectivity data set, and inputs the multi-angle soil reflectivity data set into a pre-trained integrated multi-angle hierarchical learning model for estimation to obtain the soil heavy metal content value, wherein the integrated multi-angle hierarchical learning model is constructed based on the first layer random forest model and the second layer linear regression model. Based on the soil multi-angle reflectivity data and the soil heavy metal content data, the machine learning model and the linear model are used to construct the integrated multi-angle hierarchical learning model, retaining and combining the soil spectral features at different angles, thereby achieving a more accurate estimation of the soil heavy metal content, which is higher than the single-layer prediction model established by the existing vertical angle or multi-angle spectral matrix splicing data. Moreover, all the Vis-NIR spectral segments used in the present application can effectively extract the spectral features of each angle, improve the prediction accuracy of the soil heavy metal content, and ensure its stable generalization ability. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0062] Figure 1 A schematic diagram of a method flow for soil heavy metal estimation based on multi-angle reflectivity provided in an embodiment of the present application is shown;
[0063] Figure 2A A schematic diagram of another method flow for estimating soil heavy metals based on multi-angle reflectivity provided in an embodiment of the present application is shown;
[0064] Figure 2B A schematic diagram of an architecture flow of an integrated multi-angle hierarchical learning model provided in an embodiment of the present application is shown;
[0065] Figure 2C A schematic diagram of model prediction scatter points constructed after matrix splicing provided in an embodiment of the present application is shown;
[0066] Figure 2D A schematic diagram of a scatter point prediction of an integrated multi-angle hierarchical learning model provided in an embodiment of the present application is shown;
[0067] Figure 3A A schematic diagram of the structure of soil heavy metal estimation based on multi-angle reflectivity provided in an embodiment of the present application is shown;
[0068] Figure 3B A schematic diagram of the structure of soil heavy metal estimation based on multi-angle reflectivity provided in an embodiment of the present application is shown;
[0069] Figure 4 A schematic diagram of the device structure of a computer device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0070] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0071] The present application embodiment provides a soil heavy metal estimation method based on multi-angle reflectivity, such as Figure 1 As shown, the method includes:
[0072] 101. Determine representative points in the area to be tested, and use the collection instrument to collect surface soil at a preset depth at the representative points.
[0073] Soil is a typical non-Lambertian reflector, and the reflection characteristics in different directions are not exactly the same. Therefore, using a single angle or only using the vertical direction reflectivity cannot fully reflect the soil reflection characteristics and target information. Some scholars have pointed out that the changes in the incident angle and the observation angle have a great impact on the 2 The soil spectral characteristics in space have a strong impact, which further illustrates the scientificity and necessity of multi-angle observation of soil. However, while obtaining multi-angle soil reflectance data, it also increases the data dimension, which increases the complexity and operating cost of the subsequent construction of the soil heavy metal content prediction model. Constructing the model only by matrix splicing increases the target information while also increasing noise interference, making the estimation model have certain ambiguity and uncertainty. Therefore, there is an urgent need for a modeling method that can scientifically and reasonably integrate multi-angle reflectance data, effectively extract soil spectral feature information at different angles, integrate multi-angle reflectance data and construct a universal model to improve the accuracy of soil heavy metal estimation.
[0074] To solve this problem, the present application proposes a soil heavy metal estimation method based on multi-angle reflectivity, taking into account the anisotropic characteristics of the actual soil surface, establishing and based on a multi-angle soil spectral data set, effectively extracting spectral features at each angle, improving the prediction accuracy of soil heavy metal content, and avoiding artificial screening of bands to ensure the generalization ability of the model in practical applications. The execution subject of the present application can be a heavy metal estimation system, which relies on the computing power of the server to provide services to users. The server can be an independent server, or it can provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and servers of basic cloud computing such as big data and artificial intelligence platforms, so that the heavy metal estimation system can realize accurate estimation of soil heavy metal content. In an embodiment of the present application, the heavy metal estimation system determines representative points in the area to be tested, and collects surface soil of a preset depth at the representative point based on the acquisition instrument, such as collecting 0-20cm surface soil.
[0075] 102. The spectral reflectance of the surface soil is collected based on multiple observation azimuth angles and multiple observation zenith angles to obtain a multi-angle soil reflectance data set.
[0076] In an embodiment of the present application, the heavy metal estimation system collects the spectral reflectance of the surface soil based on multiple observation azimuths and multiple observation zenith angles to obtain a multi-angle soil reflectance data set. Compared with the vertical observation angle, the acquisition of soil spectral reflectance data has more or different valid information related to the heavy metal content in the spectra at other non-vertical angles, ensuring the diversity of the input data features of the integrated multi-angle hierarchical learning model.
[0077] 103. The multi-angle soil reflectance data set is input into the pre-trained integrated multi-angle hierarchical learning model for estimation to obtain the soil heavy metal content value.
[0078] In an embodiment of the present application, a heavy metal estimation system inputs a multi-angle soil reflectance data set into a pre-trained integrated multi-angle hierarchical learning model for estimation to obtain soil heavy metal content values, wherein the integrated multi-angle hierarchical learning model is constructed based on a first-layer random forest model and a second-layer linear regression model. Based on soil multi-angle reflectance data and soil heavy metal content data, the present application uses a machine learning model and a linear model to construct an integrated multi-angle hierarchical learning model to solve the problems of high dimensionality of multi-angle reflectance data, low proportion of effective target information, high uncertainty of the estimation model, and poor universality, and improve the estimation accuracy of soil heavy metal content.
[0079] The method provided in the embodiment of the present application determines representative points in the area to be tested, collects surface soil of a preset depth at the representative points based on the acquisition instrument, collects the spectral reflectance of the surface soil based on multiple observation azimuths and multiple observation zenith angles, obtains a multi-angle soil reflectance data set, and inputs the multi-angle soil reflectance data set into a pre-trained integrated multi-angle hierarchical learning model for estimation to obtain the soil heavy metal content value, wherein the integrated multi-angle hierarchical learning model is constructed based on the first layer random forest model and the second layer linear regression model. Based on the soil multi-angle reflectance data and the soil heavy metal content data, a machine learning model and a linear model are used to construct an integrated multi-angle hierarchical learning model, retaining and combining the spectral features of the soil at different angles, thereby achieving a more accurate estimation of the soil heavy metal content, which is higher than the single-layer prediction model established by the existing vertical angle or multi-angle spectral matrix splicing data. Moreover, all the Vis-NIR spectral segments used in this application can effectively extract the spectral features of each angle, improve the prediction accuracy of the soil heavy metal content, and ensure its stable generalization ability.
[0080] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, the embodiment of the present application provides another soil heavy metal estimation method based on multi-angle reflectivity, such as Figure 2A As shown, the method includes:
[0081] 201. The spectral reflectance of soil samples is collected based on multiple observation azimuth angles and multiple observation zenith angles to obtain a soil sample reflectance data set, the soil sample reflectance data set is smoothed and preprocessed, and the soil sample reflectance data set after smoothing and preprocessing is randomly divided into a training sample set and a verification sample set.
[0082] In an embodiment of the present application, a heavy metal estimation system collects spectral reflectances of soil samples based on multiple observation azimuths and multiple observation zenith angles to obtain a soil sample reflectance data set. Specifically, before obtaining multi-angle soil reflectance data, the soil sample needs to be dried, ground, sieved, and loaded into a black sample box, wherein the sieved particle size is ≤2mm. Then, under laboratory conditions, Vis-NIR spectra with observation azimuths of 0°, 90°, 180°, 270°, and observation zenith angles of 0°, 30°, and 60° are obtained. 10 spectral reflectances can be obtained for each observation angle, and the average value of the 10 spectral reflectances is calculated as the spectral reflectance data for the observation angle. Then, the spectral reflectance data with an observation zenith angle of 0° are averaged to obtain soil vertical spectral data, and the spectral reflectance data of each observation angle and the soil vertical spectral data are used as the soil sample reflectance data set. Then, the heavy metal estimation system performs smoothing preprocessing on the soil sample reflectance dataset, and randomly divides the smoothed preprocessed soil sample reflectance dataset into a training sample set and a validation sample set, of which the training set accounts for 75% and the validation set accounts for 25%. Based on the above process, compared with the vertical observation angle, the spectra at other non-vertical angles in the soil spectral reflectance data acquisition stage have more or different effective information related to the heavy metal content in the soil, ensuring the diversity of the input data features of the integrated multi-angle hierarchical learning model, thereby improving the model accuracy.
[0083] 202. The metal content of the pretreated soil sample is measured based on the measuring instrument to obtain the heavy metal content of the soil sample, and the heavy metal content of the soil sample is used as a metal element label.
[0084] In an embodiment of the present application, the heavy metal estimation system obtains a soil sample after a second pretreatment, wherein the second pretreatment operation includes drying, grinding, digesting, removing acid, diluting, and constant volume treatment of the soil sample. Next, the heavy metal estimation system measures the metal content of the pretreated soil sample based on a measuring instrument to obtain the heavy metal content of the soil sample, and uses the heavy metal content of the soil sample as a metal element label, wherein the measuring instrument is an ICP-MS instrument.
[0085] The training sample set is divided twice, and based on the five-fold cross-validation method, the first-layer random forest model is constructed using the divided training sample set and validation sample set.
[0086] Currently, there are few studies on estimating soil heavy metal content by building models using multi-angle reflectance data, and the estimation accuracy of soil heavy metal content cannot be improved by matrix splicing alone. No study has yet proposed an optimized integration method for multi-angle reflectance data of soil heavy metals. For this reason, this application uses machine learning models and linear models to build an Integrated Multi-angle Hierarchical Learning Model (IMHL) based on soil multi-angle reflectance data and soil heavy metal content data, retaining and combining soil spectral features at different angles, thereby achieving a more accurate estimation of soil heavy metal content. Compared with the existing single-layer prediction model established by vertical angle or multi-angle spectral matrix splicing data, the model has higher accuracy, and the model is built based on all Vis-NIR spectral segments to ensure its stable generalization ability.
[0087] In an embodiment of the present application, the heavy metal estimation system divides the training sample set twice, and obtains a five-fold cross-validation method and an initial random forest model. Based on the five-fold cross-validation method, the divided training sample set and the validation sample set are used to train the initial random forest model to obtain a first-layer random forest model. Specifically, the heavy metal estimation system uses multiple observation azimuths and multiple observation zenith angles to determine multiple observation angles, wherein an observation azimuth and an observation zenith angle can determine an observation angle, so that the observation instrument can accurately collect spectral reflectance data at the observation angle, and the observation azimuth is one of 0°, 90°, 180°, and 270°, and the observation zenith angle is one of 0°, 30°, and 60°. For each observation angle, the heavy metal estimation system reads the target validation sample set corresponding to the observation angle in the validation sample set, reads the target training sample set corresponding to the observation angle in the training sample set, and divides the target training sample set into 5 subsets. Next, the heavy metal estimation system randomly selects one subset from the five subsets as a validation subset and four subsets as training subsets, and uses the target validation sample set, validation subset, and training subset to perform cyclic training on the initial random forest model based on the five-fold cross-validation method to obtain a random forest model for the observation angle. In the process of cyclic training of the initial random forest model based on the five-fold cross-validation method, the heavy metal estimation system can obtain multiple training set prediction results output by the model, and use the multiple training set prediction results as the new training subset for the observation angle. At the same time, it can obtain five validation set prediction results output by the model, and use the average of the five validation set prediction results as the new validation subset for the observation angle. Finally, the heavy metal estimation system obtains the random forest model for each observation angle, obtains multiple random forest models, and uses the multiple random forest models as the first-layer random forest model.
[0088] 204. Obtain a new training sample set and a new validation sample set obtained in the process of constructing the first-layer random forest model, and use the new training sample set and the new validation sample set to train the initial linear regression model to obtain a second-layer linear regression model.
[0089] In an embodiment of the present application, the heavy metal estimation system obtains a new training subset and a new verification subset for each observation angle obtained in the process of constructing the first-layer random forest model, obtains multiple new training subsets and multiple new verification subsets, and uses the multiple new training subsets as new training sample sets, and uses the multiple new verification subsets as new verification sample sets. Then the heavy metal estimation system obtains an initial linear regression model, uses the new training sample set and the new verification sample set to train the initial linear regression model, and obtains a second-layer linear regression model. The integrated multi-angle hierarchical learning model constructed based on the first-layer random forest model and the second-layer linear regression model can retain and combine soil spectral characteristics at different angles to achieve a more accurate estimation of the heavy metal content in the soil.
[0090] 205. An integrated multi-angle hierarchical learning model is constructed using the first-layer random forest model and the second-layer linear regression model.
[0091] In the embodiment of the present application, the heavy metal estimation system uses the first layer random forest model and the second layer linear regression model to construct an integrated multi-angle hierarchical learning model. Figure 2B As shown, the construction of the integrated multi-angle hierarchical learning model mainly includes the secondary partitioning of the data set, multi-angle model training and prediction, feature combination, linear model training and linear model prediction stages. The secondary partitioning of the data set is for the soil reflectance data of each observation angle. On the basis of being randomly divided into training sample sets and validation sample sets, the training sample sets are further divided into 5 folds. The training and prediction of the multi-angle model are based on the random forest model and the 5-fold training sample set data that have been divided. After repeating the five-fold cross-validation method for 5 times, a new training sample set with the spectral characteristics of the observation angle is obtained. At the same time, the prediction results of the validation set obtained after 5 cross-validations are averaged to obtain a new validation sample set with the spectral characteristics of the observation angle, where It represents the training set prediction result obtained when training set -1 is used as the validation subset and training set -2 to training set -5 are used as the training subsets for model training for observation angle i in the five-fold cross-validation method. It represents the prediction results of the five validation sets obtained by model training of the target validation sample set at observation angle i. Feature combination is to match the new training sets at different angles (with different angle features) with metal element labels after all the first-layer models have been run. Linear model training is to train the new training sample set using the linear regression model in the second-layer model. The linear model prediction is to predict the new validation sample set based on the linear regression model obtained after training, and finally obtain an integrated multi-angle hierarchical learning model.
[0092] In an optional implementation scheme, the heavy metal estimation system inputs the training sample set and the verification sample set into the integrated multi-angle hierarchical learning model, obtains the predicted value of soil heavy metal content output by the integrated multi-angle hierarchical learning model, and uses the predicted value of soil heavy metal content and the metal element label for calculation to obtain the prediction accuracy, and the calculation formula is as follows: Formula 1:
[0093] Formula 1:
[0094] in, is the prediction accuracy, is the sample size, is the predicted value of soil heavy metal content, For metal element labels, is the observation angle.
[0095] Next, the heavy metal estimation system obtains the prediction accuracy of the preset model and compares the prediction accuracy with the prediction accuracy of the preset model; if the prediction accuracy is greater than or equal to the prediction accuracy of the preset model, the heavy metal estimation system stores the integrated multi-angle hierarchical learning model.
[0096] This application collects 190 soil samples in the field, takes soil arsenic as an example, uses its content as a label, and uses the method to obtain soil multi-angle reflectance data and perform preprocessing. After dividing the samples, the constructed integrated multi-angle hierarchical learning model is used to estimate the heavy metal content. Figure 2C , Figure 2DAs shown, it can be seen that the confidence band of the integrated multi-angle hierarchical learning model is smaller than the width of the confidence band of the matrix splicing model, so the confidence level of the integrated multi-angle hierarchical learning model is better, the model reliability is higher, and the prediction band of the integrated multi-angle hierarchical learning model is also smaller than the width of the prediction band of the matrix splicing model, so the uncertainty of the integrated multi-angle hierarchical learning model is low and the model accuracy is higher. Moreover, compared with the vertical observation angle, the other non-vertical angle spectra in the soil spectral reflectance data acquisition stage have more or different effective information related to the soil heavy metal content, which ensures the diversity of the input data features of the integrated multi-angle hierarchical learning model. Secondly, compared with the modeling accuracy of vertical or other single angles, the integrated multi-angle hierarchical learning model can improve the estimation accuracy. Specifically, the model accuracy of the integrated multi-angle hierarchical learning model is RMSE (Root Mean Square Error) = 5.08 g / mg, while the RMSE of the matrix splicing model is 5.63 g / mg, the RMSE of the vertical direction model is 6.10 g / mg, and the RMSE of the single angle model 0-30 (azimuth-zenith angle) is 5.96 g / mg, 0-60 is 7.41 g / mg, 90-30 is 5.67 g / mg, 90-60 is 6.39 g / mg, 180-30 is 7.00 g / mg, 180-60 is 6.09 g / mg, 270-30 is 5.72 g / mg, and 270-60 is 5.40. g / mg, the range of RMSE is from 0 to positive infinity. The smaller the value, the smaller the prediction error of the model and the stronger the prediction ability of the model. Therefore, the estimation accuracy of the integrated multi-angle hierarchical learning model is higher. Compared with the modeling accuracy of spectral data observed in the vertical direction, the integrated multi-angle hierarchical learning model improves the prediction accuracy by about 17%. Compared with the modeling accuracy after matrix splicing of all angle spectral data, the integrated multi-angle hierarchical learning model improves the prediction accuracy by about 10%. The integrated multi-angle hierarchical learning model proposed in this application takes into account the anisotropic characteristics of the actual soil surface. Based on the multi-angle soil spectral data set, it can effectively extract the spectral features of each angle, improve the prediction accuracy of soil heavy metal content, and avoid artificial screening of bands to ensure the generalization ability of the model in practical applications.
[0097] 206. Determine representative points in the area to be tested, and use a collection instrument to collect surface soil of a preset depth at the representative points.
[0098] In an embodiment of the present application, the heavy metal estimation system determines representative points in the area to be measured, and collects surface soil of a preset depth at the representative points based on a collection instrument, for example, collecting surface soil of 0-20 cm based on the collection instrument.
[0099] 207. The spectral reflectance of the surface soil is collected based on multiple observation azimuth angles and multiple observation zenith angles to obtain a multi-angle soil reflectance data set.
[0100] In an embodiment of the present application, the heavy metal estimation system first obtains the surface soil after the first pretreatment, wherein the first pretreatment includes drying, grinding and screening the surface soil. Then, the heavy metal estimation system uses multiple observation azimuths and multiple observation zenith angles to determine multiple observation angles. Specifically, for each observation azimuth, the heavy metal estimation system combines the observation azimuth with multiple observation zenith angles to obtain multiple angles, wherein the observation azimuth is one of 0°, 90°, 180°, and 270°, and the multiple observation zenith angles include 0°, 30°, and 60°. In this way, each observation azimuth is combined with multiple observation zenith angles to obtain multiple angles corresponding to each observation azimuth, and the multiple angles corresponding to each observation azimuth are used as multiple observation angles. Subsequently, the heavy metal estimation system collects the target soil spectral reflectance data of each observation angle under laboratory conditions to obtain multiple target soil spectral reflectance data. Specifically, for each of the observation angles, the heavy metal estimation system performs multiple visible light-near infrared spectrum acquisitions on the treated surface soil based on the observation angle under laboratory conditions to obtain multiple soil spectral reflectance data, such as repeatedly acquiring spectral reflectance data of the treated surface soil 10 times. Then, the average value of the multiple soil spectral reflectance data is calculated as the target soil spectral reflectance data of the observation angle. Then, the heavy metal estimation system obtains the target soil spectral reflectance data with an observation zenith angle of 0° as the soil vertical spectral data from the multiple target soil spectral reflectance data. Finally, the heavy metal estimation system uses the multiple target soil spectral reflectance data and the soil vertical spectral data as a multi-angle soil reflectance data set.
[0101] 208. The multi-angle soil reflectance data set is input into the pre-trained integrated multi-angle hierarchical learning model for estimation to obtain the soil heavy metal content value.
[0102] In an embodiment of the present application, the heavy metal estimation system inputs a multi-angle soil reflectance data set into a pre-trained integrated multi-angle hierarchical learning model for estimation to obtain the soil heavy metal content value, wherein the integrated multi-angle hierarchical learning model is constructed based on the first-layer random forest model and the second-layer linear regression model. Based on soil multi-angle reflectance data and soil heavy metal content data, the present application uses a machine learning model and a linear model to construct an integrated multi-angle hierarchical learning model, retaining and combining soil spectral features at different angles, thereby achieving a more accurate estimation of soil heavy metal content. Compared with the existing single-layer prediction model established by vertical angle or multi-angle spectral matrix splicing data, it has higher accuracy and can solve the problems of multi-angle reflectance data with multiple dimensions, low proportion of effective target information, high uncertainty of the estimation model, and poor universality. It plays a very important role in the classification of soil pollution levels and the effect of remediation and management.
[0103] The method provided in the embodiment of the present application determines representative points in the area to be tested, collects surface soil of a preset depth at the representative points based on the acquisition instrument, collects the spectral reflectance of the surface soil based on multiple observation azimuths and multiple observation zenith angles, obtains a multi-angle soil reflectance data set, and inputs the multi-angle soil reflectance data set into a pre-trained integrated multi-angle hierarchical learning model for estimation to obtain the soil heavy metal content value, wherein the integrated multi-angle hierarchical learning model is constructed based on the first layer random forest model and the second layer linear regression model. Based on the soil multi-angle reflectance data and the soil heavy metal content data, a machine learning model and a linear model are used to construct an integrated multi-angle hierarchical learning model, retaining and combining the spectral features of the soil at different angles, thereby achieving a more accurate estimation of the soil heavy metal content, which is higher than the single-layer prediction model established by the existing vertical angle or multi-angle spectral matrix splicing data. Moreover, all the Vis-NIR spectral segments used in this application can effectively extract the spectral features of each angle, improve the prediction accuracy of the soil heavy metal content, and ensure its stable generalization ability.
[0104] Further, as Figure 1 The specific implementation of the method, the embodiment of the present application provides a soil heavy metal estimation device based on multi-angle reflectivity, such as Figure 3A As shown, the device includes: a determination module 301, a calculation module 302 and an estimation module 303.
[0105] The determination module 301 is used to determine representative points in the area to be measured, and collect surface soil of a preset depth at the representative points based on the collection instrument;
[0106] A calculation module 302 is used to collect the spectral reflectance of the surface soil based on multiple observation azimuth angles and multiple observation zenith angles to obtain a multi-angle soil reflectance data set;
[0107] The estimation module 303 is used to input the multi-angle soil reflectance data set into a pre-trained integrated multi-angle hierarchical learning model for estimation to obtain the soil heavy metal content value. The integrated multi-angle hierarchical learning model is constructed based on a first-layer random forest model and a second-layer linear regression model.
[0108] In a specific application scenario, the calculation module 302 is used to obtain the surface soil after a first preprocessing, wherein the first preprocessing includes drying, grinding and screening the surface soil; determining multiple observation angles using the multiple observation azimuths and the multiple observation zenith angles; collecting target soil spectral reflectance data for each of the observation angles under laboratory conditions to obtain multiple target soil spectral reflectance data; obtaining target soil spectral reflectance data with an observation zenith angle of 0° from the multiple target soil spectral reflectance data as soil vertical spectral data; and using the multiple target soil spectral reflectance data and the soil vertical spectral data as the multi-angle soil reflectance data set.
[0109] In a specific application scenario, the calculation module 302 is used to combine the observation azimuth with the multiple observation zenith angles for each observation azimuth to obtain multiple angles, where the observation azimuth is one of 0°, 90°, 180°, and 270°, and the multiple observation zenith angles include 0°, 30°, and 60°; based on combining each observation azimuth with the multiple observation zenith angles, multiple angles corresponding to each observation azimuth are obtained, and the multiple angles corresponding to each observation azimuth are used as the multiple observation angles.
[0110] In a specific application scenario, the calculation module 302 is used to perform multiple visible light-near infrared spectrum acquisitions on the processed surface soil based on the observation angle under laboratory conditions for each observation angle to obtain multiple soil spectral reflectance data; calculate the average value of the multiple soil spectral reflectance data, and use the average value of the multiple soil spectral reflectance data as the target soil spectral reflectance data of the observation angle.
[0111] In specific application scenarios, such as Figure 3B As shown, the device also includes: a model training module 304.
[0112] The model training module 304 is used to collect the spectral reflectance of the soil sample based on the multiple observation azimuths and the multiple observation zenith angles to obtain a soil sample reflectance data set; perform smoothing preprocessing on the soil sample reflectance data set, and randomly divide the soil sample reflectance data set after the smoothing preprocessing into a training sample set and a verification sample set; obtain the soil sample after a second preprocessing, the second preprocessing includes drying, grinding, digesting, removing acid, diluting, and constant volume treatment on the soil sample; measure the metal content of the pretreated soil sample based on a measuring instrument to obtain the heavy metal content of the soil sample, and use the heavy metal content of the soil sample as a metal element label; use the training sample set, the verification sample set and the metal element label to train the integrated multi-angle hierarchical learning model.
[0113] In a specific application scenario, the model training module 304 is used to perform a secondary division on the training sample set, and based on the five-fold cross-validation method, use the divided training sample set and the verification sample set to construct a first-layer random forest model; obtain a new training subset and a new verification subset for each observation angle obtained in the process of constructing the first-layer random forest model, obtain multiple new training subsets and multiple new verification subsets, use the multiple new training subsets as new training sample sets, and use the multiple new verification subsets as new verification sample sets; obtain an initial linear regression model, use the new training sample set and the new verification sample set to train the initial linear regression model to obtain a second-layer linear regression model; use the first-layer random forest model and the second-layer linear regression model to construct the integrated multi-angle hierarchical learning model.
[0114] In a specific application scenario, the model training module 304 is used to determine multiple observation angles using the multiple observation azimuths and the multiple observation zenith angles; for each of the observation angles, read a target verification sample set corresponding to the observation angle in the verification sample set, read a target training sample set corresponding to the observation angle in the training sample set, and divide the target training sample set into 5 subsets; obtain an initial random forest model, and based on the five-fold cross-validation method, use the target verification sample set, the verification subset, and the training subset to perform cyclic training on the initial random forest model to obtain a random forest model of the observation angle, wherein the verification subset is randomly selected from the 5 subsets. , wherein the training subsets are 4 subsets randomly selected from the 5 subsets; obtaining multiple training set prediction results output during the cyclic training of the initial random forest model based on the five-fold cross-validation method, and using the multiple training set prediction results as the new training subset for the observation angle; obtaining five validation set prediction results output during the cyclic training of the initial random forest model based on the five-fold cross-validation method, and using the average value of the five validation set prediction results as the new validation subset for the observation angle; obtaining a random forest model for each of the observation angles to obtain multiple random forest models, and using the multiple random forest models as the first-layer random forest models.
[0115] In a specific application scenario, the model training module 304 is used to input the training sample set and the verification sample set into the integrated multi-angle hierarchical learning model, and obtain the predicted value of soil heavy metal content output by the integrated multi-angle hierarchical learning model, and use the predicted value of soil heavy metal content and the metal element label to calculate to obtain the prediction accuracy, wherein,
[0116]
[0117] in, is the prediction accuracy, is the sample size, is the predicted value of soil heavy metal content, is the metal element label, is the observation angle; obtaining the prediction accuracy of the preset model, and comparing the prediction accuracy with the prediction accuracy of the preset model; if the prediction accuracy is greater than or equal to the prediction accuracy of the preset model, storing the integrated multi-angle hierarchical learning model.
[0118] The device provided in the embodiment of the present application determines a representative point in the area to be measured, collects surface soil of a preset depth at the representative point based on a collection instrument, collects the spectral reflectance of the surface soil based on multiple observation azimuths and multiple observation zenith angles, obtains a multi-angle soil reflectance data set, and
[0119] The input is into the pre-trained integrated multi-angle hierarchical learning model for estimation to obtain the soil heavy metal content value, wherein the integrated multi-angle hierarchical learning model is constructed based on the first-layer random forest model and the second-layer linear regression model. Based on the soil multi-angle reflectance data and the soil heavy metal content data, the machine learning model and the linear model are used to construct the integrated multi-angle hierarchical learning model, which retains and combines the soil spectral characteristics at different angles, thereby achieving a more accurate estimation of the soil heavy metal content, which is higher than the single-layer prediction model established by the existing vertical angle or multi-angle spectral matrix splicing data. Moreover, all the Vis-NIR spectral segments used in this application can effectively extract the spectral characteristics of each angle, improve the prediction accuracy of the soil heavy metal content, and ensure its stable generalization ability.
[0120] It should be noted that for other corresponding descriptions of the functional units involved in the soil heavy metal estimation device based on multi-angle reflectivity provided in the embodiment of the present application, reference can be made to Figure 1 and FIG. 2A to FIG. 2D The corresponding description in will not be repeated here.
[0121] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0122] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0123] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
[0124] In an exemplary embodiment, see Figure 4 , and also provides a device, which includes a bus, a processor, a memory and a communication interface, and may also include an input and output interface and a display device, wherein each functional unit can communicate with each other through the bus. The memory stores a computer program, and the processor is used to execute the program stored in the memory and execute the soil heavy metal estimation method based on multi-angle reflectivity in the above embodiment.
[0125] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the soil heavy metal estimation method based on multi-angle reflectivity.
[0126] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by hardware, or by means of software plus necessary general hardware platforms. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.
[0127] Those skilled in the art will appreciate that the accompanying drawings are merely schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily required for implementing the present application.
[0128] Those skilled in the art will appreciate that the modules in the device in the implementation scenario can be distributed in the device in the implementation scenario according to the implementation scenario description, or can be changed accordingly and located in one or more devices different from the implementation scenario. The modules in the above implementation scenario can be combined into one module, or can be further split into multiple sub-modules.
[0129] The above application serial numbers are for description only and do not represent the advantages or disadvantages of the implementation scenarios.
[0130] The above disclosure only discloses several specific implementation scenarios of the present application. However, the present application is not limited thereto, and any changes that can be conceived by technicians in this field should fall within the scope of protection of the present application.
Claims
1. A soil heavy metal estimation method based on multi-angle reflectivity, characterized in that: include: Determine representative points in the area to be measured, and collect surface soil of a preset depth at the representative points using a collection instrument; The spectral reflectance of the surface soil is collected based on multiple observation azimuth angles and multiple observation zenith angles to obtain a multi-angle soil reflectance data set; Inputting the multi-angle soil reflectance data set into a pre-trained integrated multi-angle hierarchical learning model for estimation to obtain a soil heavy metal content value, wherein the integrated multi-angle hierarchical learning model is constructed based on a first-layer random forest model and a second-layer linear regression model; Before inputting the multi-angle soil reflectance data set into a pre-trained integrated multi-angle hierarchical learning model for estimation, the method further includes: Collecting spectral reflectance of soil samples based on the multiple observation azimuth angles and the multiple observation zenith angles to obtain a soil sample reflectance data set; Performing smoothing preprocessing on the soil sample reflectance data set, and randomly dividing the soil sample reflectance data set after the smoothing preprocessing into a training sample set and a verification sample set; Obtaining the soil sample after the second pretreatment, wherein the second pretreatment includes drying, grinding, digesting, removing acid, diluting, and fixing the volume of the soil sample; Measuring the metal content of the pretreated soil sample using a measuring instrument to obtain the heavy metal content of the soil sample, and using the heavy metal content of the soil sample as a metal element label; The integrated multi-angle hierarchical learning model is obtained by using the training sample set, the verification sample set and the metal element label training; The integrated multi-angle hierarchical learning model is obtained by using the training sample set, the verification sample set and the metal element label training, including: The training sample set is divided twice, and based on a five-fold cross-validation method, a first-layer random forest model is constructed using the divided training sample set and the validation sample set; Obtain a new training subset and a new validation subset for each observation angle obtained in the process of constructing the first-layer random forest model, obtain multiple new training subsets and multiple new validation subsets, use the multiple new training subsets as new training sample sets, and use the multiple new validation subsets as new validation sample sets; Acquire an initial linear regression model, and train the initial linear regression model using the new training sample set and the new verification sample set to obtain a second-layer linear regression model; The first-layer random forest model and the second-layer linear regression model are used to construct the integrated multi-angle hierarchical learning model; The second division of the training sample set and the construction of a first-layer random forest model using the divided training sample set and the validation sample set based on a five-fold cross-validation method include: Determine a plurality of observation angles using the plurality of observation azimuth angles and the plurality of observation zenith angles; For each of the observation angles, a target verification sample set corresponding to the observation angle is read from the verification sample set, a target training sample set corresponding to the observation angle is read from the training sample set, and the target training sample set is divided into 5 subsets; Obtaining an initial random forest model, and based on the five-fold cross-validation method, using the target validation sample set, validation subset, and training subset to perform cyclic training on the initial random forest model to obtain the random forest model of the observation angle, wherein the validation subset is one subset randomly selected from the five subsets, and the training subset is four subsets randomly selected from the five subsets; Acquire multiple training set prediction results outputted in a process of performing cyclic training on the initial random forest model based on the five-fold cross validation method, and use the multiple training set prediction results as new training subsets of the observation angles; Obtaining five validation set prediction results outputted during the cyclic training of the initial random forest model based on the five-fold cross-validation method, and taking the average value of the five validation set prediction results as a new validation subset of the observation angle; Obtain a random forest model for each of the observation angles to obtain multiple random forest models, and use the multiple random forest models as the first-layer random forest models.
2. The method according to claim 1, characterized in that The method of collecting the spectral reflectance of the surface soil based on multiple observation azimuth angles and multiple observation zenith angles to obtain a multi-angle soil reflectance data set includes: Obtaining the surface soil after a first pretreatment, wherein the first pretreatment includes drying, grinding, and screening the surface soil; Determine a plurality of observation angles using the plurality of observation azimuth angles and the plurality of observation zenith angles; Collecting target soil spectral reflectance data at each observation angle under laboratory conditions to obtain a plurality of target soil spectral reflectance data; Acquire target soil spectral reflectance data with an observation zenith angle of 0° from the plurality of target soil spectral reflectance data as soil vertical spectral data; The multiple target soil spectral reflectance data and the soil vertical spectral data are used as the multi-angle soil reflectance data set.
3. The method according to claim 2, characterized in that The method of determining a plurality of observation angles by using the plurality of observation azimuth angles and the plurality of observation zenith angles comprises: For each of the observation azimuth angles, the observation azimuth angle is respectively combined with the multiple observation zenith angles to obtain multiple angles, wherein the observation azimuth angle is one of 0°, 90°, 180°, and 270°, and the multiple observation zenith angles include 0°, 30°, and 60°; Based on the combination of each observation azimuth angle and the multiple observation zenith angles, multiple angles corresponding to each observation azimuth angle are obtained, and the multiple angles corresponding to each observation azimuth angle are used as the multiple observation angles.
4. The method according to claim 2, characterized in that: The step of obtaining the target soil spectral reflectance data at each observation angle under laboratory conditions to obtain a plurality of target soil spectral reflectance data includes: For each observation angle, multiple visible light-near infrared spectra are collected on the treated surface soil based on the observation angle under laboratory conditions to obtain multiple soil spectral reflectance data; An average value of the plurality of soil spectral reflectance data is calculated, and the average value of the plurality of soil spectral reflectance data is used as the target soil spectral reflectance data at the observation angle.
5. The method according to claim 1, characterized in that After the first-layer random forest model and the second-layer linear regression model are used to construct the integrated multi-angle hierarchical learning model, the method further includes: The training sample set and the verification sample set are input into the integrated multi-angle hierarchical learning model, and the predicted value of soil heavy metal content output by the integrated multi-angle hierarchical learning model is obtained, and the predicted value of soil heavy metal content and the metal element label are used for calculation to obtain the prediction accuracy, wherein, in, For prediction accuracy, is the sample size, is the predicted value of soil heavy metal content, is the metal element label, is the observation angle; Obtaining a preset model prediction accuracy, and comparing the prediction accuracy with the preset model prediction accuracy; If the prediction accuracy is greater than or equal to the preset model prediction accuracy, the integrated multi-angle hierarchical learning model is stored.
6. A soil heavy metal estimation device based on multi-angle reflectivity, characterized in that: include: A determination module, used to determine representative points in the area to be measured, and collect surface soil of a preset depth at the representative points based on the collection instrument; A calculation module, used for collecting the spectral reflectance of the surface soil based on multiple observation azimuth angles and multiple observation zenith angles to obtain a multi-angle soil reflectance data set; An estimation module, used for inputting the multi-angle soil reflectance data set into a pre-trained integrated multi-angle hierarchical learning model for estimation to obtain a soil heavy metal content value, wherein the integrated multi-angle hierarchical learning model is constructed based on a first-layer random forest model and a second-layer linear regression model; A model training module is used to collect spectral reflectance of soil samples based on the multiple observation azimuth angles and the multiple observation zenith angles to obtain a soil sample reflectance data set; perform smoothing preprocessing on the soil sample reflectance data set, and randomly divide the soil sample reflectance data set after smoothing preprocessing into a training sample set and a verification sample set; Obtain the soil sample after the second pretreatment, wherein the second pretreatment includes drying, grinding, digesting, removing acid, diluting, and fixing the volume of the soil sample; measuring the metal content of the pretreated soil sample based on a measuring instrument to obtain the heavy metal content of the soil sample, and using the heavy metal content of the soil sample as a metal element label; using the training sample set, the verification sample set, and the metal element label to train and obtain the integrated multi-angle hierarchical learning model; The model training module is also used to determine multiple observation angles using the multiple observation azimuths and the multiple observation zenith angles; for each of the observation angles, read a target verification sample set corresponding to the observation angle in the verification sample set, read a target training sample set corresponding to the observation angle in the training sample set, and divide the target training sample set into 5 subsets; obtain an initial random forest model, and based on a five-fold cross-validation method, use the target verification sample set, the verification subset, and the training subset to perform cyclic training on the initial random forest model to obtain a random forest model of the observation angle, wherein the verification subset is one subset randomly selected from the five subsets, and the training subset is four subsets randomly selected from the five subsets; obtain a random forest model based on the five-fold cross-validation method for the initial random forest model Perform multiple training set prediction results output during the cyclic training process, and use the multiple training set prediction results as new training subsets for the observation angles; obtain five validation set prediction results output during the cyclic training of the initial random forest model based on the five-fold cross-validation method, and use the average of the five validation set prediction results as the new validation subset for the observation angle; obtain a random forest model for each of the observation angles to obtain multiple random forest models, and use the multiple random forest models as the first-layer random forest models; obtain a new training subset and a new validation subset for each observation angle obtained during the construction of the first-layer random forest model, and obtain multiple new training subsets and multiple new validation subsets, and use the multiple new training subsets as new training sample sets, and use the multiple new validation subsets as new validation sample sets; An initial linear regression model is obtained, and the initial linear regression model is trained using the new training sample set and the new verification sample set to obtain a second-layer linear regression model; and the first-layer random forest model and the second-layer linear regression model are used to construct the integrated multi-angle hierarchical learning model.
7. A soil heavy metal estimation device based on multi-angle reflectivity, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Soil heavy metal content prediction method based on machine learning and application thereof
CN116187543A
Soil heavy metal spectrum inversion method and system based on PCA and MGWR
CN118130401A