Method and system for predicting occurrence form of heavy metal elements in waste residues, medium and terminal

By introducing morphological data of similar elements and transfer learning methods, an adaptive model was established, which solved the problems of accuracy and generalization in predicting the occurrence of heavy metals in waste residue. This achieved efficient and accurate prediction of the occurrence of heavy metals, reduced detection costs, and provided a theoretical basis for waste residue treatment.

CN122024889APending Publication Date: 2026-05-12CENT SOUTH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511962819.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-24
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately predict the occurrence of heavy metals in waste residues, resulting in suboptimal model accuracy and significant application difficulties. In particular, traditional methods cannot systematically study the overall occurrence patterns of heavy metals when data volume is limited.

Method used

We introduce the morphological data of elements in the same group, period, and diagonal position as the target heavy metal element in the periodic table. We establish an adaptive model through transfer learning, use deep neural networks for prediction, and combine a shared encoder, a domain-specific encoder, a feature decoupling module, and an output predictor to perform data preprocessing and adversarial training. We dynamically adjust the weights to improve the model's accuracy and generalization ability.

Benefits of technology

It achieves high-precision and high-generalization prediction of heavy metal occurrence speciation under small sample conditions, reduces detection costs, reduces the risk of secondary environmental pollution, and provides a theoretical basis for waste residue treatment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122024889A_ABST
    Figure CN122024889A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a system for predicting occurrence forms of heavy metal elements in waste residues, a medium and a terminal. The method comprises the following steps: acquiring physical and chemical attribute data in to-be-predicted waste residues, and performing data preprocessing to obtain characteristic data; wherein the physical and chemical attribute data comprises one or more of pH value, conductivity, element content, waste residue type, organic matter content, phase content and detection method; and inputting the feature data as input into the constructed and trained adaptive model for predicting the occurrence form of the target heavy metal for prediction, and outputting to obtain the occurrence form of the target heavy metal element. According to the method, similar element occurrence form data with similar physicochemical properties in the same family, the same period and the diagonal position of a target heavy metal element in the periodic table of elements are introduced, and a model for predicting the occurrence form of the heavy metal in the waste residues, which is high in prediction precision and strong in generalization ability, is successfully established through a transfer learning method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of interdisciplinary technology of environmental protection and machine learning, and in particular to a method, system, medium and terminal for predicting the occurrence of heavy metal elements in waste residue. Background Technology

[0002] Heavy metals are a class of metallic or metalloid elements with a density greater than 5 g / cm³ and potential biotoxicity, such as lead (Pb), cadmium (Cd), mercury (Hg), arsenic (As), and chromium (Cr). While their background concentrations in the natural environment are low, increased industrialization, mining, smelting, agricultural fertilization, and wastewater irrigation have led to the release of large quantities of heavy metals into soil, water bodies, and the atmosphere, causing widespread and persistent environmental pollution. Because heavy metals are difficult to degrade, they easily accumulate through the food chain and eventually enter the human body, potentially causing serious health risks such as neurological damage, liver and kidney dysfunction, and carcinogenicity and teratogenicity. Of particular concern is that the environmental forms of heavy metals (such as extractable in weak acids, reducible, oxidizable, and residual forms) directly determine their mobility, bioavailability, and toxicity. Therefore, accurately identifying and predicting the occurrence forms of heavy metals is crucial for assessing ecological risks, developing remediation strategies, and ensuring environmental safety. In recent years, intelligent modeling methods combining machine learning and physicochemical properties have provided new approaches for predicting heavy metal speciation under cross-regional, multi-source, and heterogeneous conditions. Existing technologies are insufficient to meet the urgent needs of heavy metal pollution control and require further improvement. Research on speciation is of great significance for the development of treatment technologies. The proportion of different speciations of heavy metals in waste residue determines the selection and combination of different separation and recovery methods. Accurate prediction of speciation is a prerequisite for the scientific treatment of heavy metals in waste residue.

[0003] Traditional experimental methods for studying the occurrence of heavy metals in waste residue can only analyze the occurrence under specific conditions, making it difficult to guide a systematic study of the overall occurrence patterns of heavy metals in waste residue. Traditional experimental methods have significant limitations in the systematic study of heavy metal occurrence patterns in waste residue. However, with the continuous development of machine learning technology, it has become a powerful tool for studying the occurrence patterns of heavy metals in waste residue. Machine learning's powerful data processing capabilities can establish the interaction relationships between various influencing factors and the target object, and even discover new influences or mechanisms of action. This provides a scientific method for the systematic study of heavy metal occurrence patterns in waste residue. However, the limited number of research papers on heavy metal occurrence patterns in waste residue, the difficulty in data acquisition, and the small amount of existing data make it difficult to model conventional heavy metal occurrence patterns prediction using machine learning, resulting in unsatisfactory model accuracy and significant challenges in model application.

[0004] Therefore, in view of the problems of insufficient data, modeling difficulties and insufficient prediction stability of heavy metals in the above-mentioned waste residues, there is an urgent need for a prediction method of heavy metal occurrence forms in waste residues that can improve model accuracy and applicability. Summary of the Invention

[0005] To address the technical problems in the background art, the present invention provides a method, system, medium, and terminal for predicting the occurrence forms of heavy metal elements in waste residue. The method introduces occurrence form data of similar elements that have similar physicochemical properties to the target heavy metal element in the same group, period, and diagonal position in the periodic table. Through transfer learning, a prediction model for the occurrence forms of heavy metals in waste residue with high prediction accuracy and strong generalization ability is successfully established.

[0006] In a first aspect, the present invention provides a method for predicting the occurrence speciation of heavy metal elements in waste residue, comprising:

[0007] The physicochemical properties data of the waste residue to be predicted are obtained and the data are preprocessed to obtain feature data; wherein, the physicochemical properties data include one or more of the following: pH value, conductivity, element content, waste residue type, organic matter content, phase content, and detection method;

[0008] Feature data is used as input and fed into an adaptive model for predicting the occurrence forms of target heavy metals, which has been constructed and trained. The model outputs the occurrence forms of the target heavy metal elements. The occurrence forms include weakly acid-extractable, reducible, oxidizable, and residue forms. The adaptive model for predicting the occurrence forms of target heavy metals is trained using a dataset constructed from the physicochemical properties of the target heavy metal element and similar elements in the same group, period, and diagonal position, as well as their corresponding occurrence forms, through a deep neural network model.

[0009] Furthermore, the data preprocessing includes filling in missing values ​​in the dataset, performing numerical conversion on non-numerical features, standardizing the data, and using correlation analysis methods to screen feature data whose correlation meets preset requirements.

[0010] Furthermore, the adaptive model for predicting the occurrence morphology of the target heavy metal includes a shared encoder, a domain-specific encoder, a feature decoupling module, and an output predictor.

[0011] The shared encoder is used to extract the preprocessed feature data and convert it into high-dimensional domain-invariant features. The domain-invariant features are the common regular features of the target heavy metal elements and similar elements in the same group, period and diagonal position of the target heavy metal elements.

[0012] Domain-specific encoders include target domain encoders and source domain encoders. Target domain encoders are used to extract specific features of target heavy metal elements; source domain encoders are used to extract specific features of similar elements that are in the same group, period, or diagonal position as the target heavy metal elements.

[0013] The feature decoupling module is used to separate the domain-invariant features extracted by the shared encoder and the specific features extracted by the domain-specific encoder through orthogonal constraints, and then fuse them to obtain fused features;

[0014] Domain discriminators are used during model training to perform adversarial training with a gradient reversal layer and a shared encoder, reducing the difference between features in the source and target domains and thus enhancing domain invariance.

[0015] The output predictor is used to map the fused features obtained by the feature decoupling module into the proportion prediction results of the assigned form.

[0016] Furthermore, the shared encoder consists of an input layer and three fully connected layers, each followed by a ReLU activation function and a Dropout layer. The number of neurons in the input layer is the same as the feature dimension of the feature data. The domain-specific encoder consists of two fully connected layers followed by a ReLU activation function. The domain discriminator consists of a three-layer binary classification neural network. The output predictor consists of a fully connected layer and an output layer.

[0017] Furthermore, the loss function for orthogonal constraints in the feature decoupling module is specifically as follows:

[0018]

[0019] in, For shared encoder output, Output for a domain-specific encoder. Dot product. If two vectors are orthogonal, their dot product is 0; squaring is to ensure that the loss is non-negative and differentiable.

[0020] Furthermore, the training process of the adaptive model for predicting the occurrence morphology of the target heavy metal is as follows:

[0021] Obtain the physicochemical properties and corresponding occurrence data of the target heavy metal element and similar elements in the same group, period, and diagonal position in the periodic table.

[0022] The KNN missing value filling algorithm is used to fill missing values ​​in the dataset. One-hot encoding is used to transform non-numerical features. Then, all data are standardized. The standardized target heavy metal elements and their corresponding storage forms are oversampled to expand the sample size to a preset proportion. The data are integrated to construct a dataset and the dataset is divided into training set and test set.

[0023] The target domain-specific encoder and domain discriminator are frozen. The physicochemical property data of similar elements are input into the network. Only the shared encoder, the source domain-specific encoder, and the output predictor are trained to obtain the pre-trained model. During the training process, the optimizer is the Adam optimizer, and the loss function is the cross-entropy loss of the predicted values.

[0024] During the fine-tuning phase, the shared encoder remains trainable to support adversarial domain alignment; both the target domain-specific encoder and the output predictor participate in the update. The physicochemical property data of the target heavy metal element and the physicochemical property data of similar elements are jointly input into the model, and optimized through task loss (only applied to the source domain), adversarial domain discrimination loss, and feature orthogonality constraints, ultimately obtaining an adaptive model suitable for predicting the occurrence morphology of heavy metals in the target domain.

[0025] An adaptive model for predicting the occurrence patterns of target heavy metals is evaluated based on test set data. Training is completed when the evaluation results meet the preset conditions; otherwise, training continues. The evaluation indicators include the coefficient of determination, mean absolute error, and root mean square error.

[0026] Key influencing factors are identified through Mean Marginal Contribution (SHAP) analysis to determine the critical impact of each feature on the model's predictions. These key influencing factors are the top predetermined number of input features whose SHAP values ​​are sorted in descending order. SHAP analysis determines the critical impact of each feature on the model's predictions by calculating the SHAP value of each feature across all possible feature combinations.

[0027] Furthermore, during training, a dynamic weight adaptive mechanism is adopted to dynamically adjust the weight of similar elements and target heavy metal elements in the total loss based on the loss ratio of similar elements and target heavy metal elements in the previous epoch; a Bayesian optimization hyperparameter search strategy is used to optimize the key parameters of the model, including the learning rate, number of network layers, and batch size; and five-fold cross-validation is used to ensure model stability.

[0028] Secondly, the present invention provides a system for predicting the occurrence speciation of heavy metal elements in waste residue, the system being used to perform the above method, including:

[0029] Data acquisition module: used to acquire physicochemical property data of the waste residue to be predicted and perform data preprocessing to obtain feature data; wherein, the physicochemical property data includes one or more of the following: pH value, conductivity, element content, waste residue type, organic matter content, phase content, and detection method;

[0030] The result prediction module is used to input feature data into an adaptive model for predicting the occurrence forms of target heavy metals, which has been constructed and trained, and outputs the occurrence forms of the target heavy metal elements. The occurrence forms include weakly acid-extractable, reducible, oxidizable, and residue states. The adaptive model for predicting the occurrence forms of target heavy metals is trained on a deep neural network model using a dataset constructed from the physicochemical properties of the target heavy metal and similar elements in the same group, period, and diagonal position as the target heavy metal element, as well as their corresponding occurrence forms.

[0031] Thirdly, the present invention provides a readable storage medium storing a computer program that, when invoked by a processor, performs the steps of the method described above.

[0032] Fourthly, the present invention provides an electronic terminal comprising a processor and a memory, the memory storing a computer program, the processor invoking the computer program to perform the steps of the method described above.

[0033] This invention proposes a method, system, medium, and terminal for predicting the occurrence forms of heavy metal elements in waste residue. Addressing the challenges of limited data and modeling difficulties associated with target heavy metal elements in waste residue, the method introduces occurrence form data from multiple similar elements with chemical properties. Through transfer learning, a high-precision and highly generalizable prediction model for heavy metal occurrence forms in waste residue is successfully established. The hierarchical adaptive transfer learning framework, combined with feature decoupling and adversarial training mechanisms, significantly improves the accuracy and generalization ability of predicting target heavy metal occurrence forms under small sample conditions, overcoming the negative transfer problem caused by direct transfer in traditional methods. A source domain is constructed based on the periodic law criterion, and a dynamic weight adjustment mechanism is employed, enabling the model to more effectively utilize transferable information from similar element data. This method requires only easily obtainable physicochemical parameters to accurately predict the occurrence forms of target heavy metal elements in waste residue, eliminating the need for complex chemical experiments, significantly improving detection efficiency, reducing the risk of secondary environmental pollution, and aligning with the direction of green technology development. The model established by the method has good interpretability and can reveal key influencing factors through feature importance analysis, providing a theoretical basis for waste residue treatment processes. Attached Figure Description

[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art 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.

[0035] Figure 1 This is a schematic flowchart of a method for predicting the occurrence format of heavy metal elements in waste residue provided by an embodiment of the present invention;

[0036] Figure 2 This is a Pearson correlation analysis diagram of the heavy metal dataset in waste residue provided in this embodiment of the invention;

[0037] Figure 3 This is a diagram illustrating the improved performance of the transfer learning model provided in this embodiment of the invention.

[0038] Figure 4 This is the optimal transfer learning model fitting graph provided by the embodiments of the present invention: Figure 4 (a) is the weak acid extraction state F1. Figure 4 (b) is the reducible state F2. Figure 4 (c) is an oxidizable state of F3. Figure 4 (d) represents residual F4. Detailed Implementation

[0039] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be described in detail below. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other implementation methods obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0040] Example 1

[0041] like Figure 1 As shown in this embodiment, a method for predicting the occurrence speciation of heavy metal elements in waste residue is provided. To further elaborate on the scheme, thallium is used as the target heavy metal element as an example to predict the occurrence speciation of thallium in waste residue. The method includes:

[0042] S1: Obtain the physicochemical property data of the waste residue to be predicted and perform data preprocessing to obtain feature data; wherein, the physicochemical property data includes one or more of the following: pH value, conductivity, elemental content, waste residue type, organic matter content, phase content, and detection method. In this specific implementation, pH value, conductivity, elemental content, waste residue type, organic matter content, phase content, and detection method are selected as input features.

[0043] Specifically, the data preprocessing includes removing outliers from the dataset, filling in missing values, performing numerical transformation on non-numerical features, data standardization, and using correlation analysis to screen feature data whose correlation meets preset requirements. In practice, the method for detecting outliers is based on the statistical standard deviation (SD). This method assumes that the data roughly follows a normal distribution. In this case, the mean (…) can be used. ) and standard deviation ( This is used to identify potential outliers. According to a rule of thumb (also known as the 68-95-99.7 rule), for normally distributed data, approximately 99.7% of the data points should be within three standard deviations of the mean. ± 3 Given a dataset, first calculate the mean of the dataset (). ) and standard deviation ( The calculation formula is as follows:

[0044]

[0045]

[0046] Where n is the number of data points; x i For data points;

[0047] Based on the mean and standard deviation, outliers can be identified using the following formula, and the range of outliers can be determined as follows:

[0048]

[0049]

[0050] Any value below the lower bound or above the upper bound can be considered an outlier. Outlier data is deleted directly.

[0051] The KNN missing value imputation algorithm (with k=5 nearest neighbors) is used to fill in missing values ​​in the dataset (e.g., filling in missing pH values) to avoid the bias caused by simple mean imputation; one-hot encoding is used to transform possible non-numerical features (e.g., waste type); RobustScaler is used to standardize all features (all input features) to reduce the impact of outliers on model training. The calculation formula is as follows:

[0052]

[0053] in, The standardized values ​​of the data points; For data points; This is the median of the dataset; The interquartile range is used to reduce the impact of outliers.

[0054] Pearson correlation analysis was used to perform feature selection and dimensionality reduction on target heavy metal elements, improving feature representation capabilities and resulting in a simpler and more efficient model. The Pearson correlation analysis formula measures the linear relationship between two variables; its calculation formula is as follows:

[0055]

[0056] in, There are two variables. and Covariance between them; and These are the standard deviations of variables X and Y, respectively. The Pearson correlation coefficient ranges from -1 to 1, where 1 indicates a perfect positive correlation, -1 indicates a perfect negative correlation, and 0 indicates no correlation. Pearson correlation analysis is performed on the data points in the dataset to determine the correlation between the features of each data point. Based on the correlation, features are filtered out, removing features with excessively high correlation to ensure the model's simplicity and efficiency. For example... Figure 2 As shown, input features with high correlation are removed based on Pearson correlation analysis.

[0057] S2: The feature data is used as input and fed into the adaptive model for predicting the occurrence form of the target heavy metal, which has been constructed and trained. The output is the occurrence form of the target heavy metal element. The occurrence forms include weakly acid extractable state F1, reducible state F2, oxidizable state F3, and residue state F4. The adaptive model for predicting the occurrence form of the target heavy metal is obtained by training a deep neural network model using a dataset constructed from the physicochemical properties of the target heavy metal and similar elements in the same group, period, and diagonal position as the target heavy metal element, as well as their corresponding occurrence forms.

[0058] Specifically, the adaptive model for predicting the occurrence morphology of the target heavy metal includes a shared encoder, a domain-specific encoder, a feature decoupling module, and an output predictor.

[0059] A shared encoder is used to extract preprocessed feature data using a multilayer perceptron (MLP) and transform it into high-dimensional domain-invariant features. These domain-invariant features are common patterns shared with the target heavy metal element and similar elements in the same group, period, or diagonal position in the periodic table. Specifically, it consists of one input layer and three fully connected (dense) layers. The number of neurons in the input layer is the same as the feature dimension (14 features). The three fully connected layers have 64, 32, and 16 neurons, respectively. Each layer is followed by a ReLU activation function and a dropout layer (Dropout rate = 0.3). By transforming the original input into a high-dimensional feature representation, knowledge transfer between similar tasks can be achieved. By sharing parameters instead of training an independent model for each task, computational costs and storage requirements can be reduced to some extent.

[0060] Domain-specific encoders consist of a target domain encoder and a source domain encoder. The target domain encoder extracts specific features of the target heavy metal element, while the source domain encoder extracts specific features of elements similar to the target heavy metal element in the same group, period, and diagonal position in the periodic table. Both the target and source domain encoders have the same structure, consisting of two fully connected layers (16 and 8 neurons respectively), followed by a ReLU activation function.

[0061] The feature decoupling module is used to separate the domain-invariant features extracted by the shared encoder and the domain-specific features extracted by the domain-specific encoder through orthogonal constraints, avoiding negative transfer, and then fuses them to obtain fused features. The formula for the fused features is:

[0062]

[0063] in, These are domain-invariant features extracted by the shared encoder; These are specific features extracted by a domain-specific encoder; This represents the fused features. The feature decoupling module helps identify and separate features that are significantly different between the source and target domains, thereby improving the model's generalization ability. Simultaneously, by distinguishing between domain-invariant and domain-specific features, the model can focus more on task-critical invariant features, ignoring variations caused only by a specific domain. The model can learn more general representations, thus improving its performance on cross-domain tasks. Furthermore, the loss function for orthogonal constraints in the feature decoupling module is specifically:

[0064]

[0065] in, For shared encoder output, Output for domain-specific encoders.

[0066] The domain discriminator is used during model training to perform adversarial training with a gradient inversion layer and a shared encoder, reducing the difference between features from the source and target domains and thus enhancing domain invariance. Specifically, the domain discriminator is a three-layer binary classification neural network (with 16, 8, and 1 neurons respectively), connected by a gradient inversion layer (GRL). During backpropagation, it performs adversarial training on the shared features, making it unable to distinguish whether features come from the source or target domain, thereby enhancing domain invariance. Simultaneously, bidirectional adversarial training is introduced, allowing not only the feature extractor to train the domain discriminator, but also the domain discriminator to guide the feature extractor in learning more effective representations. This innovative improvement enables the model to achieve cross-domain adaptation, helping it to be better applied in different relevant environments without requiring extensive retraining for each new environment.

[0067] The output predictor maps the fused features obtained from the feature decoupling module to the predicted proportions of the four memory configurations. In practice, the output predictor consists of a fully connected layer with 8 neurons and an output layer. The output layer uses the Softmax activation function and outputs a vector with four nodes, representing the predicted proportions of the four memory configurations, with the sum of the proportions being 100%. The main function of the output predictor is to enable the model to simultaneously predict the proportions of the four memory configurations. The Softmax function is a commonly used activation function in multi-class classification problems; it transforms a set of values ​​into a probability distribution. Specifically, given a vector Z, the Softmax function maps each element Z of this vector... i Mapped to:

[0068]

[0069] in, This indicates that the natural exponential function is applied to The result; It is the index of the current element; It is the sum of the exponents of all elements, ensuring that the sum of all elements in the output is 1.

[0070] Furthermore, the training process of the adaptive model for predicting the occurrence morphology of the target heavy metal is as follows:

[0071] The study acquires physicochemical property data and corresponding occurrence forms of similar elements to the target heavy metal element and elements in the same group, period (i.e., with the same number of electron shells) and diagonally opposite positions in the periodic table. Specifically, data is collected from publicly available scientific literature, experimental reports, and environmental monitoring databases, including target domain data and source domain data. Target domain data (in this example, data on the target heavy metal thallium): Weakly acid-extractable state F1, reducible state F2, oxidizable state F3, and residual state F4 (unit: %) of the heavy metal in the waste residue are collected as prediction labels. Simultaneously, the physicochemical property features corresponding to each data point are collected, including: pH value, conductivity (μS / cm), and the content (unit: mg / kg) of elements such as Tl, Pb, Zn, Fe, Cd, and S in the waste residue, as well as the waste residue type. Ultimately, 300 sets of valid target domain data samples are collected. Source domain data (physicochemical property data of similar elements): Based on chemical similarity (both are chalcophiles, have similar ionic radii, etc.), aluminum (Al), lead (Pb), and cadmium (Cd) were selected as similar elements. Following the same specifications, the proportions of the four occurrence forms of Al, Pb, and Cd and the corresponding physicochemical characteristic data of identical systems were collected respectively. 500 samples were collected for each element, which together formed the source domain dataset.

[0072] The KNN missing value imputation algorithm is used to fill missing values ​​in the dataset. One-hot encoding is used to transform non-numerical features. Then, all data are standardized. The standardized target heavy metal elements and their corresponding storage forms are oversampled to expand the sample size to a preset proportion. The data are integrated to construct a dataset and divided into training and test sets. To alleviate the overfitting problem that may be caused by the small amount of data in the target domain, the SMOTE algorithm is used to oversample the target domain training set, expanding the sample size to 200% of the original size.

[0073] The target domain-specific encoder and domain discriminator are frozen. The physicochemical property data of similar elements are input into the network, and only the shared encoder, source domain-specific encoder, and output predictor are trained to obtain a pre-trained model. During training, the optimizer is the Adam optimizer (initial learning rate lr=0.001), and the loss function is the cross-entropy loss of the predicted values.

[0074] During the fine-tuning phase, the shared encoder remains trainable to support adversarial domain alignment; both the target domain-specific encoder and the output predictor participate in the update; the physicochemical property data of the target heavy metal element and the source domain data (i.e., the physicochemical property data of similar elements) are jointly input into the model, and the model is jointly optimized by the task loss that only acts on the source domain, the adversarial domain discrimination loss and the feature orthogonality constraint, and finally an adaptive model suitable for predicting the occurrence form of heavy metals in the target domain is obtained.

[0075] An adaptive model for predicting the occurrence patterns of target heavy metals is evaluated based on test set data. Training is considered complete when the evaluation results meet preset conditions; otherwise, training continues. The evaluation metrics used include the coefficient of determination (COP). Mean absolute error ( ) and root mean square error ( As an evaluation indicator, the specific calculation formula is as follows:

[0076]

[0077]

[0078]

[0079] in, It is the predicted value of the output label; This is the true value of the output label; N is the number of samples. and These are the true value and the predicted value of the i-th sample, respectively; It is the mean of the true values ​​of N samples.

[0080] Key influencing factors are identified through SHAP value analysis. SHAP analysis determines the critical influence of each feature on the model prediction by calculating the average marginal contribution of each feature across all possible feature combinations (SHAP value). The key influencing factors are the top preset number of input features whose average marginal contribution is sorted in descending order.

[0081] Furthermore, during training, a Dynamic Weight Adaptive (DWA) mechanism is employed to dynamically adjust the weights of similar elements and target heavy metal elements in the total loss based on the loss ratio of similar elements and target heavy metal elements in the previous epoch. A Bayesian optimization hyperparameter search strategy is used to optimize key model parameters, including the learning rate, number of network layers, and batch size. Five-fold cross-validation is used to ensure model stability.

[0082] Dynamic Weight Adaptation (DWA) is used to adjust the contributions of the source and target domains during training. Specifically, it calculates the relative rate of decrease in loss for each task. Let the loss of the i-th task at training step t be the relative descent rate. The calculation formula is: When the loss of a task decreases more slowly, its weight is increased; conversely, if the loss decreases rapidly, its weight is temporarily decreased. The Bayesian optimization framework is used to automatically optimize hyperparameters (such as the initial learning rate, Dropout rate, and weight coefficients λ of orthogonal constraints), using the R² score on the validation set as the optimization objective. Bayesian optimization first randomly selects several hyperparameter combinations for evaluation, and based on the initial results, predicts the optimal hyperparameter combination as the next evaluation point. This process is repeated, continuously updating the model and selecting new points for evaluation, until the maximum number of iterations is reached or a sufficiently good parameter combination is found.

[0083] After training, the model performance was comprehensively evaluated using an independent test set (representing 20% ​​of the total target domain data, i.e., 60 sets of data not used in training). The results are as follows: Figure 3 As shown, when training using only heavy metal element data, the transfer learning model R... 2 The R-value is 0.74, while the conventional GBRT model is 0.714. When using Al, Pb, and Cd element-assigned morphological data as source data for transfer learning, the performance of the transfer learning model MTL is 0.687, 0.743, and 0.598, respectively, while the conventional model is only 0.66, 0.68, and 0.60. The R-value of the model used in this invention is... 2 The value can reach 0.743, while the traditional GBRT model R 2 The value is only 0.714. The results show that the method proposed in this invention significantly outperforms the comparative model in all indicators, proving its effectiveness and superiority in small sample scenarios.

[0084] To further analyze the performance differences between the conventional model and the transfer learning model, significance testing and analysis of variance were used to compare the accuracy of the conventional model and the similar element transfer model for heavy metal occurrence in waste residue. According to Occam's razor, among models with similar or identical prediction results, the one with lower complexity should be selected. Different models were used to predict on the same test set to evaluate the model's accuracy and complexity. For the specific differences between different modeling methods on prediction tasks for different occurrence forms, the root mean square error (RMSE) and mean absolute error (MAE) of various transfer learning models for occurrence form prediction were compared. The predicted values ​​and true values ​​for each sample were compared, and frequency density distribution curves and descriptive statistical analysis were used to determine the tendency (overestimation, underestimation, or normality) of different modeling methods in the regression prediction of heavy metal occurrence distribution. The final transfer learning model fitting effect is shown below. Figure 4 As shown, where, Figure 4 (a) is the weak acid extraction state F1. Figure 4 (b) is the reducible state F2. Figure 4 (c) is an oxidizable state of F3. Figure 4 (d) represents residual state F4. This invention collects data on the occurrence forms of heavy metal-containing waste residue and, based on the occurrence forms of similar heavy metal elements according to the periodic law, as well as data on the elemental content, pH, conductivity, organic matter content, detection methods, and phase content of the heavy metal-containing waste residue, constructs a transfer learning model to predict the proportion of heavy metal-containing waste residue occurrence forms. Based on this model, the proportion of heavy metal-containing waste residue occurrence forms can be predicted simply by inputting existing elemental content and other characteristic data of the waste residue, without the need for complex experiments, and the prediction accuracy can reach 74.3%.

[0085] Secondly, the present invention provides a system for predicting the occurrence speciation of heavy metal elements in waste residue, the system being used in the above method, comprising:

[0086] Data acquisition module: used to acquire physicochemical property data of the waste residue to be predicted and perform data preprocessing to obtain feature data; wherein, the physicochemical property data includes one or more of the following: pH value, conductivity, element content, waste residue type, organic matter content, phase content, and detection method;

[0087] The result prediction module is used to input feature data into an adaptive model for predicting the occurrence forms of target heavy metals, which has been constructed and trained, and outputs the occurrence forms of the target heavy metal elements. The occurrence forms include weakly acid-extractable forms, exchange forms, residue forms, and organically bound forms. The adaptive model for predicting the occurrence forms of target heavy metals is trained on a deep neural network model using a dataset constructed from the physicochemical properties of the target heavy metal and similar elements in the same group, period, and diagonal position of the target heavy metal, as well as their corresponding occurrence forms.

[0088] Thirdly, the present invention provides a readable storage medium storing a computer program that, when invoked by a processor, performs the steps of the method described above.

[0089] Fourthly, the present invention provides an electronic terminal comprising a processor and a memory, the memory storing a computer program, the processor invoking the computer program to perform the steps of the method described above.

[0090] It should be understood that, in the embodiments of the present invention, the processor may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. The memory may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information.

[0091] The readable storage medium is a computer-readable storage medium, which can be an internal storage unit of the controller described in any of the foregoing embodiments, such as the controller's hard drive or memory. The readable storage medium can also be an external storage device of the controller, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the controller. Further, the readable storage medium can include both the controller's internal storage unit and external storage devices. The readable storage medium is used to store the computer program and other programs and data required by the controller. The readable storage medium can also be used to temporarily store data that has been output or will be output.

[0092] 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 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 described in the various embodiments of the present invention. The aforementioned readable 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.

[0093] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.

[0094] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for predicting the occurrence speciation of heavy metal elements in waste residue, characterized in that, include: The physicochemical properties data of the waste residue to be predicted are obtained and the data are preprocessed to obtain feature data; wherein, the physicochemical properties data include one or more of the following: pH value, conductivity, element content, waste residue type, organic matter content, phase content, and detection method; Feature data is used as input and fed into an adaptive model for predicting the occurrence forms of target heavy metals, which has been constructed and trained. The model outputs the occurrence forms of the target heavy metal elements. The occurrence forms include four types: weakly acid-extractable, reducible, oxidizable, and residue. The adaptive model for predicting the occurrence forms of target heavy metals is trained using a dataset constructed from the physicochemical properties of the target heavy metal element and similar elements in the same group, period, and diagonal position as the target heavy metal element, along with their corresponding occurrence forms, through a deep neural network model.

2. The method according to claim 1, characterized in that, The data preprocessing includes filling in missing values ​​in the dataset, performing numerical conversion on non-numerical features, standardizing the data, and removing redundant features using correlation analysis.

3. The method according to claim 1, characterized in that, The adaptive model for predicting the occurrence morphology of target heavy metals includes a shared encoder, a domain-specific encoder, a feature decoupling module, and an output predictor. The shared encoder is used to extract the preprocessed feature data and convert it into high-dimensional domain-invariant features. The domain-invariant features are the common regular features of the target heavy metal element and similar elements in the same group, period and diagonal position as the target heavy metal element. Domain-specific encoders include target domain encoders and source domain encoders. Target domain encoders are used to extract specific features of target heavy metal elements; source domain encoders are used to extract specific features of similar elements that are in the same group, period, or diagonal position as the target heavy metal elements. The feature decoupling module is used to separate the domain-invariant features extracted by the shared encoder and the specific features extracted by the domain-specific encoder through orthogonal constraints, and then fuse them to obtain fused features; The domain discriminator is used during model training to perform adversarial training with the shared encoder using a gradient inversion layer; The output predictor is used to map the fused features obtained by the feature decoupling module into the proportion prediction results of the assigned form.

4. The method according to claim 3, characterized in that, The shared encoder consists of one input layer and three fully connected layers, each followed by a ReLU activation function and a Dropout layer. The number of neurons in the input layer is the same as the feature dimension of the feature data. The domain-specific encoder consists of two fully connected layers followed by a ReLU activation function. The domain discriminator consists of a three-layer binary classification neural network. The output predictor consists of one fully connected layer and an output layer.

5. The method according to claim 4, characterized in that, The loss function for orthogonal constraints in the feature decoupling module is as follows: ; Among them, among them, For shared encoder output; Output for domain-specific encoders.

6. The method according to claim 1, characterized in that, The training process of the target heavy metal element occurrence morphology prediction model is as follows: Obtain the physicochemical properties and corresponding occurrence forms of the waste residue of the target heavy metal element and similar elements in the same group, period and diagonal position in the periodic table of elements. The KNN missing value filling algorithm is used to fill missing values ​​in the dataset. One-hot encoding is used to transform non-numerical features. Then, all data are standardized. The standardized target heavy metal elements and their corresponding storage forms are oversampled to expand the sample size to a preset proportion. The data are integrated to construct a dataset and the dataset is divided into training set and test set. The target domain-specific encoder and domain discriminator are frozen. The physicochemical property data of similar elements are input into the network. Only the shared encoder, the source domain-specific encoder, and the output predictor are trained to obtain the pre-trained model. During the training process, the optimizer is the Adam optimizer, and the loss function is the cross-entropy loss of the predicted values. During the fine-tuning phase, the shared encoder remains trainable to support adversarial domain alignment; both the target domain-specific encoder and the output predictor participate in the update; the physicochemical property data of the target heavy metal element and the physicochemical property data of similar elements are jointly input into the model, and optimized by the task loss that only acts on the source domain, the adversarial domain discrimination loss and the feature orthogonality constraint, and finally an adaptive model suitable for predicting the occurrence form of heavy metals in the target domain is obtained. An adaptive model for predicting the occurrence patterns of target heavy metals is evaluated based on test set data. Training is completed when the evaluation results meet the preset conditions; otherwise, training continues. The evaluation indicators include the coefficient of determination, mean absolute error, and root mean square error. Key influencing factors are identified by analyzing the marginal contribution average value, and the degree of key influence of each feature on the model prediction is determined; wherein, the key influencing factors are the first preset number of input features whose marginal contribution average values ​​are sorted in descending order.

7. The method according to claim 6, characterized in that, During training, a dynamic weight adaptive mechanism is adopted to dynamically adjust the weight of similar elements and target heavy metal elements in the total loss based on the loss ratio of similar elements and target heavy metal elements in the previous epoch. A Bayesian optimization hyperparameter search strategy is used to optimize the key parameters of the model, including the learning rate, number of network layers, and batch size. Five-fold cross-validation is used to ensure model stability.

8. A system for predicting the occurrence speciation of heavy metal elements in waste residue, the system being used to execute the method of any one of claims 1-7, characterized in that, include: Data acquisition module: used to acquire physicochemical property data of the waste residue to be predicted and perform data preprocessing to obtain feature data; wherein, the physicochemical property data includes one or more of the following: pH value, conductivity, element content, waste residue type, organic matter content, phase content, and detection method; The result prediction module is used to input feature data into an adaptive model for predicting the occurrence forms of target heavy metals, which has been constructed and trained, and outputs the occurrence forms of the target heavy metal elements. The occurrence forms include weakly acid-extractable, reducible, oxidizable, and residue states. The adaptive model for predicting the occurrence forms of target heavy metals is trained on a deep neural network model using a dataset constructed from the physicochemical properties of the target heavy metal and similar elements in the same group, period, and diagonal position as the target heavy metal element, as well as their corresponding occurrence forms.

9. A readable storage medium, characterized in that: A computer program is stored, which, when invoked by a processor, performs the steps of the method according to any one of claims 1-7.

10. An electronic terminal, characterized in that: It includes a processor and a memory, the memory storing a computer program, the processor calling the computer program to perform the steps of the method according to any one of claims 1-7.