A method and system for electrochemically monitoring heavy metal content in forest soil
Patent Information
- Application Number
- CN202611222925.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-13
- Publication Date
- 2026-09-08
AI Technical Summary
[0005]鉴于以上现有技术的缺点,本发明的目的在于提供一种林地土壤重金属含量电化学监测方法及系统,用于解决现有方法难以实现林地土壤重金属的现场快速准确监测与长期趋势分析的问题
[0033] Beneficial Effects: This invention provides an electrochemical monitoring method and system for heavy metal content in forest soil. The method involves performing a step potential-square wave dissolution voltammetry scan on soil extracts in the forest to obtain the original dissolution curve; estimating and removing nonlinear baseline drift using one-dimensional morphological opening operations to obtain the pure dissolution current; applying multi-scale Mexican cap wavelet transform and ridge tracing to the pure dissolution current to determine the characteristic peak potential of each heavy metal and obtaining the peak current value through window integration; simultaneously collecting soil temperature, moisture, and pH signals, which, along with the peak current value, are input into a pre-trained extreme gradient boosting regression model. The model outputs the mass ratio content through environmental parameter compensation; the content sequence is uploaded to the cloud, and a local weighted regression decomposition algorithm is used to separate the seasonal and trend terms, generating a heavy metal accumulation trend change curve. This achieves highly environmentally adaptable rapid on-site detection and long-term evolution tracking.
Smart Images

Figure CN122709565A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of on-site electrochemical monitoring technology for heavy metals in soil, specifically to a method and system for electrochemical monitoring of heavy metal content in forest soil. Background Technology
[0002] Heavy metal pollution in soil is characterized by its high degree of concealment and significant cumulative effects. Forest land, as an ecological security barrier, requires dynamic monitoring of heavy metal content for pollution prevention and ecological risk assessment. Traditional laboratory analytical methods, such as atomic absorption spectrometry and inductively coupled plasma mass spectrometry, offer high detection accuracy, but require complex pretreatment processes such as sample digestion and volume adjustment, making the entire process time-consuming and unable to meet the needs of rapid on-site screening and high-frequency monitoring at multiple locations. Electrochemical stripping voltammetry, due to its high sensitivity and portable instrumentation, is considered a promising method for on-site heavy metal detection. However, its practical application in forest soil monitoring still faces a series of technical bottlenecks.
[0003] First, forest soil leachates have complex compositions, containing large amounts of organic substances such as humic acid. The adsorption and side reactions of these substances on the electrode surface lead to severe nonlinear baseline drift in the dissolution voltammetry curve, accompanied by a significant increase in background current. Traditional methods rely on operators manually fitting the baseline for subtraction, which is highly subjective and has poor repeatability, making it difficult to meet the requirements of automated monitoring. Second, soil often contains multiple heavy metals such as lead, cadmium, copper, and zinc. Their dissolution peak potentials are close to each other, and the peak broadening caused by matrix effects results in severe peak overlap. Existing methods based on derivative peak finding or single threshold identification have limited resolution, are prone to missed detections or misjudgments, and cannot accurately extract the independent peak current response of each component. Third, electrochemical dissolution signals are extremely sensitive to environmental conditions. Changes in temperature directly affect electrode reaction kinetics and ion diffusion coefficients, soil moisture content affects ion activity and migration rate, and pH determines the occurrence form and electrochemical activity of heavy metal ions. Fluctuations in these environmental factors can significantly distort the quantitative relationship between peak current and concentration. Conventional standard curve methods can only be used under fixed conditions; when the monitored environment experiences drastic changes in temperature, humidity, and pH, measurement deviations become unacceptable. While existing technologies have proposed methods such as temperature compensation and humidity correction based on physical models, these are mostly single-factor approximations and cannot effectively address the complexities of multi-factor interactions in forest environments. Furthermore, existing on-site electrochemical equipment often uses simple linear regression or lookup table methods to calculate concentrations, lacking the ability to fit multi-dimensional nonlinearities to environmental disturbances and the capability to reveal long-term heavy metal accumulation trends through cloud-based time series analysis, thus making it difficult to support regional pollution trend early warning.
[0004] The aforementioned factors have resulted in significant deficiencies in the accuracy, adaptability, and intelligence of existing electrochemical monitoring methods in practical applications in forest land. There is an urgent need for an integrated method and system that can automatically correct baseline drift, accurately distinguish overlapping peaks, effectively compensate for environmental effects, and perform trend decomposition on time series data. Summary of the Invention
[0005] In view of the shortcomings of the prior art, the purpose of this invention is to provide an electrochemical monitoring method and system for heavy metal content in forest soil, which solves the problem that existing methods are difficult to achieve rapid and accurate on-site monitoring and long-term trend analysis of heavy metals in forest soil. This invention obtains the original dissolution curve by performing a step potential-square wave dissolution voltammetry scan on soil extracts in the forest; it obtains the pure dissolution current by estimating and removing nonlinear baseline drift using one-dimensional morphological opening operations; it then performs multi-scale Mexican cap wavelet transform and ridge tracing on the pure dissolution current to determine the characteristic peak potential of each heavy metal and calculates the peak current value by window integration; it simultaneously collects soil temperature, moisture, and pH signals, and inputs them along with the peak current value into a pre-trained extreme gradient boosting regression model, outputting the mass ratio content through environmental parameter compensation; it uploads the content sequence to the cloud, and uses a local weighted regression decomposition algorithm to separate the seasonal and trend terms, generating a heavy metal accumulation trend change curve, thereby achieving highly environmentally adaptable rapid on-site detection and long-term evolution tracking.
[0006] This invention provides an electrochemical monitoring method for heavy metal content in forest soil, comprising:
[0007] S1: Standardized extraction of undisturbed soil samples from forest land was performed to obtain the test solution, and the working electrode current was collected to generate the original dissolution voltammetry curve signal;
[0008] S2: Input the original dissolution voltammetry curve signal into the morphological baseline estimation module, estimate the nonlinear baseline drift component signal through one-dimensional morphological opening operation, and subtract this component signal from the original dissolution voltammetry curve signal to generate a pure dissolution current signal;
[0009] S3: Perform multi-scale continuous wavelet transform based on Mexican cap wavelet on the pure dissolution current signal, determine the characteristic peak potential value signal corresponding to each heavy metal by ridge tracing, and integrate the characteristic peak potential value signal by truncating a window on the pure dissolution current signal to obtain the peak current value signal.
[0010] S4: Synchronously collect environmental signals, including soil temperature signal, soil volumetric water content signal and soil pH signal. Input the peak current value signal and environmental signal into the pre-trained regression model and output the heavy metal mass ratio content signal.
[0011] S5: The heavy metal mass ratio content signal is uploaded to the cloud platform with a timestamp. The local weighted regression algorithm is used to separate the seasonal and trend terms of the accumulated time series to generate a heavy metal accumulation trend change curve signal.
[0012] In one embodiment of the present invention, in step S1, the test solution is placed in a detection cell, which integrates a screen-printed three-electrode system. The three-electrode system includes a working electrode, a reference electrode, and a counter electrode. The working electrode is coated with an in-situ formed bismuth film, the reference electrode is a silver chloride electrode, and the counter electrode is a carbon electrode. A step potential-square wave stripping voltammetry scan waveform is applied to the three-electrode system using a potentiostat. The scanning process includes stirring and enriching the metal ions to be tested at a predetermined enrichment potential for a predetermined time, so that the metal ions to be tested are reduced and enriched on the surface of the working electrode. Then, a square wave potential is superimposed and linearly scanned to the termination potential. During this period, the response current on the working electrode is collected simultaneously to generate an original stripping voltammetry curve signal with potential as the independent variable.
[0013] In one embodiment of the present invention, the parameters of the step potential-square wave stripping voltammetry scan waveform are set as follows: the enrichment potential is selected within the potential range that causes electrochemical reduction of the heavy metal to be tested, and the enrichment duration is adaptively adjusted according to the concentration range of the heavy metal in the solution to be tested; the square wave frequency, amplitude, and potential scan rate are determined according to the type of heavy metal to be tested and its stripping peak resolution requirements, so that the stripping peaks of adjacent heavy metals are separated; during the scan, a current signal is collected once every preset sampling period to generate the original stripping voltammetry curve signal, and the preset sampling period is less than a predetermined multiple of the half-cycle of the square wave.
[0014] In one embodiment of the present invention, in step S2, the length of the structural element used in the one-dimensional morphological opening operation is dynamically set according to the type of heavy metal contained in the solution to be tested. When the element to be detected contains at least one of lead, cadmium, copper, and zinc, the length of the structural element is taken as a preset small proportion of the total number of sampling points of the entire original dissolution voltammetric curve signal. Specifically, the signal is first subjected to grayscale etching to remove peak features narrower than the structural element, and then the etching result is subjected to equal-length grayscale expansion to restore the large-scale baseline trend, thereby obtaining the nonlinear baseline drift component signal. This dynamic setting enables the baseline estimation to effectively retain the dissolution peak while removing electrode background drift. The calculation formula for the one-dimensional morphological opening operation is as follows:
[0015] ;
[0016] Where x(n) is the discrete sampling signal of the original dissolution voltammetry curve, and b(k) is a one-dimensional morphological structure element sequence. denoted by , where is the total number of sampling points for the structuring element, 'n' is the overall signal sampling point index, 'm' is the internal offset of the structuring element corresponding to the erosion operation, 'k' is the internal offset of the structuring element corresponding to the dilation operation, 'min' represents the minimum value operation for grayscale erosion, and 'max' represents the maximum value operation for grayscale dilation. This is the nonlinear baseline drift component signal output by the morphological opening operation.
[0017] In one embodiment of the present invention, step S3, based on the Mexican hat wavelet multi-scale continuous wavelet transform and ridge tracking, includes: performing a Mexican hat wavelet continuous wavelet transform on a set of continuous scale factors on the pure dissolution current signal to generate a scale-potential wavelet coefficient matrix; determining candidate peak positions by detecting the modulus maxima of wavelet coefficients at each scale; constructing ridges using the distance cost and amplitude correlation of modulus maxima points between adjacent scales; searching for connection paths along the scale direction using dynamic programming; determining the potential of the smallest scale corresponding to the path terminal as the characteristic peak potential signal; simultaneously setting a signal-to-noise ratio threshold; removing spurious peaks caused by noise when the modulus maxima of the coefficients corresponding to the ridges is lower than the threshold; for the overlapping of dissolution peaks caused by multiple heavy metal types, utilizing the bifurcation and separation characteristics of ridges at different scales, and combining the continuity of ridges between scales to distinguish the characteristic peak potentials of overlapping components, the multi-scale continuous wavelet transform coefficient calculation formula of the Mexican hat wavelet is as follows:
[0018] ;
[0019] in, For scale Translation potential The corresponding wavelet coefficients, y(n) are the pure dissolution current discrete signal after baseline removal via one-dimensional morphological opening operation, and s is the wavelet transform scaling factor. This is the potential shift amount. is the signal sampling time interval, N is the total number of sampling points for the pure dissolution current signal, and exp is the natural exponential operation.
[0020] In one embodiment of the present invention, the peak current signal is obtained by integrating a window of characteristic peak potential value signal onto the pure dissolution current signal. Specifically, for each characteristic peak potential value, a symmetrical window is selected on the pure dissolution current signal centered on that potential value. The width of the window is determined based on the prior information of the half-peak width of the heavy metal dissolution peak to be measured, ensuring that the window covers the entire dissolution peak and is not interfered with by adjacent peaks. After extracting the signal data points within the window, the signal mean at both ends of the window is calculated as a local baseline. This local baseline is subtracted from the signal within the window to remove residual tilted background. Then, the area of the net current within the window is calculated using the trapezoidal numerical integration method. This area value is the peak current signal of the corresponding heavy metal. When multiple heavy metals coexist, the above window integration operation is performed sequentially for each characteristic peak to obtain their respective independent peak current signals. All peak current signals of the same batch are normalized by dividing by the reference electrode calibration factor to compensate for the sensitivity differences between different electrodes. The calculation formula of the trapezoidal numerical integration method is as follows:
[0021] ;
[0022] in, This is the final calculated heavy metal peak current signal. Let z be the potential axis sampling step size, and z(i) be the pure dissolution current signal extracted within the window after determining the characteristic peak through wavelet ridge tracing. The signal is the net current signal of the window after deducting the local baseline. M is the total number of sampling points in the characteristic peak window, and i is the sampling point number in the window.
[0023] In one embodiment of the present invention, the regression model pre-trained in step S4 is a limit gradient boosting regression model. This model is based on a gradient boosting decision tree, and trains multiple regression trees sequentially, fitting each tree to the residual of the previous round. At the same time, a regularization term is introduced in the objective function to control the model complexity. The input feature vector of the limit gradient boosting regression model consists of peak current signal, soil temperature signal, soil volumetric water content signal, and soil pH signal. The model output is the mass ratio content signal of a single heavy metal. During model training, a sample set covering different soil textures, different heavy metal pollution levels, and multiple combinations of temperature, water content, and pH is collected. Steps S1 to S3 are performed on each sample to obtain the peak current signal, and the corresponding heavy metal content is determined using laboratory standard methods as the training label. Cross-validation combined with grid search is used to determine the optimal hyperparameters of the model. The hyperparameters include the maximum depth of the tree, learning rate, minimum leaf node weight, and regularization coefficient. The training loss function is the root mean square error.
[0024] In one embodiment of the present invention, soil temperature signal, soil volumetric water content signal, and soil pH signal are measured in real time by a temperature sensor, a dielectric soil moisture sensor, and an antimony electrode pH sensor buried at the same sampling point in the soil being tested. After signal conditioning and analog-to-digital conversion, the sensor outputs are aligned and synchronized with the peak current signal in the embedded processing module through a common timestamp to form a synchronized feature vector. Environmental signal acquisition and electrochemical scanning are started simultaneously to ensure that each dissolution curve corresponds to the soil environmental conditions at the same time. Each sensor is calibrated at multiple points before deployment, and the measured values are converted into standard engineering units through calibration equations before participating in the feature vector combination. The embedded processing module has a built-in limit gradient boosting inference program. The program loads the trained model parameters, receives the synchronized feature vector, directly calculates the output mass ratio content signal, and caches it locally.
[0025] In one embodiment of the present invention, the model parameters used by the extreme gradient boosting inference program are obtained by quantization conversion of the trained floating-point model, mapping the floating-point weights and intermediate variables to low-bit integer representations, generating efficient inference code suitable for embedded processing modules and storing it in non-volatile memory; during inference, the embedded processing module reads the quantized model from memory, loads the input synchronous feature vector into memory, performs integer matrix operations and decision tree path traversal, and outputs the heavy metal mass ratio content signal within a predetermined time delay; the embedded processing module encapsulates the mass ratio content signal, along with the location identifier and timestamp, into a data packet through a narrowband IoT wireless communication module and sends it to the cloud platform; the cloud platform periodically retrains the model based on new samples and distributes the latest quantized model parameters to the embedded processing modules of each monitoring point through a wireless update mechanism.
[0026] This invention also provides an electrochemical monitoring system for heavy metal content in forest soil, comprising:
[0027] The in-situ extraction module is used to standardize the extraction of undisturbed soil samples from forest land to obtain the test solution;
[0028] The electrochemical sensing module is used to apply a step potential-square wave stripping voltammetry scan to the solution to be tested through a screen-printed three-electrode system, and to collect the working electrode current to generate the original stripping voltammetry curve signal.
[0029] The environmental parameter acquisition module is used to simultaneously acquire soil temperature signals, soil volumetric water content signals, and soil pH signals;
[0030] The embedded processing module, connected to the electrochemical sensing module and the environmental parameter acquisition module, is equipped with a baseline estimation module, a peak identification module, and a regression inference module. The baseline estimation module estimates the nonlinear baseline drift component signal from the original dissolution voltammetric curve signal through one-dimensional morphological opening operation and subtracts it to obtain the pure dissolution current signal. The peak identification module performs multi-scale continuous wavelet transform and ridge tracing based on Mexican cap wavelet on the pure dissolution current signal to determine the characteristic peak potential value signal and integrates it to obtain the peak current value signal. The regression inference module inputs the peak current value signal and the environmental signal into a pre-trained regression model and outputs the heavy metal mass ratio content signal.
[0031] The wireless communication module is used to upload the mass ratio content signal and timestamp;
[0032] The cloud platform is used to receive and accumulate the mass ratio content signal sequence, and uses a local weighted regression algorithm to separate the seasonal and trend terms to generate a heavy metal accumulation trend change curve signal.
[0033] Beneficial Effects: This invention provides an electrochemical monitoring method and system for heavy metal content in forest soil. The method involves performing a step potential-square wave dissolution voltammetry scan on soil extracts in the forest to obtain the original dissolution curve; estimating and removing nonlinear baseline drift using one-dimensional morphological opening operations to obtain the pure dissolution current; applying multi-scale Mexican cap wavelet transform and ridge tracing to the pure dissolution current to determine the characteristic peak potential of each heavy metal and obtaining the peak current value through window integration; simultaneously collecting soil temperature, moisture, and pH signals, which, along with the peak current value, are input into a pre-trained extreme gradient boosting regression model. The model outputs the mass ratio content through environmental parameter compensation; the content sequence is uploaded to the cloud, and a local weighted regression decomposition algorithm is used to separate the seasonal and trend terms, generating a heavy metal accumulation trend change curve. This achieves highly environmentally adaptable rapid on-site detection and long-term evolution tracking. Attached Figure Description
[0034] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 A flowchart of an electrochemical monitoring method for heavy metal content in forest soil;
[0036] Figure 2 This is a flowchart illustrating the internal workflow of the embedded processing module.
[0037] Figure 3 A flowchart illustrating the closed-loop process between the cloud platform and the front-end terminal;
[0038] Figure 4 This is a system architecture diagram of an electrochemical monitoring system for heavy metal content in forest soil. Detailed Implementation
[0039] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and features described therein can be combined with each other.
[0040] Please see Figures 1-4 The image shows an electrochemical monitoring method and system for heavy metal content in forest soil according to the present invention. The electrochemical monitoring method for heavy metal content in forest soil according to the present invention includes: S1: Standardizing and extracting a sample of undisturbed forest soil to obtain a test solution, and collecting the working electrode current to generate an original dissolution voltammetry curve signal; S2: Inputting the original dissolution voltammetry curve signal into a morphological baseline estimation module, estimating the nonlinear baseline drift component signal through one-dimensional morphological opening operation, and subtracting this component signal from the original dissolution voltammetry curve signal to generate a pure dissolution current signal; S3: Performing a multi-scale continuous wavelet transform based on the Mexican cap wavelet on the pure dissolution current signal, and determining the characteristics corresponding to each heavy metal through ridge tracing. S4: Simultaneously collect environmental signals, including soil temperature, soil volumetric water content, and soil pH. Input the peak current signal and the environmental signals into a pre-trained regression model to output the heavy metal mass ratio content signal. S5: Bind the heavy metal mass ratio content signal to a timestamp and upload it to the cloud platform. Use a local weighted regression algorithm to separate the seasonal and trend terms from the accumulated time series to generate a heavy metal accumulation trend change curve signal.
[0041] like Figure 1As shown, this workflow fully presents the operational logic of the entire business of electrochemical monitoring of heavy metals in forest soil, connecting sample pretreatment, electrochemical signal acquisition, algorithm correction, feature extraction, model quantification, and cloud analysis. Multi-layered loops and logical verification ensure data quality at each step, with each functional module sequentially connected and operating collaboratively. Standardized sample extraction, the first step in the workflow, focuses on standardized extraction of undisturbed forest soil, transforming solid soil samples into liquid test solutions suitable for electrochemical detection. A unified extraction process eliminates pretreatment errors caused by different forest soil types and sample states, providing a standard test medium for subsequent detection. The electrochemical scanning acquisition of raw signals relies on an integrated screen-printed three-electrode system. A specific scanning waveform is applied to the test solution to complete the enrichment and dissolution of heavy metal ions on the electrode surface. Simultaneously, the electrode response current is acquired, generating raw dissolution voltammetric curve signals, achieving the initial conversion of heavy metal content into electrical signals. The signal sampling compliance verification checks the sampling period, scanning parameters, and other indicators of the original signal. If the acquisition result does not meet the preset standard, the system will restart the electrochemical scanning acquisition of the original signal, relying on a cyclic mechanism to control the quality of the original data from the source. The morphological opening operation baseline correction stage addresses the nonlinear baseline drift problem in the original signal by using a one-dimensional morphological opening operation algorithm to estimate and remove the baseline drift component, obtaining a pure dissolution current signal and effectively eliminating background interference caused by electrode aging and solution impurities.
[0042] The wavelet transform and ridge tracking steps perform Mexican hat wavelet multi-scale transform on the pure leaching current signal, combined with ridge tracking technology to mine signal feature points, fully leveraging the time-frequency analysis advantages of wavelet transform to analyze complex signals. The effective feature peak identification step determines whether a valid peak corresponding to heavy metals is detected in the signal. If no valid feature peak is identified, the system will repeat the wavelet transform and ridge tracking operations, repeatedly analyzing the signal to prevent effective features from being masked by noise. The window integration peak current calculation step extracts a signal window centered on the feature peak potential and uses a trapezoidal integral algorithm to calculate the peak current value, completing the quantification and extraction of core feature parameters. The environmental parameter fusion and model inference step integrates synchronously collected soil temperature, volumetric water content, and pH parameters, combining environmental data with peak current values into a feature vector. This vector is input into a trained regression model to calculate the heavy metal mass ratio content, improving detection accuracy by incorporating environmental influencing factors. The data upload and cloud analysis step uploads the content data along with timestamps to the cloud platform, where time-series data processing and long-term trend analysis are performed. The entire process is rigorously controlled at every stage and operates in a closed loop, enabling stable and rapid on-site detection of heavy metals in forest soil while ensuring both data accuracy and process automation.
[0043] Specifically, in the forest site, undisturbed soil samples are first taken and subjected to standardized extraction with a buffer solution added at a fixed liquid-to-soil ratio to obtain a test solution containing the heavy metal ions to be tested. The extraction process is completed in a sealed extraction chamber, and the test solution is transported to the detection pool via a micro-peristaltic pump. The detection pool integrates a screen-printed three-electrode system, including a working electrode, a silver chloride reference electrode, and a carbon counter electrode. The working electrode surface is electrochemically modified in situ to form a dense bismuth film. The bismuth film is environmentally friendly and can form alloys with various heavy metals, significantly improving the leaching and enrichment efficiency. A potentiostat circuit applies a specific step potential and a square wave superimposed on the leaching scan waveform to the three-electrode system. The scanning process consists of two stages: first, a relatively negative enrichment potential is applied to the working electrode while stirring, causing the heavy metal ions in the solution to be reduced and enriched on the bismuth film electrode surface; after enrichment, the surface is briefly allowed to stand, and then a square wave potential is superimposed and scanned linearly towards the positive potential direction. The metals enriched on the electrode surface are sequentially oxidized and dissolved, generating a characteristic current response. During the scanning process, current signals on the working electrode are synchronously acquired at fixed sampling intervals, forming a discrete current sequence with potential as the independent variable, i.e., the original dissolution voltammetric curve signal. The enrichment potential is selected within a potential window that allows common heavy metals such as lead, cadmium, copper, and zinc to undergo electrochemical reduction, and the enrichment time is adaptively adjusted according to the concentration range of the test solution. The square wave frequency and amplitude are selected to distinguish adjacent heavy metal dissolution peaks, while the potential scan rate balances test time and peak resolution. The sampling interval is set to a small fraction of half a square wave cycle to ensure that enough current points are captured within each square wave cycle to accurately reconstruct the dissolution peak morphology.
[0044] Forest soil extracts contain a large amount of organic matter, such as humic acid. The irreversible adsorption and side reactions of these substances on the electrode surface introduce severe nonlinear baseline drift, specifically manifested as an overall tilt or curvature of the original stripping voltammetric curve signal. To remove this drift, the original stripping voltammetric curve signal is fed into a morphological baseline estimation module. This module employs one-dimensional morphological opening operations, with the core parameter being the length of the structural element. This length is dynamically set according to the type of heavy metal contained in the test solution. When the test object contains lead, cadmium, copper, and zinc, the length of the structural element is set to a small proportion of the total number of sampling points on the entire curve, ensuring that the width of the structural element is much larger than the width of a single stripping peak. During the operation, the original signal is first subjected to grayscale etching, which eliminates peak features with widths smaller than the structural element, leaving the lower boundary of the envelope curve. Subsequently, an equal-length grayscale expansion operation is performed on the etching result to restore the baseline trend suppressed by etching, ultimately generating a smooth nonlinear baseline drift component signal. Subtracting this baseline drift component signal from the original stripping voltammetric curve signal yields the pure stripping current signal. The signal has been freed from electrode background drift and tilt interference, providing a flat baseline for subsequent peak identification.
[0045] like Figure 2 As shown, this process details the internal operating logic of the embedded processing module in the field monitoring equipment. This module is the core carrier for front-end signal processing, model inference, and data storage. All functional modules work closely together, and multiple loop verification mechanisms are implemented to meet the low-power, high-stability operating requirements of field monitoring equipment. Receiving synchronization signal data is the initial working step of the embedded processing module. It is responsible for uniformly receiving the current signal output from the electrochemical sensing module and the parameter signals transmitted by various environmental sensors. It uses timestamps to complete the time sequence alignment of multi-source data, ensuring that the same set of detection data corresponds to the soil state at the same time. Sensor calibration verification checks the sensor's operating status and calibration results against the received data. If sensor calibration fails or the measurement data deviates from the standard range, the system will re-receive synchronization signal data and continue retrying until the sensor status returns to normal, ensuring the reliability of environmental parameter measurements. The baseline estimation and baseline drift removal step performs one-dimensional morphological opening operations on the received raw current signal, accurately separating and removing the baseline drift component to obtain a pure dissolution current signal without background interference, laying a high-quality data foundation for subsequent peak shape identification.
[0046] The peak identification module's wavelet analysis stage performs Mexican hat wavelet multi-scale transform and ridge tracing on the pure dissolution current signal to comprehensively analyze the peak shape characteristics within the signal and distinguish between valid dissolution peaks and false peaks generated by environmental noise. The heavy metal peak overlap discrimination stage addresses the coexistence of multiple metals in forest areas by determining whether there is overlapping dissolution peaks in the current signal. If overlapping is found, the system will restart the wavelet analysis stage of the peak identification module, utilizing the multi-scale characteristics of wavelets to separate and identify overlapping peaks. The integration + electrode normalization stage extracts a signal window based on the identified characteristic peaks, calculates the peak current value through trapezoidal integration, and then combines it with the reference electrode calibration factor to complete data normalization, compensating for sensitivity differences between different electrodes and improving the consistency of multiple batches of detection data. The quantization model inference stage retrieves the quantized model parameters stored locally, combines the normalized peak current value with environmental parameters to form a feature vector, and uses integer operations to complete regression model inference, quickly calculating the heavy metal content result. The output and caching stage stores the heavy metal mass ratio signal obtained from model inference locally, temporarily storing the data from a single round of detection, awaiting subsequent unified upload to the cloud platform. The embedded processing module's internal workflow integrates algorithm computation, device self-testing, and data management. Its streamlined and efficient computational logic enables stable operation in embedded devices with limited hardware resources, meeting the practical needs of long-term automated monitoring in forest areas.
[0047] Peak identification of pure dissolution current signals is a crucial step in separating responses from multiple heavy metals. This scheme employs a multi-scale continuous wavelet transform based on the Mexican hat wavelet combined with ridge tracing. The Mexican hat wavelet is the second derivative of a Gaussian function, and its shape is highly similar to the waveform of electrochemical dissolution peaks, thus generating a significant coefficient response when matching dissolution peaks. Continuous wavelet transform is performed on the pure dissolution current signal over a set of continuous scale factors, generating a two-dimensional wavelet coefficient matrix with scale and potential as coordinates. At each scale, the locations of the wavelet coefficient modulus maxima are identified; these locations correspond to signal abrupt changes, i.e., candidate peak locations. From large to small scales, there are corresponding connections between modulus maxima points of adjacent scales, thereby constructing several ridges. A dynamic programming algorithm searches for the optimal connection path along the scale direction, and the potential corresponding to the smallest scale when each ridge is traced is determined as the characteristic peak potential signal. Simultaneously, a signal-to-noise ratio (SNR) threshold is set; if the modulus maxima of a ridge at all scales are below the threshold, it is judged as a false peak caused by noise and is discarded. When multiple heavy metals are present in the soil, causing partial overlap of leaching peaks, different component peaks will exhibit different ridge bifurcation and separation characteristics at different scales. The scale continuity and bifurcation characteristics of the ridges can be used to effectively distinguish overlapping peaks and determine independent characteristic peak potentials for each heavy metal.
[0048] After determining the potential of each characteristic peak, the corresponding peak current value needs to be extracted from the pure dissolution current signal. A symmetrical window is extracted from the pure dissolution current signal, centered on the characteristic peak potential. The window width is set with reference to the prior information of the half-width at half-maximum (WHM) of the dissolution peak of the heavy metal to be measured, aiming to cover the complete dissolution peak while avoiding interference regions of neighboring peaks. After extracting the data points within the window, the average signal value of several points at both ends of the window is taken as a local baseline. This local baseline is then subtracted point by point from the signal within the window to eliminate any possible residual tilted background. Subsequently, a trapezoidal numerical integration is performed on the net current signal within the window to calculate the peak area. This area value is the peak current signal of the heavy metal. When multiple heavy metals coexist, the window integration operation is performed sequentially on each characteristic peak to obtain their respective independent peak current signals. To eliminate sensitivity differences between different batches of screen-printed electrodes, all peak current signals are also normalized by dividing by the reference electrode calibration factor.
[0049] Because the temperature, moisture, and pH of the forest environment fluctuate significantly, these factors directly affect the reactivity, diffusion coefficient, and speciation of heavy metal ions on the electrode surface, leading to shifts in peak current values measured at the same concentration. To eliminate this environmental interference, soil temperature, volumetric water content, and pH signals are simultaneously acquired at the same point during electrochemical scanning using a temperature sensor, a dielectric soil moisture sensor, and an antimony electrode pH sensor. Each sensor undergoes multi-point calibration before deployment, and the measured values are converted to standard engineering units using calibration equations. These environmental signals and the normalized peak current signal are aligned with timestamps in the embedded processing module, forming a complete input feature vector.
[0050] like Figure 3 As shown, this process embodies a complete closed-loop system for data interaction, time-series analysis, and model iteration between the cloud platform and the on-site monitoring terminal. It covers all aspects of daily data reception, trend analysis, and model updates, relying on a cyclical operation mode to achieve long-term autonomous operation and maintenance of the entire monitoring system. Each module has a clear division of labor and seamless business connections. In the terminal data reporting stage, the embedded device on-site encapsulates the heavy metal content data, bound to the location identifier and timestamp, into a standard message and initiates data transmission to the cloud platform via wireless communication. This is the main entry point for the cloud to obtain on-site monitoring data. The data verification stage checks the completeness and standardization of the received data messages. If problems such as missing data or abnormal message formats are found, the cloud will provide feedback, and the terminal will re-execute the terminal data reporting operation. The retransmission mechanism ensures complete data entry into the database. In the time-series data accumulation stage, the verified monitoring data is categorized and stored in the cloud time-series database, continuously accumulating heavy metal content data from different time periods and sampling points to build a complete long-term monitoring dataset, providing data support for trend analysis and model training. The local weighted regression decomposition time series step calls the local weighted regression algorithm to perform calculations on the accumulated time series data, separate the seasonal and trend terms in the data, eliminate data disturbances caused by environmental cycle changes, and restore the true change pattern of heavy metal content.
[0051] The heavy metal accumulation trend curve generation step uses time-series decomposition results to create a visualized curve, intuitively displaying the accumulation rate and trend of heavy metals in forest soils of different regions, supporting managers in conducting long-term pollution trend assessments. The model update cycle determination step checks if the current time has reached the preset model retraining cycle. If not, the system enters a waiting state, continuously receiving newly reported monitoring data from terminals to maintain normal daily monitoring operations. The model retraining and parameter quantization step, upon reaching the update cycle, retrieves the full historical sample set from the cloud, combines cross-validation and grid search to retrain the regression model, and then converts the trained floating-point model into a low-bit integer quantization model to adapt to the operating requirements of embedded devices. The new model distribution step pushes the latest quantized model parameters to each field monitoring terminal via wireless transmission. Once the terminal loads the new model, it is officially activated. The entire process then regresses to the data reporting step, forming a permanently operating business loop. This closed-loop process combines the value mining of monitoring data with the continuous optimization of algorithm models, enabling the entire monitoring system to continuously improve detection accuracy during long-term use and fully adapt to the application scenario of long-term dynamic monitoring of heavy metals in forest soil.
[0052] The feature vector is input into a pre-trained extreme gradient boosting regression model. Extreme gradient boosting is an ensemble learning algorithm based on gradient boosting decision trees. It sequentially trains multiple regression trees and fits each tree to the residuals of the previous round, gradually approximating the true function mapping relationship. A regularization term is introduced into the objective function to control the complexity of the trees and prevent overfitting. The model's input features include peak current values, soil temperature, soil volumetric water content, and soil pH. The output is the mass ratio of a single heavy metal, expressed in milligrams per kilogram. The model training relies on a large-scale and widely covered sample set. The sample set is prepared through orthogonal experimental design, covering the coexistence of various heavy metal elements at different concentrations, taking into account common forest soil types such as sandy soil, loam, and clay, and also including different organic matter contents and salinity levels. A complete standardized extraction, electrochemical scanning, baseline correction, and peak identification process is performed on each sample to obtain peak current signals. The actual heavy metal content is determined using standard laboratory methods such as inductively coupled plasma mass spectrometry or atomic absorption spectrometry as training labels. During training, cross-validation combined with grid search was used to determine the optimal hyperparameters of the model, including the maximum tree depth, learning rate, minimum leaf node weights, and regularization coefficient. The root mean square error (RMSE) loss function was used. To further enhance the model's robustness, small random perturbations were applied to the peak current values of the samples during training to simulate the effects of sensor noise and operational errors in real-world environments. Furthermore, to address the background current rise caused by high-conductivity soil, synchronously measured soil conductivity signals were incorporated into the input feature vector for modeling, enabling the model to automatically learn and compensate for the influence of conductivity.
[0053] The trained model parameters are in floating-point format. To accommodate the computational and storage resource limitations of the embedded processing module, the model is quantized into a low-bit integer representation, generating lightweight and efficient inference code, which is stored in the non-volatile memory of the embedded processing module. The embedded processing module integrates an ARM architecture processor, an analog-to-digital converter, and a narrowband IoT wireless communication module. During on-site monitoring, the embedded processing module loads the quantized model from memory, loads the real-time feature vectors into memory, performs integer matrix operations and decision tree path traversal, and outputs and buffers the mass ratio content signal in a very short time. Subsequently, the content value, along with the monitoring point identifier and timestamp, is encapsulated into a data packet via the narrowband IoT communication module and wirelessly transmitted to the cloud platform.
[0054] The cloud platform receives and accumulates time series signals of heavy metal mass ratios transmitted from various monitoring points. For each point's time series, the platform applies a time series trend decomposition algorithm based on local weighted regression. This algorithm selects several data points within a local neighborhood for each time point in the sequence, assigns weights based on distance, and performs a weighted polynomial fitting to obtain the estimated trend and seasonal components for that point. By subtracting the seasonal components from the original sequence, a deseasonalized trend change sequence is obtained. This deseasonalized sequence is then subjected to low-pass smoothing filtering to finally generate a smooth heavy metal accumulation trend change curve signal. Based on network geographic information system technology, the platform visualizes the trend change curves of each monitoring point by overlaying them onto a forest electronic map using color-gradient mapping. This visually displays the heavy metal accumulation status and its changing trends at different locations within the region, providing data support for forest soil environmental management and pollution prevention decisions. To maintain the model's adaptability during long-term operation, the cloud platform periodically collects newly accumulated labeled samples to retrain the model and distributes the latest quantized model parameters to the embedded processing modules at each monitoring point via a wireless update mechanism, completing remote iterative upgrades of the model.
[0055] like Figure 4As shown, this invention also provides an electrochemical monitoring system for heavy metal content in forest soil, comprising: an in-situ extraction module for standardized extraction of undisturbed forest soil samples to obtain a test solution; an electrochemical sensing module for applying a step potential-square wave stripping voltammetry scan to the test solution via a screen-printed three-electrode system, and acquiring the working electrode current to generate the original stripping voltammetry curve signal; an environmental parameter acquisition module for simultaneously acquiring soil temperature, soil volumetric water content, and soil pH signals; and an embedded processing module connected to the electrochemical sensing module and the environmental parameter acquisition module, configured with a baseline estimation module, a peak identification module, and a regression inference module. The baseline estimation module uses one-dimensional morphology... The opening operation estimates the nonlinear baseline drift component signal from the original dissolution voltammetry curve signal and subtracts it to obtain the pure dissolution current signal. The peak identification module performs multi-scale continuous wavelet transform and ridge tracing based on Mexican cap wavelet on the pure dissolution current signal to determine the characteristic peak potential value signal and integrates it to obtain the peak current value signal. The regression inference module inputs the peak current value signal and environmental signal into a pre-trained regression model to output the heavy metal mass ratio content signal. The wireless communication module is used to upload the mass ratio content signal and timestamp. The cloud platform is used to receive and accumulate the mass ratio content signal sequence, and uses a local weighted regression algorithm to separate the seasonal term and trend term to generate the heavy metal accumulation trend change curve signal.
[0056] This invention discloses an electrochemical monitoring method and system for heavy metal content in forest soil. In the forest field, a step potential-square wave dissolution voltammetric scan is performed on soil extract to obtain the original dissolution curve. One-dimensional morphological opening operations are used to estimate and remove nonlinear baseline drift to obtain the pure dissolution current. Multi-scale Mexican cap wavelet transform and ridge tracing are applied to the pure dissolution current to determine the characteristic peak potential of each heavy metal, and window integration is performed to obtain the peak current value. Simultaneously, soil temperature, moisture, and pH signals are collected and input along with the peak current value into a pre-trained extreme gradient boosting regression model. The mass ratio content is output through environmental parameter compensation. The content sequence is uploaded to the cloud, and a local weighted regression decomposition algorithm is used to separate the seasonal and trend terms, generating a heavy metal accumulation trend change curve. This achieves highly environmentally adaptable rapid on-site detection and long-term evolution tracking.
[0057] Therefore, the electrochemical monitoring method and system for heavy metal content in forest soil of the present invention can solve the problem that existing methods are difficult to implement for rapid and accurate on-site monitoring and long-term trend analysis of heavy metals in forest soil.
[0058] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.
Claims
1. A method for electrochemical monitoring of heavy metal content in forest soil, characterized in that, include: S1: Standardized extraction of undisturbed forest soil samples was performed to obtain the test solution, and the working electrode current was collected to generate the original dissolution voltammetry curve signal; S2: Input the original dissolution voltammetric curve signal into the morphological baseline estimation module, estimate the nonlinear baseline drift component signal through one-dimensional morphological opening operation, and subtract the component signal from the original dissolution voltammetric curve signal to generate a pure dissolution current signal; S3: Perform a multi-scale continuous wavelet transform based on Mexican hat wavelet on the pure dissolution current signal, determine the characteristic peak potential value signal corresponding to each heavy metal by ridge tracing, and integrate the characteristic peak potential value signal by truncating a window on the pure dissolution current signal to obtain the peak current value signal. S4: Synchronously collect environmental signals, including soil temperature signal, soil volumetric water content signal and soil pH signal. Input the peak current value signal and the environmental signal into a pre-trained regression model and output the heavy metal mass ratio content signal. S5: The heavy metal mass ratio content signal is uploaded to the cloud platform with a timestamp, and the cumulative time series is separated into seasonal and trend terms using a local weighted regression algorithm to generate a heavy metal cumulative trend change curve signal.
2. The method according to claim 1, characterized in that, In step S1, the test solution is placed in a detection cell, which integrates a screen-printed three-electrode system. This three-electrode system includes a working electrode, a reference electrode, and a counter electrode. The working electrode is coated with an in-situ formed bismuth film, the reference electrode is a silver chloride electrode, and the counter electrode is a carbon electrode. A step potential-square wave stripping voltammetry scan waveform is applied to the three-electrode system using a potentiostat. The scanning process includes stirring and enriching the metal ions to be tested at a predetermined enrichment potential for a predetermined time, so that the metal ions to be tested are reduced and enriched on the surface of the working electrode. Then, a square wave potential is superimposed and linearly scanned to the termination potential. During this period, the response current on the working electrode is collected simultaneously to generate the original stripping voltammetry curve signal with potential as the independent variable.
3. The method according to claim 2, characterized in that, The parameters of the step potential-square wave stripping voltammetry scan are set as follows: the enrichment potential is selected within the potential range that causes electrochemical reduction of the heavy metal to be tested; the enrichment duration is adaptively adjusted according to the concentration range of the heavy metal in the test solution; the square wave frequency, amplitude, and potential scan rate are determined according to the type of heavy metal to be tested and its stripping peak resolution requirements, so that the stripping peaks of adjacent heavy metals are separated; during the scan, a current signal is acquired once at a preset sampling period to generate the original stripping voltammetry curve signal, and the preset sampling period is less than a predetermined multiple of the square wave half-cycle.
4. The method according to claim 1, characterized in that, In step S2, the length of the structural element used in the one-dimensional morphological opening operation is dynamically set according to the type of heavy metal contained in the solution to be tested. When the element to be detected contains at least one of lead, cadmium, copper, and zinc, the length of the structural element is taken as a preset small proportion of the total number of sampling points of the entire original dissolution voltammetric curve signal. Specifically, the signal is first subjected to grayscale etching to remove peak features narrower than the structural element, and then the etching result is subjected to equal-length grayscale expansion to restore the large-scale baseline trend, thereby obtaining the nonlinear baseline drift component signal. This dynamic setting enables the baseline estimation to effectively retain the dissolution peak while removing electrode background drift. The calculation formula for the one-dimensional morphological opening operation is as follows: ; Where x(n) is the discrete sampling signal of the original dissolution voltammetry curve, and b(k) is a one-dimensional morphological structure element sequence. denoted by , where is the total number of sampling points for the structuring element, 'n' is the overall signal sampling point index, 'm' is the internal offset of the structuring element corresponding to the erosion operation, 'k' is the internal offset of the structuring element corresponding to the dilation operation, 'min' represents the minimum value operation for grayscale erosion, and 'max' represents the maximum value operation for grayscale dilation. This is the nonlinear baseline drift component signal output by the morphological opening operation.
5. The method according to claim 1, characterized in that, Step S3, based on the Mexican hat wavelet multi-scale continuous wavelet transform and ridge tracking, includes: performing a Mexican hat wavelet continuous wavelet transform on a set of continuous scale factors on the pure dissolution current signal to generate a scale-potential wavelet coefficient matrix; determining candidate peak positions at each scale by detecting the modulus maxima of wavelet coefficients; constructing ridges using the distance cost and amplitude correlation of modulus maxima points between adjacent scales; searching for connection paths along the scale direction using dynamic programming; determining the potential of the smallest scale corresponding to the path terminal as the characteristic peak potential signal; simultaneously setting a signal-to-noise ratio threshold, removing spurious peaks caused by noise when the modulus maxima of the coefficients corresponding to the ridges are lower than the threshold; for overlapping dissolution peaks caused by multiple heavy metal types, utilizing the bifurcation and separation characteristics of ridges at different scales, combined with the continuity of ridges between scales, to distinguish the characteristic peak potentials of overlapping components. The calculation formula for the multi-scale continuous wavelet transform coefficients of the Mexican hat wavelet is as follows: ; in, For scale Translation potential The corresponding wavelet coefficients, y(n) are the pure dissolution current discrete signal after baseline removal via one-dimensional morphological opening operation, and s is the wavelet transform scaling factor. This is the potential shift amount. is the signal sampling time interval, N is the total number of sampling points for the pure dissolution current signal, and exp is the natural exponential operation.
6. The method according to claim 5, characterized in that, The peak current signal is obtained by integrating a window of the characteristic peak potential signal onto the pure dissolution current signal. Specifically, for each characteristic peak potential value, a symmetrical window is selected on the pure dissolution current signal centered on that potential value. The window width is determined based on the prior information of the half-peak width of the heavy metal dissolution peak to be measured, ensuring that the window covers the entire dissolution peak and is not affected by adjacent peaks. After extracting the signal data points within the window, the signal mean at both ends of the window is calculated as a local baseline. This local baseline is subtracted from the signal within the window to remove residual tilted background. Then, the area of the net current within the window is calculated using the trapezoidal numerical integration method. This area value is the peak current signal of the corresponding heavy metal. When multiple heavy metals coexist, the above window integration operation is performed sequentially for each characteristic peak to obtain their respective independent peak current signals. All peak current signals of the same batch are normalized by dividing by the reference electrode calibration factor to compensate for the sensitivity differences between different electrodes. The calculation formula of the trapezoidal numerical integration method is as follows: ; in, This is the final calculated heavy metal peak current signal. Let z be the potential axis sampling step size, and z(i) be the pure dissolution current signal extracted within the window after determining the characteristic peak through wavelet ridge tracing. The signal is the net current signal of the window after deducting the local baseline. M is the total number of sampling points in the characteristic peak window, and i is the sampling point number in the window.
7. The method according to claim 1, characterized in that, The pre-trained regression model mentioned in step S4 is the extreme gradient boosting regression model. This model is based on gradient boosting decision trees. It trains multiple regression trees sequentially and fits the residuals of the previous round to each tree. At the same time, a regularization term is introduced into the objective function to control the model complexity. The input feature vector of the extreme gradient boosting regression model consists of peak current value signal, soil temperature signal, soil volumetric water content signal, and soil pH signal. The model output is the mass ratio content signal of a single heavy metal. During model training, a sample set covering different soil textures, different heavy metal pollution levels, and multiple combinations of temperature, water content, and pH is collected. Steps S1 to S3 are performed on each sample to obtain the peak current value signal, and the corresponding heavy metal content is determined using laboratory standard methods as the training label. Cross-validation combined with grid search is used to determine the optimal hyperparameters of the model. The hyperparameters include the maximum depth of the tree, learning rate, minimum leaf node weight, and regularization coefficient. The training loss function is the root mean square error.
8. The method according to claim 7, characterized in that, The soil temperature, soil volumetric water content, and soil pH signals are measured in real time by a temperature sensor, a dielectric soil moisture sensor, and an antimony electrode pH sensor buried at the same sampling point in the soil being tested. After signal conditioning and analog-to-digital conversion, the sensor outputs are aligned and synchronized with the peak current signal in the embedded processing module using a common timestamp to form a synchronized feature vector. Environmental signal acquisition and electrochemical scanning are started simultaneously to ensure that each dissolution curve corresponds to the soil environmental conditions at the same time. Each sensor is calibrated at multiple points before deployment, and the measured values are converted into standard engineering units through calibration equations before participating in the feature vector combination. The embedded processing module has a built-in limit gradient boosting inference program. The program loads the trained model parameters, receives the synchronized feature vector, directly calculates the output mass ratio content signal, and caches it locally.
9. The method according to claim 8, characterized in that, The model parameters used in the extreme gradient boosting inference program are obtained by quantizing the trained floating-point model, mapping the floating-point weights and intermediate variables to low-bit integer representations, generating efficient inference code suitable for the embedded processing module, and storing it in non-volatile memory. During inference, the embedded processing module reads the quantized model from memory, loads the input synchronous feature vector into memory, performs integer matrix operations and decision tree path traversal, and outputs the heavy metal mass ratio signal within a predetermined time delay. The embedded processing module encapsulates the mass ratio signal, along with the location identifier and timestamp, into a data packet through a narrowband IoT wireless communication module and sends it to the cloud platform. The cloud platform periodically retrains the model based on new samples and distributes the latest quantized model parameters to the embedded processing modules at each monitoring point through a wireless update mechanism.
10. A system for electrochemical monitoring of heavy metal content in forest soil according to any one of claims 1-9, characterized in that, include: The in-situ extraction module is used to standardize the extraction of undisturbed soil samples from forest land to obtain the test solution; The electrochemical sensing module is used to apply a step potential-square wave stripping voltammetry scan to the solution to be tested through a screen-printed three-electrode system, and to collect the working electrode current to generate the original stripping voltammetry curve signal. The environmental parameter acquisition module is used to simultaneously acquire soil temperature signals, soil volumetric water content signals, and soil pH signals; An embedded processing module, connected to the electrochemical sensing module and the environmental parameter acquisition module, is configured with a baseline estimation module, a peak identification module, and a regression inference module. The baseline estimation module estimates the nonlinear baseline drift component signal from the original dissolution voltammetric curve signal through one-dimensional morphological opening operation and subtracts it to obtain the pure dissolution current signal. The peak identification module performs multi-scale continuous wavelet transform and ridge tracing based on Mexican cap wavelet on the pure dissolution current signal to determine the characteristic peak potential value signal and integrates it to obtain the peak current value signal. The regression inference module inputs the peak current value signal and the environmental signal into a pre-trained regression model and outputs the heavy metal mass ratio content signal. The wireless communication module is used to upload the heavy metal mass ratio content signal and timestamp; The cloud platform is used to receive and accumulate the mass ratio content signal sequence, and uses a local weighted regression algorithm to separate the seasonal and trend terms to generate a heavy metal accumulation trend change curve signal.