A farmland cadmium pollution dynamic prediction and intelligent application optimization method and system

CN122927658APending Publication Date: 2026-10-16ZHEJIANG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611213412.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-11
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

然而,现有的生物炭-菌剂施用技术普遍存在以下不足:第一,施用决策缺乏科学依据

Benefits of technology

第一,提供了科学的施用决策依据。通过随机森林算法建立的预测模型,能够根据土壤条件、生物炭属性和菌剂类型等参数定量预测修复效果,避免了单纯依靠经验确定施用量的不科学做法,显著提升了决策的科学性和精准性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122927658A_ABST
    Figure CN122927658A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of farmland heavy metal pollution remediation, and particularly relates to a farmland cadmium pollution dynamic prediction and intelligent application optimization method and system. The method comprises the following steps: firstly, a multi-dimensional input feature vector of the soil to be repaired is obtained, including nine soil properties, two biochar properties, one type of microbial agent and one application parameter, totaling thirteen dimensions; then, a random forest algorithm is used to respectively establish a target time prediction model and an effective maintenance period prediction model; then, the dose effect coefficient automatically learned through the non-intercept linear regression is combined, and a long short-term memory network is used to simulate the cadmium content dynamic curve after multi-stage application; finally, the optimal scheme is screened through the multi-objective weighted scoring of a pre-defined strategy library containing one hundred and sixty-eight candidate schemes. The application solves the problems of lack of scientific basis in decision-making, inaccurate effect prediction and lack of multi-stage application optimization design in the existing biochar application technology, and can provide a scientific, intelligent and durable application scheme for farmland cadmium pollution remediation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of farmland heavy metal pollution remediation technology, specifically to a method and system for dynamic prediction and intelligent application optimization of cadmium pollution in farmland. Background Technology

[0002] Heavy metal pollution in soil is characterized by its wide range of pollution, strong environmental persistence, and high ecological and health risks, making it a significant environmental issue of global concern. Among various heavy metal pollutants, cadmium (Cd) has received widespread attention due to its high toxicity, strong migration activity, significant bioaccumulation, and inability to be biodegraded. Cadmium can accumulate in the human body through the food chain, and long-term intake of low doses can lead to kidney damage, osteoporosis, and even Itai-itai disease, posing a significant threat to human health.

[0004] The main sources of cadmium pollution include atmospheric deposition, wastewater irrigation, phosphate fertilizer application, and mining activities.

[0005] The "Soil Environmental Quality Standard for Agricultural Land Soil Pollution Risk Control" (GB 15618-2018) clearly stipulates the risk screening values ​​for cadmium in agricultural land soil under different pH conditions: when the soil pH is ≤5.5, the screening value is 0.3 mg / kg; when 5.5 < pH ≤ 6.5, the screening value is 0.4 mg / kg; when 6.5 < pH ≤ 7.5, the screening value is 0.6 mg / kg; and when pH > 7.5, the screening value is 0.8 mg / kg. The "National Food Safety Standard for Limits of Contaminants in Food" (GB 2762-2022) stipulates that the limit for cadmium in rice is 0.2 mg / kg.

[0006] Currently, cadmium-contaminated soil remediation technologies can generally be classified into physical remediation, chemical remediation, bioremediation, and combined remediation technologies. Physical remediation methods (such as topsoil replacement, deep tillage, and electrokinetic remediation) are effective but costly and involve large-scale engineering projects; chemical remediation methods (such as lime conditioning, phosphate passivation, and clay mineral modification) are easily affected by soil conditions, resulting in unstable effectiveness; bioremediation methods (such as phytoremediation and microbial remediation) have long cycles and unpredictable results. Biochar-microbial agent composite materials, as an emerging remediation material, have received widespread attention from academia and industry in recent years. Biochar is a carbon-rich material formed by the thermochemical conversion of biomass under limited or anaerobic conditions. Its pore structure, specific surface area, mineral composition, and oxygen-containing functional groups on the surface such as carboxyl and phenolic hydroxyl groups are closely related to the type of raw materials and pyrolysis conditions. Biochar can promote the conversion of exchangeable or soluble cadmium to a relatively stable form through mechanisms such as pore filling and surface adsorption, cation exchange, surface complexation, electrostatic interaction, mineral co-precipitation, and increasing soil pH. (See GONG H, ZHAO L, RUI X, HU J, ZHU N. A review of pristine and modified biochar immobilizing typical heavy metals in soil: Applications and challenges[J]. *Journal of Hazardous Materials*, 2022, 432:128668.).

[0007] Functional microbial agents (such as siderogenic bacteria and heavy metal-tolerant bacteria) can promote the transformation and stabilization of cadmium. Cadmium-tolerant bacteria, sulfate-reducing bacteria, and other functional microorganisms can reduce the mobility and plant availability of cadmium through cell surface adsorption, extracellular polymer complexation, biomineralization, sulfide precipitation, and alteration of the rhizosphere environment (MA B, SONG W, ZHANG X, et al. Potential application of novel cadmium-tolerant bacteria in bioremediation of Cd-contaminated soil[J]. Ecotoxicology and Environmental Safety, 2023, 255: 114766). The synergistic effect of both can significantly improve the efficiency of cadmium pollution remediation. However, existing biochar-microbial agent application technologies generally have the following shortcomings: First, the application decision lacks a scientific basis. In actual production, the application rate is mainly determined by experience, failing to fully consider the differential influence of soil physicochemical properties, resulting in significant differences in the effect of the same application scheme under different soil conditions. Second, there is a lack of quantitative prediction capability. Existing technologies cannot predict the repair effect under specific application conditions (such as the time to reach the target and the effective maintenance period), and cannot provide precise time-based decision support for repair projects. Third, most are single-application schemes. Existing technologies typically use a one-time application method, which carries the risk of "effect rebound," meaning that the passivation effect gradually decays and becomes ineffective after reaching its peak. Fourth, there is a lack of multi-stage application optimization methods. Existing technologies have failed to systematically study the impact mechanism of key parameters such as dosage distribution and interval time of multiple applications on the repair effect, thus limiting further improvements in repair efficiency.

[0008] The development of machine learning technology has provided new technical paths for solving the above problems. Random forest algorithms, due to their strong fitting ability to nonlinear relationships, built-in feature importance assessment, and high robustness to noisy data, have been widely applied in environmental prediction and risk assessment. Long Short-Term Memory (LSTM) networks, as a deep learning method for processing time-series data, have shown unique advantages in predicting environmental variables over time series. However, facing the complex characteristics of multi-factor interactions and dynamic changes in biochar-inoculant application systems, existing prediction methods generally suffer from problems such as incomplete effect prediction, susceptibility to single-result rebound, and weak ability to capture time-series dependencies, making it difficult to achieve accurate effect prediction and scheme recommendation. A systematic solution that organically combines random forests and LSTM is still lacking. Summary of the Invention To achieve the above objectives, the present invention adopts the following technical solution: The present invention provides a method for dynamic prediction and intelligent application optimization of cadmium pollution in farmland, comprising the following steps: S1. Obtain soil property parameters, biochar property parameters, microbial agent type parameters, and application parameters of the soil to be remediated, and construct a multidimensional input feature vector; S2, using a random forest regressor to train a time-to-achieve prediction model and an effective maintenance period prediction model respectively. The time-to-achieve prediction model is used to predict the number of days required for the soil available cadmium content to drop below the GB 15618-2018 screening value after a single application. The effective maintenance period prediction model is used to predict the number of days that the cadmium content can be maintained below the standard after achieving the standard, thus obtaining a single application baseline scheme. S3. Obtain the initial available cadmium content of the soil to be remediated. Use the long short-term memory network algorithm and the multi-stage application simulation algorithm to simulate the dynamic curve of cadmium content after multi-stage application. The input of the LSTM is a three-dimensional tensor with the shape of (number of samples, time step, feature dimension). The time step is fixed at three time points, corresponding to the monitoring data on the seventh day, the thirtieth day and the forty-fifth day after application, respectively. The output is a complete cadmium content-time dynamic curve. S4. Construct a predefined strategy library. Each candidate scheme in the strategy library includes the number of application stages, the application amount in each stage, and the interval time between each stage. For each candidate scheme in the strategy library, call step S3 to perform dynamic simulation to obtain three evaluation indicators for each candidate scheme: the time to achieve the target, the total amount used, and the effective maintenance period. Rank and score the three evaluation indicators respectively, calculate the weighted comprehensive score, and output the candidate scheme with the highest comprehensive score as the optimal application scheme. Compare and verify the optimal application scheme with the single application benchmark scheme obtained in step S2, and output the amount of amount saved, the time advance, and the maintenance period extension.

[0009] Furthermore, the soil property parameters include soil pH, soil organic matter content, soil cation exchange capacity, total soil cadmium, soil available cadmium content, soil electrical conductivity, soil clay content, soil moisture content, and soil temperature; the biochar property parameters include biochar type and biochar pH; the inoculant type parameter is a category parameter; and the application parameter is the single application amount.

[0010] Further, step S1 also includes a data preprocessing step, which includes the following sub-steps: S11, data cleaning, deleting completely duplicate records, and using the three Sigma principle to identify and remove outliers of numerical features; S12, missing value handling, using linear interpolation to fill in missing values ​​at the beginning and end, and using the mean of the field to fill in missing values ​​at the beginning and end; S13, categorical feature encoding, performing unique thermal encoding on biochar type and inoculant type; S14, numerical feature standardization, performing Z-score standardization on all numerical features, with the standardization formula being x_normalized = (x - μ) / σ, where x is the original value, μ is the mean of the training set, and σ is the standard deviation of the training set. After standardization, the mean and standard deviation are saved for use in the prediction stage by performing the same processing on the data to be predicted.

[0011] Furthermore, step S1 also includes a dataset partitioning step, which divides the processed data into a training set, a validation set, and a test set in a ratio of 7:1.5:1.5.

[0012] Furthermore, the random forest algorithm described in step S2 adopts a dual random forest regressor architecture. The two models have the same structure but independent parameters, and are optimized for the time to achieve the standard and the effective maintenance period, respectively. The time to achieve the standard prediction model is used to predict the number of days required from application until the soil available cadmium content drops below the screening value of GB 15618-2018; the effective maintenance period prediction model is used to predict the number of days that the cadmium content can be maintained below the standard after the standard is achieved.

[0013] Furthermore, the hyperparameter optimization of the random forest regressor in step S2 employs a grid search and five-fold cross-validation method. The search space includes: the number of decision trees n_estimators, ranging from one to three hundred; the maximum tree depth max_depth, ranging from ten to thirty or unlimited; the minimum number of split samples min_samples_split, ranging from two to ten; and the minimum number of leaf node samples min_samples_leaf, ranging from one to four. Five-fold cross-validation divides the training data into five equal subsets, using four subsets for training and one subset for validation each time, and repeating the cycle five times to take the average score as the performance evaluation of this parameter combination.

[0014] Further, the model performance evaluation metrics in step S2 include mean squared error (MSE), root mean squared error (RMSE), mean absolute error (MAE), and coefficient of determination (R²), calculated as follows: MSE = (1 / n) × Σ(y_true - y_pred)²; RMSE = √MSE; MAE = (1 / n) × Σ|y_true - y_pred|; R² = 1 - Σ(y_true - y_pred)² / Σ(y_true - y_mean)², where y_true is the true value, y_pred is the predicted value, and n is the number of samples. After the random forest model is trained in step S2, the contribution of each input feature is calculated. The Gini importance is calculated based on the reduction in Gini impurity when a node splits, and the formula is: Importance_i = Σ(ΔGini_i) / Σ(ΔGini_all), where ΔGini_i is the reduction in Gini impurity resulting from splitting using feature i, and Σ(ΔGini_all) is the total reduction in Gini impurity resulting from all features.

[0015] Further, the dose-response coefficient mentioned in step S3 is automatically learned from historical experimental data through non-intercept linear regression. The dose-response coefficient characterizes the relationship between the biochar application rate and the decrease in cadmium content. The learning method for the dose-response coefficient includes the following sub-steps: S31, extracting the initial available cadmium content, the seventh-day available cadmium content, and the application rate for each sample from the training data; S32, calculating the relative effect for each sample, with the effect calculation formula being Effect = (Cd_initial - Cd_d7) / (Cd_initial + ε), where Cd_initial is the initial available cadmium content, Cd_d7 is the seventh-day available cadmium content, and ε is a small constant to avoid division by zero; S33, fitting the relationship between the effect and the application rate using non-intercept linear regression, with the regression equation being Effect = k × Dose, where k is the dose-response coefficient and Dose is the application rate; S34, solving for the dose-response coefficient using the least squares method, with the calculation formula being k = Σ(Dose × Effect). / Σ(Dose²); S35, limits the dose-effect coefficient to the range of [-0.5, 0].

[0016] Furthermore, the input data format of the Long Short-Term Memory Network in step S3 is a three-dimensional tensor with a shape of (number of samples, time step, feature dimension). The time step is fixed at three, corresponding to the seventh day, the thirtieth day, and the forty-fifth day. The features of each time step include thirteen static features plus the effective cadmium content at that time point, for a total of fourteen features.

[0017] Further, the network structure of the Long Short-Term Memory (LSTM) network algorithm described in step S3 includes: an input layer that receives input with a shape of (variable time step, fourteen feature dimensions); a first LSM layer with sixty-four units configured to return complete sequences and a random deactivation layer with a connection dropout rate of 0.2; a second LSM layer with thirty-two units and a random deactivation layer with a connection dropout rate of 0.2; a fully connected layer with sixteen units and an activation function of ReLU; and an output layer with one unit and an activation function of a linear function, outputting the predicted effective maintenance period value.

[0018] Furthermore, the long short-term memory network compilation configuration in step S3 includes: the optimizer adopts the adaptive moment estimation algorithm (Adam), the learning rate is set to 0.001; the loss function adopts mean squared error; the evaluation metric adopts mean absolute error; the training configuration includes a maximum training epoch of 200, a batch size of 32, and a validation set ratio of 15%; an early stop callback strategy is adopted during training, if the validation loss does not decrease for ten consecutive epochs, then training is stopped and the optimal weights are restored.

[0019] Further, the multi-stage application simulation algorithm in step S3 includes the following sub-steps: S301, initialization step, setting the current cadmium content as the initial value, the current number of days as zero, and the stage index as zero; S302, calculating the cumulative number of days for each stage of application, with the first stage applied on day zero, and subsequent stages accumulating the interval days sequentially; S303, main loop step, first checking whether a new dose needs to be applied, if the current stage index is less than the total number of stages and the current number of days is greater than or equal to the corresponding application day, then executing the dose application; S304, the dose application adopts the Mikalis-Menten type dose-effect function, and the formula for calculating the new cadmium content is Cd_new = Cd_current × (1 - DoseEffect / (1 + DoseEffect)), where DoseEffect = |k| × Dose, k is the dose-effect coefficient, and Dose is the application amount; S305, natural decay adopts a first-order kinetic exponential decay model, and the formula for calculating the new cadmium content is Cd_decay = Cd_current × r^Δt, where r is the natural decay exponent and Δt is the time step; S306, the post-processing step calculates the time to reach the standard, the effective maintenance period and the half-life; the time to reach the standard refers to the number of days required from the first application until the cadmium content drops below the screening value of GB 15618-2018, the effective maintenance period refers to the length of time from reaching the standard until the simulation ends or the cadmium content begins to rebound, and the half-life refers to the time required for the cadmium content to drop to half of the initial value. The calculation formula is t_half = ln(2) / λ = 0.693 / λ, where λ is the decay rate constant.

[0020] Furthermore, the predefined strategy library in step S4 imposes parameter restrictions: the total dose range is controlled between 0.5 g / kg and 3 g / kg; the single dose is not less than 0.1 g / kg; the interval time is controlled between 20 and 50 days; and it covers multiple dose distribution modes such as equal distribution, decreasing distribution, and increasing distribution. The predefined strategy library includes: five single-application schemes as benchmark references, with doses of 0.8, 1.2, 1.5, 2.0, and 2.5 g / kg; fifty-five two-application schemes, including equal distribution, decreasing distribution, and increasing distribution; and one hundred and eight three-application schemes, including equal distribution, decreasing distribution, and distribution with high doses in the middle and low doses on both sides. The strategy library contains a total of one hundred and sixty-eight candidate schemes.

[0021] Further, the optimization objectives of the multi-objective weighted scoring in step S4 include three: achievement time (optimization direction: smaller is better, weight: 0.4); total usage (optimization direction: smaller is better, weight: 0.3); and effective maintenance period (optimization direction: larger is better, weight: 0.3). The scoring calculation method for the multi-objective weighted scoring in step S4 is as follows: First, each objective of each candidate scheme is ranked and scored, with the first-ranked scheme receiving 100 points and the last-ranked scheme receiving 0 points, and intermediate rankings are linearly interpolated. The calculation formula is Score_i = (n - rank_i) / (n - 1) × 100, where n is the total number of schemes and rank_i is the ranking of scheme i (starting from zero); then, the weighted comprehensive score is calculated using the formula S_total = 0.4 × S_time + 0.3 × S_dose + 0.3 × S_duration, where S_time is the achievement time score, S_dose is the total usage score, and S_duration is the effective maintenance period score.

[0022] Furthermore, the comparison indicators mentioned in step S4 include the usage saving rate, time advance, and duration extension, and the calculation formulas are as follows: usage saving rate = (Dose_baseline - Dose_optimal) / Dose_baseline × 100%; time advance = Time_baseline - Time_optimal; duration extension = Duration_optimal - Duration_baseline.

[0023] This application also provides a computer system, characterized in that it includes a memory and a processor; the memory stores a computer program; and the processor executes the computer program to implement the steps of a method for dynamic prediction and intelligent application optimization of cadmium pollution in farmland.

[0024] A computer-readable storage medium, characterized in that: it stores a computer program; when the computer program is executed by a processor, it implements the steps of a method for dynamic prediction and intelligent application optimization of cadmium pollution in farmland.

[0025] The beneficial effects of this invention are as follows: First, it provides a scientific basis for application decisions. The predictive model built using the random forest algorithm can quantitatively predict the remediation effect based on parameters such as soil conditions, biochar properties, and inoculant type, avoiding the unscientific practice of relying solely on experience to determine the application amount, and significantly improving the scientific nature and accuracy of the decision-making.

[0026] Second, it enables accurate prediction of remediation effects. The random forest algorithm can effectively capture the nonlinear relationships and high-order interaction effects between features. Combined with the powerful temporal modeling capabilities of long short-term memory networks, it can accurately predict the dynamic changes in soil cadmium content under specific application conditions, including key indicators such as the time to reach the standard and the effective maintenance period.

[0027] Third, it supports intelligent optimization design of multi-stage application plans. Through a predefined strategy library and a multi-objective weighted scoring method, it can seek the optimal balance among the three core objectives of achievement time, total dosage, and effective maintenance period, generating scientific and reasonable multi-stage application plans, effectively overcoming the "effect rebound" problem of single-application plans, and extending the maintenance period of repair effects.

[0028] Fourth, it is highly adaptable and scalable. The modular design enables the system to flexibly adapt to application scenarios in different regions and with different soil conditions, and the strategy library can be adjusted and expanded according to actual needs; at the same time, the system can achieve self-evolutionary performance improvement as training data accumulates.

[0029] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the preferred embodiments of this application are described in detail below with reference to the accompanying drawings.

[0030] The above and other objects, advantages and features of this application will become more apparent to those skilled in the art from the following detailed description of specific embodiments in conjunction with the accompanying drawings. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in the embodiments of this application 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 some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In all drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.

[0032] Figure 1 This is a system architecture diagram of an optimized method for remediating cadmium pollution in farmland using biochar-inoculant composite materials based on machine learning. Figure 2 Here is a flowchart of the data preprocessing process; Figure 3 Here is a diagram of the structure of the random forest model; Figure 4 Here is a diagram of the LSTM network structure; Figure 5 Optimize the flowchart for multi-stage strategies; Figure 6 Diagram of multi-objective weighted scoring mechanism; Figure 7 Random forest feature importance ranking plot; Figure 8 Comparison chart of comprehensive scores for multi-stage application strategies; Specific Implementation To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. In the following description, specific details such as specific configurations and components are provided merely to help fully understand the embodiments of this application. Therefore, those skilled in the art should understand that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application. In addition, for clarity and brevity, descriptions of known functions and structures are omitted in the embodiments.

[0033] It should be understood that the phrase "an embodiment" or "this embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "an embodiment" or "this embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.

[0034] Furthermore, reference numerals and / or letters may be repeated in different examples within this application. Such repetition is for the purpose of simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or settings discussed.

[0035] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, B exists alone, and A and B exist simultaneously. The term " / and" in this article describes another type of relationship between related objects, indicating that two relationships can exist. For example, A / and B can mean: A exists alone, and A and B exist alone. In addition, the character " / " in this article generally indicates that the related objects before and after it are in an "or" relationship.

[0036] In this article, the term "at least one" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, "at least one of A and B" can mean: A exists alone, A and B exist simultaneously, or B exists alone.

[0037] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion.

[0038] Example 1 System Deployment Plan This embodiment demonstrates the engineering system deployment scheme of the method of the present invention. In the data collection and processing phase, the collection of training data should cover experimental data under different soil types and different biochar-inoculant combinations. Each training data record should include three parts: input features, dynamic monitoring tags, and target variables. Input features include biochar type, biochar pH value, inoculant type, soil pH value, soil organic matter content, soil cation exchange capacity, total soil cadmium, soil available cadmium content, soil electrical conductivity, soil clay content, soil moisture content, soil temperature, and single application rate. Dynamic monitoring tags include available cadmium content on the seventh, thirtieth, and forty-fifth days. Target variables include the time to achieve the target and the effective maintenance period.

[0039] During the model training phase, the random forest model employs grid search and five-fold cross-validation for hyperparameter optimization. The hyperparameter search space includes the number of decision trees, the maximum tree depth, the minimum number of split samples, and the minimum number of leaf node samples. After training, the contribution ranking of each input feature is calculated using the model's built-in function. The Long Short-Term Memory (LSTM) network model uses the Adam algorithm as the optimizer and MSE as the loss function. Early stopping is employed during training to prevent overfitting. After model training is complete, dose-effect coefficients are learned from the training data.

[0040] During the system deployment phase, the system deployment includes loading pre-trained random forest models, long short-term memory network models, preprocessors, and policy library files. During deployment, the completeness and usability of each model and configuration file are verified. After the system is ready, it receives user-input soil parameters and biochar-inoculant parameters, preprocesses them, and then calls upon various modules for prediction and optimization, ultimately outputting the optimal application scheme and effect prediction.

[0041] Reference Figure 1 As shown, the present invention provides an optimized method for the remediation of cadmium pollution in farmland using biochar-inoculant composite materials based on machine learning, employing a three-module cascaded intelligent optimization system architecture. The system, from top to bottom, includes a user input layer, a first module (a static effect prediction module based on random forest), a second module (a dynamic trajectory simulation module based on long short-term memory networks), a third module (a predefined strategy library and multi-objective optimization screening module), and a system output layer. The user input layer receives a thirteen-dimensional feature vector comprising soil property parameters, biochar property parameters, inoculant type parameters, and application parameters. The first module trains a sub-model for predicting the time to achieve the target and a sub-model for predicting the effective maintenance period based on the random forest algorithm, outputting two key prediction indicators under single application conditions. The second module, based on a long short-term memory network and combined with a dose-response coefficient automatically learned from training data, simulates the dynamic change curve of soil cadmium content under multi-stage application conditions. The third module constructs a predefined strategy library containing 168 candidate schemes, calls the second module for dynamic simulation of each scheme, and selects the optimal multi-stage application scheme through a multi-objective weighted scoring method. The system output layer finally outputs the optimal multi-stage application scheme and a comparison of its effect with the single-stage baseline scheme.

[0042] In terms of implementation, this invention is achieved through four organically linked parts. The first part is the construction of input features, specifically including the acquisition and preprocessing of soil property parameters, biochar property parameters, inoculant type parameters, and application parameters; the second part is the construction and training of the random forest static prediction model, specifically including data preprocessing, hyperparameter optimization, model training, and feature importance assessment; the third part is the construction and training of the long short-term memory network dynamic simulation model, specifically including sequence data preparation, network structure design, model training, and dose-response coefficient learning; the fourth part is strategy optimization and selection, specifically including the construction of a predefined strategy library, dynamic simulation, multi-objective scoring, and optimal solution output. The following section will combine... Figures 2 to 8 As shown, the above four parts will be explained in detail.

[0043] Part 1: Input Feature Construction (Step S1) Reference Figure 2 As shown, the multidimensional input feature vector constructed in this section includes nine soil attribute features, one biochar attribute feature, one inoculant type feature, and one application parameter feature, totaling thirteen dimensions. The soil attribute features include: soil pH (dimensionless, reflecting the influence of soil acidity / alkalinity on cadmium speciation), soil organic matter content (unit: g / kg, affecting cadmium complexation and adsorption), soil cation exchange capacity (CEC) (unit: cmol / kg, reflecting the soil's ability to retain cations), total soil cadmium (unit: mg / kg, reflecting the degree of cadmium pollution), soil available cadmium content (unit: mg / kg, reflecting the bioavailability of cadmium), soil electrical conductivity (unit: mS / cm, reflecting soil salinity), soil clay content (unit: %), soil moisture content (unit: %), affecting microbial activity and ion migration, and soil temperature (unit: °C, affecting reaction kinetics and microbial metabolism). The biochar attribute features include biochar type (categorical type, such as rice husk biochar, wood biochar, bamboo biochar, straw biochar, etc., requiring unique thermal coding) and biochar pH (reflecting the alkalinity of the biochar). The microbial agent type is categorized (it can be a siderophore-producing microbial agent, a heavy metal-tolerant microbial agent, a compound functional microbial agent, etc., and requires unique thermal coding). The application parameter is the single application rate (unit: g / kg, representing the mass ratio of biochar to soil).

[0044] Reference Figure 2As shown, the specific process of data preprocessing includes the following steps: First, the data cleaning step removes completely duplicate records and uses the three Sigma principle (i.e., points exceeding the mean ± 3 standard deviations are considered outliers) to identify and remove outliers in numerical features. Second, the missing value handling step uses linear interpolation to fill in intermediate missing values, and for missing values ​​at the beginning and end, the mean of the field is used for filling. Third, the categorical feature encoding step performs one-hot encoding on the two categorical variables, biochar type and inoculant type, generating k binary features (k being the number of categories). Fourth, the numerical feature standardization step performs Z-score standardization on all numerical features, using the formula x_normalized = (x - μ) / σ, where μ and σ are the mean and standard deviation of the training set, respectively. The processed feature data has a mean of 0 and a variance of 1, facilitating subsequent model training and convergence. Fifth, the dataset partitioning step divides the processed complete data into training set, validation set and test set according to the proportions of 70% for training set, 15% for validation set and 15% for test set, which are used for model training, hyperparameter tuning and final performance evaluation respectively.

[0045] Part 2: Static Prediction Model of Random Forest (Step S2) Reference Figure 3 As shown, this section constructs a dual random forest regressor architecture. The two models have the same structure but independent parameters, respectively modeling and predicting the time to cadmium compliance and the effective maintenance period. The time to cadmium compliance prediction model is used to predict the number of days required from application until the soil's available cadmium content drops below the GB 15618-2018 screening value, which is a core indicator for evaluating remediation efficiency. The effective maintenance period prediction model is used to predict the number of days after cadmium content meets the standard and can remain below that standard, which is a core indicator for evaluating remediation persistence.

[0046] Random forest is an ensemble learning method. Its basic idea is to use bootstrap sampling to draw multiple subsets of samples with replacement from the training set, train a decision tree independently for each subset, and finally integrate the outputs of all decision trees through voting (for classification problems) or averaging (for regression problems). This method effectively reduces the risk of overfitting from a single decision tree, improves the stability and generalization ability of predictions, and is particularly suitable for environmental data modeling tasks involving complex nonlinear relationships and interactions between features.

[0047] Reference Figure 3As shown, hyperparameter optimization employs a strategy combining grid search and 5-Fold Cross-Validation. The hyperparameter space for grid search includes: the number of decision trees (n_estimators, ranging from one to three hundred), the maximum tree depth (max_depth, ranging from ten to thirty or unlimited), the minimum number of split samples (min_samples_split, ranging from two to ten), and the minimum number of leaf node samples (min_samples_leaf, ranging from one to four). 5-Fold Cross-Validation randomly divides the training data into five equal-sized disjoint subsets. Each iteration selects four subsets as the training set and the remaining subset as the validation set, repeating this process five times. The average of the five validation scores is used as the performance evaluation metric for this parameter combination. Cross-validation uses Negative Mean Squared Error (MSE) as the evaluation metric, aiming to find the parameter combination that minimizes this metric.

[0048] The model performance evaluation metrics use four industry-standard indicators: Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and Coefficient of Determination (R²). These metrics quantify the model's prediction accuracy from different perspectives. MSE assigns higher weight to larger errors, RMSE has the same dimensions as the original data for easy interpretation, MAE is insensitive to outliers and reflects the average error level, and R² reflects the proportion of data variation explained by the model (ranging from 0 to 1, with values ​​closer to 1 indicating a better model fit).

[0049] After model training, the contribution of each input feature to the prediction target is calculated using the built-in `feature_importances_` attribute of the random forest model. This attribute is calculated based on the Gini Importance principle. The core idea is that at each node of each decision tree, the contribution of feature i to the model's predictive ability is equal to the proportion of the total reduction in Gini impurity caused by splitting with that feature to the total reduction in Gini impurity of all features. The formula for calculating Gini Importance is: `Importance_i = Σ(ΔGini_i) / Σ(ΔGini_all)`, where `ΔGini_i` is the reduction in Gini impurity caused by splitting with feature i, and `Σ(ΔGini_all)` is the total reduction in Gini impurity caused by all features. This ranking of feature importance provides a scientific basis for subsequent application decision optimization (such as soil improvement priorities, biochar selection, etc.).

[0050] Part 3: Dynamic Simulation Model of Long Short-Term Memory Network (Step S3) Reference Figure 4As shown, this section constructs a dynamic simulation model of cadmium content based on a Long Short-Term Memory (LSTM) network. LSTM is a special type of recurrent neural network (RNN) that effectively solves the gradient vanishing and gradient exploding problems of traditional RNNs by introducing three precisely designed gating units—the input gate, the forget gate, and the output gate—and a cell state spanning all time steps. It is particularly suitable for modeling time-series data with long-term dependencies. The LSTM model of this invention receives the "pulse effect" of multi-stage application and the "gradual process" of natural decay, outputting daily predicted values ​​of available cadmium content in the soil within a 180-day time window, and then calculates key indicators such as the time to achieve the target, the effective maintenance period, and the half-life.

[0051] 1. Dose-effect coefficient learning In dynamic simulations, accurately quantifying the "pulse" passivation effect of biochar application on cadmium content is crucial. This invention designs a method for automatically learning dose-effect coefficients from training data, avoiding the subjectivity and unscientific nature of hard-coded coefficients. Specifically, firstly, the initial effective cadmium content (Cd_initial), the seventh-day effective cadmium content (Cd_d7), and the corresponding application dose (Dose) for each sample are extracted from the training data; then, the relative effect for each sample is calculated using the formula: Effect = (Cd_initial - Cd_d7) / (Cd_initial + ε), where ε is a small constant (e.g., 1e-8) to avoid division by zero; next, a no-intercept linear regression is used to fit the relationship between the effect and the application dose, with the regression equation being Effect = k × Dose, where k is the dose-effect coefficient to be solved; k is obtained by least squares method: k = Σ(Dose × Effect) / Σ(Dose²); finally, the dose-effect coefficient is limited to a reasonable range of [-0.5, 0]. The physical meaning of this coefficient is the percentage decrease in the available cadmium content in the soil for every 1 g / kg of biochar applied. The value reflects the passivation ability of biochar in the soil-biochar-inoculant system.

[0052] 2. LSTM Network Structure Reference Figure 4As shown, the LSTM network structure consists of the following five layers from bottom to top. First, the input layer receives three-dimensional input data with a variable time step size and fourteen feature dimensions. The time step is fixed at three, corresponding to the effective cadmium content monitoring values ​​at three time points: day 7, day 30, and day 45. Each time step has fourteen feature dimensions (thirteen static features + one dimension of the effective cadmium content at the current time point). Second, the first LSTM layer has sixty-four units, configured to return complete sequences (return_sequences=True), followed by a Dropout layer with a dropout rate of 0.2 to prevent overfitting. Third, the second LSTM layer has thirty-two units, also followed by a Dropout layer with a dropout rate of 0.2. Fourth, the fully connected layer (Dense layer) has sixteen units, using ReLU (Rectified Linear Function) activation to enhance the network's non-linear expressive power. Fifth, the output layer has one unit, using a linear function activation to output the predicted effective maintenance period value.

[0053] 3. LSTM training configuration The network uses Adam (Adaptive Moment Estimation) as the compile-time optimizer with a learning rate of 0.001. The loss function is Mean Squared Error (MSE), consistent with the target evaluation metric. The evaluation metric is Mean Absolute Error (MAE). Training configuration includes a maximum of 200 epochs, a batch size of 32, and a validation set ratio of 15%. To prevent overfitting, an early stopping callback strategy is employed during training. If the validation loss does not decrease after ten consecutive epochs, training is automatically stopped and the optimal weights are restored, ensuring the model stops when its generalization ability is optimal.

[0054] 4. Multi-stage application simulation algorithm Reference Figure 4As shown, the multi-stage application simulation algorithm realizes accurate simulation of candidate application schemes by iteratively calculating the daily cadmium content within the next 180 days. It specifically includes the following steps. First, in the initialization step, the current cadmium content is set as the initial value, the current number of days is set to zero, and the stage index is set to zero. Second, the cumulative number of days for application in each stage is calculated, the first stage is applied on day zero, and subsequent stages accumulate the interval days in sequence. Third, in the main loop step, it is first checked whether a new dose needs to be applied, and if the current stage index is less than the total number of stages and the current number of days is greater than or equal to the corresponding application day, the dose application is executed. Fourth, the Michaelis-Menten type dose-effect function is adopted for dose application, and the calculation formula for the new cadmium content is Cd_new = Cd_current × (1 - DoseEffect / (1 + DoseEffect)), where DoseEffect = |k| × Dose. This function can correctly reflect the biological law that the effect gain decreases with the increase of biochar application amount. Fifth, the first-order kinetic exponential decay model is adopted for natural attenuation, and the calculation formula for the new cadmium content is Cd_decay = Cd_current× r^Δt, where r is the natural attenuation index (0<r<1), and Δt is the time step (usually 1 day). Sixth, in the post-processing step, three output indicators including compliance time, effective maintenance period and half-life are calculated.

[0055] The compliance time is defined as the number of days required from the first application to when the cadmium content drops below the screening value of GB 15618-2018, which is a core indicator for evaluating remediation efficiency. The effective maintenance period is defined as the length of time from reaching the compliance standard to the end of the simulation or the start of cadmium content rebound, which is a core indicator for evaluating the persistence of remediation. The half-life is defined as the time required for the cadmium content to drop to half of the initial value, and the calculation formula is t_half = ln(2) / λ = 0.693 / λ, where λ is the decay rate constant.

[0056] Strategy optimization and screening (Step S4) 1. Predefined strategy library construction Reference Figure 5 As shown, this part constructs a predefined strategy library containing multiple multi-stage application schemes, covering common application scenarios in agricultural production. The design principles of the strategy library are as follows: the total dose range is controlled from 0.5 g / kg to 3 g / kg (comprehensively considering effect and cost), the single dose is not less than 0.1 g / kg (preventing insignificant effect caused by too low dose), the interval time is controlled within the range of 20 to 50 days (conforming to the seasonal cycle of agricultural operations), and various dose distribution modes such as equal distribution, decreasing distribution and increasing distribution are covered (to meet the differentiated needs of different soil conditions).

[0057] The strategy library is specifically composed of: five single-dose regimens as benchmark reference regimens, with doses of 0.8, 1.2, 1.5, 2.0, and 2.5 g / kg; fifty-five two-dose regimens, including three dose allocation patterns: equal distribution, decreasing distribution, and increasing distribution; and one hundred and eight three-dose regimens, including three dose allocation patterns: equal distribution, decreasing distribution, and distribution with high dose in the middle and low dose on both sides; totaling one hundred and sixty-eight candidate regimens in the strategy library.

[0058] 2. Multi-objective weighted scoring method Reference Figure 6 As shown, the multi-objective weighted scoring method comprehensively considers three optimization objectives: time to achieve the target, total dosage, and effective maintenance period, and selects the optimal multi-stage application scheme from the candidate schemes. The weights of the three optimization objectives are as follows: time to achieve the target weight 0.4 (emphasizing repair efficiency), total dosage weight 0.3 (taking into account economy), and effective maintenance weight 0.3 (taking into account durability), with a sum of weights of 1.0.

[0059] The scoring calculation employs a "rank first, then normalize" strategy. First, each target value for each candidate solution is ranked and scored: the top-ranked solution receives 100 points, the bottom-ranked solution receives 0 points, and intermediate rankings are calculated using linear interpolation. Specifically, for the "smaller is better" indicators of time to achieve the target and total usage, scores are calculated using the formula Score_i = (n - rank_i) / (n - 1) × 100 after ranking in ascending order. For the "larger is better" indicator of effective maintenance period, scores are calculated using the same formula after ranking in descending order. Here, n is the total number of solutions, and rank_i is the rank of solution i (counting from zero, rank=0 indicates the top-ranked solution). Then, the weighted comprehensive score S_total = 0.4 × S_time + 0.3 × S_dose + 0.3 × S_duration is calculated, where S_time is the score for time to achieve the target, S_dose is the score for total usage, and S_duration is the score for effective maintenance period. The final output is the optimal solution with the highest overall score and its effect compared with the baseline solution for a single application.

[0060] 3. Output of effect comparison To facilitate users' intuitive evaluation of the optimal solution's effectiveness, the system also outputs three comparative metrics. The saving rate is calculated as SavingRate = (Dose_baseline - Dose_optimal) / Dose_baseline × 100%, representing the percentage of biochar saved compared to a single baseline solution. The time advance is calculated as TimeAdvance = Time_baseline - Time_optimal, representing the positive number of days the target was achieved ahead of schedule compared to a single baseline solution. The maintenance period extension is calculated as DurationExtend = Duration_optimal - Duration_baseline, representing the positive number of days the effective maintenance period was extended compared to a single baseline solution.

[0061] Reference Figure 7 As shown in the random forest feature importance analysis, soil pH, single application rate, and available cadmium content are the three most important features for predicting the time to achieve the target; soil organic matter, soil cation exchange capacity, and soil pH are the three most important features for predicting the effective maintenance period. This ranking of feature importance provides a scientific basis for soil improvement priorities and biochar selection in agricultural production.

[0062] Reference Figure 8 As shown in the chart, the multi-stage strategy comprehensive score comparison chart illustrates the multi-objective score distribution of the Top 15 candidate strategies in the strategy library. The horizontal axis represents the strategy number, and the vertical axis represents the scores for each item (time to target achievement score, dosage score, maintenance period score, and overall score). The strategy with the highest overall score is the optimal multi-stage application strategy recommended by the system. The chart clearly shows that the maintenance period score of the multi-stage application strategy is generally higher than that of the single-dose baseline strategy, but the dosage score is slightly lower (because multi-stage strategies usually require more precise dosage control). The final weighted comprehensive score reflects the system's intelligent trade-offs among multiple objectives.

[0063] Example 2 Remediation of cadmium-contaminated paddy fields in red soil areas of southern China This embodiment demonstrates the application of the method of the present invention in the remediation of cadmium-contaminated paddy fields in the red soil region of southern China. Soil conditions were as follows: red soil type, pH 5.2, organic matter content 25 g / kg, cation exchange capacity 12 cmol / kg, total cadmium 1.2 mg / kg, and available cadmium content 0.65 mg / kg. The remediation material was rice husk biochar with a pH of 6.5, and the inoculant was a siderophore-producing inoculant. According to GB 15618-2018 standard, the cadmium risk screening value was 0.3 mg / kg when the soil pH was 5.2.

[0064] According to the method of this invention, a 13-dimensional input feature vector is first constructed and then input into a random forest prediction model. Under a single application rate of 1.5 g / kg, the predicted time to reach the target is 45 days, and the effective maintenance period is 75 days; under a single application rate of 2.0 g / kg, the predicted time to reach the target is 32 days, and the effective maintenance period is 85 days.

[0065] The strategy optimization screening module was used to evaluate 168 candidate schemes in a predefined strategy library. The optimal scheme was a three-stage decreasing application scheme: the first stage dosage was 0.6 g / kg, the second stage dosage was 0.8 g / kg, and the third stage dosage was 0.4 g / kg, with an interval of 25 days between the first stage and 30 days between the second stage, for a total dosage of 1.8 g / kg. The predicted time to reach the target was 28 days, and the predicted effective maintenance period was 102 days. Compared with the baseline scheme of a single application of 1.8 g / kg, the optimal scheme achieved the target 10 days earlier and extended the effective maintenance period by 22 days. This indicates that for cadmium pollution remediation in acidic red soil in southern China, the three-stage decreasing application scheme can achieve faster target closure and longer-lasting effects under the same total dosage conditions.

[0066] Example 3 Remediation of mildly cadmium-contaminated farmland in alkaline soil in northern China This embodiment demonstrates the application of the method of the present invention in the remediation of mildly cadmium-contaminated farmland in alkaline soil in northern China. Soil conditions were as follows: soil type: alluvial soil; soil pH: 7.8; organic matter content: 18 g / kg; cation exchange capacity: 18 cmol / kg; total cadmium: 0.9 mg / kg; available cadmium content: 0.45 mg / kg. The remediation material was wood-based biochar with a pH of 6.2, and the inoculant type was a heavy metal-tolerant inoculant. According to GB 15618-2018 standard, the cadmium risk screening value for a soil pH of 7.8 is 0.8 mg / kg. Since the available cadmium content of 0.45 mg / kg in this embodiment is lower than this screening value, falling within the range of mild pollution (close to the screening value according to engineering indicators), 0.8 mg / kg was used as the basis for assessment.

[0067] The strategy optimization results are as follows: the optimal scheme is two equal-dose applications, with a first-stage dose of 0.4 g / kg and a second-stage dose of 0.4 g / kg, spaced 30 days apart, for a total dose of 0.8 g / kg. The predicted time to achieve the target is 14 days, and the predicted effective maintenance period exceeds 120 days. This indicates that for alkaline soils close to the screening value, the two equal-dose application scheme can achieve the safety standard in a relatively short time, and the effect can be maintained for a long time, demonstrating good economic efficiency and practicality.

[0068] Example 4 Enhanced remediation of heavily cadmium-contaminated soil This embodiment demonstrates the application of the method of the present invention in the enhanced remediation of heavily cadmium-contaminated soil. The soil conditions were as follows: red soil type, pH 5.8, organic matter content 15 g / kg, cation exchange capacity 8 cmol / kg, total cadmium 2.5 mg / kg, and available cadmium content 1.2 mg / kg. The remediation material was bamboo biochar with a pH of 6.4, and the inoculant was a compound functional inoculant. According to GB 15618-2018 standard, the cadmium risk screening value at a soil pH of 5.8 was 0.4 mg / kg. Due to the severe pollution, enhanced remediation measures were required.

[0069] The optimization results show that the optimal approach is a three-stage application regimen: a first-stage dose of 0.8 g / kg, a second-stage dose of 0.8 g / kg, and a third-stage dose of 0.6 g / kg, with an interval of 25 days between the first and second stages, and a total dose of 2.2 g / kg. The predicted time to achieve the target is 35 days, and the predicted effective maintenance period is 110 days. This indicates that for heavily cadmium-contaminated soil, the three-stage enhanced application regimen can achieve the safety standard in a relatively short time, and the effective maintenance period exceeds 100 days, meeting the needs of agricultural production for durable remediation effects.

[0070] Example 5 This embodiment aims to verify the accurate predictive ability of the remediation effect achieved by the present invention. Representative samples from three different soil conditions were selected for verification: Sample A (acidic soil): Soil pH=5.5, organic matter=18 g / kg, CEC=9 cmol / kg, total cadmium=1.0 mg / kg, available cadmium=0.55 mg / kg, remediation material is wood biochar (pH=8.8) + heavy metal tolerant bacteria agent.

[0071] Sample point B (neutral soil): soil pH=6.8, organic matter=25 g / kg, CEC=15 cmol / kg, total cadmium=0.8 mg / kg, available cadmium=0.42 mg / kg, remediation material is rice husk biochar (pH=7.5) + iron-producing microbial agent.

[0072] Sample C (alkaline soil): Soil pH=7.6, organic matter=15 g / kg, CEC=20 cmol / kg, total cadmium=1.8 mg / kg, available cadmium=0.95 mg / kg, remediation material is bamboo biochar (pH=8.0) + compound functional microbial agent.

[0073] A random forest model was used to predict the time to target efficacy and effective maintenance period after a single application (1.5 g / kg), while an LSTM model was used to simulate the 180-day decay curve. The results showed: Random forest prediction: The predicted time to reach the target for the three samples are 38 days, 22 days, and 45 days, respectively; the predicted effective maintenance period is 85 days, 110 days, and 72 days, respectively.

[0074] LSTM decay curve simulation: The actual time to reach the standard for the three samples were 40 days, 24 days, and 47 days, respectively; the actual effective maintenance period was 82 days, 108 days, and 70 days, respectively.

[0075] Prediction error analysis: The mean absolute error (MAE) for the time to reach the target was 2.3 days, and the mean relative error was 5.2%; the MAE for the effective maintenance period was 4.5 days, and the mean relative error was 4.8%. This accuracy is significantly better than that of the traditional linear regression model (the latter's MAE for the time to reach the target is usually more than 8 days).

[0076] The above results show that the present invention can effectively capture the nonlinear relationships and higher-order interaction effects between 13-dimensional features through the random forest algorithm. Combined with the time series modeling capability of the LSTM network, it can accurately predict the time to achieve the target under specific application conditions and the effective maintenance period, providing a precise basis for the time planning of the repair project.

[0077] Example 6: This embodiment aims to verify the intelligent optimization design capability of the multi-stage application scheme supported by the present invention. A cadmium-contaminated farmland was selected as the research object. The soil pH was 6.2, the organic matter content was 20 g / kg, the CEC was 12 cmol / kg, the total cadmium was 1.3 mg / kg, and the available cadmium content was 0.68 mg / kg. This plot had previously undergone a simple single application of biochar, but a significant "rebound effect" phenomenon occurred one year later, with the cadmium content rising from 0.35 mg / kg to 0.55 mg / kg.

[0078] To address the above issues, the method of this invention was used for optimization design. The strategy optimization module simulated and evaluated each of the 168 candidate schemes. The results showed a clear pattern: the effective maintenance period of single-application schemes (regardless of dosage, 1.5 g / kg or 2.0 g / kg) was generally in the range of 70-90 days, and all had varying degrees of "rebound effect" risk; the effective maintenance period of two-application schemes was generally in the range of 95-115 days, with a significantly reduced rebound risk; and the effective maintenance period of three-application schemes was generally in the range of 105-130 days, with the lowest rebound risk.

[0079] The multi-objective weighted scoring results showed that the top-ranked optimal regimen was a three-stage application (0.7 + 0.6 + 0.5 g / kg, with intervals of 28 days and 32 days), achieving a comprehensive score of 94.5. This regimen is characterized by: a high-dose first stage rapidly reducing cadmium content; a medium-dose second stage maintaining the passivation effect; and a low-dose third stage supplementation for maintenance, effectively overcoming the "rebound effect" problem.

[0080] Comparative verification: Compared with the baseline regimen of a single application at the same total dose (1.8 g / kg), the optimal regimen achieved the target time (25 days vs. 38 days) 13 days earlier, maintained the effective duration (128 days vs. 82 days) for 46 days longer, and improved the overall score (94.5 points vs. 72.3 points) by 22.2 points. These results demonstrate that the multi-stage application regimen of this invention can effectively overcome the "rebound effect" problem of single applications and significantly prolong the maintenance period of the repair effect.

[0081] The above description is merely a preferred embodiment of the present invention and does not limit the scope of protection of the present invention. For those skilled in the art, the present invention can have various modifications and variations. Any changes, modifications, substitutions, integrations, and parameter alterations to these embodiments within the spirit and principles of the present invention, achieved through conventional substitutions or while still achieving the same function, fall within the scope of protection defined by the claims of the present invention.

Claims

1. An optimized method for remediating cadmium pollution in farmland using biochar-inoculant composite materials based on machine learning, characterized in that, Includes the following steps: S1. Obtain soil property parameters, biochar property parameters, microbial agent type parameters, and application parameters of the soil to be remediated, and construct a multidimensional input feature vector; S2. A random forest regressor is used to train a time-to-achieve prediction model and an effective maintenance period prediction model, respectively. The time-to-achieve prediction model is used to predict the number of days required for the soil available cadmium content to drop below the screening value specified in the standard after a single application. The effective maintenance period prediction model is used to predict the number of days that the cadmium content can be maintained below the standard after the standard is achieved, thus obtaining a single application baseline scheme. The standard is GB 15618-2018. S3, obtain the initial available cadmium content of the soil to be remediated, and use the long short-term memory network algorithm and the multi-stage application simulation algorithm to simulate the dynamic curve of cadmium content after multi-stage application. The input of the LSTM is a three-dimensional tensor with the following shape: number of samples, time step, feature dimension. The time step is fixed at three time points, corresponding to the monitoring data on the seventh day, the thirtieth day and the forty-fifth day after application, respectively. The output is a complete cadmium content-time dynamic curve. S4. Construct a predefined strategy library. Each candidate scheme in the strategy library includes the number of application stages, the application amount in each stage, and the interval time between each stage. For each candidate scheme in the strategy library, call step S3 to perform dynamic simulation to obtain three evaluation indicators for each candidate scheme: the time to achieve the target, the total amount used, and the effective maintenance period. Rank and score the three evaluation indicators respectively, calculate the weighted comprehensive score, and output the candidate scheme with the highest comprehensive score as the optimal application scheme. Compare and verify the optimal application scheme with the single application benchmark scheme obtained in step S2, and output the amount of amount saved, the time advance, and the maintenance period extension.

2. The method according to claim 1, characterized in that: The soil property parameters include soil pH, soil organic matter content, soil cation exchange capacity, total soil cadmium, soil available cadmium content, soil electrical conductivity, soil clay content, soil moisture content, and soil temperature; the biochar property parameters include biochar type and biochar pH; the inoculant type parameter is a category parameter; and the application parameter is the single application amount.

3. The method according to claim 1, characterized in that: The data preprocessing in step S1 includes unique thermal encoding of biochar type and inoculant type, and Z-score standardization of all numerical features. The Z-score standardization formula is x_normalized = (x - μ) / σ, where x is the original value, μ is the mean of the feature in the training set, and σ is the standard deviation of the feature in the training set. After standardization, the mean and standard deviation are saved for use in the prediction stage.

4. The method according to claim 1, characterized in that: The hyperparameter optimization of the random forest regressor in step S2 employs grid search and five-fold cross-validation.

5. The method according to claim 1, characterized in that: The LSTM network structure described in step S3 includes: a first long short-term memory layer with sixty-four units, configured to return complete sequences, and a random deactivation layer with a connection dropout rate of 0.2; a second long short-term memory layer with thirty-two units, and a random deactivation layer with a connection dropout rate of 0.2; a fully connected layer with sixteen units, and an activation function of a linear rectified function; and an output layer with one unit, and an activation function of a linear function.

6. The method according to claim 1, characterized in that: The simulation following the multi-stage application in step S3 is performed as follows: After the passivating agent is applied, the current cadmium content is updated using a dose-effect function, calculated as Cd_after = Cd_before × (1 - DoseEffect / (1 + DoseEffect)), where DoseEffect = |k| × Dose, k is the dose-effect coefficient, and Dose is the single application dose; during the period when no passivating agent is applied, the cadmium content is updated using an exponential decay model, calculated as Cd_decay = Cd_current × r^Δt, where r is the residual rate and Δt is the time interval in days; the above steps are repeated to simulate the dynamic changes in cadmium content throughout the complete cycle.

7. The method according to claim 5, characterized in that: The dose-response coefficient k is automatically learned from historical experimental data through non-intercept linear regression. The learning method includes: extracting the initial effective cadmium content, the seventh-day effective cadmium content, and the application dose for each sample from the training data; calculating the relative effect for each sample, with the effect calculation formula being Effect = (Cd_initial - Cd_d7) / (Cd_initial + ε); fitting the relationship between the effect and the application dose using non-intercept linear regression, with the regression equation being Effect = k × Dose; solving for the effect using the least squares method, with the calculation formula being k = Σ(Dose × Effect) / Σ(Dose²); and restricting the dose-response coefficient k to the range of -0.5 to zero.

8. The method according to claim 1, characterized in that: The weighted comprehensive score calculation method in step S4 is as follows: rank all candidate solutions by their achievement time, total usage, and effective maintenance period. The shorter the achievement time, the higher the ranking; the less the total usage, the higher the ranking; and the longer the effective maintenance period, the higher the ranking. The formula for calculating the score of each indicator is Score_i = (N- rank_i) / (N - 1) × 100, where N is the total number of candidate solutions and rank_i is the ranking of the i-th solution; the formula for calculating the comprehensive score is S_total = 0.4 × S_time + 0.3 × S_dose + 0.3 × S_duration, where S_time is the score for the time to achieve the target, S_dose is the score for the total usage, and S_duration is the score for the effective maintenance period.

9. The method according to claim 1, characterized in that: The dosage saving rate mentioned in step S4 = (single application amount - total amount used in multiple stages) / single application amount × 100%; the time advance amount = single target achievement time - multi-stage target achievement time; The extension of the maintenance period = multi-stage effective maintenance period - single-time effective maintenance period.

10. A machine learning-based optimization system for the remediation of cadmium pollution in farmland using biochar-inoculant composite materials, characterized in that: It includes a memory and a processor; the memory stores a computer program; the processor executes the computer program to implement the steps of the method according to any one of claims 1 to 9.