Soil thickness spatial prediction method and apparatus, electronic device, and storage medium
By independently training a soil thickness prediction model based on geographically and ecologically homogeneous zoning and introducing an exponentially decaying weight function, the problem of insufficient soil thickness prediction accuracy in existing technologies is solved, and higher prediction accuracy and stability are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA AERO GEOPHYSICAL SURVEY & REMOTE SENSING CENT FOR LAND & RESOURCES
- Filing Date
- 2026-03-02
- Publication Date
- 2026-06-05
Smart Images

Figure CN122153511A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of soil monitoring, and more specifically, to a method, apparatus, electronic device, and storage medium for spatial prediction of soil thickness. Background Technology
[0002] Soil thickness is a key indicator for characterizing soil resource status, assessing land productivity, and studying soil carbon pools, and is of great significance for ecological environmental protection and sustainable agricultural development. However, soil thickness exhibits strong spatial heterogeneity and non-stationarity, and its spatial distribution is complexly influenced by multiple soil-forming factors such as climate, topography, parent material, organisms, and time.
[0003] Currently, spatial prediction methods for soil thickness can be mainly categorized into traditional geostatistical methods, global machine learning models, and locally weighted regression models. Traditional geostatistical methods (such as Kriging interpolation) rely solely on spatial autocorrelation for prediction, failing to effectively incorporate environmental factors as auxiliary variables, resulting in limited prediction accuracy in areas with strong environmental heterogeneity. While global machine learning models (such as random forests and support vector machines) can capture complex nonlinear relationships, their fundamental assumption is global stationarity, meaning the relationship between environmental factors and soil thickness remains constant within the study area. This contradicts the second law of geography (spatial heterogeneity), leading to prediction biases in complex terrain areas.
[0004] Locally weighted regression models, particularly geographically weighted regression (GWR) and its machine learning variant (geographically weighted random forest, GWRF), alleviate nonstationarity to some extent by locally calibrating the model for each prediction point. However, traditional GWRF methods have significant drawbacks: First, the local window definition relies solely on spatial Euclidean distance, failing to adequately consider the similarity of environmental features. This may result in geographically proximate but environmentally dissimilar samples (such as sunny and shady slopes) being included in the same local model, introducing noise. Second, the independent calculation of weights and model fitting for each prediction point leads to extremely high computational complexity, making it difficult to apply to large-scale, high-resolution mapping tasks. Third, the model lacks interpretability, making it difficult to quantitatively reveal the spatial differentiation patterns of the influence mechanisms and contributions of environmental factors on soil thickness in different regions. Summary of the Invention
[0005] The purpose of this application is to provide a method, apparatus, electronic device and storage medium for spatial prediction of soil thickness, so as to improve the detection accuracy of soil thickness.
[0006] In a first aspect, the present invention provides a method for spatial prediction of soil thickness, the method comprising: Obtain a soil thickness sample dataset, which includes the geographic coordinates of the sample points, the measured soil thickness values of the sample points, and the environmental factors of the sample points. Based on the geographic coordinates and environmental factors of the sample points, a hybrid feature space is obtained; Based on the hybrid feature space, all soil sample points are clustered to obtain multiple geographically and ecologically homogeneous zones; A soil thickness prediction model for each of the geographically homogeneous zones is independently trained based on soil thickness samples corresponding to each of the geographically homogeneous zones, and the soil thickness prediction model for each geographically homogeneous zone is tested based on the measured soil thickness values of the sample points. Determine the target geographical and ecological homogeneous zone to which the point to be predicted belongs; Based on the soil thickness prediction model of the target geographical and ecological homogeneous zone, the predicted soil thickness value of the point to be predicted is obtained.
[0007] The method of this application can cluster samples based on their geographic coordinates and environmental factors, thereby independently training a soil thickness prediction model for each geo-ecological homogeneous zone based on the clustering results. Finally, the soil thickness of the target geo-ecological homogeneous zone to which the point to be predicted belongs is used to predict the soil thickness. Compared with existing technologies, the zoning model independently trained based on clustering results can learn a more stable "environment-soil" relationship, effectively avoiding heterogeneity bias, making the prediction results closer to reality in terms of spatial pattern and numerical accuracy, while enhancing the ability to resist data noise.
[0008] In an optional implementation, obtaining the hybrid feature space based on the geographic coordinates of the sample points and the environmental factors of the sample points includes: The feature selection algorithm based on statistical significance test screens out the environmental factors that affect soil thickness from the environmental factors of the sample points to obtain the screened environmental factors, wherein the environmental factors of the sample points are used as the initial environmental factors. Based on the weights of the geographic coordinates of the sample points, the filtered environmental factors are combined with the geographic coordinates of the sample points to obtain the hybrid feature space.
[0009] This optional implementation can identify and filter out the environmental factors that are truly important to soil thickness, effectively remove redundant and noisy variables, and provide clean and reliable feature inputs for subsequent cluster analysis and zoning modeling, thereby improving the robustness and efficiency of the model.
[0010] In an optional implementation, the feature selection algorithm for the statistical significance test includes the Boruta algorithm.
[0011] This optional implementation preferably uses the Boruta algorithm for environmental factor screening. The algorithm uses a random forest regressor as the base evaluator, which is configured to contain 200 decision trees with a maximum tree depth of 10, and uses all available processor cores for parallel computation to improve efficiency.
[0012] In an optional implementation, the weight of the geographic coordinates is set to 0.5, and the weight of the geographic coordinates is used to adjust their influence relative to the filtered environmental factors.
[0013] This optional implementation can adjust the degree of influence of geographic coordinates relative to the filtered environmental factors by weighting the geographic coordinates.
[0014] In an optional implementation, the soil thickness prediction model based on the target geo-ecological homogeneous zone obtains the predicted soil thickness value of the point to be predicted, including: When the point to be predicted is located within a single geographically and ecologically homogeneous zone, the predicted soil thickness value of the point to be predicted is calculated based on the soil thickness prediction model of the single geographically and ecologically homogeneous zone. When the point to be predicted is located in the boundary area of a geographically and ecologically homogeneous zone, the Euclidean distance between the center of the cluster to which the point to be predicted belongs and the center of the neighboring clusters is determined. The weight of the point to be predicted belonging to each neighboring cluster is determined based on the exponentially decaying Gaussian weight function. Then, from the weight of the predicted point belonging to each neighboring cluster, the clusters with weights greater than a first threshold are selected. The soil thickness prediction values output by the soil thickness prediction model of the clusters with weights greater than the first threshold are weighted and averaged to obtain the soil thickness prediction value of the point to be predicted.
[0015] This optional implementation, based on the architecture of "first clustering and partitioning, then training an independent model for each partition", introduces a distance-based exponential decay weight function (such as a Gaussian function) for the partition boundary points to perform weighted fusion of multi-model prediction results. This framework significantly improves computational efficiency (from O(n×m) to O(K)) while effectively ensuring the spatial continuity of the prediction results and avoiding the boundary mutations caused by simple hard partitioning.
[0016] In an optional implementation, the method further includes: The SHAP values of the screened environmental factors are obtained based on the SHAP value analysis algorithm, wherein the SHAP values of the screened environmental factors characterize the contribution of the screened environmental factors to the predicted soil thickness value of the point to be predicted. Based on the SHAP values of the screened environmental factors, a target visualization chart is generated, which includes a SHAP waterfall plot, a SHAP honeycomb summary plot, and a SHAP bar chart. The SHAP waterfall plot is used to show the interpretation path of the predicted soil thickness value of the point to be predicted, the SHAP honeycomb summary plot is used to show the overall feature distribution effect, and the SHAP bar chart is used to characterize the average influence of features on the output of the soil thickness prediction model.
[0017] This optional implementation can enhance the visualization of prediction results, quantitatively revealing the types, contributions, and effects of dominant environmental factors within different geoecological units.
[0018] In an optional implementation, the method further includes: The screened environmental factors are subjected to data preprocessing, which includes uniform resolution preprocessing, missing value preprocessing, and data standardization preprocessing.
[0019] This optional implementation can perform data preprocessing on the screened environmental factors to exclude outlier values.
[0020] In an optional implementation, the clustering of all soil sample points based on the hybrid feature space yields multiple geo-ecological homogeneous partitions, including: The K-means algorithm is used to identify the homogeneous geographic and ecological regions in the mixed feature space.
[0021] This optional implementation can preferably use the K-means algorithm for clustering. This algorithm can automatically select the k value with the highest overall score as the optimal number of clusters, thereby ensuring the quality of clustering while also taking into account the balance of sample size in each partition.
[0022] In an optional implementation, the environmental factors of the sample points in the method include topographic factors, hydrological factors, soil property factors, climate factors, and vegetation factors.
[0023] In a second aspect, the present invention provides a spatial prediction device for soil thickness, the device comprising: The acquisition module is used to acquire a soil thickness sample dataset, which includes the geographic coordinates of the sample points, the measured soil thickness of the sample points, and the environmental factors of the sample points. The construction module is used to obtain a hybrid feature space based on the geographic coordinates and environmental factors of the sample points; The clustering module is used to cluster all soil sample points based on the hybrid feature space to obtain multiple geographically and ecologically homogeneous partitions. The training module is used to independently train a soil thickness prediction model for each of the geographically homogeneous zones based on soil thickness samples corresponding to each of the geographically homogeneous zones, and to verify the soil thickness prediction model for each geographically homogeneous zone based on the measured soil thickness values of the sample points. The determination module is used to determine the target geographic and ecological homogeneous zone to which the point to be predicted belongs; The prediction module is used to obtain the predicted soil thickness value of the point to be predicted based on the soil thickness prediction model of the target geographical and ecological homogeneous zone.
[0024] The apparatus of this application can cluster samples based on their geographic coordinates and environmental factors, thereby independently training a soil thickness prediction model for each geographically homogeneous zone based on the clustering results. Finally, the soil thickness of the target geographically homogeneous zone to which the point to be predicted belongs is used to predict the soil thickness. Compared with existing technologies, the zoning model, which can be independently trained based on clustering results, can learn a more stable "environment-soil" relationship, effectively avoiding heterogeneity bias, making the prediction results closer to reality in terms of spatial pattern and numerical accuracy, while enhancing the ability to resist data noise.
[0025] Thirdly, the present invention provides an electronic device, comprising: Processor; and The memory is configured to store machine-readable instructions that, when executed by the processor, perform the method as described in any of the foregoing embodiments.
[0026] The electronic device of this application performs spatial prediction of soil thickness by clustering sample points based on their geographic coordinates and environmental factors. Based on the clustering results, it independently trains a soil thickness prediction model for each of the geographically and ecologically homogeneous zones. Finally, it predicts the soil thickness of the target geographically and ecologically homogeneous zone using the soil thickness prediction model of the zone to which the point to be predicted belongs. Compared with existing technologies, the zone model, trained independently based on clustering results, learns a more stable "environment-soil" relationship, effectively avoiding heterogeneity bias and making the prediction results closer to reality in terms of spatial pattern and numerical accuracy. It also enhances the resistance to data noise.
[0027] Fourthly, the present invention provides a storage medium storing a computer program, the computer program being executed by a processor as described in any of the foregoing embodiments.
[0028] The storage medium of this application performs spatial prediction of soil thickness by clustering sample points based on their geographic coordinates and environmental factors. Based on the clustering results, it independently trains a soil thickness prediction model for each geographically homogeneous region. Finally, it uses the soil thickness prediction model of the target geographically homogeneous region to which the point to be predicted belongs to predicts the soil thickness of that point. Compared with existing technologies, the zoning model, independently trained based on clustering results, learns a more stable "environment-soil" relationship, effectively avoiding heterogeneity bias and making the prediction results closer to reality in terms of spatial pattern and numerical accuracy. It also enhances the resistance to data noise. Attached Figure Description
[0029] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 This is a flowchart illustrating a method for spatial prediction of soil thickness provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of a spatial prediction device for soil thickness provided in this application; Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application; Figure 4 This is a flowchart illustrating another method for spatial prediction of soil thickness provided in an embodiment of this application; Figure 5 This is a comparison chart of the prediction accuracy of this application and the prior art, provided in an embodiment of this application; Figure 6 This is a schematic diagram of spatial autocorrelation and model residual analysis results provided in an embodiment of this application; Figure 7 This is a schematic diagram of a SHAP honeycomb summary diagram provided in an embodiment of this application. Detailed Implementation
[0031] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0032] Please see Figure 1 , Figure 1 This is a schematic flowchart of a spatial prediction method for soil thickness provided in an embodiment of this application. Figure 1 As shown, the method includes the following steps: 101. Obtain the soil thickness sample dataset, which includes the geographic coordinates of the sample points, the measured soil thickness values of the sample points, and the environmental factors of the sample points; 102. Based on the geographic coordinates and environmental factors of the sample points, a hybrid feature space is obtained; 103. Based on the hybrid feature space, all soil sample points are clustered to obtain multiple geographically and ecologically homogeneous zones; 104. Train a soil thickness prediction model for each geographically homogeneous zone independently based on soil thickness samples corresponding to each geographically homogeneous zone, and verify the soil thickness prediction model for each geographically homogeneous zone based on the measured soil thickness values of the sample points. 105. Determine the target geographical and ecological homogeneous zone to which the point to be predicted belongs; 106. Based on the soil thickness prediction model of the target geographical and ecological homogeneous zoning, the predicted soil thickness value of the point to be predicted is obtained.
[0033] In the embodiments of this application, a geographically ecological homogeneous zoning refers to a geographical unit within a region with similar soil formation environmental conditions and small spatial variability in soil properties. It can be spatially grouped based on the similarity of environmental elements, such as regions with similar slope, aspect, and parent material.
[0034] In this embodiment, the soil thickness sample dataset refers to a structured data set containing measured soil thickness values and associated attributes at each sampling point, obtained through systematic field sampling and indoor analysis. This dataset serves as the fundamental data support for spatial prediction of soil thickness, soil resource assessment, and land use planning.
[0035] In the embodiments of this application, the geographical coordinates of the sample points can be WGS84 or a locally applicable coordinate system.
[0036] In this embodiment, the hybrid feature space refers to a multidimensional feature representation space formed by organically integrating geographic coordinates (spatial location information) with various environmental covariates (such as topography, climate, vegetation, parent material, etc.) through specific mathematical methods in soil thickness spatial prediction. This space retains the spatial autocorrelation inherent in geographic location and integrates key environmental control factors of soil formation, providing a more comprehensive and discriminative feature foundation for geographic ecological homogeneous zoning and soil thickness modeling.
[0037] In this embodiment, the soil thickness prediction model refers to a mathematical model used to predict soil thickness based on environmental variables and geographical location. This model can be a machine learning-based regression model, such as a random forest regressor or a gradient boosting tree model.
[0038] The method in this application can cluster samples based on their geographic coordinates and environmental factors, thereby independently training a soil thickness prediction model for each geo-ecological homogeneous zone based on the clustering results. Finally, the soil thickness of the predicted point is predicted using the soil thickness prediction model of the target geo-ecological homogeneous zone to which the predicted point belongs. Compared with existing technologies, the zoning model, which can be independently trained based on clustering results, can learn a more stable "environment-soil" relationship, effectively avoiding heterogeneity bias, making the prediction results closer to reality in terms of spatial pattern and numerical accuracy, while enhancing the ability to resist data noise. For example, in the application in the hilly area of the Loess Plateau, traditional global models are difficult to accurately predict the soil thickness of steep slopes and gullies simultaneously, often resulting in over-predicted soil thickness in steep slopes and under-predicted soil thickness in gullies. After adopting the geo-ecological homogeneous zoning modeling method, the study area is divided into three homogeneous units: "thin soil layer at the top of the slope", "medium soil layer in the middle of the slope", and "thick sedimentary layer at the bottom of the gully", and each unit is modeled independently. The results showed that the model for the top of the slope focused more on slope and curvature factors, while the model for the bottom of the gully relied more on runoff accumulation and deposition time. This zonal modeling prevented unreasonable abrupt changes in the predictions at topographic transitions, making them more consistent with actual soil distribution patterns, especially at the boundary between terraces and natural slopes, where the predictions matched the field surveys more closely.
[0039] In this embodiment of the application, as an optional implementation, a hybrid feature space is obtained based on the geographic coordinates and environmental factors of the sample points, including the following sub-steps: The feature selection algorithm based on statistical significance test screens out the environmental factors that affect soil thickness from the environmental factors of the sample points, and obtains the screened environmental factors, where the environmental factors of the sample points are used as the initial environmental factors. Based on the weights of the geographic coordinates of the sample points, the filtered environmental factors are combined with the geographic coordinates of the sample points to obtain a hybrid feature space.
[0040] This optional implementation can identify and filter out the environmental factors that are truly important to soil thickness, effectively remove redundant and noisy variables, and provide clean and reliable feature inputs for subsequent cluster analysis and zoning modeling, thereby improving the robustness and efficiency of the model.
[0041] In this application embodiment, as an optional implementation, the feature selection algorithm for statistical significance testing includes the Boruta algorithm.
[0042] This optional implementation preferably uses the Boruta algorithm for environmental factor screening. The algorithm uses a random forest regressor as the base evaluator, which is configured to contain 200 decision trees with a maximum tree depth of 10, and uses all available processor cores for parallel computation to improve efficiency.
[0043] In this embodiment of the application, as an optional implementation, the weight of the geographic coordinates is set to 0.5. The weight of the geographic coordinates is used to adjust its influence relative to the screened environmental factors.
[0044] This optional implementation can adjust the degree of influence of geographic coordinates relative to the screened environmental factors by weighting the geographic coordinates.
[0045] In this application embodiment, as an optional implementation, the predicted soil thickness value of the point to be predicted is obtained based on the soil thickness prediction model of the target geographic and ecological homogeneous zone, including: When the point to be predicted is located within a single geographical and ecological homogeneous zone, the predicted value of the soil thickness at the point to be predicted is calculated based on the soil thickness prediction model of the single geographical and ecological homogeneous zone. When the point to be predicted is located in the boundary area of a geographically and ecologically homogeneous zone, the Euclidean distance between the center of the cluster to which the point to be predicted belongs and the center of the neighboring clusters is determined. The weight of the point to be predicted belonging to each neighboring cluster is determined based on the exponentially decaying Gaussian weight function. Then, from the weight of the predicted point belonging to each neighboring cluster, the clusters with weights greater than a first threshold are selected. The soil thickness prediction values output by the soil thickness prediction model of the clusters with weights greater than the first threshold are weighted and averaged to obtain the soil thickness prediction value of the point to be predicted.
[0046] This optional implementation, based on the architecture of "first clustering and partitioning, then training an independent model for each partition", introduces a distance-based exponential decay weight function (such as a Gaussian function) for the partition boundary points to perform weighted fusion of multi-model prediction results. This framework significantly improves computational efficiency (from O(n×m) to O(K)) while effectively ensuring the spatial continuity of the prediction results and avoiding the boundary mutations caused by simple hard partitioning.
[0047] In this application embodiment, as an optional implementation, the method of this application embodiment further includes: The SHAP values of the screened environmental factors are obtained based on the SHAP value analysis algorithm. The SHAP value of the screened environmental factors represents the contribution of the screened environmental factors to the predicted soil thickness value of the predicted point. Based on the SHAP values of the screened environmental factors, a target visualization chart is generated. The target visualization chart includes a SHAP waterfall plot, a SHAP honeycomb summary plot, and a SHAP bar chart. The SHAP waterfall plot is used to show the interpretation path of the predicted soil thickness values at the points to be predicted. The SHAP honeycomb summary plot is used to show the overall feature distribution effect. The SHAP bar chart is used to characterize the average influence of features on the output of the soil thickness prediction model.
[0048] This optional implementation can enhance the visualization of prediction results, quantitatively revealing the types, contributions, and effects of dominant environmental factors within different geoecological units.
[0049] In this embodiment of the application, as an optional implementation, the method further includes the following steps: Data preprocessing is performed on the screened environmental factors, including uniform resolution preprocessing, missing value preprocessing, and data standardization preprocessing.
[0050] This optional implementation method can perform data preprocessing on the screened environmental factors to eliminate outlier values.
[0051] In this embodiment of the application, as an optional implementation, all soil sample points are clustered based on a hybrid feature space to obtain multiple geo-ecological homogeneous partitions, including the following sub-steps: Identifying geographically and ecologically homogeneous partitions in a mixed feature space based on the K-means algorithm.
[0052] This optional implementation can preferably use the K-means algorithm for clustering. This algorithm can automatically select the k value with the highest overall score as the optimal number of clusters, thereby ensuring the quality of clustering while also taking into account the balance of sample size in each partition.
[0053] In an optional implementation, the environmental factors of the method sample points include topographic factors, hydrological factors, soil property factors, climate factors, and vegetation factors.
[0054] Please see Figure 2 , Figure 2 This is a schematic diagram of the structure of a soil thickness spatial prediction device provided in this application, as shown below. Figure 2 As shown, the device includes the following functional modules: The acquisition module 201 is used to acquire a soil thickness sample dataset, which includes the geographic coordinates of the sample points, the measured soil thickness of the sample points, and the environmental factors of the sample points. Module 202 is used to obtain a hybrid feature space based on the geographic coordinates and environmental factors of the sample points; Clustering module 203 is used to cluster all soil sample points based on the hybrid feature space to obtain multiple geo-ecological homogeneous partitions; Training module 204 is used to independently train the soil thickness prediction model for each geo-ecological homogeneous zone based on the soil thickness samples corresponding to each geo-ecological homogeneous zone, and to verify the soil thickness prediction model for geo-ecological homogeneous zones based on the measured soil thickness values of the sample points. Module 205 is used to determine the target geographic ecological homogeneous zone to which the point to be predicted belongs; The prediction module 206 is used to obtain the predicted soil thickness value of the point to be predicted based on the soil thickness prediction model of the target geographical and ecological homogeneous zoning.
[0055] The apparatus in this application embodiment can cluster samples based on their geographic coordinates and environmental factors, thereby independently training a soil thickness prediction model for each geo-ecological homogeneous zone based on the clustering results. Finally, the soil thickness of the point to be predicted is predicted using the soil thickness prediction model of the target geo-ecological homogeneous zone to which the point to be predicted belongs. Compared with the prior art, the zoning model, which can be independently trained based on clustering results, can learn a more stable "environment-soil" relationship, effectively avoiding heterogeneity bias, making the prediction results closer to reality in terms of spatial pattern and numerical accuracy, while enhancing the ability to resist data noise.
[0056] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. For example... Figure 3 As shown, the electronic device includes: Processor 301; and The memory 302 is configured to store machine-readable instructions that, when executed by a processor, perform a method as described in any of the foregoing embodiments.
[0057] The electronic device in this application performs spatial prediction of soil thickness by clustering sample points based on their geographic coordinates and environmental factors. Based on the clustering results, it independently trains a soil thickness prediction model for each geo-ecological homogeneous zone. Finally, it uses the soil thickness prediction model of the target geo-ecological homogeneous zone to which the point to be predicted belongs to predicts the soil thickness of that point. Compared with existing technologies, the zoning model, independently trained based on clustering results, learns a more stable "environment-soil" relationship, effectively avoiding heterogeneity bias and making the prediction results closer to reality in terms of spatial pattern and numerical accuracy. It also enhances the resistance to data noise.
[0058] This application provides a storage medium storing a computer program, which is executed by a processor using the method described in any of the foregoing embodiments.
[0059] The storage medium in this application embodiment performs spatial prediction of soil thickness by clustering sample points based on their geographic coordinates and environmental factors. Based on the clustering results, it independently trains a soil thickness prediction model for each geographically and ecologically homogeneous zone. Finally, it uses the soil thickness prediction model of the target geographically and ecologically homogeneous zone to which the point to be predicted belongs to predicts the soil thickness of that point. Compared with existing technologies, the zoning model, which can be independently trained based on clustering results, can learn a more stable "environment-soil" relationship, effectively avoiding heterogeneity bias and making the prediction results closer to reality in terms of spatial pattern and numerical accuracy. It also enhances the resistance to data noise.
[0060] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and there may be other division methods in actual implementation. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interface; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0061] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0062] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0063] It should be noted that if a function is implemented as a software module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0064] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.
[0065] The above are merely embodiments of this application and are not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
[0066] The present invention will be further illustrated by specific embodiments below to help understand the technical solution of the present invention, but the scope of protection of the present invention is not limited to these embodiments.
[0067] Therefore, this application also provides a more specific implementation of the spatial prediction method for soil thickness. Please refer to the specific implementation below. First, various candidate prediction factors are determined. The candidate prediction factors are environmental factors used to predict soil thickness, including topographic factors, hydrological factors, soil property factors, climate factors, and vegetation factors.
[0068] Topographic factors include elevation, slope, aspect, plan curvature, and profile curvature. These factors are most widely used in soil thickness prediction studies and have been confirmed by numerous empirical studies to have significant explanatory power for soil spatial distribution; therefore, this study includes them in the candidate predictive factor set. This study uses a 30-meter resolution digital elevation model (DEM) acquired by the Space Shuttle Radar Topographic Mapping Mission (SRTM DEM) as the basic data source and extracts the aforementioned topographic factors using the DEM analysis module of relevant software.
[0069] SRTM is an abbreviation for "Shuttle Radar Topography Mission," meaning the Space Shuttle Radar Topography Mission. This space-based mapping project is unprecedented in mapping history due to its vast coverage, large volume of data, and high accuracy. Processing all the raw data collected within 10 days will take approximately two years. The resulting global DEM data, after meticulous data processing, boasts an accuracy improvement of about thirty times. Currently, this measurement data comprehensively covers the entire territory of China.
[0070] The hydrological factors included were flow accumulation (FA), flow direction (FD), topographic wetness index (TWI), and stream power index (SPI). These factors effectively characterize surface hydrological processes, which indirectly affect soil thickness and have potential links with soil development. For example, FA and FD reflect the collection paths and patterns of surface runoff, TWI characterizes the spatial distribution trend of soil moisture, and SPI indicates runoff erosion capacity. Together, they influence the migration, deposition, and stability of soil materials, and are therefore widely used for soil thickness prediction and included in this study. All of the above factors were calculated based on DEM data using hydrological analysis tools. The specific process was as follows: first, the original DEM was filled with depressions; then, flow direction and flow accumulation were calculated sequentially; finally, TWI and SPI were generated using a flow distance tool and a raster calculator.
[0071] Soil property factors, including soil type, are selected based on the fact that parent material, as the material basis for soil formation, directly affects the weathering rate, soil development level, and ultimate land productivity through its lithology and physicochemical properties. It is an important intrinsic factor controlling the spatial differentiation of soil thickness.
[0072] Soil types were determined based on field survey results and relevant classification standards, adhering to principles of scientific rigor, completeness, systematicity, and specificity, to classify the parent materials of the study area. The main parent material types in the study area are classified into seven categories: alluvial-diluvial deposits, lacustrine-marsh deposits, loess, gneiss-granulite, basic-ultrabasic volcanic rocks, intermediate-acidic volcanic rocks, and intermediate-acidic intrusive rocks. In this embodiment, the parent rock data are categorized using unique thermal coding, and the coded categorized data can be identified by a random forest model.
[0073] Climate factors included Mean Annual Temperature (MAT) and Mean Annual Precipitation (MAP). These two factors were selected because hydrothermal conditions are key environmental variables controlling rock weathering rates, soil formation and development, and the decomposition and accumulation of organic matter, significantly influencing the spatial differentiation of soil thickness. The data were obtained by interpolating nearly ten years of meteorological data from meteorological stations near the study area. The meteorological data was sourced from the Resource and Environmental Science and Data Center (https: / / www.resdc.cn / ).
[0074] For vegetation factors, this includes the Normalized Difference Vegetation Index (NDVI). NDVI is a widely used indicator in remote sensing and vegetation research (Jensen, 2005) to assess vegetation growth and cover. Its formula is: ; NIR and Red represent the reflectance values in the near-infrared and red light bands, respectively. NDVI ranges from -1 to 1, with positive values indicating abundant vegetation cover and negative values indicating non-vegetated areas (such as water bodies or bare soil). Previous research has shown a strong positive correlation between vegetation index and soil thickness, making it an important environmental variable influencing soil thickness and its application in machine learning models for soil thickness prediction.
[0075] This embodiment first uses the Google Earth Engine (GEE) platform to acquire Landsat 8-L2A image raster files of the study area, which were collected at the same time as the soil samples. Then, band operations are performed on the study area image raster files to obtain the NDVI values for the study area.
[0076] The NDVI data used in this embodiment is calculated based on the L2A level surface reflectance product from the Landsat 8 satellite. The Landsat 8 L2A data is a surface reflectance product that has been radiometrically calibrated and atmospherically corrected. Its atmospheric correction algorithm is based on the Global Medium-Range Weather Forecast (ECMWF) model, which effectively eliminates the effects of atmospheric scattering and absorption, providing more accurate material reflectance information, and is suitable for high-precision quantitative remote sensing analysis and ecological parameter inversion.
[0077] Furthermore, to ensure the quality and consistency of the feature input data and to avoid interference from noise and differences in units of measurement on model performance and feature evaluation, this embodiment performs uniform preprocessing on all candidate predictors and target variables. The specific process is as follows: Unified resolution: After determining the candidate predictors, all the candidate predictors below were converted into a 30m resolution raster form, and the raster resolution was unified.
[0078] Missing Value Handling: When extracting environmental factor values from GIS rasters, invalid values (NoData) may be generated due to missing original data. This study uses a simple interpolation method to handle missing values: For continuous variables (such as elevation, slope, precipitation, etc.), a mean imputation strategy is used to fill in the missing values by using the average of all valid sample points of the factor.
[0079] For categorical variables (referred to as "soil" in this study), a mode imputation strategy was adopted, using the category with the highest frequency of occurrence in the factor to fill in its missing values.
[0080] This data preprocessing ensures the integrity of the dataset and provides a foundation for subsequent analysis.
[0081] Furthermore, due to the significant differences in the dimensions and numerical ranges of various environmental prediction factors (for example, the numerical range of elevation is much larger than that of NDVI), in order to avoid bias in the calculation of the feature importance of the random forest model and subsequent comparisons caused by the dimensions, this embodiment performs data standardization processing: All continuous predictors were standardized using the Z-score, transforming them into normally distributed data with a mean of 0 and a standard deviation of 1. The calculation formula is as follows: ; in, The original value, The mean, The standard deviation is denoted as .
[0082] The same Z-score standardization was applied to the target variable "soil thickness" to optimize the model training process. The categorical variable "soil type," being a class label itself, was not standardized and was directly input into the model in its raw encoded form (tree models can naturally handle categorical features). Through the above preprocessing, a complete and standardized dataset was obtained, providing a reliable and fair data foundation for subsequent feature selection experiments based on various algorithms.
[0083] The embodiments of this application are based on multi-source, standardized geospatial data. Data preparation and preprocessing are fundamental steps in the entire workflow, aiming to construct a sample attribute dataset with unified coordinates, consistent scale, and complete information, providing a high-precision data foundation for subsequent feature selection and model training. This process mainly includes four key steps: soil sample data acquisition, environmental factor data collection, spatial standardization processing, and spatial overlay and attribute extraction.
[0084] Further, please refer to Figure 4 , Figure 4 This is a flowchart illustrating another method for spatial prediction of soil thickness provided in an embodiment of this application. Figure 4 As shown, the spatial prediction method for soil thickness includes steps such as data preparation, data preprocessing, factor combination selection, k-means clustering, GWRFC model establishment, raster prediction, model accuracy verification, and SHAPK interpretability analysis.
[0085] Data preparation includes acquiring soil thickness sample data, which is obtained through standardized field surveys. Each sample point is recorded with precise geographic coordinates and its corresponding measured soil thickness. In this embodiment, soil thickness measurement follows the most commonly used scientific definition in the industry: the vertical depth from the surface to a continuous, hard bedrock or solid barrier layer. This clear definition ensures uniformity in measurement standards and spatial comparability of data, laying a solid foundation for establishing reliable predictive models.
[0086] Simultaneously, it is necessary to systematically collect multi-source environmental factor data covering the entire study area. This embodiment initially selected thirteen environmental factors, constituting a comprehensive factor combination for soil thickness modeling. These factors, as auxiliary variables for predicting soil thickness, comprehensively reflect the key environmental elements influencing soil formation and spatial distribution, mainly covering five categories: topography, hydrology, climate, soil properties, and vegetation. These data initially came from different sensors and databases, with varying original coordinate systems, spatial resolutions, and data formats.
[0087] To achieve accurate spatial matching of all raster data, rigorous spatial standardization is essential. This embodiment unifies all environmental factor layers to the same geographic coordinate system and map projection. Simultaneously, their spatial resolution is standardized using resampling technology; this invention unifies all data to a 30-meter pixel size to eliminate the impact of scale differences on spatial analysis. This step ensures that data from different sources can be accurately calculated and compared within the same spatial framework.
[0088] After spatial standardization, a multi-source environmental factor spatial overlay and numerical extraction method based on raster sampling technology was adopted. Through precise coordinate mapping, the standardized environmental factor raster data was overlaid with the spatial locations of sampling points, thereby extracting the values of all environmental factors corresponding to each sampling point. This process achieved precise spatial matching between sampling points and environmental factors. Finally, these extracted environmental attribute values were integrated with the coordinates of the sampling points and measured soil thickness values to form a structured, complete dataset containing coordinates, soil thickness, and values of each environmental factor. This dataset serves as the core data foundation for all subsequent analysis and modeling operations.
[0089] Furthermore, after data preprocessing, this invention employs an automated feature selection algorithm based on statistical tests to identify and retain core factors that significantly contribute to soil thickness prediction from the initial thirteen environmental factors. This step aims to eliminate redundant and noisy variables, reduce model complexity, and enhance the robustness and interpretability of the final prediction model.
[0090] The feature selection method used in this embodiment is the Boruta algorithm. This algorithm is an encapsulated feature selection method based on random forest. Its core principle is not to find a minimum optimal subset, but to retain all features that are significantly related to the target variable through statistical tests, thereby avoiding the omission of any potentially important information.
[0091] In practice, the first step is to prepare the feature matrix and the target variable. The soil thickness measurements obtained from the preprocessed dataset are used as the target variable y. Simultaneously, the values of thirteen environmental factors are used to construct the feature matrix X. To ensure the machine learning model can fairly evaluate all features and avoid bias caused by differences in units of measurement, continuous environmental factors are Z-score standardized before feature selection, transforming them into a distribution with a mean of 0 and a standard deviation of 1. For any missing values that may exist in the data, a mean imputation strategy is used to ensure the integrity of the dataset.
[0092] Next, the Boruta algorithm execution environment is initialized. The algorithm uses a random forest regressor as the base evaluator, configured to contain 200 decision trees with a maximum tree depth of 10, and utilizes all available processor cores for parallel computation to improve efficiency. The Boruta algorithm itself is set to a maximum of 100 iterations, repeatedly building the random forest model and comparing feature importance until all features are clearly classified or the maximum number of iterations is reached.
[0093] The Boruta algorithm follows a rigorous statistical decision-making mechanism. In each iteration, the algorithm creates a set of "shadow features" by randomly shuffling the original features. These shadow features are theoretically independent of the target variable. Then, the importance scores of all true features and shadow features in the random forest are calculated. A two-sided Wilcoxon rank-sum test is used to compare the importance of each true feature with the importance of the best shadow feature. If the importance of a true feature is consistently significantly higher than the random shadow benchmark, it is marked as "important" and ultimately retained; otherwise, it is judged as "unimportant" and discarded.
[0094] After the algorithm finishes running, it outputs the final set of key features. From the thirteen initial environmental factors, the algorithm automatically selected four key predictive factors: elevation, slope, profile curvature, and annual average precipitation. To verify the effectiveness of the selected feature subset, a new random forest model was trained using this subset, and its goodness-of-fit determination coefficient R² was calculated. The results show that this simplified combination still maintains strong interpretability. Ultimately, these four factors constitute the optimal combination of environmental factors for subsequent spatial clustering and partitioning modeling.
[0095] To determine the spatial nonstationarity of soil-environment relationships and lay the foundation for subsequent zoning modeling, this specific embodiment employs a clustering zoning mechanism based on joint constraints of feature similarity and spatial proximity. The core of this mechanism lies in organically combining screened environmental factors with the geographic coordinates of sampling points to construct a hybrid feature space. An unsupervised clustering algorithm then divides the study area into multiple geographically and ecologically homogeneous zones, ensuring that samples within each zone are not only similar in environmental characteristics but also spatially proximate.
[0096] In its implementation, a feature space for cluster analysis is first constructed. This feature space consists of two parts: the core environmental factor data selected by the Boruta algorithm and the planar coordinates of the sampling points. To achieve a balance between environmental similarity and geographical proximity in the clustering process, this invention introduces a key spatial weight parameter, which is set to 0.5. This means that when constructing the hybrid feature space, the spatial coordinate data, after standardization, is assigned a weight of 0.5 to adjust its influence relative to the environmental factors.
[0097] Before executing the clustering algorithm, the mixed feature space needs to be rigorously preprocessed. First, a mean imputation strategy is used to handle any missing values that may exist in the data. Then, Z-score standardization is applied to normalize all features and eliminate dimensional differences. Finally, the standardized spatial coordinate components are multiplied by a preset weight (0.5) to complete the final construction of the feature space.
[0098] This specific embodiment preferably uses the K-means algorithm for cluster analysis. To determine the optimal number of clusters, an automated evaluation process was designed. This process iteratively searches within a preset range of cluster numbers (k=3 to 20). For each candidate k value, K-means clustering is performed, and two key metrics are calculated: the silhouette coefficient, used to evaluate the cluster density and separation; and the coefficient of variation, used to measure the uniformity of sample size distribution among different clusters. Subsequently, the results for each k value are quantitatively evaluated using a comprehensive scoring function, defined as: Comprehensive Score = 0.6 × Silhouette Coefficient + 0.4 × (1 / (1 + Coefficient of Variation)). Finally, the k value with the highest comprehensive score is automatically selected as the optimal number of clusters, thus ensuring cluster quality while maintaining a balanced sample size across different partitions.
[0099] After clustering, to ensure each partition has sufficient samples to support robust training of the subsequent model, this invention includes a post-processing step. This step examines all clusters and identifies "small clusters" with fewer than a preset threshold (set to 8 samples in this invention). For each small cluster, the mean center of the coordinates of all its samples is calculated, and then the spatially nearest large cluster with the required number of samples is found. Finally, all samples from the small clusters are merged into the nearest large cluster. This strategy effectively avoids model overfitting or training instability caused by insufficient samples within a partition.
[0100] Through the above process, all soil sampling points in the study area were scientifically divided into K subsets with relatively homogeneous spatial-environmental characteristics. These K clustered partitions constitute the framework for subsequent partition modeling and are key to achieving efficient and high-precision spatial prediction. This specific embodiment abandons the high-overhead "point-by-point fitting" mode of traditional Geographically Weighted Random Forest (GWRF) and innovatively adopts a prediction framework of "partition modeling + boundary fusion". Based on fully utilizing the spatial clustering results, this framework achieves an optimal balance between high accuracy and high computational efficiency by establishing an independent prediction model for each homogeneous partition and designing an intelligent prediction value fusion mechanism.
[0101] In the partitioning modeling stage, based on the partitioning results generated by spatial clustering analysis, all soil sampling points are first divided into K subsets. Then, a machine learning prediction model is independently trained for each clustering partition. This invention preferably uses the random forest algorithm as the base model for each partition. In specific implementation, the random forest model for each partition is configured to contain 200 decision trees, with one-third of the features randomly selected during node splitting, a minimum of 5 samples required for internal node splitting, and a minimum of 2 samples required for leaf nodes. These hyperparameter settings aim to ensure the model has sufficient expressive power while effectively preventing overfitting. Before model training, the soil thickness target variable within each partition is Z-score standardized to optimize the model training process.
[0102] In the spatial prediction phase, for any point (raster cell) to be predicted within the study area, the system executes a refined prediction process. First, the cluster affiliation of the prediction point is determined. By inputting the environmental factors and spatial coordinates of the prediction point into a pre-trained K-means clusterer, its distance to each cluster center is calculated, and it is assigned to the nearest cluster. Furthermore, based on the location characteristics of the prediction point, the system employs different prediction strategies: For points within a cluster: if the predicted point is explicitly assigned to a certain cluster partition, then the random forest model corresponding to that partition is directly called for prediction.
[0103] For cluster boundary points: If the predicted point is located at the boundary of different clusters, a distance-based weighted fusion method is used. The system calculates the Euclidean distance from the point to its own cluster and the centers of other nearby clusters, and calculates the weight of its membership in each neighboring cluster according to an exponentially decaying Gaussian weight function. The specific form of this function is: weight = exp(-0.5 × (d / 5000)²), where d is the distance from the predicted point to the cluster center, and the bandwidth h is set to 5000 meters. To ensure computational efficiency, only clusters with a weight greater than 0.01 are retained in the final calculation. The final soil thickness value of the predicted point is the weighted average of the predicted values of each neighboring cluster model.
[0104] To objectively evaluate the model's generalization ability, this application employs a leave-one-out cross-validation method to correct for data leakage. During validation, each sample point is sequentially used as a test set. To ensure the complete independence of the test data, the system temporarily creates a training subset that does not contain the test sample, and uses only the data from this subset to train the local model for its respective cluster. If the number of training samples in the cluster containing the test sample is insufficient (less than 5), a cross-cluster weighted prediction strategy is automatically activated. This validation process effectively avoids overestimation of model performance due to information leakage, providing a more reliable and robust estimate of the model's prediction accuracy.
[0105] Through the above-mentioned partitioned modeling and intelligent prediction framework, this embodiment effectively captures the spatial heterogeneity of soil-environment relationship while significantly reducing computational complexity (from O(n×m) to O(K)) and ensuring the spatial continuity and smoothness of prediction results.
[0106] To comprehensively and objectively evaluate the predictive performance, robustness, and generalization ability of the GWRFC model proposed in this embodiment, a systematic, multi-index accuracy verification and evaluation system is adopted. This system not only includes the evaluation of the model's goodness of fit, but also focuses on verifying the model's predictive ability for unknown data and the spatial characteristics of its residuals through rigorous cross-validation and spatial statistical analysis.
[0107] This embodiment employs leave-one-out cross-validation (LOOCV) as the core method for evaluating the model's generalization ability. LOOCV is an extremely rigorous validation strategy suitable for small sample data. Its process involves sequentially using each sample point as the test set, and then training the model using the remaining samples according to the complete process of this invention (including feature selection, clustering, and partitioning modeling), predicting the soil thickness value for that test point. After traversing all samples, all predicted values and actual measured values are summarized, and the following three core accuracy indicators are calculated: Coefficient of determination: Used to quantify the extent to which a model explains the variation in the target variable; the closer its value is to 1, the higher the prediction accuracy.
[0108] Root mean square error (RMSE): This measures the deviation between the predicted and measured values. The smaller the value, the higher the absolute accuracy of the model's prediction.
[0109] Mean Absolute Error: Similar to RMSE, but not sensitive to outliers, and robustly reflects the average level of prediction error.
[0110] Please see Figure 5 , Figure 5 This is a comparison chart of the prediction accuracy of this application and the prior art, provided by an embodiment of this application. For example... Figure 5 As shown, the coefficient of determination of the GWRFC in this application embodiment is 0.626, which is greater than that of the prior art, indicating that its soil thickness detection accuracy is higher.
[0111] To verify whether the model adequately extracts and interprets the inherent spatial structure information in the data, and to avoid predictable patterns in the residuals due to the omission of key spatial features, this invention performs spatial autocorrelation analysis on the prediction residuals generated by LOOCV. Specifically, the global Moran's I index is used for verification. This index measures the spatial clustering or randomness of the residuals. Its calculation is based on constructing a K-nearest neighbor spatial weight matrix (nearest neighbor number k=8) based on the geographical coordinates of the sampling points, and then performing row standardization. The analysis results are as follows: Figure 6 As shown, where, Figure 6This is a schematic diagram illustrating the spatial autocorrelation and model residual analysis results provided in an embodiment of this application. For example... Figure 6 As shown, the analysis results include Moran's I index, standardized Z-score, and significance p-value. The residuals of an ideal model should exhibit spatial randomness, meaning the Moran's I index is close to 0 and statistically insignificant, demonstrating that the model has successfully captured the main spatial dependence structure of soil thickness.
[0112] Through the above comprehensive verification framework, this specific embodiment not only provides quantitative evidence of the model's prediction accuracy, but also demonstrates the rationality and effectiveness of the model setting from a spatial statistical perspective, ensuring the scientific validity and reliability of the final soil thickness mapping results.
[0113] Furthermore, to deeply analyze the influence mechanism and relative contribution of various environmental predictive factors on the spatial distribution of soil thickness, this specific embodiment employs the SHAP (SHapley Additive exPlanations) framework for model interpretability analysis after completing model prediction. Based on the Shapley value concept in cooperative game theory, this framework provides a consistent and fair measure of feature importance for the prediction results of machine learning models, thereby transforming the model's "black box" decision-making process into a transparent and quantifiable mechanistic explanation.
[0114] This specific embodiment preferably uses TreeExplainer to interpret the trained GWRFC model. This interpreter is specifically optimized for tree ensemble models and can efficiently and accurately calculate SHAP values. The analysis process first loads the GWRFC model corresponding to the optimal factor combination and its preprocessing module. Then, TreeExplainer is used to interpret the model's predictions on all training samples, calculating the SHAP value for each sample and each environmental factor. The core principle of SHAP value is to decompose the predicted value of a single sample into the sum of the baseline predicted value and the SHAP values of each feature: ,in For predicted values, The mean (baseline) of all predicted values for all samples. Let be the SHAP value of the i-th feature. A positive SHAP value indicates that the feature makes a positive contribution to the prediction result, and vice versa.
[0115] Furthermore, to comprehensively present the analysis results, this invention generates a series of visualization charts: Feature Importance and Contribution Distribution Chart: This chart presents the global importance ranking of each environmental factor based on the mean absolute SHAP value in descending order of bar charts, intuitively showing the overall contribution of different factors to the model output. A radial plot is also embedded in the chart to further quantify the relative contribution share of each factor in percentage form.
[0116] SHAP Honeycomb Summary Diagram: This diagram comprehensively illustrates the importance of each feature, the direction of the SHAP value's effect (positive or negative), and the distribution of feature values. Please refer to [link / reference]. Figure 7 , Figure 7 This is a schematic diagram of a SHAP honeycomb summary diagram provided in an embodiment of this application. For example... Figure 7 As shown in the figure, each point represents a sample, and the color of the point indicates the feature value of that sample (red for high values and blue for low values). The horizontal position of the point indicates the SHAP value of that feature on that sample. Through this figure, it can be clearly identified that factors such as "elevation" mainly have a negative impact (high altitude corresponds to thinner soil), while factors such as "profile curvature" exhibit complex nonlinear relationships.
[0117] SHAP Waterfall Plot: This plot visually illustrates how each environmental factor progressively pushes the model's baseline predictions towards the final prediction result, based on a "virtual average sample" constructed from the average SHAP value of all samples. The plot clearly reveals the specific contribution path and amount of each factor to the average prediction value.
[0118] Through the above SHAP analysis, this specific embodiment not only verifies the rationality of the feature selection results, but more importantly, it quantitatively reveals the types, contributions, and directions of the dominant environmental factors in different geographic ecological units. This elevates the model output from a single prediction map to a scientific result containing explanations of the zoning mechanism, greatly enhancing the theoretical value and practical guiding significance of the model.
Claims
1. A method for spatial prediction of soil thickness, characterized in that, The method includes: Obtain a soil thickness sample dataset, which includes the geographic coordinates of the sample points, the measured soil thickness values of the sample points, and the environmental factors of the sample points. Based on the geographic coordinates and environmental factors of the sample points, a hybrid feature space is obtained; Based on the hybrid feature space, all soil sample points are clustered to obtain multiple geographically and ecologically homogeneous zones; A soil thickness prediction model for each of the geographically homogeneous zones is independently trained based on soil thickness samples corresponding to each of the geographically homogeneous zones, and the soil thickness prediction model for each geographically homogeneous zone is tested based on the measured soil thickness values of the sample points. Determine the target geographical and ecological homogeneous zone to which the point to be predicted belongs; Based on the soil thickness prediction model of the target geographical and ecological homogeneous zone, the predicted soil thickness value of the point to be predicted is obtained.
2. The spatial prediction method for soil thickness as described in claim 1, characterized in that, The hybrid feature space obtained based on the geographic coordinates and environmental factors of the sample points includes: The feature selection algorithm based on statistical significance test screens out the environmental factors that affect soil thickness from the environmental factors of the sample points to obtain the screened environmental factors, wherein the environmental factors of the sample points are used as the initial environmental factors. Based on the weights of the geographic coordinates of the sample points, the filtered environmental factors are combined with the geographic coordinates of the sample points to obtain the hybrid feature space.
3. The spatial prediction method for soil thickness as described in claim 2, characterized in that, The feature selection algorithm for the statistical significance test includes the Boruta algorithm.
4. The spatial prediction method for soil thickness as described in claim 2, characterized in that, The weight of the geographic coordinates is set to 0.5, and the weight of the geographic coordinates is used to adjust their influence relative to the filtered environmental factors.
5. The spatial prediction method for soil thickness as described in claim 1, characterized in that, The soil thickness prediction model based on the target geographical and ecological homogeneous zoning obtains the predicted soil thickness value of the point to be predicted, including: When the point to be predicted is located within a single geographically and ecologically homogeneous zone, the predicted soil thickness value of the point to be predicted is calculated based on the soil thickness prediction model of the single geographically and ecologically homogeneous zone. When the point to be predicted is located in the boundary area of a geographically and ecologically homogeneous zone, the Euclidean distance between the center of the cluster to which the point to be predicted belongs and the center of the neighboring clusters is determined. The weight of the point to be predicted belonging to each neighboring cluster is determined based on the exponentially decaying Gaussian weight function. Then, from the weight of the predicted point belonging to each neighboring cluster, the clusters with weights greater than a first threshold are selected. The soil thickness prediction values output by the soil thickness prediction model of the clusters with weights greater than the first threshold are weighted and averaged to obtain the soil thickness prediction value of the point to be predicted.
6. The spatial prediction method for soil thickness as described in claim 1, characterized in that, The method further includes: The SHAP values of the screened environmental factors are obtained based on the SHAP value analysis algorithm, wherein the SHAP values of the screened environmental factors characterize the contribution of the screened environmental factors to the predicted soil thickness value of the point to be predicted. Based on the SHAP values of the screened environmental factors, a target visualization chart is generated, which includes a SHAP waterfall plot, a SHAP honeycomb summary plot, and a SHAP bar chart. The SHAP waterfall plot is used to show the interpretation path of the predicted soil thickness value of the point to be predicted, the SHAP honeycomb summary plot is used to show the overall feature distribution effect, and the SHAP bar chart is used to characterize the average influence of features on the output of the soil thickness prediction model.
7. The spatial prediction method for soil thickness as described in claim 1, characterized in that, The method further includes: The screened environmental factors are subjected to data preprocessing, which includes uniform resolution preprocessing, missing value preprocessing, and data standardization preprocessing.
8. The soil thickness space prediction method of claim 1, wherein, The clustering of all soil sample points based on the hybrid feature space yields multiple geographically and ecologically homogeneous zones, including: The K-means algorithm is used to identify the homogeneous geographic and ecological regions in the mixed feature space.
9. The soil thickness space prediction method of claim 1, wherein, The environmental factors of the sample points include topographic factors, hydrological factors, soil property factors, climatic factors, and vegetation factors.
10. A soil thickness spatial prediction apparatus characterized by comprising: The device includes: The acquisition module is used to acquire a soil thickness sample dataset, which includes the geographic coordinates of the sample points, the measured soil thickness of the sample points, and the environmental factors of the sample points. The construction module is used to obtain a hybrid feature space based on the geographic coordinates and environmental factors of the sample points; The clustering module is used to cluster all soil sample points based on the hybrid feature space to obtain multiple geographically and ecologically homogeneous partitions. The training module is used to independently train a soil thickness prediction model for each of the geographically homogeneous zones based on soil thickness samples corresponding to each of the geographically homogeneous zones, and to verify the soil thickness prediction model for each geographically homogeneous zone based on the measured soil thickness values of the sample points. The determination module is used to determine the target geographic and ecological homogeneous zone to which the point to be predicted belongs; The prediction module is used to obtain the predicted soil thickness value of the point to be predicted based on the soil thickness prediction model of the target geographical and ecological homogeneous zone.
11. An electronic device, comprising: include: processor; as well as A memory configured to store machine-readable instructions that, when executed by the processor, perform the method as described in any one of claims 1-9.
12. A storage medium, characterized by The storage medium stores a computer program, which is executed by a processor according to any one of claims 1-9.