Spectroscopic detection-based method and system for detecting components of saline-alkali soil

CN122814545APending Publication Date: 2026-09-25INST OF WATER RESOURCES FOR PASTERAL AREA MINIST OF WATER RESOURCES P R C
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611282457.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-24
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

一类是基于实地采样的实验室测定方法,通过在目标区域内布设采样点、分层采集土样并测定含盐量,能够获得较为准确的垂向剖面数据,但该方法受采样成本和实验室分析周期的限制,采样点的空间密度通常较低,难以支撑区域尺度上精细的空间分布推断;

Benefits of technology

本发明利用少量代表性采样点的分层含盐量数据,采用引入深度权重的最小二乘法拟合含盐量垂向变化曲线,提取各深度的含盐量垂向梯度系数,结合表层高光谱一阶微分特征构建梯度预测模型,同步建立表层含盐量光谱预测子模型,对于区域内大量测点仅需采集表层高光谱数据,通过模型预测垂向梯度系数与表层含盐量,沿深度方向梯形积分得到各深度含盐量估算值,经空间插值生成三维盐分分布,实现利用易获取的表层光谱数据反演整个土壤剖面的含盐量垂向分布,将光谱检测从表层定量拓展至垂向三维检测,在保证精度的同时提升区域尺度盐碱土壤监测效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122814545A_ABST
    Figure CN122814545A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of soil salt detection, in particular, the present application relates to a salt-alkali soil component detection method and system based on spectral detection, sampling points are arranged in a target area, surface hyperspectral reflectance data and layered soil salt content are collected, a salt content vertical variation curve is obtained by fitting, and a salt content vertical gradient coefficient at each depth is obtained by derivation, a gradient prediction model is constructed with the first-order derivative of the surface spectrum as input and the gradient coefficient as output, a surface salt content spectral prediction sub-model is constructed with the surface spectrum as input and the surface salt content as output, measurement points are arranged outside the sampling points, the surface spectrum is collected to input the gradient prediction model to obtain the gradient coefficient prediction value, the sub-model is input to obtain the surface salt content prediction value, trapezoidal integral operation is performed on the gradient coefficient along the depth direction to obtain the salt content estimation value at each depth, finally, the salt content estimation value at each depth is spatially interpolated to form a three-dimensional array, and soil salt content vertical distribution information is generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of soil salinity detection technology, and more specifically, to a method and system for detecting components in saline-alkali soil based on spectral detection. Background Technology

[0002] In the monitoring and remediation of saline-alkali soils, soil salinity and its vertical distribution characteristics are the basis for assessing the degree of salinization and formulating remediation plans. Currently, there are two main approaches to obtaining soil salinity distribution information: One type is laboratory testing methods based on field sampling. By setting up sampling points in the target area, collecting soil samples in layers, and measuring the salt content, relatively accurate vertical profile data can be obtained. However, this method is limited by sampling costs and laboratory analysis cycles, and the spatial density of sampling points is usually low, making it difficult to support fine spatial distribution inference at the regional scale. Another type is the rapid detection method based on hyperspectral remote sensing technology. This method utilizes the quantitative relationship between the surface reflectance spectrum of soil and the salinity to achieve non-contact measurement, which has the advantages of fast detection speed and low cost. However, existing spectroscopic detection methods are mostly limited to estimating the salinity content of surface soil. The vertical distribution of salt in the soil profile, especially the changes in salinity at different depths, cannot be directly obtained through spectroscopic means. The degree of salt damage to crops is closely related to the accumulation of salt within the root distribution depth range. It is difficult to comprehensively assess the impact of soil salinization on crop growth based solely on surface information. Therefore, how to effectively infer the salinity distribution of deep soil using easily obtainable surface hyperspectral information, and extend spectroscopic detection from surface qualitative to vertical quantitative, is a key problem that urgently needs to be solved in this field. To solve this technical problem, we provide a method and system for detecting saline-alkali soil components based on spectroscopic detection. Summary of the Invention

[0003] The purpose of this invention is to provide a method and system for detecting the components of saline-alkali soil based on spectral detection, so as to solve the problems mentioned in the background art.

[0004] To achieve the above objectives, one objective of this invention is to provide a method for detecting the components of saline-alkali soil based on spectral detection, comprising the following steps: S1. Set up several sampling points in the target area, determine the plane coordinates of each sampling point, collect the hyperspectral reflectance data of the surface soil at each sampling point, and collect soil samples at multiple preset depths at each sampling point, and determine the salt content of each layer of soil sample, wherein the surface salt content is used as the measured value of the surface salt content of the corresponding sampling point. S2. Arrange the salinity at each sampling point at each preset depth in order of depth, and use the least squares method to fit the vertical variation curve of salinity at each sampling point. Calculate the first derivative of the vertical variation curve of salinity to obtain the gradient function that changes continuously with depth. Substitute each preset depth into the gradient function to obtain the vertical gradient coefficient of salinity at each sampling point at each preset depth. A gradient prediction model is constructed by performing a first-order differential transformation on the hyperspectral reflectance data of surface soil and extracting the first-order differential values ​​of the characteristic bands. The first-order differential values ​​of the characteristic bands are used as inputs, and the vertical gradient coefficients of the salinity at each preset depth of the corresponding sampling points are used as outputs. Simultaneously, using the hyperspectral reflectance of the surface soil at each sampling point as input and the measured value of the surface salinity at the corresponding sampling point as output, a sub-model for predicting surface salinity by spectrum is constructed. S3. Set up measuring points at other locations outside the sampling points in the target area, determine the plane coordinates of each measuring point, collect the hyperspectral reflectance data of the surface soil at each measuring point, perform a first-order differential transformation and input it into the gradient prediction model to obtain the predicted value of the vertical gradient coefficient of salinity at each measuring point. The hyperspectral reflectance data of the surface soil at each measuring point are input into the surface salinity spectral prediction sub-model to obtain the spectral prediction value of the surface soil salinity at each measuring point. Using the spectral prediction value of surface soil salinity as the initial value of salinity at the shallowest preset depth, the predicted value of vertical gradient coefficient of salinity is calculated by trapezoidal integration along the depth direction to obtain the estimated value of soil salinity at each preset depth for each measuring point. S4. Bind the estimated soil salinity at each measurement point at each preset depth to the corresponding plane coordinates. Perform spatial interpolation on the estimated salinity of all measurement points at the same preset depth layer to obtain the plane distribution grid of salinity at that depth layer. Stack all the plane distribution grids of the preset depth layers in depth order to form a three-dimensional array. Combine the depth label and the plane coordinate label to generate the vertical distribution information of soil salinity in the target area.

[0005] The second objective of this invention is to provide a system for implementing a method for detecting the components of saline-alkali soil based on spectral detection, comprising: The sampling point layout and spectral acquisition unit is used to deploy sampling points in the target area according to the terrain elevation and vegetation coverage, and to collect hyperspectral reflectance data of the surface soil at each sampling point, while recording the acquisition time, the distance between the probe and the soil surface and the illumination attitude. The stratified sampling and salinity measurement unit is used to collect soil samples at each sampling point at a preset depth determined by the capillary rise and crop root distribution, measure the salinity of each soil sample, and record the bulk density. The unit for fitting vertical salt curves and calculating gradient coefficients is used to arrange the salt content at each sampling point at each preset depth in order of depth, and to fit the vertical salt variation curves by using the least squares method with depth weights, and to calculate the first derivative as the vertical salt gradient coefficient at each preset depth, thus forming a gradient coefficient dataset. The spectral preprocessing and feature band extraction unit is used to smooth and denoise the hyperspectral reflectance data of surface soil and perform first-order differential transformation. Feature bands are selected through band-by-band correlation analysis to form a feature band reflectance matrix. The gradient prediction model building unit is used to perform principal component analysis on the reflectivity matrix of the characteristic band, and then use the principal components as input and the salinity vertical gradient coefficient as output to train the gradient prediction model using the partial least squares regression algorithm. Other location prediction and integration units are used to collect surface soil hyperspectral reflectance data at locations other than the sampling points. After the same preprocessing, the data is input into the gradient prediction model to obtain the predicted value of the vertical gradient coefficient of salinity. At the same time, the surface salinity spectral prediction sub-model, which outputs the measured surface salinity at the sampling points, is used to obtain the spectral prediction value of surface soil salinity at other locations. The spectral prediction value is then used as the initial value to integrate layer by layer along the depth direction to obtain the estimated value of soil salinity at each preset depth. The vertical distribution information generation unit is used to arrange the estimated soil salinity values ​​at each preset depth in depth order, perform spatial interpolation on the estimated values ​​at the same depth layer and stack them into a three-dimensional array, and output the vertical distribution information of soil salinity in the target area by combining depth labels and planar coordinate labels.

[0006] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention utilizes stratified salinity data from a small number of representative sampling points, employs a least-squares method with depth weighting to fit the vertical variation curve of salinity, extracts the vertical gradient coefficient of salinity at each depth, and constructs a gradient prediction model by combining the first-order differential features of surface hyperspectral data. Simultaneously, a sub-model for surface salinity spectral prediction is established. For a large number of measuring points within a region, only surface hyperspectral data needs to be collected. The model predicts the vertical gradient coefficient and surface salinity, and the estimated salinity at each depth is obtained by trapezoidal integration along the depth direction. Spatial interpolation generates a three-dimensional salinity distribution, enabling the inversion of the vertical salinity distribution of the entire soil profile using readily available surface spectral data. This extends spectral detection from quantitative surface analysis to vertical three-dimensional detection, improving the efficiency of regional-scale saline-alkali soil monitoring while maintaining accuracy. Attached Figure Description

[0007] Figure 1 This is a flowchart illustrating the overall workflow of the present invention; Figure 2 This is a schematic diagram of the overall structure of the present invention. Detailed Implementation

[0008] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0009] Please see Figure 1 As shown, one of the objectives of this embodiment is to provide a method for detecting the components of saline-alkali soil based on spectral detection, including the following steps: S1. Set up several sampling points in the target area, determine the plane coordinates of each sampling point, collect the hyperspectral reflectance data of the surface soil at each sampling point, and collect soil samples at multiple preset depths at each sampling point, and determine the salt content of each layer of soil sample, wherein the surface salt content is used as the measured value of the surface salt content of the corresponding sampling point. S2. Arrange the salinity at each sampling point at each preset depth in order of depth, and use the least squares method to fit the vertical variation curve of salinity at each sampling point. Calculate the first derivative of the vertical variation curve of salinity to obtain the gradient function that changes continuously with depth. Substitute each preset depth into the gradient function to obtain the vertical gradient coefficient of salinity at each sampling point at each preset depth. A gradient prediction model is constructed by performing a first-order differential transformation on the hyperspectral reflectance data of surface soil and extracting the first-order differential values ​​of the characteristic bands. The first-order differential values ​​of the characteristic bands are used as inputs, and the vertical gradient coefficients of the salinity at each preset depth of the corresponding sampling points are used as outputs. Simultaneously, using the hyperspectral reflectance of the surface soil at each sampling point as input and the measured value of the surface salinity at the corresponding sampling point as output, a sub-model for predicting surface salinity by spectrum is constructed. S3. Set up measuring points at other locations outside the sampling points in the target area, determine the plane coordinates of each measuring point, collect the hyperspectral reflectance data of the surface soil at each measuring point, perform a first-order differential transformation and input it into the gradient prediction model to obtain the predicted value of the vertical gradient coefficient of salinity at each measuring point. The hyperspectral reflectance data of the surface soil at each measuring point are input into the surface salinity spectral prediction sub-model to obtain the spectral prediction value of the surface soil salinity at each measuring point. Using the spectral prediction value of surface soil salinity as the initial value of salinity at the shallowest preset depth, the predicted value of vertical gradient coefficient of salinity is calculated by trapezoidal integration along the depth direction to obtain the estimated value of soil salinity at each preset depth for each measuring point. S4. Bind the estimated soil salinity at each measurement point at each preset depth to the corresponding plane coordinates. Perform spatial interpolation on the estimated salinity of all measurement points at the same preset depth layer to obtain the plane distribution grid of salinity at that depth layer. Stack all the plane distribution grids of the preset depth layers in depth order to form a three-dimensional array. Combine the depth label and the plane coordinate label to generate the vertical distribution information of soil salinity in the target area.

[0010] It needs further explanation that when carrying out the sampling point layout work, the topographic elevation data and vegetation coverage data of the target area are first obtained. The topographic elevation data is obtained by generating a digital elevation model through airborne lidar scanning. The spatial resolution of the digital elevation model is set to one meter, and each grid cell stores the elevation of the corresponding point in meters.

[0011] Vegetation cover data is calculated from multispectral remote sensing imagery. The calculation process first extracts the reflectance of the red and near-infrared bands of the imagery, and then calculates the normalized vegetation index for each grid cell. The calculation formula is as follows: ,in Here, represents the surface reflectance in the near-infrared band, and is a dimensionless value. denoted as , where is the surface reflectance in the red band and is a dimensionless value; NDVI is the normalized difference in vegetation index and is also a dimensionless value. The vegetation cover of each grid cell is calculated using a pixel-based bisection model, and the calculation formula is as follows: ,in The normalized vegetation index value is for areas with purely bare soil. The normalized vegetation index value is for areas with purely vegetated vegetation. , which is a dimensionless value ranging from zero to one, representing the proportion of the vegetation canopy area within the corresponding grid to the total area of ​​the grid.

[0012] After preparing the two types of basic data, spatial partitioning is performed. First, the entire target area is divided into a 10-meter by 10-meter basic grid. Each basic grid corresponds to a set of elevation and vegetation cover values. Then, the K-means clustering algorithm is used to jointly cluster all basic grids according to the two dimensions of elevation and vegetation cover. The number of clusters is preset to five. After the clustering is completed, the set of grids of the same category and spatially connected are divided into a spatial block. Finally, several spatial blocks with uniform internal terrain and vegetation attributes are obtained. The partitioning method of two-factor joint clustering can avoid the attribute heterogeneity problem within the block caused by single-factor partitioning and improve the regional representativeness of the sample.

[0013] After segmentation, the area ratio of each segment is calculated. The segment area is the total number of basic grids in the segment multiplied by the area of ​​a single basic grid. The area ratio is the area of ​​the corresponding segment divided by the total area of ​​the target area. The total number of sampling points is preset according to the detection accuracy requirements. The number of sampling points deployed in each segment is equal to the total number of sampling points multiplied by the area ratio of the corresponding segment. The calculation result is rounded up, and it is ensured that at least one sampling point is deployed in each segment. The sampling points are generated in a constrained random distribution method within the segment, avoiding non-soil areas such as roads and water bodies, so that the number of sampling points deployed in each segment matches the area ratio of the corresponding segment, and the spatial distribution of sampling points is adapted to the regional heterogeneity characteristics.

[0014] Upon arrival at each sampling point, spectral acquisition preparation work is carried out. Surface litter refers to plant residues covering the soil surface, including dead branches and leaves and dry weeds. Soil crust refers to the dense hard crust formed by surface soil particles under physical and chemical action, including physical crust and biological crust. Both types of cover will change the spectral reflectance characteristics of the soil, causing the spectral data to fail to reflect the true salinity information of the soil.

[0015] Before collection, the operator gently scrapes away the surface debris and crust at the sampling point using a non-metallic scraper, controlling the scraping depth to within 0.5 cm to avoid damaging the underlying soil structure. The scraping area is a circular area with a diameter of 30 cm, which is larger than the field of view diameter of the spectral probe. If stones or roots are found after scraping, the foreign objects are removed and filled with fine soil of the same depth around the perimeter to ensure that the observation surface is flat and the soil properties are uniform, so that the field of view of the spectral probe is filled with bare and uniform soil.

[0016] After preprocessing, spectral acquisition is performed. The spectral probe is fixed directly above the soil surface using an adjustable height bracket. The height of the bracket is adjusted to keep the distance between the probe and the soil surface consistent, and is uniformly set to 15 centimeters. At the same time, the probe posture is adjusted using the bubble level on the bracket to ensure that the spectral probe is perpendicular to the soil surface, so that both incident and reflected light propagate along the normal direction, eliminating spectral distortion caused by angular differences.

[0017] The data collection period was selected within two hours before and after noon to ensure that each sampling point was under the same lighting conditions. Ten spectral curves were continuously collected from each sampling point, with each spectral curve covering a wavelength range of 350 nm to 2500 nm and a spectral resolution of 1 nm. After collection, the arithmetic mean of the reflectance of the corresponding bands of the ten spectral curves was calculated. The formula for calculating the average value is as follows: ,in This represents the total number of spectral curves collected, with a value of ten. For the first The spectral curves at the 1st Reflectance values ​​at each wavelength band After averaging, the first The reflectance values ​​of each band, and the average reflectance of all bands arranged in wavelength order, are the hyperspectral reflectance data of the surface soil at the corresponding sampling point. Multi-curve averaging can suppress spectral fluctuations caused by random noise and micro-topographic undulations, and improve data stability.

[0018] During the data acquisition process, the acquisition time, probe distance from the soil surface, incident light angle, and probe attitude corresponding to each spectral curve are recorded and stored simultaneously. The acquisition time is obtained through a satellite timing module, the probe distance from the soil surface is read in real time by a laser rangefinder on the support (in centimeters), and the incident light angle is calculated based on the solar zenith angle using the acquisition time and the latitude and longitude of the sampling point (in degrees). The probe attitude, including pitch and roll angles, is obtained through the probe's built-in attitude sensor (in degrees). All auxiliary parameters are used for subsequent screening and correction of abnormal spectral data. When the probe distance deviation for a single curve exceeds one centimeter or the attitude angle deviation exceeds three degrees, the corresponding spectral curve is marked as abnormal and removed, and is not included in the mean calculation. This sampling point layout method based on two-factor clustering improves the representativeness of the samples for regional topographic and vegetation heterogeneity compared to uniform grid layout. The standardized spectral acquisition process and auxiliary parameter recording mechanism can effectively control systematic errors during the acquisition process, ensure the comparability of spectral data from different sampling points, and provide a high-quality input data foundation for subsequent feature band extraction and prediction model construction.

[0019] After completing the sampling point layout and surface spectral acquisition, soil samples were collected at each sampling point at multiple preset depths. The preset depths were determined based on the typical influence range of capillary rise fronts and the typical distribution range of crop roots in the target area, so that the sampling density of different depth intervals matched the salinity change rate of the corresponding intervals.

[0020] The capillary rise front refers to the leading edge that groundwater can reach when it migrates upward through the capillary action of soil pores. It corresponds to the depth interface where soil moisture content and salinity change abruptly. The capillary rise front is obtained through a combination of theoretical calculations and field measurements. First, long-term groundwater level observation data from hydrological monitoring stations in the target area are collected. The average groundwater level depth during the monitoring period is then calculated and denoted as [missing information]. The unit is meters. Then, undisturbed soil samples are collected at typical sampling points to determine soil particle size distribution, and the effective pore radius r of the soil is calculated, also in meters. The theoretical capillary rise height is calculated based on the capillary rise height formula, which is: ,in The surface tension coefficient of pure water at room temperature is taken as 0.0728 N / m. This represents the contact angle between water and soil particles; for mineral soils, it is taken as 0 degrees. Let be the density of water, taken as 1000 kg per cubic meter. The acceleration due to gravity is taken as 9.8 meters per second squared. The theoretical capillary rise height is expressed in meters.

[0021] After theoretical calculations were completed, soil moisture content was measured in layers by drilling in the field. The initial depth at which moisture content increased with depth was used as the measured capillary rise front position to correct the theoretical value. Finally, the typical influence range of the capillary rise front was determined to be the depth interval from 0.3 meters above the front position to 0.1 meters below the front position. The typical distribution range of crop roots was defined as the depth interval corresponding to 90% of the total root dry weight of the main crop in the target area. This was obtained through previous field root drilling sampling surveys. The preset depth division started from the ground surface and extended downwards. The sampling depth was extended to 0.2 meters below the maximum distribution depth of the crop roots. The entire depth range was divided into two sampling sections. The first sampling section was the depth range affected by the capillary rise front, and the stratification spacing within the corresponding sampling section was set to 5 centimeters. The second sampling section was the depth range within the distribution range of the crop roots but not in the capillary influence zone, and the stratification spacing within the corresponding sampling section was set to 10 centimeters. The specific depth values ​​were generated by sequentially adding the corresponding spacing from the ground surface. Each depth value corresponded to a sampling layer. The depth values ​​of all layers were uniformly set with the ground surface as the zero point and downward as the positive direction.

[0022] Soil samples were collected layer by layer at a preset depth using a spiral soil auger at each sampling point. Each layer's soil sample was independently placed in a sealed aluminum box, with the sampling point number and corresponding layer depth marked on the box. Sealing prevented moisture evaporation and subsequent changes in salt concentration. Simultaneously, undisturbed soil samples were collected at the corresponding layers using a ring cutter method to determine the bulk density parameters of each soil layer. In the laboratory testing phase, each layer of soil samples was first air-dried, ground, sieved, and a quantitative amount of dry soil sample was weighed. Carbon dioxide-free distilled water was added at a soil-to-water mass ratio of 1:5, shaken for 30 minutes, and then allowed to stand and filter to obtain the soil extract. The conductivity of the extract at 25 degrees Celsius was measured using a calibrated conductivity meter and recorded as . The unit is millisiemens per centimeter. After obtaining the conductivity of the extract, the soil mass salinity is calculated using a pre-established linear regression equation between conductivity and soil salinity. The regression equation is calibrated based on sample data measured by standard chemical methods in the same region and is in the form of... ,in and These are regression coefficients, calibrated based on local soil types. Soil salinity is expressed in grams per kilogram (g / kg), representing the mass of salt contained in one kilogram of dry soil.

[0023] Because soil bulk density varies at different depths, mass salt content cannot be directly used for integral calculation of total vertical salt content. Therefore, volume correction is performed during the conversion process, incorporating the bulk density of soil samples from each layer to convert mass salt content to volumetric salt content. Soil bulk density is denoted as... The unit is grams per cubic centimeter, obtained by actual measurement using the ring cutter method. The formula for calculating the volumetric salt content after volume correction is as follows: ,in The salinity is expressed in grams per cubic centimeter, representing the mass of salt contained in a unit volume of undisturbed soil. The corrected salinity parameter eliminates the dimensional bias caused by differences in porosity between different soil layers and can be directly used for subsequent fitting of vertical salinity curves and gradient calculations. This ensures that salinity parameters at different depths use a unified volumetric benchmark. This variable-spacing stratified sampling method, which combines the location of capillary fronts and the distribution range of roots, can increase the sampling point density in the salinity variation range with the same sampling workload. The salinity conversion method with bulk density correction can improve the consistency of vertical salinity distribution calculations, providing a measured data basis for subsequent fitting of vertical salinity variation curves and calculation of gradient coefficients.

[0024] After obtaining the volumetric salinity data at different depths of each sampling point, the weighted least squares method was used to fit the vertical variation curve of salinity at each sampling point. The fitting process constructed a polynomial fitting equation with depth as the independent variable and salinity as the dependent variable, and introduced a depth weight function that decreases with increasing depth to improve the fitting accuracy in the shallow region, matching the subsequent vertical extrapolation requirements driven by surface spectroscopy. The fitting process first defines the independent variables. The depth is defined as the soil layer, with the surface as the zero point and the downward direction as the positive direction. The unit is meters, and the dependent variable is the volumetric salinity at the corresponding depth. The unit is grams per cubic centimeter. The general form of the order-1 polynomial fitting equation is: ,in to denoted as the coefficients of the polynomial to be solved.

[0025] Since subsequent vertical integrations are calculated layer by layer downwards using the surface salinity as the initial value, the fitting accuracy of the shallow layer has a much greater impact on the overall calculation result than that of the deeper layer. Therefore, a depth weighting function that decays exponentially with depth is introduced, so that the contribution of the shallow layer salinity observation value to the fitting result is greater than that of the deep layer salinity observation value at the same sampling point. The shallow layer is defined as the soil layer with a depth of less than or equal to 0.3 meters, corresponding to the region where salinity is most significantly affected by evaporation and capillary action and changes at the fastest rate. The expression for the depth weighting function is: ,in For the first The depth values ​​of each sampling layer, in meters. is the weight attenuation coefficient, a dimensionless constant calibrated based on the vertical rate of change of salinity in the region, typically set to 1.5 per meter. The larger the depth, the smaller the corresponding weight value, and the lower the contribution of the observed value to the fitting result. The optimization objective of weighted least squares fitting is to minimize the weighted sum of squared residuals, where the residuals are the difference between the measured salinity and the fitted salinity. The expression for the weighted sum of squared residuals is: ,in This represents the total number of stratified samples for the corresponding sampling points. For the first The measured volumetric salinity of the layer can be obtained by constructing a normal equation system and solving it to obtain the optimal polynomial coefficients by taking the partial derivatives of the weighted sum of squared residuals with respect to the coefficients of each polynomial and setting the partial derivatives to zero, thus completing the fitting of the vertical variation curve of salinity.

[0026] The order of the fitting polynomial determines the complexity of the curve. If the order is too low, it will be unable to capture the nonlinear variation of salinity, while if the order is too high, overfitting is likely to occur. Therefore, the order of the fitting polynomial is selected from several candidate orders based on the Akaike Information Criterion. The Akaike Information Criterion is a statistical criterion used for model order selection. It balances fitting accuracy and model complexity by introducing a penalty term for the number of parameters, and avoids the decline in generalization ability caused by overfitting.

[0027] The candidate orders cover four groups from first to fourth order. The Akaike Information Criterion value corresponding to each group of orders is calculated using the following formula: ,in Let be the order of the polynomial. The total number of parameters to be estimated. To calculate the weighted sum of squared residuals at the corresponding order, the order that minimizes the Akaike Information Criterion is used as the final fitting order for the corresponding sampling point, automatically adapting to the vertical distribution of salinity at different sampling points. After curve fitting, a weighted coefficient of determination is calculated for the fitted vertical salinity curve to measure the degree to which the fitted curve interprets the measured data. The formula for calculating the weighted coefficient of determination is as follows: ,in The weighted total sum of squares is expressed as follows: , The weighted average salinity is obtained by averaging the measured salinity of each layer according to depth weights. The coefficient of determination is a dimensionless value ranging from zero to one; the closer the value is to one, the better the fit. The preset fitting accuracy threshold is set to 0.9. If the coefficient of determination for a sampling point is lower than the preset fitting accuracy threshold, the fitting effect is determined to be unsatisfactory, and the corresponding sampling point is marked as an outlier. Outliers are usually caused by sampling operation errors or sudden changes in local soil structure. Subsequently, stratified soil samples and spectral data are collected within one meter of the original sampling point to increase the stratified sampling density. The weighted fitting process is then repeated until the coefficient of determination meets the threshold requirement. This depth-weighted adaptive order fitting method can specifically improve the fitting accuracy of shallow salinity curves compared to fixed-order equal-weight fitting. At the same time, it automatically matches the salinity distribution pattern of different points. The outlier verification mechanism ensures that the vertical curve of each sampling point meets the accuracy requirements, providing a reliable vertical distribution benchmark for subsequent gradient coefficient calculation and prediction model training.

[0028] After fitting the vertical variation curve of salinity at each sampling point, the analytical first derivative of the polynomial form of the vertical variation curve of salinity is obtained to get the gradient function that changes continuously with depth. The analytical derivative is directly derived term by term based on the algebraic form of the polynomial, without the need for numerical difference approximation, which avoids the calculation error introduced by the difference step size.

[0029] Let the expression for the k-th order salinity vertical variation curve obtained by fitting a certain sampling point be: ,in This represents the soil depth, expressed in meters, with the surface as the zero point and downwards as the positive direction. For the first The polynomial coefficients of the term. For depth The volumetric salt content at a given location, expressed in grams per cubic centimeter.

[0030] According to the polynomial differentiation rule, the analytic first derivative with respect to depth z is obtained. The derivative of each term is the product of the corresponding coefficient, the degree of the term, and the degree of depth minus one. The derivative of the constant term is zero. The resulting gradient function expression is: ,in The gradient function is a gradient function that changes continuously with depth, with units of grams per cubic centimeter per meter. Physically, it represents the change in salinity per unit depth. The sign of the gradient function value indicates the trend of salinity along the depth direction. A positive value indicates that the salinity increases with depth, while a negative value indicates that the salinity decreases with depth. The absolute value of the value corresponds to the rate of vertical change in salinity.

[0031] After obtaining the continuous gradient function, the depth values ​​at each preset depth are substituted into the gradient function to obtain the corresponding gradient values ​​at each preset depth. The preset depths are all standard depth points determined by the previous layered sampling scheme, covering all sampling layers from the surface to the deepest layer. For the th Preset depth The formula for calculating the corresponding gradient value by substituting into the gradient function is: ,in For the first The gradient values ​​at each preset depth are calculated and recorded as the vertical gradient coefficients of salinity. Each sampling point corresponds to a vertical gradient coefficient value of salinity at each preset depth. The gradient coefficients retain the rate information of vertical change of salinity and can reflect the trend of salinity accumulation or leaching at different depths.

[0032] The vertical gradient coefficients of salinity at all sampling points and preset depths constitute the gradient coefficient dataset. The dataset is stored in the form of a two-dimensional matrix, with each row corresponding to a sampling point and each column corresponding to a preset depth. The matrix elements are the vertical gradient coefficient values ​​of salinity at the corresponding sampling point and depth. The gradient coefficient dataset is used for subsequent feature band selection and model training, serving as the output label variable of the prediction model. This gradient coefficient calculation method based on analytical differentiation does not have the subjective problem of step size selection compared to the numerical difference method. The calculation results are unique and have higher accuracy. The continuous gradient function can adapt to the gradient value requirements of any depth point. The standardized dataset structure can be directly connected to the subsequent correlation analysis and regression modeling process, providing the output label basis for the construction of the gradient prediction model.

[0033] After constructing the gradient coefficient dataset, smoothing and denoising processes, along with first-order differential transformations, were sequentially applied to the surface soil hyperspectral reflectance data at each sampling point to obtain first-order differential spectra. Then, band-by-band multiple correlation analysis was used to select the feature bands with the highest correlation to the salinity vertical gradient, reducing spectral data redundancy and improving the computational efficiency and prediction accuracy of subsequent models. Smoothing and denoising were achieved using the Savitzky-Golayy convolutional smoothing method. This method corrects the reflectance of the central band of the window by using polynomial least-squares fitting within a moving window, which can suppress high-frequency random noise while preserving spectral absorption characteristics. Let the discrete sequence of the original reflectance spectrum be... ,in For the first The wavelength of the i-th band is measured in nanometers. The window width is set to 11 bands. A second-order polynomial is used for fitting, and after smoothing, the i-th band... Reflectance values ​​of each band It is obtained by weighted summation of the original reflectance of each band within the window and the corresponding convolution weights. The calculation formula is as follows: ,in These are the convolution weights smoothed by Savitzky-Golay. The weighted normalization coefficients are used to smooth out high-frequency fluctuations caused by instrument noise and soil microparticle scattering, thereby improving the signal-to-noise ratio of spectral data.

[0034] After smoothing, a first-order differential transform is performed. First-order differential spectroscopy effectively eliminates baseline drift and linear shift in the soil background, highlights the spectral absorption slope characteristics corresponding to salt ions, and enhances the correlation between the spectral signal and salinity parameters. The differential calculation uses the central difference method. The formula for calculating the first-order differential value of each band is: ,in and The first The wavelengths of adjacent long-wave and short-wave bands, in nanometers. The first-order differential value for the corresponding band is expressed in nanometers. Its physical meaning is the rate of change of reflectivity with wavelength. Arranging the first-order differential values ​​of all bands in order of wavelength yields the first-order differential spectrum.

[0035] After completing the first-order differential spectrum calculation for all sampling points, a band-by-band multiple correlation analysis is performed between the first-order differential value of the first-order differential spectrum at each band and the salinity vertical gradient coefficient of each sampling point in the gradient coefficient dataset. The multiple correlation coefficient is used to measure the overall linear correlation between the first-order differential value of a single band and the multidimensional variable composed of multiple depth gradient coefficients. It can comprehensively evaluate the explanatory power of a single band for the entire vertical gradient profile. Unlike simple correlation analysis that only targets a single depth, it is more suitable for the prediction needs of multi-depth gradients.

[0036] For the Given a spectral band, let the first-order differential value of each sampling point in the corresponding spectral band be a column vector of independent variables. Each sampling point The gradient coefficients for each preset depth are: dimensional dependent variable matrix The square of the multiple correlation coefficient equals the degree to which the independent variable jointly explains all dependent variables, and the formula is: ,in For the first A column vector of first-order differential values ​​for each band The gradient coefficient matrix, For the first The multiple correlation coefficients for each band are dimensionless values ​​ranging from zero to one. A higher value indicates a stronger overall correlation between the corresponding band's spectrum and the salinity vertical gradient. After calculating the multiple correlation coefficients for all bands, they are sorted in descending order of absolute value. The top twenty bands are selected as feature bands, balancing model input dimensionality and information completeness while avoiding overfitting due to excessive dimensionality. Finally, the first-order derivatives of each sampling point at all feature bands are extracted and arranged in rows (sampling points) and columns (feature bands), forming a feature band first-order derivative matrix. Each row of the matrix corresponds to a sampling point, and each column corresponds to a feature band. Matrix elements represent the first-order derivative of the corresponding sampling point at the corresponding feature band, expressed in nanometers. This feature band first-order derivative matrix serves as the input dataset for the subsequent gradient prediction model, used for model training and prediction. This effectively reduces the dimensionality of spectral data and improves the training efficiency and generalization ability of the subsequent model.

[0037] When constructing the gradient prediction model, to eliminate multicollinearity among feature bands and reduce input dimensionality, principal component analysis (PCA) is first performed on the first-order differential matrix of the feature bands to extract several principal components, ensuring that the cumulative variance contribution rate of the principal components is not less than 95%. PCA is a dimensionality reduction method that transforms highly correlated original variables into uncorrelated composite variables through orthogonal transformation. The processing flow first performs standardization on the first-order differential matrix of the feature bands to eliminate the magnitude differences in differential values ​​between different bands. The first characteristic band For each sample, the standardized calculation formula is: ,in This is the original first-order differential value, in units of nanometers. For the first The mean of all samples in each band. For the first The standard deviation of all samples in each band The standardized values ​​are dimensionless. The covariance matrix of the standardized matrix is ​​calculated. Eigenvalue decomposition is performed on the covariance matrix, yielding a sequence of eigenvalues ​​and corresponding eigenvectors arranged in descending order of value. Each eigenvector corresponds to the projection direction of a principal component, and the projection value of a sample onto the corresponding direction is the score of that principal component. The variance contribution rate of a single principal component is the proportion of its corresponding eigenvalue to the sum of all eigenvalues, and the cumulative variance contribution rate is the top... The sum of the variance contribution rates of each principal component is calculated using the following formula: ,in For the first 1 eigenvalue, The total number of characteristic bands, For the front The cumulative variance contribution rate of each principal component is calculated, and extraction stops when the cumulative variance contribution rate first reaches or exceeds 95%. The score matrices of the principal components are used as input variables for the model.

[0038] Using the extracted principal components as input variables and the salinity vertical gradient coefficients at each preset depth corresponding to the sampling points as output variables, a gradient prediction model is trained using partial least squares regression (PLR). PLS is a multi-output regression method that simultaneously maximizes the covariance of input and output variables, making it suitable for multi-objective prediction scenarios with small sample sizes. The algorithm first extracts latent variables from the input principal component matrix and the output gradient coefficient matrix respectively, maximizing the covariance between the two sets of latent variables. After progressively extracting a preset number of latent variables, a linear regression relationship is established from the input latent variables to the output latent variables, and then mapped back to the original variable space. Finally, a complete gradient prediction model containing the regression coefficient matrix and intercept vector is obtained. The gradient prediction model can directly output the predicted salinity vertical gradient coefficients at all preset depths of the corresponding points by inputting the principal component scores of the surface spectrum. During training... The sampling points are divided into training and validation sets according to their spatial location. The leave-one-out method is used to prevent spatially adjacent sampling points from being assigned to both the training and validation sets simultaneously. The leave-one-out method is a cross-validation method based on the spatial coordinates of the sampling points. It can avoid the overestimation of model accuracy caused by the spatial autocorrelation of soil properties and ensure that the validation results truly reflect the model's generalization ability to unknown areas. In specific implementation, the planar Euclidean distance between any two sampling points is first calculated based on the planar coordinates of all sampling points. The distance calculation formula is the square root of the sum of the squares of the differences between the horizontal and vertical coordinates of the two points. The spatial isolation threshold is set to fifty meters. In each round of validation, one sampling point is selected as a sample for the validation set. At the same time, all sampling points whose planar distance to the corresponding validation sample is less than the spatial isolation threshold are excluded from the training set. Only sampling points whose distance is greater than or equal to the threshold are retained to form the training set, thus avoiding the leakage of spatial information of adjacent samples from the root.

[0039] Each sampling point is used sequentially as a validation sample. After all iterations are completed, the gradient coefficients of all sampling points are obtained as validation predicted values. After all training and validation rounds are completed, the accuracy of the trained gradient prediction model is checked using the validation set. The root mean square error and coefficient of determination of the validation set are recorded as model accuracy indicators. The root mean square error reflects the average deviation between the predicted value and the measured value, and the calculation formula is as follows: ,in To verify the total number of samples, For the first Predicted gradient coefficient values ​​for each sample. To correspond to the measured values, the units are grams per cubic centimeter per meter. The smaller the root mean square error, the lower the prediction error.

[0040] The coefficient of determination reflects the extent to which the model explains the variation in the output variable, and is calculated using the following formula: ,in The mean of all measured gradient coefficients. The value is dimensionless and ranges from zero to one. The closer the value is to one, the stronger the explanatory power of the model. If the verification accuracy does not meet the preset requirements, the number of feature bands or the principal component extraction ratio will be adjusted and the training process will be re-executed until the accuracy index meets the detection requirements. The modeling method of principal component dimensionality reduction combined with partial least squares regression can cope with the multicollinearity and multi-output prediction requirements of spectral data. The space leave-one-out verification mechanism can obtain accuracy evaluation results that are close to actual applications, providing model support for the subsequent prediction of gradient coefficients of the points to be detected.

[0041] After collecting hyperspectral reflectance data of surface soil at each measuring point, a preprocessing procedure that is completely consistent with the spectral data of the sampling points is first executed to ensure that the data benchmark of the measuring point data and the modeling sample is consistent, and to avoid prediction deviations caused by preprocessing differences.

[0042] Preprocessing first employs the Savitzky-Golay convolutional smoothing algorithm, with parameters identical to those used in the modeling stage, to smooth and denoise the original reflectance spectrum. The window width and polynomial order remain consistent with those used in the sampling point processing. Then, the first-order differential value of each band is calculated using the central difference method to obtain the surface first-order differential spectrum of each measurement point. After completing the differential transformation, the first-order differential value of the corresponding band is extracted according to the wavelength position of the characteristic bands selected in the modeling stage, forming the characteristic band first-order differential vector of the measurement point. Subsequently, principal component transformation is performed using the standardized parameters obtained in the sampling point training stage and the principal component loading matrix. The transformation process first uses the mean and standard deviation of each band in the training set to standardize the characteristic differential value of the measurement point. Then, the standardized vector is multiplied by the principal component eigenvector matrix to obtain the principal component score vector of the measurement point. The number of principal components remains consistent with that in the modeling stage, and the cumulative variance contribution rate is not less than 95%.

[0043] The principal component score vector is input into the trained gradient prediction model. The gradient prediction model directly outputs the predicted vertical gradient coefficients of salinity at all preset depths corresponding to the measurement points through linear mapping. The entire transformation and prediction process reuses all parameters from the modeling stage, without refitting for the measurement point data, ensuring the consistency and reliability of the prediction results. The surface salinity spectral prediction sub-model is constructed using a partial least squares regression algorithm to directly predict the volumetric salinity of surface soil through surface spectra, providing an initial reference value for subsequent vertical integration. During the sub-model construction stage, surface hyperspectral reflectance data from all sampling points are used as input, and the measured surface volumetric salinity at the corresponding sampling points is used as output. Before modeling, a standard normal variable transformation is performed on the original reflectance spectrum. The standard normal variable transformation is a standardization method for single spectra. By centering the mean and normalizing the standard deviation of the full-band reflectance, it eliminates multiplicative scattering noise caused by soil particle size differences and surface roughness, and weakens baseline drift caused by scattering effects. The calculation formula for the standard normal variable transformation is as follows: ,in For the smoothed first Reflectance values ​​for each band, This represents the average reflectance across all bands of a single spectrum. This represents the total number of spectral bands. The transformed reflectance value is dimensionless. After transformation, the mean of each spectrum is zero and the standard deviation is one, which can effectively improve the linear correlation between spectral data and salinity. After spectral transformation, partial least squares regression is used to establish a quantitative relationship between spectral reflectance and surface salinity. Partial least squares regression can simultaneously extract latent variables from independent and dependent variables, maximizing the covariance of the two sets of variables, and is suitable for small sample modeling scenarios of high-dimensional spectral data. The algorithm extracts latent variables simultaneously from the spectral matrix and salinity vector. The optimal number of latent variables is determined by leave-one-out cross-validation. The number of latent variables corresponding to the minimum root mean square error of cross-validation is selected as the final model parameters to avoid overfitting.

[0044] Sub-model validation also employs the leave-one-out method, calculating the root mean square error and coefficient of determination of the validation set to evaluate the model's generalization ability to unknown regions. Once validated, the sub-model can be used to predict the surface salinity of the measuring points. After performing the same smoothing and standard normal transformation on the surface soil hyperspectral reflectance data of each measuring point, it is input into the trained surface salinity spectral prediction sub-model. The sub-model calculates the spectral prediction value of the surface soil salinity of each measuring point through the pre-stored regression coefficient vector and intercept term. The predicted value is the volumetric salinity, in grams per cubic centimeter, which perfectly matches the dimensions of the gradient coefficient used for subsequent integration. It can be directly used as the initial value of the salinity at the shallowest preset depth for subsequent vertical integration calculation. This dual-model collaborative prediction architecture establishes independent spectral inversion models for the surface baseline value and the vertical change rate, which is more in line with the physical laws of vertical salt transport than directly modeling the salinity at each depth. At the same time, the unified preprocessing process ensures the data consistency between the modeled samples and the predicted samples, effectively improving the overall prediction accuracy of vertical salinity distribution.

[0045] When setting up measuring points in locations other than the sampling points within the target area, the density of measuring points is higher than that of sampling points, and the setting method is consistent with that of sampling points, that is, the measuring points are set up in blocks according to the terrain elevation and vegetation coverage to ensure that the density of measuring points in each block is uniform.

[0046] After obtaining the predicted values ​​of the vertical gradient coefficient of salinity at each measuring point and the spectral prediction values ​​of salinity in the surface soil, a trapezoidal integral is performed on the predicted values ​​of the vertical gradient coefficient of salinity along the depth direction to estimate the soil salinity at each depth layer. The trapezoidal integral method can reduce the integration error when the layer spacing is large by approximating the average rate of change within the layer segment by using the mean of the gradient between two adjacent points.

[0047] Let all preset depths be arranged in order from shallowest to deepest. to ,in The shallowest preset depth corresponds to the surface sampling depth, in meters. The spectral prediction value of the surface soil salinity at the measuring point is used as the initial value of the salinity at the shallowest preset depth, denoted as . The unit is grams per cubic centimeter. The salinity is calculated layer by layer from shallow to deep, for each subsequent depth. The preset depth and the first For a layer segment between two preset depths, the arithmetic mean of the gradient prediction values ​​corresponding to the two depths is first taken as the equivalent gradient within that segment. The equivalent gradient represents the average rate of change of salinity with depth within the corresponding segment, and the calculation formula is as follows: ,in For the first Predicted vertical gradient coefficient of salinity at a preset depth, in grams per cubic centimeter per meter. For the first The equivalent gradient of each segment, with units consistent with the gradient coefficient. The thickness of this segment is the difference between two preset depths, denoted as... The unit is meters. The estimated salinity at the next preset depth is obtained by summing the salinity of the previous layer and the change in salinity within the layer segment. The recursive formula is as follows: ,in For the first Estimated salinity at a preset depth. For the first The estimated salinity values ​​at each preset depth are calculated in grams per cubic centimeter. This accumulation process is repeated until the deepest preset depth is reached, thus obtaining the estimated soil salinity at each preset depth for that measuring point. This provides a complete description of the vertical distribution characteristics of salinity at the corresponding point. After obtaining the estimated salinity values ​​at each depth for all measuring points, the vertical distribution information of soil salinity in the target area is generated. First, the planar coordinates of each measuring point are bound to its estimated soil salinity values ​​at each preset depth. Each measuring point corresponds to a set of attribute data containing planar location and salinity at multiple depths. The estimated salinity values ​​of all measuring points at the same preset depth layer are spatially interpolated using the Kriging interpolation method to obtain the planar distribution raster of salinity at that depth layer. The Kriging interpolation method is a spatial interpolation method based on the theory of regionalized variables. It utilizes the spatial autocorrelation of data to achieve unbiased estimation, and the interpolation results can accurately reflect the spatial distribution structure of salinity.

[0048] The interpolation process first calculates the experimental semivariogram values ​​for all measurement point pairs. The semivariogram describes how the attribute difference between two points in space changes with the distance between them. For measurement point pairs with a distance of h, the formula for calculating the experimental semivariogram is: ,in For spacing equal to The total number of measurement points, For position The salt content value at that location is expressed in grams per cubic centimeter. This represents the semivariance value for the corresponding interval, expressed in grams per cubic centimeter squared.

[0049] After obtaining the experimental semivariances at different intervals, a spherical variogram model was used for fitting. The expression for the spherical model is as follows:

[0050] in The nugget value represents random variation and measurement error smaller than the sampling interval. Structural variance represents the magnitude of spatial structural variation. For variable range, represents the maximum effective distance of spatial autocorrelation. The three parameters are obtained by fitting the experimental semivariogram using the least squares method.

[0051] After fitting the variogram, for each grid point to be interpolated, based on the positions of surrounding measurement points involved in the interpolation, a Kriging equation system is constructed using unbiased estimation and the minimum variance criterion. The interpolation weights for each measurement point are then solved, and the sum of these weights is one. The final salt content interpolation result for the grid point is the weighted sum of the salt content of the surrounding measurement points, calculated using the following formula: ,in For the first The Kriging weights for each measurement point are dimensionless values. The value is the estimated salt content of the grid points to be interpolated, in grams per cubic centimeter.

[0052] After all grid points are calculated, a two-dimensional salinity planar distribution grid corresponding to the depth layer is obtained. The spatial resolution of the grid can be set to 5 meters by 5 meters according to the detection requirements. All planar distribution grids corresponding to the preset depth layers are stacked sequentially from shallow to deep to form a three-dimensional array with row corresponding to the horizontal coordinate, column corresponding to the vertical coordinate, and layer corresponding to the depth. This three-dimensional array is associated and stored with the corresponding depth label and planar coordinate label. The depth label records the actual depth value corresponding to each layer, and the planar coordinate label records the actual geographic coordinates corresponding to each grid. Finally, complete vertical distribution information of soil salinity in the target area is formed, which can be directly used for subsequent salinity level evaluation and treatment plan formulation. This vertical extrapolation method based on trapezoidal integral can ensure the accuracy of vertical salinity calculation. The spatial estimation results of Kriging interpolation have statistical optimality. The storage structure of the three-dimensional array facilitates quick querying of salinity data at any location and depth, providing refined data support for saline-alkali land monitoring and treatment.

[0053] Please see Figure 2 As shown, a second objective of this invention is to provide a system for implementing a method for detecting the components of saline-alkali soil based on spectral detection, comprising: The sampling point layout and spectral acquisition unit is used to deploy sampling points in the target area according to the terrain elevation and vegetation coverage, and to collect hyperspectral reflectance data of the surface soil at each sampling point, while recording the acquisition time, the distance between the probe and the soil surface and the illumination attitude. The stratified sampling and salinity measurement unit is used to collect soil samples at each sampling point at a preset depth determined by the capillary rise and crop root distribution, measure the salinity of each soil sample, and record the bulk density. The unit for fitting vertical salt curves and calculating gradient coefficients is used to arrange the salt content at each sampling point at each preset depth in order of depth, and to fit the vertical salt variation curves by using the least squares method with depth weights, and to calculate the first derivative as the vertical salt gradient coefficient at each preset depth, thus forming a gradient coefficient dataset. The spectral preprocessing and feature band extraction unit is used to smooth and denoise the hyperspectral reflectance data of surface soil and perform first-order differential transformation. Feature bands are selected through band-by-band correlation analysis to form a feature band reflectance matrix. The gradient prediction model building unit is used to perform principal component analysis on the reflectivity matrix of the characteristic band, and then use the principal components as input and the salinity vertical gradient coefficient as output to train the gradient prediction model using the partial least squares regression algorithm. Other location prediction and integration units are used to collect surface soil hyperspectral reflectance data at locations other than the sampling points. After the same preprocessing, the data is input into the gradient prediction model to obtain the predicted value of the vertical gradient coefficient of salinity. At the same time, the surface salinity spectral prediction sub-model, which outputs the measured surface salinity at the sampling points, is used to obtain the spectral prediction value of surface soil salinity at other locations. The spectral prediction value is then used as the initial value to integrate layer by layer along the depth direction to obtain the estimated value of soil salinity at each preset depth. The vertical distribution information generation unit is used to arrange the estimated soil salinity values ​​at each preset depth in depth order, perform spatial interpolation on the estimated values ​​at the same depth layer and stack them into a three-dimensional array, and output the vertical distribution information of soil salinity in the target area by combining depth labels and planar coordinate labels.

[0054] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for detecting components in saline-alkali soil based on spectral detection, characterized in that: Includes the following steps: S1. Set up several sampling points in the target area, determine the plane coordinates of each sampling point, collect the hyperspectral reflectance data of the surface soil at each sampling point, and collect soil samples at multiple preset depths at each sampling point, and determine the salt content of each layer of soil sample, wherein the surface salt content is used as the measured value of the surface salt content of the corresponding sampling point. S2. Arrange the salinity at each sampling point at each preset depth in order of depth, and use the least squares method to fit the vertical variation curve of salinity at each sampling point. Calculate the first derivative of the vertical variation curve of salinity to obtain the gradient function that changes continuously with depth. Substitute each preset depth into the gradient function to obtain the vertical gradient coefficient of salinity at each sampling point at each preset depth. A gradient prediction model is constructed by performing a first-order differential transformation on the hyperspectral reflectance data of surface soil and extracting the first-order differential values ​​of characteristic bands. The first-order differential values ​​of the characteristic bands are used as inputs, and the vertical gradient coefficients of salinity at each preset depth of the corresponding sampling points are used as outputs. Simultaneously, using the hyperspectral reflectance of the surface soil at each sampling point as input and the measured value of the surface salinity at the corresponding sampling point as output, a spectral prediction sub-model for surface salinity is constructed. S3. Set up measuring points at other locations outside the sampling points in the target area, determine the plane coordinates of each measuring point, collect the hyperspectral reflectance data of the surface soil at each measuring point, perform a first-order differential transformation and input it into the gradient prediction model to obtain the predicted value of the vertical gradient coefficient of salinity at each measuring point. The surface soil hyperspectral reflectance data of each measuring point are input into the surface salinity spectral prediction sub-model to obtain the spectral prediction value of surface soil salinity at each measuring point. Using the spectral prediction value of the surface soil salinity as the initial value of the salinity at the shallowest preset depth, a trapezoidal integral is performed on the predicted value of the vertical gradient coefficient of the salinity along the depth direction to obtain the estimated value of the soil salinity at each preset depth for each measuring point. S4. Bind the estimated soil salinity at each measurement point at each preset depth to the corresponding plane coordinates. Perform spatial interpolation on the estimated salinity of all measurement points at the same preset depth layer to obtain the plane distribution grid of salinity at that depth layer. Stack all the plane distribution grids of the preset depth layers in depth order to form a three-dimensional array. Combine the depth label and the plane coordinate label to generate the vertical distribution information of soil salinity in the target area.

2. The method for detecting saline-alkali soil components based on spectral detection according to claim 1, characterized in that: When setting up several sampling points in the target area, the terrain elevation and vegetation cover of the target area are first divided into spatial blocks so that the number of sampling points in each block matches the area proportion of that block. When collecting hyperspectral reflectance data of surface soil at each sampling point, the spectral probe is placed perpendicular to the soil surface and the distance between the probe and the soil surface is kept consistent. Before collection, surface debris and crusts at the sampling point are scraped off so that the field of view of the spectral probe is all bare or uniformly covered soil. Several spectral curves are continuously collected at each sampling point under the same illumination conditions, and the average value is taken as the hyperspectral reflectance data of surface soil at that sampling point. The collection time, probe distance from soil surface, light incident angle and probe posture corresponding to each spectral curve are also recorded.

3. The method for detecting saline-alkali soil components based on spectral detection according to claim 2, characterized in that: When collecting soil samples at multiple preset depths at each sampling point, the division of preset depths is determined based on the typical influence range of capillary rising fronts and the typical distribution range of crop roots in the target area, so that the stratification spacing within the depth range affected by capillary rising fronts is smaller than the stratification spacing within the distribution range of crop roots. Soil samples collected from each layer were individually placed in sealed containers and marked with sampling point numbers and layer positions. The conductivity of the extract of each layer of soil samples was determined by the conductivity method. The salt content of each layer of soil samples was then calculated, and volume correction was performed in conjunction with the bulk density of each layer of soil samples during the conversion process.

4. The method for detecting saline-alkali soil components based on spectral detection according to claim 3, characterized in that: When using the least squares method to fit the vertical variation curve of salinity at each sampling point, a polynomial fitting equation is constructed with depth as the independent variable and salinity as the dependent variable. A depth weight function that decreases with increasing depth is introduced so that the contribution of the shallow salinity observation value to the fitting result is greater than that of the deep salinity observation value at the same sampling point. The order of the fitted polynomial is selected from several candidate orders based on the Akaike Information Criterion, and the order that minimizes the value of the Akaike Information Criterion is taken as the final order. The coefficient of determination is calculated for the vertical variation curve of salinity obtained by fitting. If the coefficient of determination of a certain sampling point is lower than the preset fitting accuracy threshold, the sampling point is marked as an outlier. After collecting the layered soil sample and spectral data of the sampling point, the fitting is performed again.

5. The method for detecting saline-alkali soil components based on spectral detection according to claim 4, characterized in that: When calculating the first derivative of the vertical variation curve of salinity, the analytical first derivative of the polynomial form of the vertical variation curve of salinity obtained by fitting is calculated to obtain the gradient function that changes continuously with depth. Then, the depth values ​​of each preset depth are substituted into the gradient function to obtain the gradient values ​​corresponding to each preset depth. The gradient value is recorded as the vertical gradient coefficient of salinity. Each sampling point corresponds to a vertical gradient coefficient value of salinity at each preset depth. The vertical gradient coefficients of salinity at all sampling points and all preset depths together constitute the gradient coefficient dataset.

6. The method for detecting saline-alkali soil components based on spectral detection according to claim 5, characterized in that: When performing first-order differential transformation on the hyperspectral reflectance data of surface soil and extracting the first-order differential values ​​of characteristic bands, the hyperspectral reflectance data of surface soil at each sampling point are first subjected to smoothing and denoising processing and first-order differential transformation in sequence to obtain the first-order differential spectrum. Next, perform band-by-band multiple correlation analysis on the first-order differential value of the first-order differential spectrum at each band and the vertical gradient coefficient of salt content at each sampling point in the gradient coefficient dataset. Sort the bands in descending order of the absolute value of the multiple correlation coefficient, select a preset number of bands as feature bands, and extract the first-order differential value of each sampling point at the feature band to form a feature band first-order differential matrix. Each row of the feature band first-order differential matrix corresponds to a sampling point, and each column corresponds to a feature band.

7. The method for detecting saline-alkali soil components based on spectral detection according to claim 6, characterized in that: When constructing the gradient prediction model, first perform principal component analysis on the first-order differential matrix of the characteristic band to extract several principal components, so that the cumulative variance contribution rate of the principal components is not less than 95%. Use the extracted principal components as input variables and the vertical gradient coefficient of salinity at each preset depth of the corresponding sampling point as output variables. Use partial least squares regression algorithm to train and obtain the gradient prediction model. During training, sampling points are divided into training and validation sets according to their spatial location. The leave-one-out method is used to ensure that spatially adjacent sampling points are not assigned to both the training and validation sets at the same time. The validation set is used to verify the accuracy of the gradient prediction model obtained from the training, and the root mean square error and coefficient of determination of the validation set are recorded as the model accuracy indicators.

8. The method for detecting saline-alkali soil components based on spectral detection according to claim 7, characterized in that: When setting up measuring points in locations other than the sampling points within the target area, the density of measuring points is higher than that of sampling points, and the setting method is consistent with that of sampling points, that is, the measuring points are set up in blocks according to the terrain elevation and vegetation coverage to ensure that the density of measuring points in each block is uniform. After collecting surface soil hyperspectral reflectance data at each measuring point, smoothing, denoising, and first-order differential transformation were performed using the same process as the spectral data at the sampling points to obtain the surface first-order differential spectrum of each measuring point. The first-order differential values ​​at the characteristic bands were extracted and then subjected to the same principal component transformation before being input into the gradient prediction model to obtain the predicted value of the vertical gradient coefficient of salinity at each measuring point. The surface salinity spectral prediction sub-model is constructed using a partial least squares regression algorithm. The input to the surface salinity spectral prediction sub-model is the surface hyperspectral reflectance data of the sampling points, and the output is the measured surface salinity of the corresponding sampling points. The surface soil hyperspectral reflectance data of each measuring point is input into the trained surface salinity spectral prediction sub-model to obtain the spectral prediction value of the surface soil salinity of each measuring point.

9. The method for detecting components in saline-alkali soil based on spectral detection according to claim 8, characterized in that: When performing trapezoidal integration on the predicted vertical gradient coefficient of salinity along the depth direction, the spectral prediction value of the salinity of the surface soil at the measuring point is used as the initial value of the salinity at the shallowest preset depth, and the value is progressively increased from the shallowest layer to the deepest layer: For the predicted vertical gradient coefficient of salinity between two adjacent preset depths, the average value of the corresponding gradient prediction value is taken as the equivalent gradient in the layer segment. The equivalent gradient is multiplied by the thickness of the layer segment and added to the estimated salinity value of the previous layer to obtain the estimated salinity value at the next preset depth. Repeat this accumulation process until the deepest preset depth to obtain the estimated soil salinity at each preset depth for the measuring point. When generating vertical distribution information of soil salinity, the planar coordinates of each measuring point are bound to the estimated soil salinity at each preset depth. The estimated salinity of all measuring points at the same preset depth layer is spatially interpolated using the Kriging interpolation method to obtain the planar distribution grid of salinity at that depth layer. All planar distribution grids corresponding to the preset depth layers are stacked sequentially from shallow to deep to form a three-dimensional array. This three-dimensional array is associated with and stored with the corresponding depth label and planar coordinate label as the vertical distribution information of soil salinity in the target area.

10. A system for implementing the method for detecting the composition of saline-alkali soil based on spectral detection as described in any one of claims 1-9, characterized in that, include: The sampling point layout and spectral acquisition unit is used to deploy sampling points in the target area according to the terrain elevation and vegetation coverage, and to collect hyperspectral reflectance data of the surface soil at each sampling point, while recording the acquisition time, the distance between the probe and the soil surface and the illumination attitude. The stratified sampling and salinity measurement unit is used to collect soil samples at each sampling point at a preset depth determined by the capillary rise and crop root distribution, measure the salinity of each soil sample, and record the bulk density. The unit for fitting vertical salt curves and calculating gradient coefficients is used to arrange the salt content at each sampling point at each preset depth in order of depth, and to fit the vertical salt variation curves by using the least squares method with depth weights, and to calculate the first derivative as the vertical salt gradient coefficient at each preset depth, thus forming a gradient coefficient dataset. The spectral preprocessing and feature band extraction unit is used to smooth and denoise the hyperspectral reflectance data of surface soil and perform first-order differential transformation. Feature bands are selected through band-by-band correlation analysis to form a feature band reflectance matrix. The gradient prediction model building unit is used to perform principal component analysis on the reflectivity matrix of the characteristic band, and then use the principal components as input and the salinity vertical gradient coefficient as output to train the gradient prediction model using the partial least squares regression algorithm. Other location prediction and integration units are used to collect surface soil hyperspectral reflectance data at locations other than the sampling points. After the same preprocessing, the data is input into the gradient prediction model to obtain the predicted value of the vertical gradient coefficient of salinity. At the same time, the surface salinity spectral prediction sub-model, which outputs the measured surface salinity at the sampling points, is used to obtain the spectral prediction value of surface soil salinity at other locations. The spectral prediction value is then used as the initial value to integrate layer by layer along the depth direction to obtain the estimated value of soil salinity at each preset depth. The vertical distribution information generation unit is used to arrange the estimated soil salinity values ​​at each preset depth in depth order, perform spatial interpolation on the estimated values ​​at the same depth layer and stack them into a three-dimensional array, and output the vertical distribution information of soil salinity in the target area by combining depth labels and planar coordinate labels.