A method and system for heavy metal three-dimensional risk assessment mapping based on cascading learning
By employing a cascaded learning method to conduct three-dimensional risk assessment of soil heavy metals at the regional scale, and combining total amount prediction and available state prediction, the problem of risk assessment separation in existing technologies is solved, and efficient risk zoning management and risk identification are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUN YAT SEN UNIV
- Filing Date
- 2026-05-09
- Publication Date
- 2026-07-14
Smart Images

Figure CN122390155A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of soil management technology, specifically to a method and system for three-dimensional risk assessment mapping of heavy metals based on cascade learning. Background Technology
[0002] Currently, existing regional-scale soil heavy metal pollution risk assessment methods can be broadly classified into two categories: One type of method is the index calculation method based on sampling analysis. This method obtains data on the total amount and speciation of heavy metals through field sampling and experimental testing, and then calculates evaluation indicators such as geoaccumulation index and ecological risk index. This type of method has high data reliability, but the sampling and experimental costs are high, the number of sample points is usually limited, and regional-scale risk mapping often relies on spatial interpolation methods such as Kriging interpolation or inverse distance weighting, which makes it difficult to fully characterize spatial heterogeneity and has high uncertainty for unsampled areas.
[0003] Another type is the machine learning-based regional mapping method, which uses statistical or data-driven models to spatially predict heavy metal content. This improves spatial continuity and prediction efficiency to some extent. However, existing studies mainly focus on modeling and mapping the total amount of heavy metals, and rarely incorporate the available components and ecological risk dimensions. This fails to achieve a comprehensive evaluation of pollution level, migration activity and ecological hazards through multi-indicator coupling, making it difficult to fully reflect the true risk level of heavy metals in regional soils.
[0004] Building upon the two aforementioned technical approaches, existing patented technologies have further proposed various solutions in two directions—total pollution prediction and risk assessment—to achieve the goal of regional-scale soil heavy metal mapping. The former primarily utilizes machine learning, optimization algorithms, or remote sensing-derived indicators to construct a spatial prediction process for heavy metal concentrations, while the latter mainly outputs risk probabilities, risk indices, and risk levels through statistical models or indicator systems. While these solutions have certain application value in their respective directions, they generally exhibit a separation between total pollution prediction and risk assessment. Total pollution prediction solutions focus on improving the accuracy and efficiency of spatial concentration prediction, while risk assessment solutions focus on establishing a risk assessment framework or statistical discrimination. The two rarely form a continuous joint mapping process within the same raster system, thus making it difficult to directly support the integrated identification and zoning of pollution levels, bioactivity exposure, and ecological hazards in provincial-scale monitoring scenarios.
[0005] Furthermore, from the perspective of soil environmental risk mechanisms, the mobility, bioavailability, and ecological risk of heavy metals are closely related to their chemical forms. The F1 component obtained from continuous extraction of BCR can be used to characterize the bioavailable exposure dimension; the geoaccumulation index Igeo calculated based on background values can characterize the degree of pollution accumulation; and the potential ecological risk factor Eri, after introducing the toxicity response coefficient, can reflect the differences in the hazards of different metals. Therefore, evaluating solely based on total amount or a single comprehensive index can easily lead to incomplete expression of regional risk information. Summary of the Invention
[0006] To address the aforementioned shortcomings, this invention discloses a three-dimensional risk assessment mapping method for heavy metals based on cascaded learning, which enables efficient risk zoning management.
[0007] The first aspect of this invention discloses a method for creating three-dimensional risk assessment maps of heavy metals based on cascade learning, comprising: Obtain environmental covariate raster data within the study area, and perform feature processing on the environmental covariate raster data to obtain raster feature data; Based on the pre-constructed total concentration prediction model, the raster feature data of each grid in the study area are inferred at the pixel level to obtain the total prediction result corresponding to each grid, and a total spatial distribution raster map is generated based on the total prediction results of all grids. The total spatial distribution raster map and the raster feature data corresponding to the total spatial distribution raster map are input into the effective state prediction model for processing to obtain the effective state prediction value of each raster. Based on the effective state prediction value of each raster, an effective state spatial distribution raster map is generated. Determine the background values and toxicity response coefficients of various heavy metals within the study area, and input the total spatial distribution raster map and the background values of various heavy metals into the pollution intensity formula to calculate the pollution intensity index; The total spatial distribution raster map, background values of various heavy metals, and toxicity response coefficients are input into the ecological risk formula to calculate the ecological risk index. Under the same grid system, spatial overlay and joint determination are performed based on the pollution intensity index, the effective state spatial distribution grid map, and the ecological risk index to generate a three-dimensional risk assessment result.
[0008] As an optional implementation, in the first aspect of the present invention, the pollution intensity formula is: ,in, The pollution intensity index, The total predicted values for the corresponding heavy metals are as follows. The background value parameter for the corresponding heavy metal; After inputting the total spatial distribution raster map and background values of various heavy metals into the pollution intensity formula to calculate the pollution intensity index, the method further includes: The pollution intensity index is mapped to the corresponding pollution level according to the established grading standards.
[0009] As an optional implementation, in the first aspect of the present invention, the ecological risk formula is: ,in, The total predicted values for the corresponding heavy metals are as follows. For background value parameters, The toxicity response coefficient; After inputting the total spatial distribution raster map, background values of various heavy metals, and toxicity response coefficients into the ecological risk formula to calculate the ecological risk index, the method further includes: When the study area contains multiple heavy metals, a comprehensive potential ecological risk index is calculated.
[0010] As an optional implementation, in the first aspect of the present invention, the total concentration prediction model is constructed in the following manner: Acquire heavy metal monitoring sample data, which includes location coordinates, total heavy metal content, and multi-source environmental covariate raster sample data of the study area. Determine whether each variable in the heavy metal monitoring sample data exists simultaneously in the monitoring data table field and the raster file directory, and retain the variables that pass the double verification as usable basic variables to construct a list of basic variables; Missing values are cleaned and infinite values are replaced for each data item in the basic variable list to construct a training feature set; Calculate the variance of each feature in the constructed training feature set, remove low-variance features with variances below a preset threshold, and form the final input feature set; A logarithmic transformation is performed on the total heavy metal content to compress the skewness of the data distribution; The final input feature set is standardized, and the standardized final input feature set is input into the corresponding neural network model until the set conditions are met. Then the corresponding model data is saved. The output data of the neural network model is the total content of heavy metals.
[0011] As an optional implementation, in the first aspect of the present invention, the effective state prediction model is constructed in the following manner: Acquire heavy metal monitoring sample data, which includes location coordinates, total heavy metal content, available sample data, and multi-source environmental covariate raster sample data of the study area. Based on the preset column name mapping table, the environmental covariate field and the total amount field are extracted, concatenated and used as the model input feature set, and the effective state field is used as the supervision label. Binning is performed on the labels based on a preset threshold of effective state concentration, and the dataset is divided into training and test sets based on the binned category labels. The inverse ratio of the number of samples for each effective concentration category is calculated as the category weight, and this weight is assigned to the corresponding sample to correct the impact of imbalanced data distribution on model training. Set a constraint mechanism at the model output to ensure that the effective state content predicted by the model is not greater than the total content value input at any pixel position. Define the model hyperparameter search space, perform K-fold cross-validation to evaluate the model performance under different hyperparameter combinations, and select the hyperparameter combination with the lowest average validation loss as the final model configuration.
[0012] As an optional implementation, in the first aspect of the present invention, the evaluation mapping method further includes: Identify and mark raster pixels that simultaneously meet the criteria of high pollution intensity index, high available concentration, and high ecological risk index as priority control areas; and identify low-risk areas where the total predicted value exceeds the risk screening value but the available concentration is below the threshold.
[0013] As an optional implementation, in the first aspect of the present invention, the evaluation mapping method further includes: The system receives user-configured parameters, including background values, risk screening values, toxicity response coefficients, and binning thresholds, through a graphical user interface. In response to a single operation command, a NetCDF file in a uniform format is output as the result of the three-dimensional risk assessment mapping.
[0014] The results of geoaccumulation index classification, comprehensive potential ecological risk index classification, and effective state content classification are combined into a spatial status code. By retrieving the preset three-dimensional risk assessment matrix, the status code of each pixel is mapped to the corresponding risk control zone label.
[0015] A second aspect of this invention discloses a three-dimensional risk assessment mapping system for heavy metals based on cascaded learning, comprising: Acquisition module: used to acquire environmental covariate raster data within the study area, and to perform feature processing on the environmental covariate raster data to obtain raster feature data; The first-level prediction module is used to perform pixel-level inference on the raster feature data of each grid in the study area based on the pre-built total concentration prediction model to obtain the total prediction result corresponding to each grid, and generate a total spatial distribution raster map based on the total prediction results of all grids. The secondary prediction module is used to input the total spatial distribution raster map and the raster feature data corresponding to the total spatial distribution raster map into the effective state prediction model for processing to obtain the effective state prediction value of each raster, and generate the effective state spatial distribution raster map based on the effective state prediction value of each raster. The first calculation module is used to determine the background values and toxicity response coefficients of various heavy metals within the study area. The total spatial distribution raster map and the background values of various heavy metals are input into the pollution intensity formula to calculate the pollution intensity index. The second calculation module is used to input the total spatial distribution raster map, background values of various heavy metals and toxicity response coefficients into the ecological risk formula to calculate the ecological risk index. Result generation module: used to generate three-dimensional risk assessment results by spatially overlaying and jointly determining the pollution intensity index, effective state spatial distribution grid map and ecological risk index under the same grid system.
[0016] A third aspect of the present invention discloses an electronic device, comprising: a memory storing executable program code; a processor coupled to the memory; the processor calling the executable program code stored in the memory to execute the cascaded learning-based three-dimensional risk assessment mapping method for heavy metals disclosed in the first aspect of the present invention.
[0017] The fourth aspect of this invention discloses a computer-readable storage medium storing a computer program, wherein the computer program causes a computer to execute the cascade learning-based three-dimensional risk assessment mapping method for heavy metals disclosed in the first aspect of this invention.
[0018] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: This invention constructs a cascaded machine learning path from total quantity prediction to effective state / risk prediction. The first-level total quantity prediction result is used as the key intermediate variable input for the second-level task. This addresses the problem that the effective state prediction is easily affected by sample scarcity, class imbalance and spatial heterogeneity when using only environmental variables, resulting in large fluctuations. It achieves constraints and enhancements on the second-level task, thereby improving the accuracy, generalization ability and operational stability of effective state-related predictions. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating the three-dimensional risk assessment mapping method for heavy metals based on cascaded learning disclosed in an embodiment of the present invention. Figure 2 This is a schematic diagram of the process for constructing a total concentration prediction model as disclosed in an embodiment of the present invention; Figure 3 This is a schematic diagram of the process for constructing an effective state prediction model as disclosed in an embodiment of the present invention; Figure 4 This is a schematic diagram showing the three types of risk results disclosed in the embodiments of the present invention; Figure 5 This is a schematic diagram of a three-dimensional joint risk assessment disclosed in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of a three-dimensional risk assessment mapping system for heavy metals based on cascaded learning, provided in an embodiment of the present invention. Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0021] 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.
[0022] It should be noted that the terms first, second, third, fourth, etc., in the specification and claims of this invention are used to distinguish different objects, not to describe a specific order. The terms used in the embodiments of this invention include and have, and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices.
[0023] Example 1 Please see Figure 1 , Figure 1This is a flowchart illustrating the 3D risk assessment mapping method for heavy metals based on cascaded learning disclosed in this invention. The execution entity of the method described in this embodiment is a software and / or hardware entity that can receive relevant information and send certain instructions via wired or / or wireless means. It may also have processing and storage functions. This entity can control multiple devices, such as remote physical servers or cloud servers and related software, or local hosts or servers and related software that perform operations on devices located in a specific location. In some scenarios, it can also control multiple storage devices, which may be located in the same or different locations as the devices. Figures 1 to 5 As shown, the cascade learning-based three-dimensional risk assessment mapping method for heavy metals includes the following steps: S101: Obtain environmental covariate raster data within the study area, and perform feature processing on the environmental covariate raster data to obtain raster feature data; S102: Based on the pre-constructed total concentration prediction model, perform pixel-level inference on the raster feature data of each grid in the study area to obtain the total prediction result corresponding to each grid, and generate a total spatial distribution raster map based on the total prediction results of all grids. S103: Input the total spatial distribution raster map and the raster feature data corresponding to the total spatial distribution raster map into the effective state prediction model for processing to obtain the effective state prediction value of each raster, and generate the effective state spatial distribution raster map based on the effective state prediction value of each raster. S104: Determine the background values and toxicity response coefficients of various heavy metals within the study area, and input the total spatial distribution raster map and the background values of various heavy metals into the pollution intensity formula to calculate the pollution intensity index; S105: Input the total spatial distribution raster map, background values of each heavy metal and toxicity response coefficient into the ecological risk formula to calculate the ecological risk index; S106: Under the same grid system, spatial overlay and joint determination are performed based on the pollution intensity index, the effective state spatial distribution grid map and the ecological risk index to generate a three-dimensional risk assessment result.
[0024] Specifically, in the total prediction script, the total model and normalizer can be loaded first, then the 0.05° raster covariates of Guangdong (pH, OC, CEC, Clay, Silt, Sand, TN, TK, TP, BULK) can be read and scaled according to the ratio set in the script; then, the derived features consistent with the training end can be constructed, the input can be organized according to the feature order saved in training, and after filtering the effective values at the pixel level, the model can be called to predict and obtain HM_pred.
[0025] The script also includes post-processing of the numerical domain, which then generates HM_class (0~5) according to HM_BINS=[0,50,100,150,200,500,∞), and finally outputs guangdong_HM05.nc, which contains two variables: HM_pred and HM_class.
[0026] Using the first-level total quantity prediction result as a key intermediate variable, it is combined with the original environmental covariates to form the input features of the second-level model. A constraint is added to limit the effective state content to less than the total quantity. The second-level model is constructed by resampling the first-level total quantity prediction raster and concatenating it with the environmental covariates to form a feature set. A neural network model is used, and during training, a loss function is used to implement the hard constraint that the effective state content is less than or equal to the total quantity. Cross-validation is used to optimize the parameters, resulting in the second-level effective state prediction model. The trained second-level model is loaded, and uniform raster data (including covariates and total quantity prediction) for the entire region is input pixel-by-pixel into the second-level model. The effective state prediction value F1_pred is output. F1_pred is binned using F1_BINS=[0,5,10,15,20,30,∞) to generate F1_class (0~5), and output as an nc file raster, completing the generation of the effective state spatial distribution map.
[0027] The total amount is directly used in the Igeo calculation using HM_pred from guangdong_HM05.nc. Igeo is calculated according to the formula. The calculation is performed pixel by pixel, with the script using K=1.5, B_CD=0.06, and B_HM=50.5. Then, the Igeo is classified into 0~6 (invalid pixels are -1) according to Muller's 7-level standard, and the results are output separately.
[0028] Based on the total amount prediction results, background values and toxicity response coefficients, the potential ecological risk factor Eri (and optional RI) is calculated, and ecological risk dimension results are generated: Eri = Tr × (Cn / Bn) is calculated pixel by pixel, and RI can be obtained by summing the Eri of multiple elements; the continuous Eri raster of each element and the 4-level risk classification map are output (RI<=150, 150~300, 300~600, >600 correspond to 0~3, and invalid value is -1), and a comprehensive RI raster and classification map are generated to complete the ecological risk assessment.
[0029] Specifically, the effective state F1 is obtained from the total quantity cascade prediction, while Igeo and Eri / RI are calculated from the total quantity prediction results and parameters. Therefore, the three types of results can be superimposed and jointly determined under a unified coordinate grid. For example... Figure 5 As shown in Table 1, this joint judgment step is mainly reflected in the completion of the result set preparation in the code, and the three types of indicators can be combined and partitioned according to the actual regulatory rules.
[0030] Table 1: Three-Dimensional Risk Zoning Table The environmental covariate raster data specifically includes raster files of ten physicochemical properties of soil, including pH, organic carbon (OC), cation exchange capacity (CEC), clay content (Clay), silt content (Silt), sand content (Sand), total nitrogen (TN), total potassium (TK), total phosphorus (TP), and bulk density (BULK), after spatial registration and resampling. All of the above factors must be preprocessed into a raster format (such as GeoTIFF), and it must be ensured that each layer has a consistent spatial reference system (coordinate system), spatial resolution (cell size), and spatial extent.
[0031] This invention utilizes a raster of environmental covariates and a prediction model to perform pixel-level inference, expanding discrete soil sampling data into a continuous areal distribution map, thus overcoming the limitation of traditional methods in assessing unsampled areas. A cascaded learning architecture is introduced to first predict the total amount and then the bioavailable form. This captures the nonlinear transformation process of heavy metals from their total presence to their bioavailability, making the assessment results closer to actual biotoxicity than a single total amount evaluation.
[0032] The method in this invention not only calculates the pollution intensity index reflecting human impact, but also combines the toxicity coefficient to calculate the ecological risk index. By superimposing three independent dimensions—pollution intensity, bioavailability, and ecological risk—under the same grid system for joint judgment, it can identify complex scenarios such as high total amount but low activity (potential risk) or low total amount but extremely high activity (acute risk), thus avoiding misjudgment.
[0033] The final output is a three-dimensional risk assessment raster map with geospatial attributes. Managers can intuitively identify high-risk areas (high in all three dimensions) and secondary risk areas (such as high in only the effective state), which facilitates the implementation of differentiated soil remediation strategies and land use planning.
[0034] More preferably, the pollution intensity formula is: ,in, The pollution intensity index, The total predicted values for the corresponding heavy metals are as follows. The background value parameter for the corresponding heavy metal; After inputting the total spatial distribution raster map and background values of various heavy metals into the pollution intensity formula to calculate the pollution intensity index, the method further includes: The pollution intensity index is mapped to the corresponding pollution level according to the established grading standards.
[0035] The denominator of the above pollution intensity formula uses As a corrected background value, this coefficient takes into account the natural fluctuations of the background value. The technical effect is to effectively distinguish between natural geological anomalies and human pollution, and to avoid directly misjudging naturally high background soils around mining areas as heavily polluted by humans.
[0036] Specifically, by using logarithmic transformation, the numerical differences in pollution levels (such as drastic changes from 1 mg / kg to 100 mg / kg) are compressed into a small range of exponential levels. The purpose is to mitigate the obscuring effect of extremely high concentration values on the overall spatial visual effect, resulting in smoother color gradation during mapping. This allows for clear distinction between slightly polluted and severely polluted areas on the same image, without the appearance of a saturated red due to extreme values.
[0037] This process transforms continuous floating-point exponents into discrete semantic labels (such as light pollution, moderate pollution). The aim is to convert complex mathematical calculations into a management language that non-professionals can directly interpret, providing a classification layer that can be directly operated on using Boolean operations for spatial overlay and joint determination in subsequent three-dimensional risk assessments.
[0038] In the subsequent three-dimensional risk assessment, pollution intensity, effective state, and ecological risk need to be superimposed. Superimposing continuous numerical values easily generates countless fuzzy combinations, making it difficult to define risk boundaries. The technical advantage of this step is that it discretizes the raster data of the first dimension (pollution intensity), facilitating rigorous raster logic operations with the classification results of subsequent dimensions, thereby accurately pinpointing specific raster ranges with high pollution levels, high effective state, and high risk.
[0039] More preferably, the ecological risk formula is: ,in, The total predicted values for the corresponding heavy metals are as follows. For background value parameters, The toxicity response coefficient; After inputting the total spatial distribution raster map, background values of various heavy metals, and toxicity response coefficients into the ecological risk formula to calculate the ecological risk index, the method further includes: When the study area contains multiple heavy metals, a comprehensive potential ecological risk index is calculated.
[0040] Specifically, the ecological risk formula decomposes risk into the product of the degree of anthropogenic enrichment and the biotoxicity weight. This avoids the shortcomings of traditional simple total emission assessments where high concentrations of low-toxicity elements (such as Fe) mask low concentrations of high-toxicity elements (such as Cd and Hg).
[0041] Specifically, it focuses on the classification of geological accumulation processes. In subsequent three-dimensional joint judgment, it can identify special contradictory scenarios, such as a grid cell having a moderate pollution intensity level (due to logarithmic compression) but an extremely high ecological risk index (due to a high toxicity coefficient). This contrast enhances the model's ability to capture high-risk windows and prevents underreporting caused by logarithmic smoothing.
[0042] When multiple heavy metals are involved, a comprehensive index is calculated; typically... A single heavy metal may not exceed the standard, but the simultaneous presence of multiple heavy metals can produce synergistic toxicity. By performing raster algebraic summation, multiple single-factor layers are merged into a comprehensive risk accumulation map. This can accurately locate polymetallic co-enrichment areas, which are usually the core risk target areas downstream of mining areas or wastewater irrigation areas, and are very easy to miss in single-factor evaluation.
[0043] In subsequent spatial overlay and joint determination within the same grid system, the comprehensive ecological risk index serves as a third dimension. It acts as the red alert threshold for the final decision. Even if a grid has low pollution intensity (possibly due to a high background value leading to a small normalized ratio) and high bioavailability, if its comprehensive ecological risk index is high (due to the superposition of multiple highly toxic metals), the system will still classify that grid as a high-risk area. This ensures the biological rigor of the final 3D mapping results.
[0044] More preferably, such as Figure 2 As shown, the total concentration prediction model is constructed in the following manner: S1021: Obtain heavy metal monitoring sample data, which includes location coordinates, total heavy metal content, and multi-source environmental covariate raster sample data of the study area. S1022: Determine whether each variable in the heavy metal monitoring sample data exists simultaneously in the monitoring data table field and the raster file directory, and retain the variables that pass the double verification as usable basic variables to construct a list of basic variables; S1023: Perform missing value cleanup and infinite value replacement on each data item in the basic variable list to construct a training feature set; S1024: Calculate the variance of each feature in the training feature set, remove low-variance features with variances below a preset threshold, and form the final input feature set; S1025: Perform a logarithmic transformation on the total heavy metal content to compress the skewness of the data distribution; S1026: The final input feature set is standardized, and the standardized final input feature set is input into the corresponding neural network model until the set conditions are met. Then, the corresponding model data is saved. The output data of the neural network model is the total content of heavy metals.
[0045] Feature processing is performed in steps S1022 to S1023. Due to the different sources of the monitoring data table and the environmental covariate raster, there are often inconsistencies in field naming or missing raster files. Double verification is used to force alignment of the data stream, preventing the model from crashing during training due to reading null values or path errors. It also ensures that the dimension of the input data is strictly consistent with that of the training stage during subsequent large-scale raster inference (pixel-level inference), avoiding systemic vulnerabilities in prediction failure.
[0046] Heavy metal monitoring data often contains coded values below the detection limit or outliers. By cleaning up missing values and replacing infinite values, incalculable characters or numbers are transformed into numerical tensors acceptable to the model. This ensures the continuity and stability of gradient calculation during the backpropagation of the neural network and prevents gradient explosion during the entire training process due to errors in the entry of a single data point.
[0047] By eliminating features with near-zero variance (i.e., features that remain almost unchanged across the entire study area), the dimensionality of the input layer is compressed. This has two direct effects: first, it reduces model complexity and accelerates training convergence; second, it improves the model's stability when extrapolating over a large spatial range, preventing the model from only remembering localized environmental combinations near the training samples.
[0048] A logarithmic transformation is performed on the target variable (total heavy metal concentration). In natural environments, heavy metal concentrations typically follow a log-normal distribution. Directly inputting this into a neural network can cause the model to focus only on a very small number of high-concentration samples, neglecting the patterns in the background region. The logarithmic transformation compresses the variation at the high-value ends, preventing the loss function (such as mean squared error) from being dominated by extreme high values during calculation. This ensures that the final generated raster map of the total concentration spatial distribution has high fidelity when depicting large areas of low-concentration background regions, avoiding the phenomenon where low-value areas are predicted as constant noise.
[0049] The input feature set is standardized. Environmental covariates have varying units; without standardization, neural network weights will be forced to adapt to different numerical scales, leading to training difficulties. Standardization (usually Z-score normalization) is used instead of regular normalization, preserving outlier information from the original data. This is crucial for subsequent steps, ensuring that the statistical distribution of the input during training is completely consistent with the statistical distribution of the input during the full-area raster inference stage, thus guaranteeing the accuracy and unbiasedness of the pixel-level spatial prediction results.
[0050] Specifically, the first-level model uses 10 multi-source environmental covariates as input and employs a feedforward fully connected structure, including an input layer, three hidden layers (with 64, 32, and 16 neurons respectively, and ReLU activation function), and an output layer, jointly predicting the total amount of heavy metals in the soil and its pollution index (Igeo). Building upon this, the second-level model, using the same environmental covariate inputs, introduces the total output of the first-level model as a key intermediate variable, expanding the input dimension to 11 dimensions. It also constructs a deeper fully connected network structure (four hidden layers with 64, 64, 32, and 16 neurons respectively) to further characterize complex nonlinear relationships and predict the effective state of heavy metals. Both stages of the model achieve hierarchical feature mapping through inter-layer fully connected connections and combine nonlinear activation functions to enhance the model's expressive power, thus forming a machine learning framework with hierarchical information transmission and intermediate state constraints.
[0051] More preferably, such as Figure 3 As shown, the effective state prediction model is constructed in the following manner: S1031: Obtain heavy metal monitoring sample data, which includes location coordinates, total heavy metal content, available sample data, and multi-source environmental covariate raster sample data of the study area. S1032: Extract the environmental covariate field and total amount field according to the preset column name mapping table, concatenate them as the model input feature set, and use the effective state field as the supervision label; S1033: Binning is performed on the labels based on a preset threshold of effective state concentration, and the dataset is divided into training and test sets based on the binned category labels. S1034: Calculate the inverse ratio of the number of samples for each effective concentration category as the category weight, and assign this weight to the corresponding sample to correct the impact of imbalanced data distribution on model training; S1035: Set a constraint mechanism at the model output to ensure that the effective state content predicted by the model is not greater than the total content value input at any pixel position. S1036: Define the model hyperparameter search space, perform K-fold cross-validation to evaluate the model performance under different hyperparameter combinations, and select the hyperparameter combination with the lowest average validation loss as the final model configuration.
[0052] Specifically, the dataset is binned based on the effective concentration, and the reciprocal ratio is used as the class weight. In environmental monitoring, the effective concentration of heavy metals is usually extremely low (mostly at the trace level), which causes the model training samples to be severely biased towards the low value range, and the model is prone to degenerate into a lazy classifier that always predicts low values.
[0053] By binning the concentration data, the continuous regression problem is transformed into a regression problem with sample weight correction. Using the inverse ratio of the number of samples in each category as weights, the model focuses on rare but ecologically high-risk, highly effective samples. This allows the resulting raster map of the effective spatial distribution to accurately capture highly active pollution hotspots within the study area, avoiding the smoothing of high-value predictions and underreporting caused by scarce samples.
[0054] A constraint mechanism is set at the output end to ensure that the predicted effective state is less than or equal to the total input. Without constraints, the neural network may incorrectly predict an unscientific result—the effective state content being higher than the total content—under certain environmental combinations (e.g., high pH, high organic matter areas). By constraining the output (such as activation function pruning or post-processing correction), the model output is forcibly limited to the interval [0, total value]. The direct technical effect of this is to enhance the logical consistency of the cascaded learning framework. In the subsequent three-dimensional risk assessment overlay analysis, the numerical relationship between the effective state spatial distribution raster map and the total output spatial distribution raster map conforms to the basic principles of soil chemistry, improving the credibility and interpretability of the assessment report in professional review.
[0055] Avoiding the occurrence of excellent results by chance under small sample conditions: Compared to the total sample size, obtaining effective samples is more costly and usually less numerous. A single random division of the training / test set is prone to causing evaluation metrics to be inflated or understated due to chance.
[0056] More preferably, the evaluation mapping method further includes: Identify and mark raster pixels that simultaneously meet the criteria of high pollution intensity index, high available concentration, and high ecological risk index as priority control areas; and identify low-risk areas where the total predicted value exceeds the risk screening value but the available concentration is below the threshold.
[0057] Specifically, grids that simultaneously meet the criteria of high pollution intensity, high bioavailability, and high ecological risk should be identified and marked. Focusing solely on total pollution (high pollution intensity) might misclassify areas with high background pollution and low bioavailability as areas in urgent need of remediation, leading to wasted public funds. Focusing solely on bioavailability might overlook potential risk areas where total pollution is rapidly accumulating but bioavailability has not yet been released in large quantities.
[0058] This step achieves extremely high confidence in risk confirmation through the intersection calculation of three-dimensional joint judgment. The selected pixels issue alerts in all three dimensions: total chemical content, biological activity, and toxic effects. This provides an indisputable target area for environmental enforcement and soil remediation, which can be directly used to guide the physical enclosure, detailed investigation, or engineering remediation design of priority control areas.
[0059] The system identifies areas where the total predicted concentration exceeds the screening value but the available concentration is below the threshold. It achieves dynamic separation of pollution stock and flux. This logic utilizes the nonlinear fitting capability of a cascaded learning model to the relationship between total and available concentrations, accurately capturing grids of heavy metals in the soil that are in a passivated / fixed state (e.g., complexed with organic matter or adsorbed by clay minerals).
[0060] More preferably, the evaluation mapping method further includes: The system receives user-configured parameters, including background values, risk screening values, toxicity response coefficients, and binning thresholds, through a graphical user interface. In response to a single operation command, a NetCDF file in a uniform format is output as the result of the three-dimensional risk assessment mapping.
[0061] The results of geoaccumulation index classification, comprehensive potential ecological risk index classification, and effective state content classification are combined into a spatial status code. By retrieving the preset three-dimensional risk assessment matrix, the status code of each pixel is mapped to the corresponding risk control zone label.
[0062] The GUI receives parameters (background value, filter value, coefficient, threshold) and outputs a NetCDF file in a uniform format for each operation. It can separate the evaluation criteria from the calculation engine, improving regional adaptability, as background values and toxicity coefficients differ fundamentally between different study areas (such as acidic soils in Guangdong and alkaline soils in Northwest China).
[0063] The classification results of geoaccumulation (pollution intensity), potential ecological risk, and available state are combined into spatial status codes. A pre-defined three-dimensional risk assessment matrix is retrieved, and the status codes are mapped to risk management zoning labels (such as priority management zones, safe utilization zones, etc.). The risk assessment matrix is essentially a rule-based expression of soil environmental management expert knowledge. It defines which combination of status codes (e.g., high pollution + high toxicity + high activity) corresponds to which management strategy.
[0064] It can eliminate the subjectivity of human interpretation, avoid different technical personnel from drawing different partition conclusions when faced with the same multidimensional raster map, and ensure the repeatability and objectivity of the evaluation results.
[0065] The output is a semantic layer directly geared towards decision-making: the final risk management zoning label map is no longer a collection of abstract index values, but rather geographical zoning with clear policy implications. This significantly lowers the barrier to entry for managers without a technical background, enabling the results of complex cascade learning models to directly serve land spatial planning and farmland classification management.
[0066] Specifically, before implementation, it is necessary to establish a background value and risk threshold parameter system. The background value can be the corresponding regional soil environmental background value, and the risk screening value can be the corresponding land type and pH conditions in the "Soil Environmental Quality Standard" (GB15618-2018). The above parameters will be used as the unified basis for subsequent Igeo and Eri / RI calculation and classification.
[0067] This invention addresses the problems of unstable results in regional-scale soil heavy metal risk mapping, which only shows total amounts and is difficult to directly apply to zoning management. It proposes a step-by-step, continuous mapping assessment method. This method integrates total amount prediction, bioavailable quantity prediction, and ecological risk calculation, outputting three types of results—pollution level, bioactivity exposure, and ecological risk—on the same spatial grid. Figure 4 As shown, a risk zoning map is formed, thereby improving the availability of regional-scale risk identification and governance decisions.
[0068] This invention proposes a cascaded learning mechanism to significantly improve the stability and physical rationality of soil heavy metal bioavailability prediction. The method first constructs a first-level neural network model based on a large-scale heavy metal distribution database, using soil physicochemical properties as input to predict the total heavy metal content. Then, the predicted total content and the original soil physicochemical properties are used as input to a second-level model to further map the bioavailability (bioavailable or extractable) components of heavy metals. Through this step-by-step cascaded mapping structure of soil physicochemical properties – total heavy metal content – bioavailability, the total heavy metal content is introduced as a strong physical constraint for bioavailability prediction. This framework significantly enhances the model's generalization ability, interpretability, and environmental adaptability, providing a more reliable and scientific technical path for regional-scale heavy metal bioavailability risk assessment.
[0069] This invention constructs and uniformly outputs a three-dimensional risk system of Igeo–F1–Eri, enabling three-dimensional risk assessment and mapping. Existing practices often rely primarily on total amount or a single risk index, which can easily lead to situations where the total amount is low but the effective proportion is high, or the total amount is high but the ecological hazard weight is not reflected, resulting in insufficient risk identification or biased assessment. This invention uniformly calculates, classifies, and expresses the geoaccumulation index Igeo, BCR-F1 (effective state), and the potential ecological risk factor Eri on the same spatial grid. This allows for a more comprehensive identification of key risk areas driven by pollution level, effective state, and ecological hazard at the regional scale, improving the relevance and management usability of risk zoning results.
[0070] This invention constructs a cascaded machine learning path from total quantity prediction to effective state / risk prediction. The first-level total quantity prediction result is used as the key intermediate variable input for the second-level task. This addresses the problem that the effective state prediction is easily affected by sample scarcity, class imbalance and spatial heterogeneity when using only environmental variables, resulting in large fluctuations. It achieves constraints and enhancements on the second-level task, thereby improving the accuracy, generalization ability and operational stability of effective state-related predictions.
[0071] Example 2 Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of the heavy metal three-dimensional risk assessment mapping system based on cascaded learning disclosed in an embodiment of the present invention. Figure 6 As shown, the cascade learning-based three-dimensional risk assessment mapping system for heavy metals may include: Acquisition module 21: used to acquire environmental covariate raster data within the study area, and to perform feature processing on the environmental covariate raster data to obtain raster feature data; Level 1 prediction module 22: It is used to perform pixel-level inference on the raster feature data of each grid in the study area according to the pre-built total concentration prediction model to obtain the total prediction result corresponding to each grid, and generate a total spatial distribution raster map based on the total prediction results of all grids. Secondary prediction module 23: is used to input the total spatial distribution raster map and the raster feature data corresponding to the total spatial distribution raster map into the effective state prediction model for processing to obtain the effective state prediction value of each raster, and generate the effective state spatial distribution raster map based on the effective state prediction value of each raster. First calculation module 24: used to determine the background values and toxicity response coefficients of various heavy metals in the study area, and input the total spatial distribution raster map and the background values of various heavy metals into the pollution intensity formula to calculate the pollution intensity index; The second calculation module 25 is used to input the total spatial distribution raster map, background values of various heavy metals and toxicity response coefficients into the ecological risk formula to calculate the ecological risk index. Result generation module 26: Used to generate three-dimensional risk assessment results by spatially overlaying and jointly determining the pollution intensity index, effective state spatial distribution grid map and ecological risk index under the same grid system.
[0072] This invention constructs a cascaded machine learning path from total quantity prediction to effective state / risk prediction. The first-level total quantity prediction result is used as the key intermediate variable input for the second-level task. This addresses the problem that the effective state prediction is easily affected by sample scarcity, class imbalance and spatial heterogeneity when using only environmental variables, resulting in large fluctuations. It achieves constraints and enhancements on the second-level task, thereby improving the accuracy, generalization ability and operational stability of effective state-related predictions.
[0073] Example 3 Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention. The electronic device can be a computer, a server, etc. Of course, in certain cases, it can also be a mobile phone, tablet computer, monitoring terminal, or other smart device, as well as an image acquisition device with processing capabilities. Figure 7 As shown, the electronic device may include: Memory 510 storing executable program code; Processor 520 coupled to memory 510; The processor 520 calls the executable program code stored in the memory 510 to execute some or all of the steps in the cascade learning-based three-dimensional risk assessment mapping method for heavy metals in Embodiment 1.
[0074] This invention discloses a computer-readable storage medium storing a computer program that causes a computer to perform some or all of the steps in the cascade learning-based three-dimensional risk assessment mapping method for heavy metals in Embodiment 1.
[0075] This invention also discloses a computer program product, wherein when the computer program product is run on a computer, the computer executes some or all of the steps in the cascade learning-based three-dimensional risk assessment mapping method for heavy metals in Embodiment 1.
[0076] This invention also discloses an application publishing platform, which is used to publish computer program products. When the computer program products are run on a computer, the computer executes some or all of the steps in the cascade learning-based three-dimensional risk assessment mapping method for heavy metals in Embodiment 1.
[0077] In various embodiments of the present invention, it should be understood that the sequence number of each process does not necessarily imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0078] 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; they can 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.
[0079] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0080] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible memory. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several requests to cause a computer device (which can be a personal computer, server, or network device, specifically a processor in the computer device) to execute some or all of the steps of the methods described in the various embodiments of the present invention.
[0081] In the embodiments provided by this invention, it should be understood that B corresponding to A means that B is associated with A, and B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information.
[0082] Those skilled in the art will understand that some or all of the steps in the various methods of the embodiments described can be implemented by a program instructing related hardware. This program can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.
[0083] The foregoing has provided a detailed description of the heavy metal three-dimensional risk assessment mapping method, system, electronic device, and storage medium based on cascaded learning disclosed in the embodiments of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for three-dimensional risk assessment mapping of heavy metals based on cascaded learning, characterized in that, include: Obtain environmental covariate raster data within the study area, and perform feature processing on the environmental covariate raster data to obtain raster feature data; Based on the pre-constructed total concentration prediction model, the raster feature data of each grid in the study area are inferred at the pixel level to obtain the total prediction result corresponding to each grid, and a total spatial distribution raster map is generated based on the total prediction results of all grids. The total spatial distribution raster map and the raster feature data corresponding to the total spatial distribution raster map are input into the effective state prediction model for processing to obtain the effective state prediction value of each raster. Based on the effective state prediction value of each raster, an effective state spatial distribution raster map is generated. Determine the background values and toxicity response coefficients of various heavy metals within the study area, and input the total spatial distribution raster map and the background values of various heavy metals into the pollution intensity formula to calculate the pollution intensity index; The total spatial distribution raster map, background values of various heavy metals, and toxicity response coefficients are input into the ecological risk formula to calculate the ecological risk index. Under the same grid system, spatial overlay and joint determination are performed based on the pollution intensity index, the effective state spatial distribution grid map, and the ecological risk index to generate a three-dimensional risk assessment result.
2. The method for three-dimensional risk assessment mapping of heavy metals based on cascaded learning as described in claim 1, characterized in that, The pollution intensity formula is: ,in, The pollution intensity index, The total predicted values for the corresponding heavy metals are as follows. The background value parameter for the corresponding heavy metal; After inputting the total spatial distribution raster map and background values of various heavy metals into the pollution intensity formula to calculate the pollution intensity index, the method further includes: The pollution intensity index is mapped to the corresponding pollution level according to the established grading standards.
3. The method for three-dimensional risk assessment mapping of heavy metals based on cascaded learning as described in claim 1, characterized in that, The ecological risk formula is as follows: ,in, The total predicted values for the corresponding heavy metals are as follows. For background value parameters, The toxicity response coefficient; After inputting the total spatial distribution raster map, background values of various heavy metals, and toxicity response coefficients into the ecological risk formula to calculate the ecological risk index, the method further includes: When the study area contains multiple heavy metals, a comprehensive potential ecological risk index is calculated.
4. The method for three-dimensional risk assessment mapping of heavy metals based on cascaded learning as described in claim 1, characterized in that, The total concentration prediction model was constructed in the following manner: Acquire heavy metal monitoring sample data, which includes location coordinates, total heavy metal content, and multi-source environmental covariate raster sample data of the study area. Determine whether each variable in the heavy metal monitoring sample data exists simultaneously in the monitoring data table field and the raster file directory, and retain the variables that pass the double verification as usable basic variables to construct a list of basic variables; Missing values are cleaned and infinite values are replaced for each data item in the basic variable list to construct a training feature set; Calculate the variance of each feature in the constructed training feature set, remove low-variance features with variances below a preset threshold, and form the final input feature set; A logarithmic transformation is performed on the total heavy metal content to compress the skewness of the data distribution; The final input feature set is standardized, and the standardized final input feature set is input into the corresponding neural network model until the set conditions are met. Then the corresponding model data is saved. The output data of the neural network model is the total content of heavy metals.
5. The method for three-dimensional risk assessment mapping of heavy metals based on cascaded learning as described in claim 1, characterized in that, The effective state prediction model is constructed in the following manner: Acquire heavy metal monitoring sample data, which includes location coordinates, total heavy metal content, available sample data, and multi-source environmental covariate raster sample data of the study area. Based on the preset column name mapping table, the environmental covariate field and the total amount field are extracted, concatenated and used as the model input feature set, and the effective state field is used as the supervision label. Binning is performed on the labels based on a preset threshold of effective state concentration, and the dataset is divided into training and test sets based on the binned category labels. The inverse ratio of the number of samples for each effective concentration category is calculated as the category weight, and this weight is assigned to the corresponding sample to correct the impact of imbalanced data distribution on model training. Set a constraint mechanism at the model output to ensure that the effective state content predicted by the model is not greater than the total content value input at any pixel position. Define the model hyperparameter search space, perform K-fold cross-validation to evaluate the model performance under different hyperparameter combinations, and select the hyperparameter combination with the lowest average validation loss as the final model configuration.
6. The method for three-dimensional risk assessment mapping of heavy metals based on cascaded learning as described in claim 1, characterized in that, The evaluation mapping method further includes: Identify and mark raster pixels that simultaneously meet the criteria of high pollution intensity index, high available concentration, and high ecological risk index as priority control areas; and identify low-risk areas where the total predicted value exceeds the risk screening value but the available concentration is below the threshold.
7. The method for three-dimensional risk assessment mapping of heavy metals based on cascaded learning as described in claim 1, characterized in that, The evaluation mapping method further includes: The system receives user-configured parameters, including background values, risk screening values, toxicity response coefficients, and binning thresholds, through a graphical user interface. In response to a single operation command, a NetCDF file in a uniform format is output as the result of the three-dimensional risk assessment mapping. The results of geoaccumulation index classification, comprehensive potential ecological risk index classification, and effective state content classification are combined into a spatial status code. By retrieving the preset three-dimensional risk assessment matrix, the status code of each pixel is mapped to the corresponding risk control zone label.
8. A three-dimensional risk assessment and mapping system for heavy metals based on cascaded learning, characterized in that, include: Acquisition module: used to acquire environmental covariate raster data within the study area, and to perform feature processing on the environmental covariate raster data to obtain raster feature data; The first-level prediction module is used to perform pixel-level inference on the raster feature data of each grid in the study area based on the pre-built total concentration prediction model to obtain the total prediction result corresponding to each grid, and generate a total spatial distribution raster map based on the total prediction results of all grids. The secondary prediction module is used to input the total spatial distribution raster map and the raster feature data corresponding to the total spatial distribution raster map into the effective state prediction model for processing to obtain the effective state prediction value of each raster, and generate the effective state spatial distribution raster map based on the effective state prediction value of each raster. The first calculation module is used to determine the background values and toxicity response coefficients of various heavy metals within the study area. The total spatial distribution raster map and the background values of various heavy metals are input into the pollution intensity formula to calculate the pollution intensity index. The second calculation module is used to input the total spatial distribution raster map, background values of various heavy metals and toxicity response coefficients into the ecological risk formula to calculate the ecological risk index. Result generation module: used to generate three-dimensional risk assessment results by spatially overlaying and jointly determining the pollution intensity index, effective state spatial distribution grid map and ecological risk index under the same grid system.
9. An electronic device, characterized in that, include: Memory containing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the heavy metal three-dimensional risk assessment mapping method based on cascade learning as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program causes a computer to execute the heavy metal three-dimensional risk assessment mapping method based on cascade learning as described in any one of claims 1 to 7.