Soil pollutant detection system and method

By employing continuous compensation of soil Raman spectral signals, iterative differential analysis, and incremental smoothing window techniques, the problem of pollutant feature recognition distortion caused by background baseline changes in soil Raman spectroscopy detection was solved, enabling rapid and accurate detection of pollutants in complex soil matrices.

CN120801282AInactive Publication Date: 2025-10-17SICHUAN INST OF GEOLOGICAL ENG INVESTIGATION

Patent Information

Application Number
CN202511284815.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-10
Publication Date
2025-10-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In soil Raman spectroscopy detection, drastic changes in the background baseline lead to distortion in the identification of pollutant features. Existing global baseline correction methods cannot adapt to local changes in the soil matrix and are difficult to accurately extract pollutant features.

Method used

By employing continuous spectral compensation, iterative differential analysis, and incremental smoothing window techniques for soil Raman spectral signals, the background baseline response range is identified and background interference is removed, thus extracting pollutant characteristics with high fidelity.

Benefits of technology

Under drastically changing background baseline conditions, adaptive and fidelity extraction of pollutant characteristics was achieved, improving the accuracy and efficiency of pollutant detection and enabling rapid and accurate detection of pollutants in soil.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120801282A_ABST
    Figure CN120801282A_ABST
Patent Text Reader

Abstract

The invention provides a soil pollutant detection system and method, and the method comprises the steps: carrying out the continuous spectrum compensation of a target compensation region of a soil Raman spectrum signal of a to-be-detected soil sample, and obtaining soil Raman spectrum compensation data; identifying a background baseline response interval in the soil Raman spectrum compensation data through iterative differential analysis, and segmenting the soil Raman spectrum compensation data into a plurality of peak-containing spectrum segments according to the background baseline response interval; determining a signal fidelity constraint of the soil Raman spectrum signal during smooth iteration; recognizing a local background baseline corresponding to each peak-containing spectrum section based on an incremental smooth window in combination with signal fidelity constraint, and determining a clean characteristic spectrum according to all background baseline response intervals and the local background baselines; and identifying according to the clean characteristic spectrum to obtain the pollutant concentration of the to-be-detected soil sample. According to the technical scheme provided by the invention, adaptive fidelity extraction can be carried out on the pollutant characteristics under the condition of the violently changing background base line.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of pollutant detection, and more particularly to a soil pollutant detection system and method. BACKGROUND

[0002] With the acceleration of industrialization and the expansion of urbanization, the types of pollutants in the atmosphere, water body and soil are increasingly complex, from traditional heavy metals and volatile organic compounds to new persistent organic pollutants and microplastics, which pose multiple threats to the ecological environment and human health. Traditional pollutant detection technologies such as spectrophotometry and gas chromatography have limitations such as insufficient sensitivity and long detection period. In recent years, with the rapid development of detection technologies based on mass spectrometry and Raman spectrum sensing, accurate qualitative and quantitative detection of trace pollutants has been achieved, providing key technical support for environmental monitoring, pollution tracing and risk assessment.

[0003] In existing pollutant detection, pollutant detection is mostly based on the physical and chemical characteristics of substances to realize qualitative and quantitative analysis. For example, spectroscopy identifies pollutant types by measuring the absorption, emission or scattering characteristics of pollutants at different wavelengths of light, and chromatography separates pollutants according to the difference in their distribution coefficients in the stationary phase and mobile phase. These technologies capture unique characteristic signals of pollutants to achieve accurate detection from trace to constant. However, in soil Raman spectrum detection, soil matrix (such as humus, inorganic salt and mineral) can cause significant fluorescence interference and baseline drift, and the background response in different areas has spatial heterogeneity (such as pollutant diffusion gradient and geological structure difference), resulting in a dramatically changing background baseline in soil Raman spectrum detection. Traditional global baseline correction methods (such as polynomial fitting and uniform B-spline) use fixed parameters to process the full spectrum, which cannot adapt to local changes in soil matrix, leading to distortion of the pollutant characteristics identified in soil Raman spectrum data. Therefore, how to adaptively and accurately extract pollutant characteristics under the condition of a dramatically changing background baseline has become a difficult problem in the industry. SUMMARY

[0004] The present application provides a soil pollutant detection system and method that can adaptively and accurately extract pollutant characteristics under the condition of a dramatically changing background baseline.

[0005] In a first aspect, the present application provides a soil pollutant detection method, comprising the following steps: Collecting soil Raman spectrum signals of the soil sample to be tested, and performing continuous spectrum compensation in a target compensation area of the soil Raman spectrum signals to obtain soil Raman spectrum compensation data; identify a background baseline response interval in the soil Raman spectrum compensation data through iterative differential analysis, and then extract a plurality of peak-containing spectral segments of the to-be-tested soil sample from the soil Raman spectrum compensation data according to the background baseline response interval for contaminant identification; determine a signal fidelity constraint of the soil Raman spectrum signal when performing smoothing iteration; perform smoothing iteration of the background baseline of each peak-containing spectral segment based on an incremental smoothing window and the signal fidelity constraint to obtain a local background baseline corresponding to each peak-containing spectral segment, and then perform background removal on the soil Raman spectrum signal according to all the background baseline response intervals and the local background baseline to obtain a clean characteristic spectrum of the to-be-tested soil sample after background removal; identify the contaminant concentration of the to-be-tested soil sample according to the clean characteristic spectrum.

[0006] In some embodiments, the continuous spectrum compensation is performed on a target compensation region of the soil Raman spectrum signal to obtain soil Raman spectrum compensation data, specifically including: obtain a target compensation region of the soil Raman spectrum signal, the target compensation region including a target compensation region at the left end and a target compensation region at the right end of the soil Raman spectrum signal; perform linear fitting on the target compensation regions at the left end and the right end to obtain a left end linear model and a right end linear model; calculate left end compensation spectrum data according to the left end linear model, and calculate right end compensation spectrum data according to the right end linear model; splice the left end compensation spectrum data to the starting end of the original soil Raman spectrum signal, and splice the right end compensation spectrum data to the terminal end of the original soil Raman spectrum signal to generate soil Raman spectrum compensation data.

[0007] In some embodiments, the identification of the background baseline response interval in the soil Raman spectrum compensation data through iterative differential analysis specifically includes: perform a preset number of iterations of smoothing processing on the soil Raman spectrum compensation data to generate an iteration smoothing spectrum; calculate the absolute difference between the soil Raman spectrum compensation data and the iteration smoothing spectrum to generate a difference spectrum; scan all spectral intervals with a length greater than a set minimum number of continuous points in the difference spectrum, and determine a judgment range of the background baseline response based on the maximum spectral difference value of each spectral interval; if the average spectral difference value of a spectral interval is located in the judgment range, it is determined that the spectral interval is a background baseline response interval.

[0008] In some embodiments, the plurality of peak-containing spectral segments for identifying the contaminant in the soil sample to be tested from the soil Raman spectrum compensation data according to the background baseline response interval specifically comprises: interval complement segmentation of the soil Raman spectrum compensation data with the background baseline response interval as the segmentation anchor point to generate an initial peak-containing spectral segment sequence; merging the initial peak-containing spectral segments in the initial peak-containing spectral segment sequence with adjacent intervals less than a set distance threshold to generate the plurality of peak-containing spectral segments for identifying the contaminant in the soil sample to be tested.

[0009] In some embodiments, the interval complement segmentation of the soil Raman spectrum compensation data with the background baseline response interval as the segmentation anchor point to generate an initial peak-containing spectral segment sequence specifically comprises: determining the wave number position of the background baseline response interval in the soil Raman spectrum compensation data, and taking the wave number position of the background baseline response interval as the segmentation anchor point; dividing the spectral region of the soil Raman spectrum compensation data other than the background baseline response interval into a plurality of continuous spectral segments with the segmentation anchor point as the boundary to integrate the plurality of continuous spectral segments into an initial peak-containing spectral segment sequence.

[0010] In some embodiments, the signal fidelity constraint for the soil Raman spectrum signal when performing smoothing iteration specifically comprises: identifying the wave number interval of the significant characteristic peak in the soil Raman spectrum signal; calculating the characteristic peak signal intensity range in the wave number interval; setting a signal fluctuation threshold according to the characteristic peak signal intensity range; constructing the signal fidelity constraint for the soil Raman spectrum signal when performing smoothing iteration according to the characteristic peak signal intensity range and the signal fluctuation threshold.

[0011] In some embodiments, the background removal of the soil Raman spectrum signal according to all background baseline response intervals and local background baselines to obtain the clean characteristic spectrum of the soil sample to be tested after background removal specifically comprises: splicing all background baseline response intervals and corresponding local background baselines to form the global background baseline of the soil Raman spectrum signal; subtracting the global background baseline from the soil Raman spectrum signal to obtain the clean characteristic spectrum of the soil sample to be tested after background removal.

[0012] In some embodiments, the identification of the contaminant concentration in the soil sample to be tested according to the clean characteristic spectrum specifically comprises the following steps, namely: extracting a characteristic peak intensity of the contaminant in the clean characteristic spectrum; matching the characteristic peak intensity with a preset concentration mapping model, and calculating a contaminant concentration of the to-be-tested soil sample through the concentration mapping model.

[0013] In some embodiments, the soil Raman spectrum signal of the to-be-tested soil sample is acquired by a Raman spectrometer.

[0014] In a second aspect, the present application provides a soil contaminant detection system, comprising: The acquisition module is configured to acquire a soil Raman spectrum signal of a to-be-tested soil sample, and perform continuous spectrum compensation on a target compensation region of the soil Raman spectrum signal to obtain soil Raman spectrum compensation data. The processing module is configured to identify a background baseline response interval in the soil Raman spectrum compensation data through iterative differential analysis, and then extract a plurality of peak-containing spectral segments of the to-be-tested soil sample for contaminant identification from the soil Raman spectrum compensation data according to the background baseline response interval. The processing module is further configured to determine a signal fidelity constraint of the soil Raman spectrum signal when performing smoothing iteration. The processing module is further configured to perform smoothing iteration of the background baseline of each peak-containing spectral segment based on an incremental smoothing window and the signal fidelity constraint to obtain a local background baseline corresponding to each peak-containing spectral segment, and then perform background removal on the soil Raman spectrum signal according to all the background baseline response intervals and the local background baseline to obtain a clean characteristic spectrum of the to-be-tested soil sample after background removal. The execution module is configured to identify a contaminant concentration of the to-be-tested soil sample according to the clean characteristic spectrum.

[0015] The technical scheme provided by the embodiments disclosed in the present application has the following beneficial effects: In the soil pollutant detection system and method provided by the present application, first, the soil Raman spectrum signal of the soil sample to be tested is collected, and continuous spectrum compensation is performed in the target compensation area of ​​the soil Raman spectrum signal to obtain soil Raman spectrum compensation data; secondly, the background baseline response interval in the soil Raman spectrum compensation data is identified by iterative differential analysis, and then multiple peak-containing spectrum segments for pollutant identification of the soil sample to be tested are extracted from the soil Raman spectrum compensation data based on the background baseline response interval; further, the signal fidelity constraint of the soil Raman spectrum signal during smoothing iteration is determined; then, based on an incremental smoothing window and combined with the signal fidelity constraint, smoothing iteration of the background baseline is performed on each peak-containing spectrum segment to obtain the local background baseline corresponding to each peak-containing spectrum segment, and then background removal is performed on the soil Raman spectrum signal based on all background baseline response intervals and local background baselines to obtain a clean characteristic spectrum of the soil sample to be tested after background removal; finally, the pollutant concentration of the soil sample to be tested is identified based on the clean characteristic spectrum.

[0016] It can be seen that the present application can perform adaptive fidelity extraction of pollutant features under drastically changing background baseline conditions; first, the soil Raman spectral signal of the soil sample to be tested is collected and continuous spectral compensation is performed on the spectral points at both end regions, which can make up for the signal breakage or distortion problems caused by detection condition limitations at both ends of the spectral signal, improve the integrity and continuity of the spectral data, and provide more reliable original data for subsequent analysis; secondly, the background baseline response interval is identified through iterative differential analysis and multiple peak-containing spectral segments are segmented, which can accurately locate the characteristic areas related to pollutants in the spectrum, reduce the interference of the complex background of the soil matrix, and improve the pertinence of pollutant feature extraction; further, the signal fidelity constraint is determined, which can effectively protect the spectrum in the smoothing iteration process. Characteristic peak information is collected to avoid the loss of pollutant characteristic signals due to excessive smoothing and to avoid distortion of pollutant characteristics identified in soil Raman spectral data; then, based on the incremental smoothing window combined with signal fidelity constraint smoothing iteratively and removing the background, the background interference of each peak-containing spectral segment can be eliminated in a targeted manner to obtain a purer pollutant characteristic spectrum to enhance the recognition of the characteristic signal; finally, the pollutant concentration is identified according to the clean characteristic spectrum, and the purified characteristic information can be directly used for quantitative analysis, thereby improving the accuracy and efficiency of pollutant concentration detection and realizing rapid and accurate detection of soil pollutants; in summary, the technical solution provided by this application can perform adaptive fidelity extraction of pollutant characteristics under drastically changing background baseline conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is a schematic diagram of an application scenario architecture of a soil pollutant detection method according to some embodiments of the present application; Figure 2is an exemplary flowchart of a soil pollutant detection method according to some embodiments of the present application; Figure 3 is an exemplary flowchart of determining a background baseline response interval according to some embodiments of the present application; Figure 4 is a structural schematic diagram of a soil pollutant detection system according to some embodiments of the present application; Figure 5 is a structural schematic diagram of a computer device implementing a soil pollutant detection method according to some embodiments of the present application. DETAILED DESCRIPTION

[0018] In order to better understand the technical solutions of the present application, the technical solutions of the present application will be described in detail below in combination with the drawings of the specification and specific embodiments.

[0019] Reference Figure 1 The figure is a structural schematic diagram of an application scenario of a soil pollutant detection method according to some embodiments of the present application, which includes a collection terminal, a communication network and a server terminal. The collection terminal and the server terminal are directly or indirectly connected through the communication network. The collection terminal collects a soil Raman spectrum signal of a soil sample to be tested and uploads it to the server terminal. The server terminal performs continuous spectrum compensation on a target compensation region of the soil Raman spectrum signal to obtain soil Raman spectrum compensation data. The background baseline response interval in the soil Raman spectrum compensation data is identified through iterative differential analysis, and then a plurality of peak-containing spectral segments of the soil sample to be tested for pollutant identification are extracted from the soil Raman spectrum compensation data according to the background baseline response interval. The signal fidelity constraint of the soil Raman spectrum signal during smoothing iteration is determined. The background baseline of each peak-containing spectral segment is smoothed and iterated based on an incremental smoothing window combined with the signal fidelity constraint to obtain a local background baseline corresponding to each peak-containing spectral segment. Then, the background of the soil Raman spectrum signal is removed according to all the background baseline response intervals and the local background baselines to obtain a clean characteristic spectrum of the soil sample to be tested after removing the background. The pollutant concentration of the soil sample to be tested is identified according to the clean characteristic spectrum.

[0020] Reference Figure 2 The figure is an exemplary flowchart of a soil pollutant detection method according to some embodiments of the present application. The soil pollutant detection method mainly includes the following steps: In step 101, a soil Raman spectrum signal of a soil sample to be tested is collected, and continuous spectrum compensation is performed on a target compensation region of the soil Raman spectrum signal to obtain soil Raman spectrum compensation data.

[0021] In a specific implementation, the soil Raman spectrum signal of the soil sample to be measured is collected by a Raman spectrometer, and the Raman spectrometer is used to collect the soil Raman spectrum signal of the soil sample to be measured at a wavelength of 785 nm or 532 nm. Generally, 3-5 repeated collections are performed and an average value is taken as the final soil Raman spectrum signal.

[0022] It should be noted that the soil Raman spectrum signal in the present application represents a characteristic spectrum signal generated after each type of substance molecule in the soil sample to be measured, including pollutants, absorbs photon energy. The soil Raman spectrum signal can reflect the molecular characteristics of pollutants and matrix components in the soil, and is the core basis for identifying and quantitatively detecting soil pollutants through spectral analysis.

[0023] In some embodiments, the soil Raman spectrum signal is continuously compensated in the target compensation region to obtain soil Raman spectrum compensation data, which can be achieved by the following steps, namely: The target compensation region of the soil Raman spectrum signal is obtained, and the target compensation region includes the target compensation region at the left end and the right end of the soil Raman spectrum signal. The left end and the right end of the target compensation region are linearly fitted to obtain a left end linear model and a right end linear model. The left end compensation spectrum data is calculated according to the left end linear model, and the right end compensation spectrum data is calculated according to the right end linear model. The left end compensation spectrum data is spliced to the starting end of the original soil Raman spectrum signal, and the right end compensation spectrum data is spliced to the terminal end of the original soil Raman spectrum signal to generate soil Raman spectrum compensation data.

[0024] In a specific implementation, first, a target compensation region of the soil Raman spectrum signal is obtained, the target compensation region includes a target compensation region at a left end and a target compensation region at a right end of the soil Raman spectrum signal, the target compensation region at the left end is a data point range with a set length at the left end of the soil Raman spectrum signal, the target compensation region at the right end is a data point range with a set length at the right end of the soil Raman spectrum signal, the set length can be set according to actual requirements, for example, can be set to 10 data points, which is not limited here, and the target compensation region represents a spectral segment that needs to be compensated continuously at the left end and the right end of the soil Raman spectrum signal; second, linear fitting is performed on the target compensation regions at the left end and the right end to obtain a linear model at the left end and a linear model at the right end, that is, the wave number of the spectral points in the target compensation region is taken as the independent variable and the signal intensity is taken as the dependent variable, the least square method is used to calculate the least square sum of the deviation of the fitting straight line from the actual spectral points, and the linear equations (i.e., the linear model) at the left end and the right end are obtained, respectively, to obtain the linear model at the left end and the linear model at the right end, the linear model at the left end represents a linear equation describing the change of the spectral signal with the wave number in the target compensation region at the left end, and the linear model at the right end represents a linear equation describing the change of the spectral signal with the wave number in the target compensation region at the right end; then, according to the linear model at the left end, spectral data in a set range extending to the left of the left end target region is obtained to obtain left end compensation spectral data, and according to the linear model at the right end, spectral data in a set range extending to the right of the right end target region is obtained to obtain right end compensation spectral data, the set range is set to 3-5 data points, and in addition, the set range can be set according to actual requirements, which is not limited here, and the left end compensation spectral data and the right end compensation spectral data respectively represent spectral data used to compensate the target compensation region and calculated by the linear model; finally, the left end compensation spectral data is spliced to the starting end of the original soil Raman spectrum signal, and the right end compensation spectral data is spliced to the terminal end of the original soil Raman spectrum signal to generate soil Raman spectrum compensation data, and smoothing processing (such as wavelet transform) is performed on the splicing position by using an existing smoothing technology to ensure the wave number continuity and the signal intensity transition smoothness of the compensation spectral data and the original soil Raman spectrum signal at the connection position.

[0025] It should be noted that the soil Raman spectrum compensation data in the present application represents complete and continuous soil Raman spectrum data formed after splicing the two end spectral compensation data, the linear fitting and accurate splicing of the target compensation regions at the two ends of the soil Raman spectrum signal not only solves the signal breakage and attenuation problems caused by the detection system response limitation at the two ends of the traditional Raman spectrum, but also avoids the feature distortion caused by excessive dependence on the global model in the existing compensation method, realizes the spectral signal in the meanwhile that the feature peak integrity of the pollutant is retained, and improves the spectral continuity of the two end regions, thereby providing more reliable basic data for subsequent background baseline identification and feature sub-interval segmentation.

[0026] In step 102, the background baseline response interval in the soil Raman spectrum compensation data is identified by iterative differential analysis, and then a plurality of peak-containing spectral segments of the to-be-tested soil sample for contaminant identification are extracted from the soil Raman spectrum compensation data according to the background baseline response interval.

[0027] In some embodiments, the reference Figure 3 As shown in the figure, the figure is an exemplary flow chart for determining the background baseline response interval according to some embodiments of the present application. In the present embodiment, the background baseline response interval in the soil Raman spectrum compensation data is identified by iterative differential analysis, which can be implemented by the following steps: First, in step 1021, the soil Raman spectrum compensation data is subjected to preset number of times of iterative smoothing processing to generate an iterative smoothing spectrum; Second, in step 1022, the absolute difference between the soil Raman spectrum compensation data and the iterative smoothing spectrum is calculated to generate a differential spectrum; Then, in step 1023, all spectral intervals with a length greater than a set minimum number of continuous points are scanned in the differential spectrum, and a determination range of the background baseline response is determined based on the maximum spectral differential value of each spectral interval; Finally, in step 1024, if the average spectral differential value of the spectral interval is located in the determination range, the spectral interval is determined as the background baseline response interval.

[0028] In a specific implementation, first, the soil Raman spectrum compensation data is iteratively smoothed for a preset number of times by using a moving average method to generate an iteratively smoothed spectrum, that is, the moving average method is used to set a fixed size sliding window, and the signal intensity of each spectrum point and its adjacent spectrum points in the soil Raman spectrum compensation data is sequentially arithmetically averaged, and the calculation result is taken as the smoothed value of the corresponding spectrum point. After a preset number of repeated operations, the iteratively smoothed spectrum is obtained, which represents a spectrum with reduced signal fluctuation after multiple smoothing of the soil Raman spectrum compensation data; second, the absolute difference between the soil Raman spectrum compensation data and the iteratively smoothed spectrum is calculated to generate a difference spectrum, specifically, the signal intensity of each spectrum point in the soil Raman spectrum compensation data is subtracted from the signal intensity of the spectrum point at the corresponding position in the iteratively smoothed spectrum, and then the absolute value is taken, and the spectrum thus obtained is the difference spectrum, which represents a spectrum composed of the absolute difference in signal intensity between the soil Raman spectrum compensation data and the iteratively smoothed spectrum at each spectrum point; further, all spectrum intervals with a length greater than a set minimum number of consecutive points are scanned in the difference spectrum, and a determination range of the background baseline response is determined based on the maximum spectrum difference value of each spectrum interval, wherein the maximum spectrum difference value can be used as the determination upper limit value of the determination range, the standard deviation of the difference spectrum is calculated in a flat region without characteristic peaks, and 3 times the standard deviation is used as the determination lower limit value of the determination range. In addition, the duration of noise can be calculated as the minimum number of consecutive points by wavelet transform of the original soil Raman spectrum signal, and the determination range of the background baseline response represents the spectrum difference value range for determining whether a spectrum interval is a background baseline response interval; finally, if the average spectrum difference value of the spectrum interval is within the determination range, the spectrum interval is determined to be a background baseline response interval, and the average spectrum difference value represents the arithmetic mean of the spectrum difference values of all spectrum points in the spectrum interval.

[0029] It should be noted that the background baseline response interval in the present application represents a continuous spectrum interval that can reflect the characteristics of the background baseline response. The determination of the background baseline response interval is a key link in the analysis of soil pollutant Raman spectra, which connects the original signal and feature extraction. Its role is to accurately divide the stable response region representing the soil matrix background in the spectrum, to provide a clear target range for subsequent baseline correction, and to avoid characteristic peak submergence or misjudgment due to baseline estimation deviation.

[0030] In some embodiments, the multiple peak-containing spectral segments for pollutant identification of the soil sample to be tested from the soil Raman spectrum compensation data according to the background baseline response interval can be achieved by the following steps, that is: The background baseline response interval is taken as a segmentation anchor point, and the soil Raman spectrum compensation data is complementarily segmented in intervals to generate an initial peak-containing spectral segment sequence; Merge the initial peak-containing spectral segments in the initial peak-containing spectral segment sequence that have an adjacent interval less than a set distance threshold, thereby generating a plurality of peak-containing spectral segments for the soil sample to be tested to identify pollutants.

[0031] In some embodiments, the background baseline response interval is used as a segmentation anchor point to complementarily segment the soil Raman spectrum compensation data to generate the initial peak-containing spectral segment sequence, which can be achieved by the following steps: Determine the wave number position of the background baseline response interval in the soil Raman spectrum compensation data, and use the wave number position of the background baseline response interval as a segmentation anchor point. Divide the spectral region of the soil Raman spectrum compensation data other than the background baseline response interval with the segmentation anchor point as a boundary to obtain a plurality of continuous spectral segments, and integrate the plurality of continuous spectral segments into an initial peak-containing spectral segment sequence.

[0032] In a specific implementation, first, the background baseline response interval is used as a segmentation anchor point to complementarily segment the soil Raman spectrum compensation data to generate an initial peak-containing spectral segment sequence. The segmentation anchor point represents a boundary point for dividing the spectral feature interval. The complementarily segmenting represents an operation of dividing the part of the spectral data other than the background baseline response interval into continuous intervals. The initial peak-containing spectral segment sequence represents a sequence composed of a plurality of initial peak-containing spectral segments, and the initial peak-containing spectral segment is represented by a spectral segment. Second, the initial peak-containing spectral segments in the initial peak-containing spectral segment sequence that have an adjacent interval less than a set distance threshold are merged, thereby generating a plurality of peak-containing spectral segments for the soil sample to be tested to identify pollutants. That is, the initial peak-containing spectral segments in the initial peak-containing spectral segment sequence that have an adjacent interval less than a set distance threshold are merged. The obtained spectral feature interval is used as a peak-containing spectral segment, thereby generating a plurality of peak-containing spectral segments for the soil sample to be tested to identify pollutants. The set distance threshold can be set according to actual needs or according to expert knowledge, which is not limited here.

[0033] It should be noted that the peak-containing spectral segment in this application represents a continuous spectral interval for soil pollutant identification. By determining the peak-containing spectral segment, the characteristics of the complex and variable matrix background in the soil Raman spectrum can be effectively identified, avoiding the omission of effective features or the mixing of redundant background caused by fixed division, making the feature sub-interval more consistent with the real spectral characteristics of the pollutant. This not only retains the complete information of the key feature peaks, but also eliminates irrelevant background interference, thereby providing a high-purity feature carrier for subsequent baseline identification and concentration quantitative analysis, significantly improving the specificity and accuracy of pollutant identification under a complex soil matrix.

[0034] In step 103, the signal fidelity constraint of the soil Raman spectrum signal when performing smoothing iteration is determined.

[0035] In some embodiments, determining the signal fidelity constraint of the soil Raman spectrum signal in the smoothing iteration can be achieved by the following steps, namely: identifying the wave number interval of the significant characteristic peak in the soil Raman spectrum signal; calculating the characteristic peak signal intensity range in the wave number interval; setting a signal fluctuation threshold according to the characteristic peak signal intensity range; constructing the signal fidelity constraint of the soil Raman spectrum signal in the smoothing iteration according to the characteristic peak signal intensity range and the signal fluctuation threshold.

[0036] In specific implementation, first, the wave number interval of the significant characteristic peak in the soil Raman spectrum signal is identified, that is, the first derivative of the soil Raman spectrum signal is calculated, the point where the derivative changes from positive to negative is found as the peak value point, and the wave number range corresponding to the peak value point is determined as the wave number interval of the significant characteristic peak, which represents the continuous range where the wave number with obvious signal intensity peak value in the soil Raman spectrum signal is located; second, the characteristic peak signal intensity range in the wave number interval is calculated, that is, the signal intensity values of all spectrum points in the wave number interval are extracted, and the difference between the maximum signal intensity value and the minimum signal intensity value is taken as the characteristic peak signal intensity range, which represents the maximum fluctuation range of the signal intensity in the wave number interval of the significant characteristic peak; then, the signal fluctuation threshold is set according to the characteristic peak signal intensity range, that is, the basic proportion value of 20%-40% of the characteristic peak signal intensity range can be taken, and then the basic proportion value is superimposed with the average amplitude of the noise of the soil Raman spectrum signal by noise analysis (such as calculating the average amplitude of the noise by the root mean square error method), if the superimposed result exceeds 50% of the characteristic peak signal intensity range, the signal fluctuation threshold is taken as 50% of the characteristic peak signal intensity range, otherwise, the superimposed result is taken as the signal fluctuation threshold, which represents the maximum range of the allowed change of the characteristic peak signal intensity in the smoothing iteration process; finally, the signal fidelity constraint of the soil Raman spectrum signal in the smoothing iteration is constructed according to the characteristic peak signal intensity range and the signal fluctuation threshold, that is, the signal intensity in the smoothing iteration process should not exceed the characteristic peak signal intensity range, and the signal change between adjacent iteration steps should not exceed the signal fluctuation threshold, and the constraint condition formed thereby is the signal fidelity constraint of the soil Raman spectrum signal in the smoothing iteration.

[0037] It should be noted that the signal fidelity constraint in the present application represents a restriction condition set to ensure that the characteristic peak information of the spectral signal is not lost in the smoothing iteration process. In the present embodiment, the wavenumber interval of the significant characteristic peak is first locked, and the signal fluctuation threshold is dynamically generated based on the intensity range of the characteristic peak signal in the interval and combined with the actual level of spectral noise, rather than using a universal constraint. This approach not only ensures that the threshold is adapted to the fluctuation characteristics of the characteristic peak itself by the proportion of the characteristic peak intensity range, avoiding distortion of the characteristic peak due to excessive smoothing caused by a too wide threshold, but also prevents misjudgment of reasonable signal fluctuation as characteristic distortion by a too narrow threshold, thereby accurately protecting the peak position and peak height information of the characteristic peak in the smoothing iteration process, while effectively suppressing noise interference. The contradiction of "preserving characteristics while leaving noise" caused by poor adaptability of the constraint to specific characteristic peaks in the prior art is solved, providing a more realistic characteristic signal basis for subsequent baseline identification and pollutant quantitative analysis.

[0038] In step 104, the background baseline of each peak-containing spectral segment is smoothed iteratively based on an incremental smoothing window combined with the signal fidelity constraint, to obtain the local background baseline corresponding to each peak-containing spectral segment, and then the background of the soil Raman spectrum signal is removed according to all background baseline response intervals and local background baselines, to obtain the clean characteristic spectrum of the soil sample to be tested after removing the background.

[0039] In some embodiments, the smoothing iteration of the background baseline of each peak-containing spectral segment based on an incremental smoothing window combined with the signal fidelity constraint can be achieved by the following steps, i.e.: setting an initial smoothing window for each peak-containing spectral segment; selecting a peak-containing spectral segment as a selected peak-containing spectral segment; performing first smoothing processing on the selected peak-containing spectral segment based on the corresponding initial smoothing window, and verifying the smoothing result combined with the signal fidelity constraint, if the smoothing result does not meet the signal fidelity constraint, then increasing the smoothing window size by a predetermined amplitude and repeating the smoothing processing until the smoothing result meets the signal fidelity constraint, and taking the final smoothing result meeting the signal fidelity constraint as the local background baseline of the selected peak-containing spectral segment; continuing to determine the local background baseline of the remaining peak-containing spectral segment.

[0040] In a specific implementation, first, an initial smoothing window is set for each peak-containing spectral segment, which can be set according to the length of the peak-containing spectral segment, that is, the length of the peak-containing spectral segment (i.e., the total number of spectral data points included in the interval) is determined. If the length of the peak-containing spectral segment is short (e.g., contains 50 or fewer data points), the initial smoothing window is usually set to 3-5 data points. If the length of the peak-containing spectral segment is longer (e.g., contains 50 or more data points), the initial smoothing window can be set to 5-7 data points. The size of the initial smoothing window must be ensured to be no more than 1 / 3 of the length of the sub-interval, so as to avoid the feature information being blurred due to the excessively large coverage of the window. The initial smoothing window represents a fixed-length window used for the first smoothing of the peak-containing spectral segment. Second, a peak-containing spectral segment is selected as a selected peak-containing spectral segment, which represents a sub-interval selected from all peak-containing spectral segments and currently to be processed. Then, the selected peak-containing spectral segment is first smoothed based on the corresponding initial smoothing window. The smoothing is performed using the moving average method, that is, by sliding the initial smoothing window over the selected peak-containing spectral segment, the average signal intensity of all spectral points in the window is calculated as the smoothing value of the center spectral point of the window, the first smoothing is completed, and then the smoothing result is verified in combination with the signal fidelity constraint, that is, it is checked whether the smoothed signal exceeds the characteristic peak signal intensity range and fluctuates by no more than the signal fluctuation threshold. If not, the smoothing window size is increased by a preset amplitude (i.e., 1 data point), and the smoothing is performed again using the moving average method. This is repeated to increase the window size and perform smoothing until the smoothing result satisfies the signal fidelity constraint, and the final smoothing result that satisfies the signal fidelity constraint is taken as the local background baseline of the selected peak-containing spectral segment. The smoothing result represents the spectral data obtained after smoothing. Finally, the local background baseline of the remaining peak-containing spectral segment is determined by determining the local background baseline of the selected peak-containing spectral segment.

[0041] It should be noted that the local background baseline in this application represents the background baseline identified from the peak-containing spectral segment. In this embodiment, by determining the local background baseline of each peak-containing spectral segment, the soil matrix interference signal unrelated to the characteristic peak of the pollutant in each sub-interval can be accurately stripped, including the continuous or slowly varying background fluctuation caused by organic matter and minerals, so that the characteristic peak signal stands out from the complex background. At the same time, by focusing on the local characteristics of the sub-interval, the problem that some characteristic peaks are excessively corrected or insufficiently retained due to the background difference between different regions when determining the global background baseline is avoided. This provides a clean and reliable baseline reference for the subsequent accurate identification of characteristic peaks, quantification of signal intensity, and accurate analysis of pollutant types and concentrations, effectively improving the specificity of signal extraction and the accuracy of data interpretation in soil pollutant Raman spectrum detection.

[0042] It should be noted that the smoothing iteration in the present application represents the process of multiple smoothing of the peak-containing spectral segment, which will not be described here.

[0043] In some embodiments, the background removal of the soil Raman spectrum signal according to all background baseline response intervals and local background baselines to obtain the clean characteristic spectrum of the soil sample to be tested after background removal can be achieved by the following steps, that is: Splicing all background baseline response intervals and corresponding local background baselines to form the global background baseline of the soil Raman spectrum signal; Subtracting the global background baseline from the soil Raman spectrum signal to obtain the clean characteristic spectrum of the soil sample to be tested after background removal.

[0044] In specific implementation, first, all background baseline response intervals and corresponding local background baselines are spliced to form the global background baseline of the soil Raman spectrum signal, that is, each background baseline response interval and its corresponding local background baseline are sequentially connected in order of wave number, and for the connection part of adjacent intervals, a linear transition is adopted to ensure that the spliced baseline is continuous and has no mutation, and the global background baseline represents a complete background baseline covering the full wave number range of the soil Raman spectrum signal; then, the global background baseline is subtracted from the soil Raman spectrum signal to obtain the clean characteristic spectrum of the soil sample to be tested after background removal, that is, the signal intensity of each wave number point in the soil Raman spectrum signal is subtracted by the intensity value of the global background baseline at the corresponding wave number point, thereby removing the background signal caused by the soil matrix in the spectrum, and obtaining the clean characteristic spectrum of the soil sample to be tested after removing the soil matrix pollution.

[0045] It should be noted that the clean characteristic spectrum in the present application represents the spectrum data after removing background interference, which can be directly used for pollutant identification. In existing soil pollutant identification, global background removal is limited to cause local feature distortion. By segmenting the peak-containing spectral segment and identifying the local background baseline, and then splicing the global background baseline for deduction, the "regional precision" of background removal is realized. The background removal process is deeply bound with the local characteristics of the spectral features, that is, the background baseline of each sub-interval is iteratively optimized based on the signal fidelity constraint, which avoids the "one-size-fits-all" processing of strong and weak characteristic peaks in the complex soil matrix by traditional global fitting. This method can not only completely retain the signal intensity of weak pollutant characteristic peaks, but also completely strip the specific background of different sub-intervals, providing a higher purity feature carrier for subsequent concentration quantification analysis.

[0046] In step 105, the pollutant concentration of the soil sample to be tested is identified according to the clean characteristic spectrum.

[0047] In some embodiments, the concentration of the pollutant in the soil sample to be detected can be identified according to the clean characteristic spectrum by the following steps, that is: extracting the characteristic peak intensity of the pollutant in the clean characteristic spectrum; matching the characteristic peak intensity with a preset concentration mapping model, and calculating the concentration of the pollutant in the soil sample to be detected through the concentration mapping model.

[0048] In a specific implementation, first, the characteristic peak intensity of the pollutant in the clean characteristic spectrum is extracted, that is, the peak area integration method is used to determine the wave number range corresponding to the characteristic peak of the pollutant, and the signal intensity of the clean characteristic spectrum in the wave number range is integrated to obtain the integral value, which is the characteristic peak intensity of the pollutant. The characteristic peak intensity represents the intensity quantization value of the specific peak value in the clean characteristic spectrum that can represent the existence of the pollutant. Then, the characteristic peak intensity is input into a preset concentration mapping model, and the concentration of the pollutant in the soil sample to be detected is calculated through the concentration mapping model. The concentration mapping model is constructed in advance by the Raman spectrum of the soil pollutant standard sample with a known concentration, that is, the characteristic peak intensity of the soil standard sample with different concentrations is linearly regressed with the corresponding concentration to obtain the functional relationship between the characteristic peak intensity and the concentration (i.e. the concentration mapping model). The concentration mapping model refers to a mathematical model for establishing the corresponding relationship between the characteristic peak intensity of the soil pollutant and the actual concentration.

[0049] It should be noted that the concentration of the pollutant in this embodiment refers to the amount of the pollutant contained in the soil sample to be detected.

[0050] In addition, another aspect of the present application provides a soil pollutant detection system in some embodiments, which is described with reference to Figure 4 The figure is a structural schematic diagram of a soil pollutant detection system according to some embodiments of the present application, which includes a collection module 201, a processing module 202 and an execution module 203, which are described as follows: The collection module 201 is mainly used to collect the soil Raman spectrum signal of the soil sample to be detected, and to perform continuous spectrum compensation in the target compensation area of the soil Raman spectrum signal to obtain soil Raman spectrum compensation data. The processing module 202 is mainly used to identify the background baseline response interval in the soil Raman spectrum compensation data through iterative differential analysis, and then extract a plurality of peak-containing spectrum segments for pollutant identification of the soil sample to be detected from the soil Raman spectrum compensation data according to the background baseline response interval. The processing module 202 is also used to determine the signal fidelity constraint when the soil Raman spectrum signal is iteratively smoothed. In addition, the processing module 202 is further configured to perform background baseline smoothing iteration on each peak-containing spectral segment based on an incremental smoothing window in combination with the signal fidelity constraint to obtain a local background baseline corresponding to each peak-containing spectral segment, and then perform background removal on the soil Raman spectral signal based on all background baseline response intervals and the local background baseline to obtain a clean characteristic spectrum of the soil sample to be tested after background removal. The execution module 203 in this application is mainly used to identify and obtain the pollutant concentration of the soil sample to be tested based on the clean characteristic spectrum.

[0051] In addition, the present application also provides a computer device, which includes a memory and a processor, the memory storing a code, and the processor being configured to obtain the code and execute the above-mentioned soil pollutant detection method.

[0052] In some embodiments, reference Figure 5 , which is a schematic diagram of the structure of a computer device for implementing a soil pollutant detection method according to some embodiments of the present application. The soil pollutant detection method in the above embodiment can be Figure 5 The computer device shown in FIG3 is implemented as shown in FIG3 , which includes at least one processor 301 , a communication bus 302 , a memory 303 and at least one communication interface 304 .

[0053] The processor 301 can be a general-purpose central processing unit (CPU), or an application-specific integrated circuit (ASIC) or one or more processors for controlling the execution of the soil pollutant detection method in the present application.

[0054] The communication bus 302 may be used to transmit information between the aforementioned components.

[0055] The memory 303 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM), or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, a magneto-optical disk, a magnetic disk or other magnetic storage device, or any other medium capable of storing desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto. The memory 303 can exist independently of the processor 301, and is connected to the processor 301 through the communication bus 302. The memory 303 can also be integrated with the processor 301.

[0056] The memory 303 is configured to store program codes for implementing the solutions of the present application, and the processor 301 is configured to execute the program codes stored in the memory 303. The program codes can include one or more software modules. The determination of the soil pollutant detection method in the above embodiments can be implemented by the processor 301 and one or more software modules in the program codes in the memory 303.

[0057] The communication interface 304 is configured to communicate with other devices or communication networks, such as an Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc., using any transceiver-like mechanism.

[0058] In specific implementations, as an example, the computer device can include multiple processors, each of which can be a single-CPU processor or a multi-CPU processor. The processor herein can refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0059] The aforementioned computer device can be a general-purpose computer device or a dedicated computer device. In a specific implementation, the computer device can be a desktop computer, a portable computer, a network server, a personal digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device, or an embedded device. The embodiments of this application do not limit the type of computer device.

[0060] In addition, the present application also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the above-mentioned soil pollutant detection method is implemented.

[0061] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.

[0062] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A soil pollutant detection method, characterized in that: The steps include: Collecting soil Raman spectrum signals of a soil sample to be tested, and performing continuous spectrum compensation in a target compensation area of ​​the soil Raman spectrum signals to obtain soil Raman spectrum compensation data; Identifying a background baseline response interval in the soil Raman spectrum compensation data through iterative differential analysis, and then extracting multiple peak-containing spectral segments for pollutant identification of the soil sample to be tested from the soil Raman spectrum compensation data based on the background baseline response interval; Determining a signal fidelity constraint of the soil Raman spectroscopy signal during smoothing iteration; Based on the incremental smoothing window combined with the signal fidelity constraint, the background baseline of each peak-containing spectral segment is smoothed and iterated to obtain the local background baseline corresponding to each peak-containing spectral segment, and then the soil Raman spectral signal is background-removed according to all background baseline response intervals and local background baselines to obtain a clean characteristic spectrum of the soil sample to be tested after background removal; The pollutant concentration of the soil sample to be tested is obtained according to the clean characteristic spectrum identification.

2. The method according to claim 1, wherein Performing continuous spectrum compensation in the target compensation area of ​​the soil Raman spectrum signal to obtain soil Raman spectrum compensation data specifically includes: Acquire a target compensation region of the soil Raman spectrum signal, wherein the target compensation region includes target compensation regions at the left end and the right end of the soil Raman spectrum signal; Performing linear fitting on the target compensation areas at the left and right ends to obtain a left end linear model and a right end linear model; The left-end compensation spectrum data is obtained by calculation according to the left-end linear model, and the right-end compensation spectrum data is obtained by calculation according to the right-end linear model; The left end compensation spectrum data is spliced ​​to the starting end of the original soil Raman spectrum signal, and the right end compensation spectrum data is spliced ​​to the ending end of the original soil Raman spectrum signal to generate soil Raman spectrum compensation data.

3. The method according to claim 1, wherein Identifying the background baseline response interval in the soil Raman spectrum compensation data by iterative differential analysis specifically includes: Performing a preset number of iterative smoothing processes on the soil Raman spectrum compensation data to generate an iteratively smoothed spectrum; Calculating the absolute difference between the soil Raman spectrum compensation data and the iterative smoothed spectrum to generate a differential spectrum; Scanning all spectral intervals whose length is greater than a set minimum number of consecutive points in the differential spectrum, and determining a determination range of a background baseline response based on a maximum spectral difference value of each of the spectral intervals; If the average spectral difference value of the spectral interval is within the determination range, the spectral interval is determined to be a background baseline response interval.

4. The method according to claim 1, wherein Extracting multiple peak-containing spectral segments of the soil sample to be tested from the soil Raman spectrum compensation data for pollutant identification based on the background baseline response interval specifically includes: Using the background baseline response interval as a segmentation anchor point, performing interval complementary segmentation on the soil Raman spectrum compensation data to generate an initial peak-containing spectrum segment sequence; The initial peak-containing spectral segments whose adjacent intervals are less than a set distance threshold in the initial peak-containing spectral segment sequence are merged to generate multiple peak-containing spectral segments for pollutant identification of the soil sample to be tested.

5. The method according to claim 4, wherein Using the background baseline response interval as a segmentation anchor point, performing interval complementary segmentation on the soil Raman spectrum compensation data to generate an initial peak-containing spectrum segment sequence specifically includes: Determine the wavenumber position of the background baseline response interval in the soil Raman spectrum compensation data, and use the wavenumber position of the background baseline response interval as a segmentation anchor point; The spectral region of the soil Raman spectrum compensation data except the background baseline response interval is divided using the segmentation anchor point as a boundary to obtain a plurality of continuous spectral segments, and the plurality of continuous spectral segments are integrated into an initial peak-containing spectral segment sequence.

6. The method according to claim 1, wherein Determining the signal fidelity constraint of the soil Raman spectroscopy signal during smoothing iteration specifically includes: Identifying the wavenumber interval of significant characteristic peaks in the soil Raman spectroscopy signal; Calculating the characteristic peak signal intensity range in the wavenumber interval; Setting a signal fluctuation threshold according to the characteristic peak signal intensity range; A signal fidelity constraint for the soil Raman spectroscopy signal during smoothing iteration is constructed according to the characteristic peak signal intensity range and the signal fluctuation threshold.

7. The method according to claim 1, wherein The background of the soil Raman spectrum signal is removed according to all background baseline response intervals and local background baselines to obtain a clean characteristic spectrum of the soil sample after background removal, specifically comprising: All background baseline response intervals are spliced ​​with the corresponding local background baselines to form a global background baseline of the soil Raman spectral signal; The global background baseline is subtracted from the soil Raman spectrum signal to obtain a clean characteristic spectrum of the soil sample to be tested after the background is removed.

8. The method according to claim 1, wherein Obtaining the pollutant concentration of the soil sample to be tested according to the clean characteristic spectrum identification specifically includes the following steps, namely: Extracting the characteristic peak intensity of pollutants in the clean characteristic spectrum; The characteristic peak intensity is matched with a preset concentration mapping model, and the pollutant concentration of the soil sample to be tested is calculated using the concentration mapping model.

9. The method according to claim 1, wherein The soil Raman spectrum signal of the soil sample to be tested is collected by a Raman spectrometer.

10. A soil pollutant detection system, characterized in that: include: An acquisition module is used to acquire soil Raman spectrum signals of a soil sample to be tested, and perform continuous spectrum compensation in a target compensation area of ​​the soil Raman spectrum signals to obtain soil Raman spectrum compensation data; a processing module for identifying a background baseline response interval in the soil Raman spectrum compensation data by iterative differential analysis, and then extracting a plurality of peak-containing spectral segments for pollutant identification of the soil sample to be tested from the soil Raman spectrum compensation data based on the background baseline response interval; The processing module is further used to determine the signal fidelity constraint of the soil Raman spectrum signal when performing smoothing iteration; The processing module is further configured to perform background baseline smoothing iteration on each peak-containing spectral segment based on an incremental smoothing window in combination with the signal fidelity constraint to obtain a local background baseline corresponding to each peak-containing spectral segment, and then perform background removal on the soil Raman spectral signal based on all background baseline response intervals and the local background baseline to obtain a clean characteristic spectrum of the soil sample to be tested after background removal; The execution module is used to identify and obtain the pollutant concentration of the soil sample to be tested based on the clean characteristic spectrum.

Citation Information

Patent Citations

  • Characteristic peak extraction method for low signal-to-noise ratio ultraviolet Raman spectrum

    CN109993155A

  • Intelligent pollutant toxicity detection system

    CN117007577A

Cited By

  • Method and system for classifying light-absorbing impurities

    CN120992534A

  • A method and system for classifying light absorbing impurities

    CN120992534B