Soil nutrient inversion method and system based on gamma-ray energy spectrum full spectrum
By using full-spectrum information modeling and feature extraction, combined with signal processing and machine learning, the problems of information loss and noise interference in existing gamma-ray spectrum inversion methods have been solved, enabling rapid, accurate inversion and efficient monitoring of soil nutrients.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-04-03
AI Technical Summary
Existing soil nutrient inversion methods based on gamma spectroscopy rely on single-peak count rates, ignoring continuous energy distribution information in the spectrum. This results in insufficient model response to subtle changes in spectral shape, making it difficult to accurately describe the nonlinear relationship between complex soil components and spectral characteristics. Furthermore, these methods are susceptible to noise interference and instrument drift, limiting inversion accuracy and stability.
By employing a full-spectrum information modeling and feature extraction strategy, combined with signal processing techniques and machine learning or deep learning models, a nonlinear mapping between the full-spectrum energy spectrum count distribution and soil nutrient content is established through denoising, normalization, and feature dimensionality reduction.
It enables rapid and accurate prediction of soil nutrients, and is suitable for real-time measurement and spatial distribution mapping of UAVs, ground or vehicle-mounted platforms. It improves inversion accuracy and generalization ability, and provides soil nutrient monitoring with high timeliness and high spatial resolution.
Smart Images

Figure CN121784056A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of soil nutrient inversion and remote sensing detection technology, and particularly relates to a method and system for soil nutrient inversion based on full-spectrum gamma energy information. Background Technology
[0002] Soil nutrient content is an important indicator for measuring farmland fertility and guiding precision fertilization management. Currently, the determination of soil nutrients mainly relies on laboratory chemical analysis methods, such as the Kjeldahl method, atomic absorption spectrometry, and ultraviolet spectrophotometry. Although these methods have high precision, they have problems such as cumbersome sample preparation, long detection cycle, high labor costs, and difficulty in achieving large-area real-time monitoring, which can hardly meet the needs of modern agriculture for high timeliness and high spatial resolution data.
[0003] To improve detection efficiency, soil nutrient retrieval methods based on near-infrared spectroscopy (NIR), visible hyperspectroscopy, and gamma spectroscopy have emerged in recent years; among them, gamma spectroscopy utilizes natural radionuclides (such as...) 40 K, 238 U、 232 The decay characteristics and energy spectrum response of Th can indirectly reflect soil type, mineral composition and fertility level, and have the advantages of being non-destructive, rapid and in-situ measurement.
[0004] However, existing soil inversion methods based on gamma spectroscopy mostly rely on the nuclide concentration characteristics obtained from single-peak count rate inversion, ignoring the continuous energy distribution information contained in the energy spectrum. This method suffers from information loss during feature extraction, resulting in insufficient model response to subtle changes in spectral shape and difficulty in accurately describing the nonlinear relationship between complex soil composition and energy spectrum characteristics. In addition, energy spectrum data are often affected by noise interference and instrument drift, which traditional linear regression or empirical correction methods cannot effectively address, thus limiting the accuracy and stability of inversion.
[0005] In view of the above problems, there is an urgent need for a soil nutrient inversion method that can directly use full-spectrum energy information for modeling, automatically extract features, and suppress the influence of noise. By combining signal processing techniques (such as denoising, normalization, and feature dimensionality reduction) with machine learning or deep learning models, a nonlinear mapping between the full-spectrum energy count distribution and soil nutrient content can be achieved, thereby significantly improving the accuracy and generalization ability of the inversion.
[0006] The "soil nutrient inversion method based on full energy spectrum" proposed in this invention addresses the shortcomings of existing technologies by using full-spectrum information modeling and feature extraction strategies to achieve rapid and accurate prediction of soil nutrients. It is applicable to real-time measurement and spatial distribution mapping of UAVs, ground or vehicle-mounted platforms. Summary of the Invention
[0007] The purpose of this invention is to overcome the shortcomings of the prior art and provide a soil nutrient inversion method and system based on gamma-ray full-spectrum analysis, which can accurately invert the nutrient content of the land while ensuring high timeliness and high spatial resolution accuracy.
[0008] To achieve the above objectives, this invention provides a method for soil nutrient inversion based on the full gamma spectrum, comprising the following steps:
[0009] S1, Energy Spectrum Data Acquisition: Obtain the boundary information of the target plot, scan and measure the soil of the target plot using a gamma spectrometer, and acquire the raw energy spectrum data of each measuring point. The energy spectrum includes... 40 K, 238 U、 232 The full-energy channel response information of the Th natural radionuclide was recorded, along with the time and GPS coordinates of the measurement point.
[0010] S2, Soil sample collection and soil moisture measurement: Soil samples at a certain depth are collected using the five-point sampling method, and soil moisture parameters are measured and recorded. The soil moisture data include soil water content (VWC), dielectric constant and apparent conductivity (EC) for subsequent analysis and characteristic correction.
[0011] S3, Energy Spectrum Data Analysis and Energy Scale: The original gamma energy spectrum file is analyzed and decoded to extract channel count data. Energy scale conversion is performed according to the standard source energy position to convert the channel number into the actual energy value (unit keV). At the same time, denoising and smoothing are performed to suppress statistical noise and retain spectral characteristics.
[0012] S4, Laboratory Nutrient Analysis: The collected soil samples are sent to the laboratory, and the content of their main nutrients is determined by chemical analysis methods. The main nutrient content includes ammonium nitrogen, available phosphorus, available potassium, organic matter and pH value, and soil nutrient label data corresponding to the energy dispersive spectroscopy measurement points are obtained.
[0013] S5, Data matching and training set construction: Based on GPS coordinate information, the energy spectrum data is spatially matched with the soil nutrient data at the corresponding location. After removing outliers, a training dataset is formed. The training dataset includes the full spectrum energy counting features and the corresponding target nutrient content labels.
[0014] S6, Model Training Based on Full Spectrum: For different nutrient types, full spectrum data is used as input features, and a nutrient inversion model is established through model algorithms. The model algorithm includes one of machine learning or deep learning. The model combines feature reduction and feature selection algorithms to optimize input features, improve the model's generalization ability and inversion accuracy. The feature reduction includes one of PCA or UMAP, and the feature selection algorithm includes Boruta.
[0015] S7, Model Application and Inversion Prediction: Using the trained model, nutrient inversion prediction is performed on the energy spectrum data that was not involved in the modeling, and the estimated nutrient content of each measuring point in the target area is obtained. Through spatial interpolation and map visualization methods, a soil nutrient distribution map is generated, providing a basis for agricultural decision-making, fertilization management and plot zoning.
[0016] Furthermore, the gamma spectrometer in S1 is mounted on a drone. The airborne gamma spectrometer can collect energy spectra quickly and over a wide area. After the energy spectra collection is completed, the operation data of the drone under abnormal operating conditions such as turning, repeating paths, or stopping should be deleted.
[0017] Furthermore, in step S2, after the gamma spectrum scan of the land parcel is completed in step S1, the scan data is first spatially filtered according to the land parcel boundaries to remove out-of-bounds and abnormal noise points, thus obtaining a point set. The sample center is calculated as follows:
[0018] ;
[0019] Calculate the Euclidean distance from each point to the center. And sort the indexes in ascending order by distance to obtain the index sequence. To identify spectral anomalies, the total count of the entire spectrum at each point is calculated:
[0020] ;
[0021] The threshold is the mean and standard deviation of the total count. Identify outliers based on a preset number of samples. Representative sampling points were selected using a uniform distance distribution sampling method.
[0022] ;
[0023] Soil samples were collected at each designated sampling location using a five-point sampling method. Simultaneously, soil moisture data were measured around the sampling points using a soil moisture sensor. The soil moisture data included soil water content (VWC), dielectric constant, and apparent conductivity (EC). Among these, soil water content (VWC) reflects the impact of soil moisture changes on the attenuation of the gamma-ray spectral signal; dielectric constant reflects the characteristics of the soil medium and assists in assessing water content and correcting the detection response; and apparent conductivity (EC) describes the differences in soil salinity and conductivity, which has a certain impact on the absorption and scattering of the spectral signal. Soil type, such as black soil or sandy soil, was also recorded.
[0024] Furthermore, in step S3, a standard radioactive source is used to calibrate the gamma spectrometer, and three representative characteristic energy peaks are selected as calibration points. These three representative characteristic energy peaks correspond to radionuclides, respectively. 40 K's characteristic energy peak is 1460 keV; nuclide 214 Bi's characteristic energy peak at 608 keV and nuclides 208 The characteristic energy peak of Tl is 2614 keV. Based on the characteristic energy peaks and channel positions of the three known energies mentioned above, an energy calibration equation is established:
[0025] ;
[0026] For detection systems exhibiting slight nonlinearity, a quadratic polynomial form is used:
[0027] ;
[0028] in Energy (KeV). For channel number, These are the fitting coefficients, which are determined using the least squares method.
[0029] ;
[0030] The calibrated energy spectrum is ,in As an energy channel, The count rate is used to convert the channel number to the energy value (unit: keV), thereby obtaining the energy coordinates of the energy spectrum.
[0031] Furthermore, during laboratory analysis in step S4, the collected soil samples are sent to the laboratory for chemical analysis to obtain soil nutrient data corresponding to the gamma spectroscopy measurement points. After the samples are naturally air-dried, ground, and sieved, the main nutrient indicators are measured sequentially. The main nutrient indicators include ammonium nitrogen (NH4+). + The main nutrient indicators include nitrogen determination by Kjeldahl method, sodium bicarbonate extraction-molybdenum antimony colorimetric method, ammonium acetate extraction-flame photometry method, potassium dichromate external heating oxidation method, or soil-water ratio 1:2.5 suspension method. After standardization, the main nutrient indicators are matched one-to-one with the GPS coordinates of soil sample sampling points and energy dispersive spectroscopy measurement points to form a complete soil nutrient label dataset. The label dataset is used as the target variable for model training to establish a quantitative relationship between the full energy dispersive spectroscopy spectrum and soil nutrient content.
[0032] Furthermore, in step S5, based on the GPS coordinates and unique numbers of each measuring point, the gamma spectral data is spatially matched with the soil nutrient measurement results at the corresponding locations. The spatial matching process sets a location tolerance threshold to ensure the accurate and reliable spatial correspondence between the spectral measuring points and the sampling points. After spatial matching, the soil nutrient measurement results undergo quality control and preprocessing, including:
[0033] Outlier removal: The 3σ method is used to identify and remove data points that significantly deviate from the overall distribution to reduce the interference of abnormal noise on subsequent model training. The judgment criteria are as follows:
[0034] ;
[0035] in, This represents the spectral count value at a single measurement point. The sample mean. Standard deviation;
[0036] Missing value handling: For some missing samples due to sensor malfunction or terrain obstruction, interpolation is used to repair them to ensure data integrity and consistency;
[0037] ;
[0038] Soil moisture parameter correction: Considering the attenuation and scattering effects of soil moisture content (VWC), dielectric constant (ε), and apparent conductivity (EC) on the gamma-ray spectral signal, soil moisture correction and joint modeling are performed on the spectral count values; when performing soil moisture correction, the correction formula is:
[0039] ;
[0040] in, For the original channel count, The fitting function describes the effect of soil moisture parameters on signal attenuation. When performing joint modeling, VWC, ε, and EC are included as auxiliary input features in the model training process to improve the model's adaptability to environmental changes.
[0041] Normalization and standardization: The full spectrum count values of the energy spectrum are processed by standardization to eliminate systematic biases caused by differences in detection efficiency and integration time between different measurement points.
[0042] ;
[0043] The processed training dataset contains the following two main parts:
[0044] ;
[0045] Input features: Energy counting features from the full energy spectrum and auxiliary soil moisture parameters (VWC, ε, EC), i.e., the feature vector of the original spectrum after dimensionality reduction, noise reduction and correction;
[0046] Output label: The corresponding soil nutrient content, which includes nitrogen, phosphorus, potassium, organic matter, and pH;
[0047] This training set is used to establish the nonlinear mapping relationship between the full spectrum characteristics of the energy spectrum and soil moisture parameters and soil nutrient content, providing basic data support for subsequent model training and inversion prediction.
[0048] Furthermore, in S6, energy spectrum full-spectrum counting data and soil moisture auxiliary parameters are used as input features for different soil nutrient types. A soil nutrient inversion model is established through model algorithm. The model input is the full-spectrum counting vector after energy scaling and preprocessing, and the output is the corresponding nutrient content prediction value.
[0049] The inversion model process is as follows:
[0050] Feature matrix construction: The energy spectrum after energy scaling, normalization, and soil moisture correction is represented as follows:
[0051] ;
[0052] in, express One sample The comprehensive feature matrix of one energy channel and three moisture parameters, with corresponding nutrient content labels:
[0053] ;
[0054] Each Corresponding to one or more soil nutrient indicators;
[0055] Feature selection and optimization: The Boruta algorithm is used for feature selection. Boruta is based on the feature importance of random forests and introduces shadow features to determine the importance of true features. Let the Z-score of each feature be... The judgment criterion is:
[0056] ;
[0057] Features that meet the criteria are considered "important features" and constitute the optimized feature subset. This is used for subsequent model training;
[0058] Feature dimensionality reduction and principal component extraction: obtaining the optimized feature matrix Subsequently, to further compress dimensionality and reduce noise interference, a dimensionality reduction method was used to extract the main features: when the spectral variation law is relatively linear, principal component analysis (PCA) was used to extract the principal components, and their covariance matrix is as follows:
[0059] ;
[0060] Through eigenvalue decomposition:
[0061] ;
[0062] Select the top contributors with a cumulative contribution rate of 95% The principal components are used to obtain the dimensionless matrix:
[0063] ;
[0064] in The characteristic matrix after dimensionality reduction is given. When the energy spectrum data exhibits nonlinear peak shape variations, the Unified Manifold Approximation and Projection (UMAP) method is used for nonlinear dimensionality reduction. The objective function is:
[0065] ;
[0066] in and These are the adjacency probability distributions in the high-dimensional and low-dimensional spaces, respectively. The reduced-dimensional matrix is denoted as... ;
[0067] Model training and fitting: The feature set after feature selection and dimensionality reduction optimization... Establish a soil nutrient inversion model:
[0068] ;
[0069] in, The target nutrient content is the predicted value. This represents a nonlinear mapping function, which is implemented through a model algorithm to establish a correspondence between the optimized full-spectrum features and soil nutrient content.
[0070] During model training, the training set is used The model is fitted, and its predictive performance is evaluated through cross-validation. Model performance is quantified using the following evaluation metrics:
[0071] Coefficient of determination ( ): ;
[0072] Root Mean Square Error (RMSE): ;
[0073] in, These are the actual measured soil nutrient values. These are the model's predicted values. This represents the average soil nutrient content. Given the sample size, the results of cross-validation are compared to select the appropriate sample size. maximum, The smallest model is used as the final inversion model. This model can perform inversion prediction on energy spectrum data that has not been trained, and realize the estimation of soil nutrient content in the target area, providing a scientific basis for agricultural fertilization decisions and land management.
[0074] Model representation and nonlinear mapping relationship: Finally, a nonlinear mapping between the full energy spectrum and nutrient content is established.
[0075] ;
[0076] This model not only preserves the continuous energy distribution information of the energy spectrum, but also eliminates noise and redundant features through feature selection and dimensionality reduction mechanisms, thus achieving accurate inversion prediction of soil nutrient content.
[0077] Furthermore, in step S7, a trained nutrient inversion model is used to predict and analyze the energy spectrum data that was not trained. The model outputs corresponding soil nutrient estimates based on the full-spectrum characteristics of the input energy spectrum, obtaining the prediction results for each measuring point and grid cell. Based on the predicted values of the measuring points, a continuous soil nutrient distribution map is generated using spatial interpolation methods to achieve spatial display at the regional scale. The spatial interpolation methods include Kriging interpolation and inverse distance weighting. The inversion results are then represented in a map format to display the spatial differentiation characteristics of soil nutrients in different plots. The map format platform includes a Geographic Information System (GIS) and a visualization platform. The nutrient inversion results obtained in this step can provide a scientific basis for agricultural fertilization decisions, precision management, and plot zoning, realizing fully automated analysis from energy spectrum detection to quantitative nutrient estimation.
[0078] On the other hand, the technical solution of the present invention also provides a soil nutrient inversion system based on the full spectrum of gamma energy, characterized in that it includes:
[0079] Gamma Spectrum Collection Module: Configured to identify the measurement plot, acquire boundary information, and obtain latitude, longitude, and raw energy spectrum data;
[0080] Sampling point collection module: configured to filter scan data by plot boundaries, calculate sample center, calculate distance between scan point and sample center, and determine sampling point;
[0081] Soil sampling and testing module: configured to collect soil samples based on coordinates, correct energy spectrum data, calibrate energy spectrum, and test soil sample nutrients;
[0082] The model building and plotting module is configured to perform dataset building, model building, model tuning, model evaluation, and interpolation algorithm plotting.
[0083] The beneficial effects of this invention are:
[0084] Using the soil nutrient inversion method based on the full spectrum of gamma energy spectroscopy proposed in this invention, airborne measurements of the target area are performed using a gamma energy spectrometer to obtain data containing naturally occurring radionuclides. 40 K, 238 U、 232 The full spectrum data of Th characteristic energy peak information is used, and a mapping model between the full spectrum of energy and nutrient content is established by combining the measured nutrient data of soil samples. By introducing feature selection algorithm and dimensionality reduction technology, redundant and noise information in the energy spectrum can be effectively removed, which significantly improves the generalization and inversion accuracy of the model.
[0085] This invention establishes a complete technical process from energy spectrum acquisition, energy calibration, feature extraction to model training and spatial visualization, enabling rapid and non-destructive quantitative inversion of major nutrients in soil, such as nitrogen, phosphorus, potassium, organic matter, and pH. Compared with traditional inversion methods that rely on experimental chemical analysis or single spectral features, this invention has the advantages of high automation, high precision, and wide applicability. It can rapidly generate soil nutrient distribution maps at the regional scale, providing a scientific basis for precision fertilization in agriculture, farmland quality monitoring, and resource management, and significantly improving the intelligence and efficiency of soil nutrient monitoring. Attached Figure Description
[0086] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0087] Figure 1 This is a schematic diagram of the soil nutrient inversion method and system based on the full spectrum of gamma energy spectroscopy of the present invention. Detailed Implementation
[0088] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.
[0089]
Example 1
[0090] like Figure 1 As shown, this invention discloses a method for soil nutrient inversion based on the full gamma spectrum, comprising the following steps:
[0091] S1. First, the boundary information of the target plot is obtained. An airborne gamma spectrometer is deployed on the target plot to scan and measure the soil, collecting raw energy spectrum data at each measuring point. The energy spectrum recorded at each measuring point contains naturally occurring radionuclides. 40 K,238 U、 232 The full-channel response of Th, while recording the measurement time. Compare with GPS coordinates; for UAV platforms, abnormal measurement data caused by turning, repeating paths, and stopping should be removed to ensure data reliability and obtain the raw gamma energy spectrum data A;
[0092] S2, after completing the gamma spectrum scan of the land parcel, spatial filtering is performed on the scan data according to the land parcel boundaries to remove out-of-bounds and abnormal noise points; after spatial filtering of the target land parcel, the point set is obtained. ; Calculate the sample center:
[0093] ;
[0094] Calculate the Euclidean distance from each point to the center. And sort the indexes in ascending order by distance to obtain the index sequence. To identify spectral anomalies, the total count of the entire spectrum at each point is calculated:
[0095] ;
[0096] The threshold is the mean and standard deviation of the total count. Identify outliers;
[0097] According to the preset sampling number Representative sampling points were selected using a uniform distance distribution sampling method.
[0098] ;
[0099] Soil samples were collected at a depth of approximately 10-15 cm at each designated sampling location using a five-point sampling method. Simultaneously, soil moisture data, including soil moisture content (VWC), dielectric constant, and apparent conductivity (EC), were measured around the sampling points using soil moisture sensors. VWC reflects the impact of soil moisture changes on the attenuation of the gamma-ray spectral signal; dielectric constant reflects soil medium characteristics and is used to assist in assessing moisture content and correcting the detection response; apparent conductivity (EC) describes differences in soil salinity and conductivity, and has a certain influence on the absorption and scattering of the spectral signal. Soil type, such as black soil or sandy soil, was also recorded. These data are denoted as soil data C and soil moisture data D.
[0100] S3. The obtained raw gamma spectrum data file A is parsed and decoded to extract channel count data. Energy calibration is then performed based on the standard source energy position, converting the channel number to the actual energy value (unit: keV). Three representative characteristic energy peaks are selected as calibration points. These three representative characteristic energy peaks correspond to approximately channel 490 and the radionuclide... 40K has a characteristic energy peak of 1460 keV; it has approximately 200 channels, corresponding to the nuclides. 214 Bi has a characteristic energy peak of 608 keV; it has approximately 868 channels, corresponding to the nuclide. 208 The characteristic energy peak of Ti is 2614 keV; based on the three known energy characteristic energy peaks and channel positions, an energy calibration equation is established:
[0101] ;
[0102] For detection systems exhibiting slight nonlinearity, a quadratic polynomial form is used:
[0103] ;
[0104] in Energy (KeV). For channel number, The fitting coefficients are determined using the least squares method; for detection systems with slight nonlinearity, a quadratic polynomial form is used:
[0105] ;
[0106] The calibrated energy spectrum is ,in As an energy channel, The count rate is used to convert the channel number to the energy value (unit: keV), thereby obtaining the energy coordinates of the energy spectrum. Thus, the energy spectrum data B after energy scaling is obtained.
[0107] S4, Laboratory Nutrient Analysis: The collected soil sample C was sent to the laboratory, where chemical analysis methods were used to determine the content of major nutrients to obtain soil nutrient data C' corresponding to the gamma spectroscopy measurement points. After the sample was naturally air-dried, ground, and passed through a 2mm sieve, the major nutrient indicators were measured sequentially. The major nutrient indicators included ammonium nitrogen (NH4+). + The main nutrient indicators include N, available phosphorus (AP), available potassium (AK), soil organic matter (SOM), and pH value. The analytical methods for these main nutrient indicators include one or more of the following: Kjeldahl nitrogen determination, sodium bicarbonate extraction-molybdenum antimony colorimetric method, ammonium acetate extraction-flame photometry, potassium dichromate external heating oxidation method, or soil-water ratio 1:2.5 suspension method. After standardization, the main nutrient indicators are mapped one-to-one with the GPS coordinates of the energy dispersive spectroscopy (EDS) measurement points according to their sampling numbers, forming a complete soil nutrient label dataset. This label dataset serves as the target variable for model training, used to establish a quantitative relationship between the full EDS spectrum and soil nutrient content.
[0108] S5, Data Matching and Training Set Construction: Based on GPS coordinate information, the energy spectrum data is spatially matched with the corresponding soil nutrient data. After removing outliers, a training dataset is formed. The spatial matching process sets a location tolerance threshold to ensure the accurate and reliable spatial correspondence between energy spectrum measurement points and sampling points. Then, the matched data undergoes quality control and preprocessing, including:
[0109] Outlier removal: The 3σ method is used to identify and remove data points that significantly deviate from the overall distribution to reduce the interference of abnormal noise on subsequent model training. The judgment criteria are as follows:
[0110] ;
[0111] in, This represents the spectral count value at a single measurement point. The sample mean. Standard deviation;
[0112] Missing value handling: For some missing samples due to sensor malfunction or terrain obstruction, interpolation is used to repair them to ensure data integrity and consistency.
[0113] ;
[0114] Normalization and standardization: The count values of the entire energy spectrum are standardized to eliminate systematic biases caused by differences in detection efficiency and integration time between different measurement points.
[0115] ;
[0116] The processed training dataset consists of two main parts:
[0117] ;
[0118] Input features: Energy count features from the full energy spectrum, i.e., the feature vector after dimensionality reduction and noise reduction of the original spectrum;
[0119] Output labels: corresponding soil nutrient content, including nitrogen, phosphorus, potassium, organic matter, and pH; this training set is used to establish the mapping relationship between the full spectrum of energy dispersive spectroscopy features and soil nutrient content, providing basic data support for subsequent modeling and inversion prediction;
[0120] S6, Data Matching and Training Set Construction: Based on GPS coordinate information, the energy spectrum data B is spatially matched with the corresponding soil nutrient data C'. After removing outliers, a training dataset X is formed. The training set includes full-spectrum energy count features and corresponding target nutrient content labels. For different soil nutrient types, full-spectrum count data is used as input features. A soil nutrient inversion model is established through machine learning or deep learning. The model input is the full-spectrum count vector after energy scaling and preprocessing, and the output is the corresponding predicted nutrient content value.
[0121] The inversion model process is as follows:
[0122] Feature matrix construction: The energy spectrum after energy scaling, normalization, and soil moisture correction is represented as follows:
[0123] ;
[0124] in, express One sample The comprehensive feature matrix of one energy channel and three moisture parameters, with corresponding nutrient content labels:
[0125] ;
[0126] Each Corresponding to one or more soil nutrient indicators;
[0127] Feature Selection and Optimization: Based on the dimensionality-reduced features, the Boruta algorithm is used for feature selection. Boruta is based on the feature importance of random forests and introduces shadow features to determine the importance of true features. Let the Z-score of each feature be... The judgment criterion is:
[0128] ;
[0129] Features that meet the criteria are considered "important features" and constitute the optimized feature subset. This is used for subsequent model training;
[0130] Feature dimensionality reduction and principal component extraction: obtaining the optimized feature matrix Subsequently, to further compress dimensionality and reduce noise interference, a dimensionality reduction method was used to extract the main features: when the spectral variation law is relatively linear, principal component analysis (PCA) was used to extract the principal components, and their covariance matrix is as follows:
[0131] ;
[0132] Through eigenvalue decomposition:
[0133] ;
[0134] Select the top contributors with a cumulative contribution rate of 95% The principal components are used to obtain the dimensionless matrix:
[0135] ;
[0136] in The feature matrix after dimensionality reduction is given. When the energy spectrum data exhibits nonlinear peak shape variations, the Unified Manifold Approximation and Projection (UMAP) method is used for nonlinear dimensionality reduction, with the objective function being:
[0137] ;
[0138] in and These are the adjacency probability distributions in the high-dimensional and low-dimensional spaces, respectively. The reduced-dimensional matrix is denoted as... ;
[0139] Model training and fitting: The feature set after feature selection and dimensionality reduction optimization... Establish a soil nutrient inversion model:
[0140] ;
[0141] in, The target nutrient content is the predicted value. This represents a nonlinear mapping function, which is implemented through a model algorithm to establish a correspondence between the optimized full-spectrum features and soil nutrient content.
[0142] During model training, the training set is used The model is fitted, and its predictive performance is evaluated through cross-validation. Model performance is quantified using the following evaluation metrics:
[0143] Coefficient of determination ( ): ;
[0144] Root Mean Square Error (RMSE): ;
[0145] in, These are the actual measured soil nutrient values. These are the model's predicted values. This represents the average soil nutrient content. The sample size is determined by comparing the cross-validation results. maximum, The smallest model is used as the final inversion model. This model can perform inversion prediction on energy spectrum data that has not been trained, and realize the estimation of soil nutrient content in the target area, providing a scientific basis for agricultural fertilization decisions and land management.
[0146] (5) Model representation and nonlinear mapping relationship
[0147] Finally, a nonlinear mapping between the full energy spectrum and nutrient content was established:
[0148] ;
[0149] This model not only preserves the continuous energy distribution information of the energy spectrum, but also eliminates noise and redundant features through dimensionality reduction and feature screening mechanisms, thus achieving accurate inversion prediction of soil nutrient content.
[0150] S7, Model Application and Inversion Prediction: Using a trained nutrient inversion model, predictive analysis is performed on untrained energy spectrum data. The model outputs corresponding soil nutrient estimates based on the full-spectrum characteristics of the input energy spectrum, obtaining prediction results for each measuring point and grid cell. Based on the predicted values of the measuring points, a continuous soil nutrient distribution map is generated using spatial interpolation methods to achieve regional-scale spatial display. Spatial interpolation methods include Kriging interpolation and inverse distance weighting. The inversion results are then map-based to display the spatial differentiation characteristics of soil nutrients in different plots. The map-based platforms include Geographic Information Systems (GIS) and visualization platforms. The nutrient inversion results obtained in this step can provide a scientific basis for agricultural fertilization decisions, precision management, and plot zoning, achieving fully automated analysis from energy spectrum detection to quantitative nutrient estimation.
[0151]
Example 2
[0152] In a typical embodiment of the present invention, this embodiment discloses a soil nutrient inversion system based on the full gamma spectrum, comprising:
[0153] Gamma Spectrum Collection Module: Configured to identify the measurement plot, acquire boundary information, and obtain latitude, longitude, and raw energy spectrum data;
[0154] Sampling point collection module: configured to filter scan data by plot boundaries, calculate sample center, calculate distance between scan point and sample center, and determine sampling point;
[0155] Soil sampling and testing module: configured to collect soil samples based on coordinates, correct energy spectrum data, calibrate energy spectrum, and test soil sample nutrients;
[0156] The model building and plotting module is configured to perform dataset building, model building, model tuning, model evaluation, and interpolation algorithm plotting.
[0157] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention can have various modifications and variations; any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for soil nutrient inversion based on the full gamma spectrum, comprising the following steps: S1, Energy Spectrum Data Acquisition: The soil of the target site is scanned and measured using a gamma spectrometer to acquire raw energy spectrum data at each measuring point. The energy spectrum includes... 40 K, 238 U、 232 The full-energy channel response information of natural radionuclides such as Th was recorded, along with the time and GPS coordinates of the measurement points. S2, Soil Sample Collection and Soil Moisture Measurement: After completing the gamma spectral scanning of the plot, the scanning data is spatially filtered according to the plot boundary to remove out-of-bounds and abnormal noise points. Subsequently, soil sample collection is carried out. At each gamma spectral measurement point and its representative area, soil samples at a certain depth are collected using the five-point sampling method. At the same time, soil moisture parameters, including soil water content (VWC), dielectric constant, and apparent conductivity (EC), are measured and recorded for subsequent analysis and characteristic correction. S3, Energy Spectrum Data Analysis and Energy Scale: The original gamma energy spectrum file is analyzed and decoded to extract channel count data. Energy scale conversion is performed according to the standard source energy position to convert the channel number into the actual energy value (unit keV). At the same time, denoising and smoothing are performed to suppress statistical noise and retain spectral characteristics. S4, Laboratory Nutrient Analysis: The collected soil samples are sent to the laboratory, and the content of their main nutrients is determined by chemical analysis methods. The main nutrient content includes ammonium nitrogen, available phosphorus, available potassium, organic matter and pH value, and soil nutrient label data corresponding to the energy dispersive spectroscopy measurement points are obtained. S5, Data Matching and Training Set Construction: Based on GPS coordinate information, the energy spectrum data is spatially matched with the soil nutrient data at the corresponding location. After removing outliers, a training dataset is formed. The training set includes the full spectrum energy counting features and the corresponding target nutrient content labels. S6, Model Training Based on Full Spectrum: For different nutrient types, full spectrum data is used as input features, and a nutrient inversion model is established through model algorithms. The model algorithm includes one of machine learning or deep learning. The model combines feature reduction and feature selection algorithms to optimize input features, improve the model's generalization ability and inversion accuracy. The feature reduction includes one of PCA or UMAP, and the feature selection algorithm includes Boruta. S7, Model Application and Inversion Prediction: Using the trained model, nutrient inversion prediction is performed on the energy spectrum data that was not involved in the modeling, and the estimated nutrient content of each measuring point in the target area is obtained. Through spatial interpolation and map visualization methods, a soil nutrient distribution map can be generated, providing a basis for agricultural decision-making, fertilization management and plot zoning.
2. The soil nutrient inversion method based on the full gamma spectrum as described in claim 1, characterized in that: The method utilizes an airborne gamma spectrometer to achieve rapid and large-scale energy spectrum collection of the target area; after the energy spectrum collection is completed, the operational data of the UAV under abnormal operating conditions such as turning, repeating paths, or stopping should be deleted.
3. The soil nutrient inversion method based on the full gamma spectrum as described in claim 1, characterized in that: After spatial filtering of the soil points for the target plot, a point set is obtained. Calculate the sample center: ; Calculate the Euclidean distance from each point to the center. And sort the indexes in ascending order by distance to obtain the index sequence. To identify energy spectrum anomalies, the total count of the full spectrum at each point is calculated: ; The threshold is the mean and standard deviation of the total count. Identify outliers; According to the preset sampling number Representative sampling points were selected using a uniform distance distribution sampling method. ; The sampling principle involves collecting soil samples at each designated sampling location using a five-point sampling method, while simultaneously measuring soil moisture data around the sampling points using a soil moisture sensor. This soil moisture data includes soil water content (VWC), dielectric constant, and apparent conductivity (EC). VWC reflects the impact of soil moisture changes on the attenuation of the gamma-ray spectral signal; the dielectric constant reflects the characteristics of the soil medium, assisting in assessing water content and correcting the detection response; and apparent conductivity (EC) describes differences in soil salinity and conductivity, which has a certain impact on the absorption and scattering of the spectral signal. Soil type is also recorded.
4. The soil nutrient inversion method based on the full gamma spectrum as described in claim 1, characterized in that: The method for energy calibration conversion using standard source energy positions involves selecting three representative characteristic energy peaks as calibration points: radioactive nuclides. 40 K's characteristic energy peak is 1460 keV; nuclide 214 Bi's characteristic energy peak at 608 keV and nuclides 208 The characteristic energy peak of Tl is 2614 keV. Based on the above three known energies and channel locations, an energy calibration equation is established: ; For detection systems exhibiting slight nonlinearity, a quadratic polynomial form is used: ; in Energy (KeV). For channel number, These are the fitting coefficients, which are determined using the least squares method. ; The calibrated energy spectrum is ,in As an energy channel, The count rate is used to convert the channel number to the energy value (unit: keV), thereby obtaining the energy coordinates of the energy spectrum.
5. The soil nutrient inversion method based on the full gamma spectrum as described in claim 1, characterized in that: The laboratory nutrient analysis involves air-drying, grinding, and sieving the sample, followed by sequential determination of the main nutrient indicators. The analytical methods for the main nutrient indicators include one or more of the following: Kjeldahl nitrogen determination method, sodium bicarbonate extraction-molybdenum antimony colorimetric method, ammonium acetate extraction-flame photometric method, potassium dichromate external heating oxidation method, or soil-water ratio 1:2.5 suspension method. After standardization, the main nutrient indicators are matched one-to-one with the GPS coordinates of the soil sample sampling points and the energy spectrum measurement points to form a complete soil nutrient label dataset. The label dataset serves as the target variable for model training and is used to establish a quantitative relationship between the full energy spectrum and soil nutrient content.
6. The soil nutrient inversion method based on the full gamma spectrum as described in claim 1, characterized in that: The data matching and training set construction are based on the GPS coordinate information and unique number of each measuring point. The gamma energy spectrum data is spatially matched with the soil nutrient measurement results at the corresponding locations. The matching process sets a location tolerance threshold to ensure that the spatial correspondence between the energy spectrum measuring points and the sampling points is accurate and reliable. The matched data can undergo quality control and preprocessing, including: Outlier removal: The 3σ method is used to identify and remove data points that significantly deviate from the overall distribution to reduce the interference of abnormal noise on subsequent model training. The judgment criteria are as follows: ; in, This represents the spectral count value at a single measurement point. The sample mean. Standard deviation; Missing value handling: For some missing samples due to sensor malfunction or terrain obstruction, interpolation is used to repair them to ensure data integrity and consistency. ; Soil moisture parameter correction: Considering the attenuation and scattering effects of soil moisture content (VWC), dielectric constant (ε), and apparent conductivity (EC) on the gamma-ray spectral signal, soil moisture correction and joint modeling are performed on the spectral count values. When performing soil moisture correction, the correction formula is as follows: ; in, For the original channel count, The fitting function describes the effect of soil moisture parameters on signal attenuation. When performing joint modeling, VWC, ε, and EC are included as auxiliary input features in the model training process to improve the model's adaptability to environmental changes. Normalization and standardization: The full spectrum count values of the energy spectrum are processed by standardization to eliminate systematic biases caused by differences in detection efficiency and integration time between different measurement points. ; The processed training dataset contains the following two main parts: ; Input features: Energy counting features from the full energy spectrum and auxiliary soil moisture parameters (VWC, ε, EC), i.e., the feature vector of the original spectrum after dimensionality reduction, noise reduction and correction; Output label: corresponding soil nutrient content; The training dataset is used to establish the nonlinear mapping relationship between the full spectrum characteristics of the energy spectrum and soil moisture parameters and soil nutrient content, providing basic data support for subsequent model training and inversion prediction.
7. The soil nutrient inversion method based on the full gamma spectrum according to claim 1, characterized in that: The full-spectrum model training uses full-spectrum energy count data and soil moisture auxiliary parameters as input features. A soil nutrient inversion model is established through model algorithms. The input of the soil nutrient inversion model is the full-spectrum count vector after energy scaling and preprocessing, and the output is the corresponding predicted nutrient content value. The inversion model process is as follows: Feature matrix construction: The energy spectrum after energy scaling, normalization, and soil moisture correction is represented as follows: ; in, The comprehensive feature matrix representing m samples, n energy channels, and 3 soil moisture parameters is labeled with the corresponding nutrient content tags: ; Each Corresponding to one or more soil nutrient indicators; Feature selection and optimization: The Boruta algorithm is used for feature selection. Boruta is based on the feature importance of random forests and introduces shadow features to determine the importance of true features. Let the Z-score of each feature be... The judgment criterion is: ; Features that meet the criteria are considered "important features" and constitute the optimized feature subset. This is used for subsequent model training; Feature dimensionality reduction and principal component extraction: obtaining the optimized feature matrix Subsequently, to further compress dimensionality and reduce noise interference, a dimensionality reduction method was used to extract the main features: when the spectral variation law is relatively linear, principal component analysis (PCA) was used to extract the principal components, and their covariance matrix is as follows: ; Through eigenvalue decomposition: ; Select the top contributors with a cumulative contribution rate of 95% The principal components are used to obtain the dimensionless matrix: ; in The characteristic matrix after dimensionality reduction is given. When the energy spectrum data exhibits nonlinear peak shape variations, the Unified Manifold Approximation and Projection (UMAP) method is used for nonlinear dimensionality reduction. The objective function is: ; in and These are the adjacency probability distributions in the high-dimensional and low-dimensional spaces, respectively. The reduced-dimensional matrix is denoted as... ; Model training and fitting: The feature set after feature selection and dimensionality reduction optimization... Establish a soil nutrient inversion model: ; in, The target nutrient content is the predicted value. This represents a nonlinear mapping function, implemented through a model algorithm, used to establish a correspondence between the optimized full-spectrum features and soil nutrient content; During model training, the training set is used The model is fitted, and its predictive performance is evaluated through cross-validation. Model performance is quantified using the following evaluation metrics: Coefficient of determination ( ): ; Root Mean Square Error (RMSE): ; in, These are the actual measured soil nutrient values. These are the model's predicted values. This represents the average soil nutrient content. Given the sample size, the results of cross-validation are compared to select the appropriate sample size. maximum, The smallest model is used as the final inversion model. This model can perform inversion prediction on energy spectrum data that has not been trained, and realize the estimation of soil nutrient content in the target area, providing a scientific basis for agricultural fertilization decisions and land management. Model representation and nonlinear mapping relationship: Finally, a nonlinear mapping between the full energy spectrum and nutrient content is established. ; The model not only preserves the continuous energy distribution information of the energy spectrum, but also eliminates noise and redundant features through dimensionality reduction and feature screening mechanisms, thus achieving accurate inversion prediction of soil nutrient content.
8. The soil nutrient inversion method based on the full gamma spectrum as described in claim 1, characterized in that: The model application and inversion can predict and analyze energy spectrum data that has not been trained. The model outputs corresponding soil nutrient estimates based on the full spectrum features of the input energy spectrum, and obtains the prediction results for each measuring point and grid cell. Based on the predicted values of the measuring points, the model uses spatial interpolation methods to generate continuous soil nutrient distribution maps to achieve regional-scale spatial display. The spatial interpolation methods include Kriging interpolation and inverse distance weighting.
9. A soil nutrient inversion system based on the full gamma spectrum, characterized in that, include: Gamma Spectrum Collection Module: Configured to identify the measurement plot, acquire boundary information, and obtain latitude, longitude, and raw energy spectrum data; Sampling point collection module: configured to filter scan data by plot boundaries, calculate sample center, calculate distance between scan point and sample center, and determine sampling point; Soil sampling and testing module: configured to collect soil samples based on coordinates, correct energy spectrum data, calibrate energy spectrum, and test soil sample nutrients; The model building and plotting module is configured to perform dataset building, model building, model tuning, model evaluation, and interpolation algorithm plotting.