Water quality heavy metal pollution detection method and system based on Raman spectrum

By using micro-fiber probes and wavelet transform technology to separate noise in water quality heavy metal detection and dynamically enhance heavy metal characteristic peaks, combined with acoustic feature mappers and model calibration, the signal interference and environmental adaptability problems in water quality heavy metal detection are solved, and high-precision, real-time heavy metal concentration prediction is achieved.

CN120801278APending Publication Date: 2025-10-17GUIZHOU ACADEMY OF TESTING & ANALYSIS
View PDF 0 Cites 12 Cited by

Patent Information

Application Number
CN202511029565.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-25
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing Raman spectroscopy technology is subject to weak signals masked by water molecule interference peaks, poor probe environmental adaptability and lack of dynamic calibration mechanism in heavy metal detection in water quality, resulting in low recognition of heavy metal characteristic peaks and insufficient real-time prediction reliability.

Method used

Raman scattered light from water is collected in situ using a micro-fiber probe, and noise is separated by combining wavelet transform and adaptive threshold setting. The characteristic peaks of heavy metals are dynamically enhanced, and an acoustic feature mapper is used to generate cross-domain fusion feature vectors. Concentration prediction is performed using a pre-trained model, and model parameters are calibrated in real time to improve detection reliability.

Benefits of technology

It achieves high-precision, real-time detection of heavy metals in complex water quality environments, improves the signal-to-noise ratio and detection reliability, meets high-frequency sampling requirements, and reduces false alarm rates and computational load.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120801278A_ABST
    Figure CN120801278A_ABST
Patent Text Reader

Abstract

The invention discloses a water quality heavy metal pollution detection method and system based on Raman spectrum.The water quality heavy metal pollution detection method comprises the steps that water body Raman scattering light is collected in situ through a miniature optical fiber probe, and a continuous time sequence spectrum signal flow is generated; wavelet transform is combined with self-adaptive threshold setting, and high-frequency noise and effective spectral signals are separated; dynamically strengthening the characteristic peak of the target heavy metal through a frequency domain characteristic screening module, and inhibiting a water molecule interference peak at the same time; generating a cross-domain fusion feature vector; processing the fusion feature vector through a pre-trained heavy metal concentration prediction model, and outputting concentration prediction values of various heavy metals; a confidence score is dynamically calculated based on a deviation between a current predicted value and historical data distribution, and model parameter update and system calibration are automatically triggered. The method has the advantages that through acousto-optic signal cross-domain fusion and closed-loop self-calibration, the target peak is dynamically strengthened while water molecule interference is inhibited, and the real-time performance, the anti-interference performance and the prediction precision of heavy metal detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of water quality monitoring, in particular to a water quality heavy metal pollution detection method and system based on Raman spectrum. BACKGROUND

[0002] Water quality heavy metal pollution is a core problem that threatens the ecological environment and public health. Traditional laboratory detection methods (such as atomic absorption spectrometry, mass spectrometry) require sampling, pretreatment and offline analysis, which is time-consuming and cannot meet the real-time early warning needs of sudden pollution events. In recent years, Raman spectroscopy has been used for water quality detection due to its non-invasive and fingerprint identification advantages, but in practical applications, the strong O-H stretching vibration peak (3000-3800cm -1 ) of water molecules in water will mask the weak characteristic peaks of heavy metals (such as cadmium at 600-800cm -1 , lead at 1000-1200cm -1 ), especially when turbidity fluctuates, the interference is intensified; at the same time, the underwater probe is easily affected by biological attachment, temperature drift and depth pressure, resulting in a decrease in signal stability; and the Raman peaks of trace heavy metals are weak and easily overwhelmed by noise, making it difficult for existing fixed gain enhancement methods to dynamically distinguish between effective signals and background noise. SUMMARY

[0003] To solve the above technical problems, a water quality heavy metal pollution detection method and system based on Raman spectrum is provided, which solves the problem of low recognition of heavy metal characteristic peaks and insufficient real-time prediction reliability in in-situ detection due to interference peaks of water molecules masking weak signals, poor environmental adaptability of the probe and lack of dynamic calibration mechanism.

[0004] To achieve the above purpose, the technical scheme adopted by the present application is:

[0005] A water quality heavy metal pollution detection method and system based on Raman spectrum, comprising:

[0006] A micro optical fiber probe is used to collect Raman scattered light of water in-situ to generate a continuous time series spectrum signal stream, and the original signal is subjected to baseline drift correction and spectral normalization processing;

[0007] Wavelet transform is used in combination with adaptive threshold setting to separate high-frequency noise and effective spectral signals;

[0008] A frequency domain feature screening module is used to dynamically enhance the characteristic peaks of the target heavy metal and suppress the water molecule interference peaks, and the enhancement multiple is dynamically adjusted according to the similarity between the real-time signal and the characteristic fingerprint library;

[0009] The enhanced spectral signal and the simultaneously collected acoustic sensor data are input into an acoustic feature mapper to generate a cross-domain fusion feature vector;

[0010] The fusion feature vector is processed by the pre-trained heavy metal concentration prediction model to output concentration prediction values of multiple heavy metals;

[0011] The confidence score is dynamically calculated based on the deviation of the current prediction value and the historical data distribution;

[0012] When the confidence score is lower than the preset reliability threshold, or the error between the external verification data and the prediction value exceeds the acceptable range, the model parameter update and system calibration are automatically triggered;

[0013] The updated model parameters are fed back to the heavy metal concentration prediction model in real time to form a closed-loop optimization.

[0014] Preferably, the in-situ acquisition of water Raman scattering light by the micro optical fiber probe generates a continuous time series spectrum signal stream, which specifically includes:

[0015] An antibiofouling sapphire fiber probe with a diameter of less than or equal to 1 mm is used, and an aspheric micro lens is integrated at the end of the probe to focus the laser to a 0.5-1 mm 3 micro sampling point, and the lens surface is coated with a hydrophobic and oleophobic dual functional coating;

[0016] The Raman spectrum acquisition and the acoustic wave sensor are synchronously triggered at a frequency of 10-20 Hz, and the time series alignment of the spectrum signal and the acoustic wave signal is realized through hardware time stamping;

[0017] The probe is provided with a Peltier effect temperature control module to maintain the temperature at 25±0.5℃, and a titanium alloy waterproof shell and a micro ultrasonic self-cleaning mechanism are combined to form a self-adaptive 0-100 meter deep underwater environment and a biological attachment suppression strategy.

[0018] Preferably, the wavelet transform combined with adaptive threshold setting separates the high-frequency noise and the effective spectrum signal, which specifically includes:

[0019] The time series spectrum signal stream is decomposed into five layers using a sym5 wavelet basis to obtain wavelet coefficients of different scales;

[0020] An adaptive threshold is dynamically set based on the statistical characteristics of each layer of wavelet coefficients, wherein the threshold value of the high-frequency layer is set to 1.5 times the standard deviation of the coefficients, and the threshold value of the low-frequency layer is adjusted according to the kurtosis value to adjust the compression ratio. The statistical characteristics are standard deviation and kurtosis;

[0021] The high-frequency wavelet coefficients are processed by soft threshold filtering to retain the effective signal coefficients greater than the threshold value and suppress the noise coefficients less than the threshold value;

[0022] The filtered spectrum signal is reconstructed by wavelet inverse transform to generate a denoised effective spectrum signal stream.

[0023] Preferably, the characteristic peak of the target heavy metal is dynamically enhanced by the frequency domain feature screening module, while the water molecule interference peak is suppressed, specifically including:

[0024] The standard Raman characteristic peak position and peak shape parameter of a plurality of target heavy metals are stored, including but not limited to the characteristic peak interval 600-800 cm -1 of cadmium, the characteristic peak interval 1000-1200 cm -1 of lead, etc.

[0025] The O-H stretching vibration interference peak of water molecules in the interval 3000-3800 cm -1 is identified, and a band-stop filter is used for dynamic attenuation, and the attenuation amplitude is adjusted according to the real-time water quality turbidity, so that the higher the turbidity, the greater the attenuation amplitude.

[0026] The denoised spectral signal is subjected to fast Fourier transform, and the characteristic frequency band of the target heavy metal is extracted in the frequency domain.

[0027] The gain coefficient is calculated based on the similarity between the current spectral signal and the characteristic fingerprint library, when the similarity is greater than 90%, the gain coefficient is 3.0, when the similarity is less than or equal to 90%, the gain coefficient is 2.2+0.01×(similarity-70), and when the similarity is less than 70%, the gain coefficient is 1.5.

[0028] The gain coefficient is applied to the amplitude of the characteristic frequency band to generate an enhanced spectral signal.

[0029] Preferably, the enhancement multiple is dynamically adjusted according to the similarity between the real-time signal and the characteristic fingerprint library, specifically including:

[0030] The characteristic parameters of the real-time spectral signal in the target heavy metal characteristic peak interval are extracted, including peak intensity, peak position offset and peak width change rate.

[0031] The standard characteristic parameters of the corresponding heavy metal are searched from the characteristic fingerprint library, including the standard peak intensity, the standard peak position and the standard peak width.

[0032] The similarity score of the real-time characteristic parameters and the standard characteristic parameters is calculated, wherein the similarity score is obtained by a weighted Euclidean distance formula similarity=100-(w1×ΔI+w2×ΔP+w3×ΔW), wherein ΔI is the absolute difference value of the real-time intensity and the standard intensity, ΔP is the absolute difference value of the real-time position and the standard position, ΔW is the ratio deviation of the real-time peak width and the standard peak width, w1, w2, w3 are weight coefficients, and w1+w2+w3=1.

[0033] The similarity score is input into the gain coefficient calculation rule as a similarity percentage, and the enhancement multiple is dynamically adjusted.

[0034] Preferably, the step of inputting the enhanced spectral signal and the synchronously collected acoustic wave sensor data into an acoustic feature mapper to generate a cross-domain fusion feature vector specifically includes:

[0035] The energy distribution characteristics of the sound wave signal in the preset frequency band are extracted by wavelet packet transform, and the sound wave attenuation coefficient and sound pressure level fluctuation variance are calculated. The preset frequency band is 0.1–10 kHz.

[0036] Generate a three-dimensional acoustic eigenvector V based on energy distribution, attenuation coefficient, and sound pressure fluctuation variance a =[E f ,α a ,σ p ], where E f is the frequency band energy ratio, α a is the attenuation coefficient, σ p is the sound pressure level fluctuation variance;

[0037] The peak intensity Is and peak width Ws of the enhanced spectral signal in the target heavy metal characteristic peak interval are combined to form the spectral characteristic vector V s =[I s ,W s ];

[0038] According to the signal-to-noise ratio of the real-time spectral signal Fusion weight coefficients to generate cross-domain fusion feature vector V f =[λ×V s ,(1-λ)×V a ].

[0039] Preferably, the processing of the fused feature vectors by the pre-trained heavy metal concentration prediction model to output the predicted concentration values ​​of multiple heavy metals specifically includes:

[0040] Input the cross-domain fusion feature vector Vf into the pre-trained multi-task deep neural network model, which includes a fully connected layer and a parallel output layer;

[0041] Perform nonlinear mapping on Vf through the fully connected layer to extract high-order correlation features;

[0042] The parallel output layer generates independent concentration predictions of multiple heavy metals simultaneously, where each output channel corresponds to the concentration prediction of one heavy metal, and the output layer activation function is ReLU to ensure the non-negativity of the concentration;

[0043] The model training adopts the mean square error loss function and combines the Adam optimizer to perform end-to-end training on the historical spectral-acoustic fusion dataset until the prediction error converges.

[0044] Preferably, the dynamically calculating the confidence score based on the deviation between the current predicted value and the historical data distribution specifically includes:

[0045] extracting the current fusion feature vector V f corresponding to the multiple heavy metal concentration prediction values;

[0046] Retrieving the heavy metal concentration distribution dataset of the same type of water body from the historical database, calculating the concentration mean μ of each heavy metal i and the covariance matrix Σ;

[0047] The Mahalanobis distance formula is Calculate the deviation of the current prediction value and the historical distribution, where C is the current prediction concentration vector, μ is the historical concentration mean vector;

[0048] Based on the deviation value D, the S c =e -λD , dynamically generate the confidence score S c , where λ is the decay coefficient, the value range is 0.1~0.5, and D is the Mahalanobis distance calculation result;

[0049] Introducing temperature compensation factor α t Through S' C =S c ×[1-γ×|T real -25|] modified confidence score, where T_real is the real-time water temperature, γ is the temperature sensitivity coefficient (default value 0.02 / ℃), and 25℃ is the standard calibration temperature;

[0050] Map the modified confidence score S'c to the interval [0,1] as the final confidence output.

[0051] A water quality heavy metal pollution detection system based on Raman spectrum, comprising:

[0052] Collecting Raman scattering light of water in situ through a micro optical fiber probe, generating a continuous time series spectrum signal stream, and performing baseline drift correction and spectral normalization processing on the original signal, the signal acquisition and preprocessing module: using wavelet transform combined with adaptive threshold setting to separate high-frequency noise and effective spectrum signal;

[0053] Dynamic feature enhancement module, dynamically enhance the characteristic peak of the target heavy metal through the frequency domain feature screening module, while suppressing the water molecule interference peak, and the enhancement multiple is dynamically adjusted according to the similarity between the real-time signal and the characteristic fingerprint library;

[0054] Cross-domain fusion module, input the enhanced spectrum signal and the simultaneously collected acoustic sensor data into the acoustic feature mapper to generate a cross-domain fusion feature vector;

[0055] The intelligent prediction and closed-loop calibration module processes the fused feature vectors through the pre-trained heavy metal concentration prediction model, outputs the concentration prediction values ​​of multiple heavy metals, and dynamically calculates the confidence score based on the deviation between the current prediction value and the historical data distribution. When the confidence score is lower than the preset reliability threshold, or the error between the external verification data and the prediction value exceeds the acceptable range, the model parameter update and system calibration are automatically triggered. The updated model parameters are fed back to the heavy metal concentration prediction model in real time to form a closed-loop optimization.

[0056] Compared with the prior art, the present invention has the following beneficial effects:

[0057] The present invention proposes a method and system for detecting heavy metal pollution in water based on Raman spectroscopy, which utilizes the complementarity of acoustic physical parameters (such as sound wave attenuation reflecting turbidity and bubble distribution) and spectral chemical fingerprints (heavy metal characteristic peaks) to adaptively adjust the fusion weight through the signal-to-noise ratio (SNR). At high turbidity, the weight of acoustic features is increased to compensate for spectral interference; at low turbidity, spectral dominance is strengthened to accurately capture trace signals. This can break through the limitations of a single mode, improve the accuracy of distinguishing overlapping peaks of lead and cadmium, and at the same time improve real-time guarantees, shorten the time consumption of feature fusion, and meet the 20Hz high-frequency sampling requirements. In addition, resource optimization is performed so that acoustic data only requires a 3-dimensional vector, reducing the computational load.

[0058] This paper proposes a Raman spectroscopy-based method and system for detecting heavy metal contamination in water. This system integrates statistical distribution deviations (Mahalanobis distance) with physicochemical laws (the effect of temperature on heavy metal diffusion) to construct a dynamic reliability assessment model. When the confidence level falls below a threshold, the system uses the latest data to incrementally train a prediction model (a multi-task DNN), forming a closed "perception-assessment-optimization" loop. This allows for environmental adaptation, enabling temperature compensation to reduce false alarm rates in winter low-temperature scenarios. Continuous optimization allows closed-loop calibration to reduce the fluctuation range of model prediction errors. Furthermore, the system is resource-efficient, requiring only the storage of the historical distribution covariance matrix, with a memory footprint of less than 1MB. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 It is a schematic diagram of the process of the present invention;

[0060] Figure 2 This is a schematic diagram of the process of in-situ collecting Raman scattered light from water using a micro-fiber probe to generate a continuous time-series spectrum signal stream in the present invention;

[0061] Figure 3 This is a flow chart of the present invention's use of wavelet transform combined with adaptive threshold setting to separate high-frequency noise from effective spectral signals;

[0062] Figure 4A flowchart of the process of dynamically enhancing the characteristic peaks of the target heavy metal and simultaneously suppressing the interference peaks of water molecules in the frequency domain feature screening module in the application;

[0063] Figure 5 A flowchart of the process of dynamically adjusting the enhancement multiple according to the similarity between the real-time signal and the characteristic fingerprint library in the application;

[0064] Figure 6 A flowchart of the process of inputting the enhanced spectral signal and the simultaneously collected acoustic sensor data into the acoustic feature mapper to generate a cross-domain fusion feature vector in the application;

[0065] Figure 7 A flowchart of the process of processing the fusion feature vector by the pre-trained heavy metal concentration prediction model to output the concentration prediction values of multiple heavy metals in the application;

[0066] Figure 8 A flowchart of the process of dynamically calculating the confidence score based on the deviation between the current prediction value and the historical data distribution. DETAILED DESCRIPTION

[0067] The following description is used to disclose the application so that those skilled in the art can implement the application. The preferred embodiments in the following description are only used as examples, and other obvious modifications can be thought of by those skilled in the art.

[0068] REFERENCE Figure 1 As shown in the figure, a water quality heavy metal pollution detection method and system based on Raman spectrum includes:

[0069] The Raman scattering light of the water body is collected in situ by a micro optical fiber probe to generate a continuous time series spectral signal stream, and the original signal is subjected to baseline drift correction and spectral normalization processing;

[0070] Wavelet transform combined with adaptive threshold setting is used to separate high-frequency noise and effective spectral signal;

[0071] The frequency domain feature screening module dynamically enhances the characteristic peaks of the target heavy metal while suppressing the interference peaks of water molecules, and the enhancement multiple is dynamically adjusted according to the similarity between the real-time signal and the characteristic fingerprint library;

[0072] The enhanced spectral signal and the simultaneously collected acoustic sensor data are input into the acoustic feature mapper to generate a cross-domain fusion feature vector;

[0073] The fusion feature vector is processed by the pre-trained heavy metal concentration prediction model to output the concentration prediction values of multiple heavy metals;

[0074] The confidence score is dynamically calculated based on the deviation between the current prediction value and the historical data distribution;

[0075] When the confidence score is lower than a preset reliability threshold, or the error of the external verification data and the predicted value exceeds an acceptable range, automatic triggering of model parameter updating and system calibration;

[0076] The updated model parameters are fed back to the heavy metal concentration prediction model in real time to form a closed-loop optimization.

[0077] The micro probe samples at a constant temperature underwater, and simultaneously generates spectral and acoustic time series signals. A sapphire probe with a diameter of ≤1 mm is used, which integrates a hydrophobic and oleophobic coating, a constant temperature module (25±0.5℃), and an ultrasonic self-cleaning mechanism, and is suitable for 0-100 meters of water depth environment, improves long-term stability, and reduces maintenance frequency. Through baseline correction and normalization, environmental drift is eliminated, and noise is adaptively separated through wavelet transform. At this time, the high-frequency layer is set to a threshold of 1.5 times the standard deviation, and the low-frequency layer is dynamically compressed according to kurtosis. The signal-to-noise ratio is improved, and the band-stop filter adjusts the water peak attenuation amplitude according to the turbidity. Combined with the similarity of the characteristic fingerprint library (gain coefficient 2.2+0.01×(similarity-70) when similarity is 70-90%), the target peak intensity is adjusted, the water molecule interference suppression rate is improved, and the target peak signal-to-noise ratio is enhanced by 3-5 times.

[0078] The gain of the comparative characteristic fingerprint library is dynamically adjusted to suppress water molecule interference and strengthen the target peak. Acoustic data representing the physical state of the water body (such as bubbles and particulate matter) is weighted and fused with spectral characteristics, and then input into a neural network to output multi-metal concentration. Finally, the Mahalanobis distance of the historical distribution is used to quantify the prediction deviation, combined with water temperature compensation to improve the reliability of the score, and self-calibration is triggered in abnormal situations. During its use, acoustic features (0.1-10 kHz frequency band energy distribution, attenuation coefficient, acoustic pressure fluctuation variance) and spectral features are weighted and fused, and the weight λ is dynamically calculated based on the signal-to-noise ratio SNR (λ=SNR / (10+SNR)). In turbid water, the prediction error is reduced, and the discrimination accuracy of overlapping peaks such as lead and cadmium is improved. At the same time, the Mahalanobis distance is used to quantify the deviation of the predicted value from the historical distribution (Sc=e^(-λD), λ∈[0.1,0.5]), and a water temperature compensation factor is added (Sc'=Sc×[1-0.02×|T_real-25|]). The false positive rate is reduced, and when Sc' is lower than a threshold or the external verification is out of tolerance, the model parameters are updated in real time. The error fluctuation range of the system is reduced in continuous operation, and the maintenance cost is reduced.

[0079] Referring to Figure 2 The in-situ collection of water Raman scattering light by a micro optical fiber probe to generate a continuous time series of spectral signal streams specifically includes:

[0080] An antibiofouling sapphire optical fiber probe with a diameter of ≤1 mm is used, and a non-spherical micro lens is integrated at the end of the probe to focus the laser to 0.5-1 mm 3Micro sampling point, and the lens surface is coated with a hydrophobic-oleophobic dual functional coating;

[0081] Synchronously trigger Raman spectrum acquisition and acoustic sensor with 10-20Hz frequency, and realize time sequence alignment of spectrum signal and acoustic signal through hardware time stamp;

[0082] The temperature of the probe is maintained at 25±0.5℃ by the built-in Peltier effect temperature control module, and the titanium alloy waterproof shell and the miniature ultrasonic self-cleaning mechanism are combined to form a self-adaptive 0-100 meter deep underwater environment and inhibit biological attachment strategy.

[0083] A sapphire fiber probe with a diameter of ≤1mm is used, and a non-spherical micro lens (curvature optimized by optics) is integrated at the end to focus the laser to 0.5-1mm 3 Micro sampling point, and the lens surface is coated with a hydrophobic-oleophobic dual functional coating (such as fluorosilane composite material), and a nanoscale anti-adhesion layer is formed by chemical vapor deposition process, in addition, the probe body adopts a titanium alloy waterproof shell, and a Peltier temperature control module (semiconductor refrigerating sheet) and a miniature piezoelectric ceramic ultrasonic generator are nested inside, and an O-shaped sealing ring is used at the cable interface after overall packaging. After the probe is immersed in water, the laser is transmitted to the micro lens for focusing, the Raman scattering light of the micro area of the water body is excited, and the scattered light is returned to the spectrometer by the coaxial optical fiber.

[0084] A high-precision quartz crystal oscillator is built-in to generate 10-20Hz pulse signals to synchronously drive the Raman spectrometer CCD exposure and acoustic sensor (such as piezoelectric hydrophone) acquisition, and a hardware time stamp (nanosecond level precision) is embedded through an FPGA chip to mark the absolute time stamp of the spectrum and acoustic signal in the data stream. During its use, the timing controller synchronously triggers the Raman CCD and acoustic sensor, and the hardware time stamp ensures that the spectrum signal stream and acoustic vibration data are strictly aligned. The Peltier module is in close contact with the probe optical window, and the current direction is controlled by a PID algorithm closed loop to maintain the sampling area at a constant temperature of 25±0.5℃ (temperature sensor feedback to the control unit). The ultrasonic generator (frequency ≥40kHz) periodically excites the cavitation effect on the surface of the titanium alloy shell to peel off the attached biofilm. During its use, the temperature control module adjusts the probe temperature in real time to offset the temperature difference caused by water depth, and the ultrasonic cleaning is started every 30 minutes (for 10 seconds) to inhibit the biological attachment on the surface of the probe. The constant temperature micro sampling avoids thermal noise interference, the time sequence aligned acoustic-optical fusion data enhances the reliability of feature extraction, and the self-adaptive cleaning and anti-pollution design reduces the frequency of underwater maintenance, which is suitable for long-term in-situ monitoring.

[0085] Referring to Figure 3 The wavelet transform combined with adaptive threshold setting separates high-frequency noise and effective spectrum signal, and the method comprises the following steps:

[0086] The time series spectral signal stream is decomposed into five layers using a sym5 wavelet basis to obtain wavelet coefficients of different scales.

[0087] An adaptive threshold is dynamically set based on the statistical properties of each layer of wavelet coefficients, with the threshold for high-frequency layers set to 1.5 times the standard deviation of the coefficients, and the threshold for low-frequency layers adjusted according to the kurtosis value to adjust the compression ratio, with the statistical properties being the standard deviation and kurtosis.

[0088] The high-frequency wavelet coefficients are processed using soft threshold filtering to retain valid signal coefficients greater than the threshold and suppress noise coefficients less than the threshold.

[0089] The filtered spectral signal is reconstructed by inverse wavelet transform to generate a denoised effective spectral signal stream.

[0090] First, the continuous time series spectral signal stream is decomposed into five layers using a sym5 wavelet basis, which is implemented in the signal processing module through a discrete wavelet transform algorithm. The specific setup is as follows: the input signal is processed by a wavelet filter bank to decompose it into sub-band signals of different scales, including one layer of low-frequency approximation coefficients (cA5) and five layers of high-frequency detail coefficients (cD1 to cD5). After decomposition, an adaptive threshold is dynamically set based on the statistical properties (i.e., standard deviation and kurtosis) of each layer of coefficients: for high-frequency detail coefficient layers (cD1-cD3), the threshold is set to 1.5 times the standard deviation of the coefficients to specifically suppress random noise; for low-frequency approximation coefficient layers (cA5 and cD4-D5), the threshold is adjusted according to the kurtosis value to adjust the compression ratio, for example, when the kurtosis value is higher than 3 (indicating a sharp signal distribution containing more effective components), the compression ratio is smaller (the threshold is lower) to retain more low-frequency signals; when the kurtosis value is lower than 3 (indicating a flat distribution dominated by noise), the compression ratio is larger (the threshold is higher) to avoid signal distortion. Subsequently, soft threshold filtering is performed on the high-frequency wavelet coefficients: the part of the coefficients with an absolute value greater than the threshold is retained and subtracted from the threshold (the soft threshold function is sign(c)*max(|c|-T,0), where c is the coefficient and T is the threshold), while the coefficients less than the threshold are suppressed to zero. Finally, the filtered coefficients are reconstructed by inverse transform of the sym5 wavelet basis to generate a denoised effective spectral signal stream.

[0091] The five-layer decomposition structure of the fixed sym5 wavelet base can simplify the algorithm implementation and avoid the uncertainty of manually selecting the wavelet type and the number of layers in the traditional method. In terms of threshold setting, the adaptive mechanism combines the dual statistical characteristics of standard deviation and kurtosis to dynamically distinguish noise and signal (for example, the 1.5 times standard deviation threshold of high-frequency noise strengthens noise suppression, and the low-frequency kurtosis adjustment protects the effective components), which improves the noise suppression rate and reduces the signal distortion rate compared with the existing fixed threshold method (such as using Donoho threshold uniformly). In the implementation process, the soft threshold filtering and reconstruction ensure the smoothness and integrity of the signal, solving the signal breakage problem caused by the hard threshold method. Overall, the signal-to-noise ratio is improved on average in complex water quality environments (such as high turbidity or dynamic pollution sources), providing purer input data for the subsequent feature enhancement and fusion module.

[0092] Referring to Figure 4 The dynamic enhancement of the characteristic peak of the target heavy metal and the suppression of the water molecule interference peak by the frequency domain feature screening module specifically includes:

[0093] The standard Raman characteristic peak position and peak shape parameter of a plurality of target heavy metals are stored, including but not limited to the characteristic peak interval 600-800 cm -1 of cadmium and the characteristic peak interval 1000-1200 cm -1 of lead.

[0094] The O-H stretching vibration interference peak of the water molecule in the interval 3000-3800 cm -1 is identified and dynamically attenuated by a band-stop filter. The attenuation amplitude is adjusted according to the real-time water quality turbidity, so that the higher the turbidity, the greater the attenuation amplitude.

[0095] The denoised spectral signal is subjected to fast Fourier transform, and the characteristic frequency band of the target heavy metal is extracted in the frequency domain.

[0096] The gain coefficient is calculated based on the similarity of the current spectral signal and the characteristic fingerprint library. When the similarity is greater than 90%, the gain coefficient is 3.0; when the similarity is less than or equal to 90%, the gain coefficient is 2.2+0.01×(similarity-70); and when the similarity is less than 70%, the gain coefficient is 1.5.

[0097] The gain coefficient is applied to the amplitude of the characteristic frequency band to generate an enhanced spectral signal.

[0098] The standard Raman characteristic peak parameters of the target heavy metal (such as cadmium and lead) are stored in advance, including: the accurate characteristic peak interval of cadmium is 600-800 cm -1 (such as the Cd-S bond stretching vibration peak at 650 cm -1 ), and the characteristic peak interval of lead is 1000-1200 cm -1 (such as the 1040 cm-1 Peak shape parameters include half-peak width, peak height ratio, etc. Real-time identification of 3000-3800 cm -1 O-H stretching vibration interference peaks (typical peak position 3400 cm -1 )

[0099] The mapping relationship between the attenuation amplitude A and the turbidity T is A (%) = k x T (k is the turbidity sensitivity coefficient, default 0.15 / NTU), and the filter stop width (default ±50 cm -1 ) and the attenuation depth are adjusted in real time by FPGA, and the denoising signal is subjected to fast Fourier transform (FFT), the window function is Blackman-Harris, the characteristic frequency band of the target heavy metal (such as cadmium: 650±20 cm -1 ) is extracted in the frequency domain, and the frequency domain amplitude spectrum vector is generated

[0100] The similarity S between the real-time spectrum and the fingerprint library is calculated (based on the peak intensity difference + peak position offset), and the gain coefficient G is assigned in sections: S>90%→G=3.0 (strong pollution scene); 70%≤S≤90%→G=2.2+0.01 x (S-70) (transition scene); S<70%→G=1.5 (background interference scene). The gain is applied to the characteristic frequency band amplitude: The time domain reinforcement spectrum signal is reconstructed by inverse FFT.

[0101] The turbidity is dynamically adjusted by the band-stop filter (such as 80% attenuation at high turbidity), so that the water peak suppression efficiency is improved (test data: interference intensity is reduced to less than 5% when the turbidity is 100 NTU). At the same time, based on the non-linear gain mechanism of similarity: 3 times reinforcement of the target peak when the similarity is high (such as lead pollution outbreak); adaptive gain when the similarity is medium (such as 2.2-3.0 gradual change); conservative gain (maintain 1.5 times the reference) when the similarity is low. The test shows that this strategy improves the signal-to-noise ratio of the cadmium characteristic peak. The frequency domain processing combined with the FFT algorithm (complexity O(Nlog N)) speeds up compared with the time domain convolution method, and meets the 20Hz real-time processing demand (single frame processing time <25ms). Through the "frequency domain band-stop + characteristic frequency band selective gain" double mechanism, the lead characteristic peak recognition accuracy is improved in the mixed pollution water body.

[0102] Referring to Figure 5 , the enhancement multiple is dynamically adjusted according to the similarity between the real-time signal and the characteristic fingerprint library, which specifically includes:

[0103] The characteristic parameters of the real-time spectrum signal in the target heavy metal characteristic peak interval are extracted, including peak intensity, peak position offset and peak width change rate.

[0104] Retrieve standard characteristic parameters corresponding to heavy metals from the characteristic fingerprint library, including standard peak intensity, standard peak position and standard peak width;

[0105] Calculate the similarity score between the real-time feature parameters and the standard feature parameters, where the similarity score is obtained by the weighted Euclidean distance formula: similarity = 100-(w1×ΔI+w2×ΔP+w3×ΔW), where ΔI is the normalized absolute difference between the real-time intensity and the standard intensity, ΔP is the absolute difference between the real-time position and the standard position, ΔW is the ratio deviation between the real-time peak width and the standard peak width, w1, w2, and w3 are weight coefficients, and w1+w2+w3=1;

[0106] The similarity score is used as a similarity percentage, and the gain coefficient calculation rule is input to dynamically adjust the enhancement multiple.

[0107] The system uses the spectral signal processing module to capture the target heavy metal characteristic peak range (such as cadmium: 600–800 cm -1 , lead: 1000–1200 cm -1 ) and extract the following dynamic parameters: peak intensity (ratio of real-time intensity to baseline noise); peak position offset (absolute difference between real-time peak position and standard peak position, unit: cm -1 ); Peak width change rate (the ratio deviation between the real-time half-peak width and the standard half-peak width). Parameter extraction uses a sliding window algorithm to synchronously update the data stream at a sampling frequency of 10-20Hz. The standard characteristic parameters of the corresponding heavy metals can be called from the pre-stored fingerprint library, including: standard peak intensity (reference value calibrated by the laboratory); standard peak position (such as 650cm for cadmium); -1 、1040cm of lead -1 ); standard peak width (half-peak width reference value). The fingerprint library is then generated through training of historical polluted water samples, covering a variety of heavy metals and their compound forms. Secondly, the real-time parameters and standard parameters are calculated according to the formula for similarity scores, and the similarity percentage is output. Finally, the similarity percentage is input into the gain coefficient rule of claim 4: similarity>90%→gain coefficient=3.0; 70%≤similarity≤90%→gain coefficient=2.2+0.01×(similarity-70); similarity<70%→gain coefficient=1.5. The gain coefficient acts on the amplitude of the characteristic frequency band of the target heavy metal to generate an enhanced spectral signal in real time.

[0108] The dynamic gain driven by similarity can be conservatively enhanced (1.5 times) at low similarity (<70%) to avoid noise amplification; aggressively enhanced (3.0 times) at high similarity (>90%), significantly improving the target peak signal-to-noise ratio (the measured cadmium characteristic peak signal-to-noise ratio increased by 3-5 times). Combined with a band-stop filter (dynamic attenuation 3000-3800cm -1The gain adjustment module further weakens the masking effect of water molecules. When the turbidity increases, the interference attenuation amplitude increases synchronously (attenuation rate A (%) = 0.15 x turbidity value), and the target peak gain is adaptively increased with the similarity, so that the water molecule interference suppression rate is improved. At the same time, the whole process calculation time is less than 20 ms (10-20 Hz sampling rate), which meets the in-situ detection requirements. The normalization design of the weight coefficient avoids the error caused by the scale difference of the parameters, and reduces the false positive rate of the traditional fixed threshold method in the dynamic pollution source scene.

[0109] Referring to Figure 6 The enhanced spectral signal and the synchronously collected acoustic sensor data are input into an acoustic feature mapper to generate a cross-domain fusion feature vector, and the acoustic feature mapper includes:

[0110] The energy distribution characteristics of the acoustic signal in a preset frequency band are extracted by wavelet packet transform, and the acoustic attenuation coefficient and the sound pressure level fluctuation variance are calculated, and the preset frequency band is 0.1-10 kHz;

[0111] A three-dimensional acoustic feature vector V a is generated based on the energy distribution, the attenuation coefficient and the sound pressure fluctuation variance f , α a , σ p ], wherein E f is the energy ratio of the frequency band, α a is the attenuation coefficient, and σ p is the sound pressure level fluctuation variance;

[0112] The peak intensity Is and the peak width Ws of the enhanced spectral signal in the target heavy metal feature peak interval are combined to form a spectral feature vector V s = [I s , W s ];

[0113] According to the signal-to-noise ratio of the real-time spectral signal, the fusion weight coefficient is The cross-domain fusion feature vector V f = [λ x V s , (1-λ) x V a ] is generated.

[0114] First, the wavelet packet transform algorithm is used to process the acoustic signal: the preset frequency band is 0.1-10 kHz, the acoustic signal is decomposed into multiple sub-bands, the energy ratio (E f ) of each frequency band is calculated as the energy distribution characteristic; at the same time, based on the attenuation model of the acoustic wave in the propagation process, the acoustic attenuation coefficient (α a ) is calculated, and the variance (σ p ) of the sound pressure level fluctuation data is obtained through statistical analysis. These characteristic parameters form a three-dimensional acoustic feature vector Va = [E f , a a , s p ]. In the implementation process, the synchronous acquisition of the acoustic wave sensor data is ensured to be time-aligned with the spectral signal by a hardware timestamp, avoiding asynchronous errors; subsequently, the enhanced spectral signal (processed by the frequency domain feature screening module) extracts the peak intensity (I -1 ) and peak width (W s ) in the target heavy metal characteristic peak interval (such as 600-800 cm-1 for cadmium or 1000-1200 cm-1 for lead s ), constituting the spectral feature vector V s = [I s , W s ]. The fusion weight coefficient l is dynamically calculated according to the signal-to-noise ratio (SNR) of the real-time spectral signal, and the formula is l = SNR / (10 + SNR), which ensures that the spectral features are more dependent when the signal-to-noise ratio is high, and the acoustic features are more dependent when the signal-to-noise ratio is low. Finally, the cross-domain fusion feature vector is generated by weighted combination, that is, V f = [l * V s , (1-l) * V a ], which is input to the subsequent heavy metal concentration prediction model.

[0115] That is, the acoustic wave data (such as energy distribution and attenuation coefficient) can be introduced through the acoustic feature mapper, which can effectively represent the physical state of the water body (such as bubble, particulate matter distribution), and compensate for the deficiency of the spectral signal. For example, when the signal-to-noise ratio is low, the weight coefficient adaptively reduces the spectral contribution and increases the weight of the acoustic data, thereby reducing the prediction error in turbid water and improving the accuracy of distinguishing overlapping peaks of heavy metals such as lead, cadmium, and cadmium. In addition, the pre-set frequency band (0.1-10 kHz) of wavelet packet transform optimizes the feature extraction range, combined with the dynamic weight mechanism, which improves the detection reliability and real-time performance. The measured results show that the fusion feature vector enhances the stability of the model in complex environments and reduces the false alarm rate.

[0116] Referring to Figure 7 , the processing of the fusion feature vector by the pre-trained heavy metal concentration prediction model outputs the concentration prediction values of multiple heavy metals, specifically including:

[0117] The cross-domain fusion feature vector Vf is input into the pre-trained multi-task deep neural network model, which includes a fully connected layer and a parallel output layer;

[0118] The Vf is nonlinearly mapped by the fully connected layer to extract high-order correlation features;

[0119] The parallel output layer generates independent concentration predictions of multiple heavy metals simultaneously, where each output channel corresponds to the concentration prediction of one heavy metal, and the output layer activation function is ReLU to ensure the non-negativity of the concentration;

[0120] The model training adopts the mean square error loss function and combines the Adam optimizer to perform end-to-end training on the historical spectral-acoustic fusion dataset until the prediction error converges.

[0121] The training is performed using a historical spectral-acoustic fusion dataset, which contains the cross-domain fusion feature vector Vf and the corresponding real labels of heavy metal concentrations. The dataset is divided into training set, validation set, and test set according to the ratio of 7:2:1. The mean square error (MSE) can be used as the loss function to calculate the deviation between the predicted concentration and the true value. Where N is the number of samples, y pred is the model output, y true The concentration is the measured concentration. Gradient updates were performed using the Adam optimizer (initial learning rate 0.001, β1 = 0.9, β2 = 0.999), combined with a learning rate decay strategy (decaying to 90% of the original value every 20 epochs). Training was terminated when the validation set loss did not decrease for five consecutive epochs or when the total number of training epochs reached 200. The model parameters with the lowest validation set error were saved.

[0122] The parallel output layer can be used to simultaneously predict the concentrations of multiple heavy metals, reducing the inference time and meeting the real-time monitoring needs. At the same time, the ReLU function forces the concentration prediction value to be ≥ 0 to avoid negative outputs with unreasonable physical meaning (such as the lead concentration prediction of -0.1 mg / L). f The model directly learns the nonlinear relationship between spectral and acoustic features and heavy metal concentrations through end-to-end mapping. On the same dataset, the MT-DNN achieved a root mean square error (RMSE) of 0.08, significantly lower than the cascaded model (RMSE = 0.21). The accuracy of low-level cadmium detection (<0.01 mg / L) was particularly improved. Furthermore, the Adam optimizer, combined with dynamic learning rate adjustment, enabled the model to converge within 50 epochs (compared to 120 epochs for traditional SGD), improving training efficiency and reducing sensitivity to initial parameters.

[0123] Reference Figure 8 As shown, the dynamic calculation of the confidence score based on the deviation between the current predicted value and the historical data distribution specifically includes:

[0124] Extract the current fusion feature vector V f Corresponding predicted values ​​of various heavy metal concentrations;

[0125] Retrieve the heavy metal concentration distribution data set of the same type of water from the historical database and calculate the mean concentration μ of each heavy metal i and the covariance matrix Σ;

[0126] The deviation of the current prediction value from the historical distribution is calculated by the Mahalanobis distance formula , where C is the current prediction concentration vector, and μ is the historical concentration mean vector;

[0127] The deviation value D is based on S c = e -λD , and the confidence score S c is dynamically generated t , where λ is the decay coefficient, with a value range of 0.1-0.5, and D is the Mahalanobis distance calculation result;

[0128] A temperature compensation factor α C is introduced c , and the confidence score is modified by S' real = S f × [1- γ × |T n - 25|], where T_real is the real-time water temperature, γ is the temperature sensitivity coefficient (default value 0.02 / ℃), and 25℃ is the standard calibration temperature;

[0129] The modified confidence score S'c is mapped to the interval [0,1] as the final confidence output.

[0130] The concentration prediction value C = [C1, C2, …, C T ] of the current heavy metal (such as lead, cadmium, etc.) is parsed from the cross-domain fusion feature vector V n . According to the water type (such as industrial wastewater, lake, groundwater), the historical concentration dataset of the same type of water body is called to calculate the mean vector μ = [μ1, μ2, …, μ T ] and the covariance matrix Σ (covering the concentration correlation between elements) of each heavy metal concentration. The deviation D of the prediction value from the historical distribution can be calculated by the formula . The water temperature T real can be collected in real time, the confidence is modified by the compensation formula, and the modified score is constrained to the interval [0,1] by linear mapping as the final confidence output.

[0131] Based on the historical data of the same type of water body, the deviation is calculated to avoid false judgments caused by fixed thresholds, and the temperature compensation mechanism solves the influence of water temperature changes on heavy metal diffusion characteristics, reducing the false positive rate. At the same time, when the confidence S'c < 0.7 (preset threshold), the model calibration is automatically triggered, forming a "prediction-evaluation-calibration" closed loop. The closed loop system can reduce the prediction error fluctuation range and reduce the maintenance frequency. The heavy metal concentration correlation (such as lead-cadmium synergistic effect) is quantified, and compared with the single element deviation statistics of document 11, the evaluation accuracy of compound pollution is improved.

[0132] A water quality heavy metal pollution detection system based on Raman spectrum, comprising:

[0133] The micro optical fiber probe in-situ collects Raman scattering light of the water body, generates a continuous time sequence spectrum signal stream, and performs baseline drift correction and spectrum normalization processing on the original signal, the signal acquisition and preprocessing module: adopts wavelet transform combined with adaptive threshold setting to separate high-frequency noise and effective spectrum signal;

[0134] The dynamic feature enhancement module dynamically enhances the characteristic peaks of the target heavy metal through the frequency domain feature screening module, while suppressing the water molecule interference peaks, and the enhancement multiple is dynamically adjusted according to the similarity of the real-time signal and the characteristic fingerprint library;

[0135] The cross-domain fusion module inputs the enhanced spectrum signal and the simultaneously collected acoustic sensor data into an acoustic feature mapper to generate a cross-domain fusion feature vector;

[0136] The intelligent prediction and closed-loop calibration module processes the fusion feature vector through a pre-trained heavy metal concentration prediction model, outputs the concentration prediction values of multiple heavy metals, dynamically calculates the confidence score based on the deviation of the current prediction value and the historical data distribution, and automatically triggers model parameter updating and system calibration when the confidence score is lower than the preset reliability threshold or the error between the external verification data and the prediction value exceeds the acceptable range, and the updated model parameters are fed back to the heavy metal concentration prediction model to form a closed-loop optimization.

[0137] In summary, the advantages of the present application are:

[0138] The basic principles, main features and advantages of the present application are shown and described above. It should be understood by those skilled in the art that the present application is not limited by the above examples, and the above examples and descriptions in the specification are only the principles of the present application. Without departing from the spirit and scope of the present application, various changes and improvements can be made to the present application, and these changes and improvements all fall within the scope of the claimed present application. The scope of protection claimed by the present application is defined by the appended claims and their equivalents.

Claims

1. A method for detecting heavy metal pollution in water based on Raman spectroscopy, characterized in that: include: The Raman scattered light from water is collected in situ by a micro-fiber probe to generate a continuous time-series spectral signal stream, and the baseline drift correction and spectral normalization processing are performed on the original signal. Wavelet transform combined with adaptive threshold setting is used to separate high-frequency noise and effective spectral signals; The frequency domain feature screening module dynamically enhances the characteristic peaks of target heavy metals while suppressing the interference peaks of water molecules. The enhancement factor is dynamically adjusted according to the similarity between the real-time signal and the feature fingerprint library. The enhanced spectral signal and the synchronously collected acoustic sensor data are input into the acoustic feature mapper to generate a cross-domain fusion feature vector; The pre-trained heavy metal concentration prediction model is used to process the fused feature vectors and output the predicted concentration values ​​of multiple heavy metals; Dynamically calculate confidence scores based on the deviation of the current forecast value from the historical data distribution; When the confidence score is lower than the preset reliability threshold, or the error between the external validation data and the predicted value exceeds the acceptable range, the model parameter update and system calibration are automatically triggered; The updated model parameters are fed back to the heavy metal concentration prediction model in real time to form a closed-loop optimization.

2. The method for detecting heavy metal pollution in water based on Raman spectroscopy according to claim 1, characterized in that: The in-situ collection of water Raman scattered light by a micro-fiber probe to generate a continuous time-series spectrum signal stream specifically includes: A bio-contamination-resistant sapphire fiber optic probe with a diameter of less than or equal to 1 mm is used. An aspheric micro-lens is integrated at the end of the probe to focus the laser to 0.5-1 mm. 3 The lens surface is coated with a hydrophobic-oleophobic dual-functional coating; The Raman spectrum acquisition and acoustic wave sensor are triggered synchronously at a frequency of 10-20 Hz, and the timing of the spectrum signal and the acoustic wave signal are aligned through hardware timestamps; The probe has a built-in Peltier effect temperature control module to maintain the temperature at 25±0.5℃. Combined with a titanium alloy waterproof shell and a micro-ultrasonic self-cleaning mechanism, it forms an adaptive 0-100m underwater environment and a strategy to inhibit biological attachment.

3. The method for detecting heavy metal pollution in water based on Raman spectroscopy according to claim 2, characterized in that: The method of using wavelet transform combined with adaptive threshold setting to separate high-frequency noise from effective spectral signals specifically includes: The sym5 wavelet basis is used to perform a five-layer decomposition of the time series spectral signal stream to obtain wavelet coefficients of different scales; The adaptive threshold is dynamically set based on the statistical characteristics of each layer of wavelet coefficients. The high-frequency layer threshold is set to 1.5 times the standard deviation of the coefficient, and the low-frequency layer threshold adjusts the compression ratio according to the kurtosis value. The statistical characteristics are standard deviation and kurtosis. Perform soft threshold filtering on high-frequency wavelet coefficients, retaining effective signal coefficients greater than the threshold and suppressing noise coefficients less than the threshold; The filtered spectral signal is reconstructed through inverse wavelet transform to generate a denoised effective spectral signal stream.

4. The method for detecting heavy metal pollution in water based on Raman spectroscopy according to claim 3, characterized in that: The method of dynamically enhancing the characteristic peaks of target heavy metals by the frequency domain feature screening module and suppressing the interference peaks of water molecules specifically includes: Stores the standard Raman characteristic peak positions and peak shape parameters of various target heavy metals, including but not limited to the characteristic peak range of cadmium (600-800 cm) -1 , the characteristic peak range of lead is 1000-1200cm -1 ; Identify water molecules at 3000-3800 cm -1 The OH stretching vibration interference peak in the interval is dynamically attenuated by a band-stop filter. The attenuation amplitude is adjusted according to the real-time water turbidity, so that the higher the turbidity, the greater the attenuation amplitude; Perform fast Fourier transform on the denoised spectral signal to extract the characteristic frequency band of the target heavy metal in the frequency domain; The gain coefficient is calculated based on the similarity between the current spectral signal and the feature fingerprint library. When the similarity is greater than 90%, the gain coefficient is 3.

0. When the similarity is less than or equal to 70%, the gain coefficient is 2.2 + 0.01 × (similarity - 70). When the similarity is less than 70%, the gain coefficient is 1.

5. The gain coefficient is applied to the characteristic frequency band amplitude to generate an enhanced spectral signal.

5. The method for detecting heavy metal pollution in water based on Raman spectroscopy according to claim 4, characterized in that: The enhancement factor is dynamically adjusted according to the similarity between the real-time signal and the feature fingerprint library, specifically including: Extract characteristic parameters of real-time spectral signals within the target heavy metal characteristic peak range, including peak intensity, peak position offset, and peak width change rate; Retrieve standard characteristic parameters corresponding to heavy metals from the characteristic fingerprint library, including standard peak intensity, standard peak position and standard peak width; Calculate the similarity score between the real-time feature parameters and the standard feature parameters, where the similarity score is obtained by the weighted Euclidean distance formula: similarity = 100-(w1×ΔI+w2×ΔP+w3×ΔW), where ΔI is the normalized absolute difference between the real-time intensity and the standard intensity, ΔP is the absolute difference between the real-time position and the standard position, ΔW is the ratio deviation between the real-time peak width and the standard peak width, w1, w2, and w3 are weight coefficients, and w1+w2+w3=1; The similarity score is used as a similarity percentage, and the gain coefficient calculation rule is input to dynamically adjust the enhancement multiple.

6. The method for detecting heavy metal pollution in water based on Raman spectroscopy according to claim 5, characterized in that: The step of inputting the enhanced spectral signal and the synchronously collected acoustic wave sensor data into the acoustic feature mapper to generate a cross-domain fusion feature vector specifically includes: The energy distribution characteristics of the sound wave signal in the preset frequency band are extracted through wavelet packet transform, and the sound wave attenuation coefficient and sound pressure level fluctuation variance are calculated. The preset frequency band is 0.1–10 kHz. Generate a three-dimensional acoustic eigenvector V based on energy distribution, attenuation coefficient, and sound pressure fluctuation variance a =[E f ,α a ,σ p ], where E f is the frequency band energy ratio, α a is the attenuation coefficient, σ p is the sound pressure level fluctuation variance; The peak intensity Is and peak width Ws of the enhanced spectral signal in the target heavy metal characteristic peak interval are combined to form the spectral characteristic vector V s =[I s ,W s ]; According to the signal-to-noise ratio of the real-time spectral signal Fusion weight coefficients to generate cross-domain fusion feature vector V f =[λ×V s ,(1-λ)×V a ].

7. The method and system for detecting heavy metal pollution in water based on Raman spectroscopy according to claim 6, characterized in that: The processing of the fused feature vectors by the pre-trained heavy metal concentration prediction model to output the predicted concentration values ​​of multiple heavy metals specifically includes: Input the cross-domain fusion feature vector Vf into the pre-trained multi-task deep neural network model, which includes a fully connected layer and a parallel output layer; Perform nonlinear mapping on Vf through the fully connected layer to extract high-order correlation features; The parallel output layer generates independent concentration predictions of multiple heavy metals simultaneously, where each output channel corresponds to the concentration prediction of one heavy metal, and the output layer activation function is ReLU to ensure the non-negativity of the concentration; The model training adopts the mean square error loss function and combines the Adam optimizer to perform end-to-end training on the historical spectral-acoustic fusion dataset until the prediction error converges.

8. The method and system for detecting heavy metal pollution in water based on Raman spectroscopy according to claim 7, characterized in that: The dynamic calculation of the confidence score based on the deviation between the current predicted value and the historical data distribution specifically includes: Extract the current fusion feature vector V f Corresponding predicted values ​​of various heavy metal concentrations; Retrieve the heavy metal concentration distribution data set of the same type of water from the historical database and calculate the mean concentration μ of each heavy metal i and the covariance matrix Σ; The Mahalanobis distance formula is used to Calculate the deviation between the current predicted value and the historical distribution, where C is the current predicted concentration vector and μ is the historical concentration mean vector; Based on the deviation value D through S c =e -λD , dynamically generate confidence score S c , where λ is the attenuation coefficient, ranging from 0.1 to 0.5, and D is the result of Mahalanobis distance calculation; Introducing temperature compensation factor α t Through S′ C =S c ×[1-γ×|T real -25|] corrected confidence score, where T_real is the real-time water temperature, γ is the temperature sensitivity coefficient (default value 0.02 / °C), and 25°C is the standard calibration temperature; The corrected confidence score S'c is mapped to the interval [0,1] as the final confidence output.

9. A water quality heavy metal pollution detection system based on Raman spectroscopy, comprising: The Raman scattered light from water is collected in situ using a micro-fiber probe to generate a continuous time-series spectral signal stream. The original signal is then subjected to baseline drift correction and spectral normalization. The signal acquisition and preprocessing module uses wavelet transform combined with adaptive threshold setting to separate high-frequency noise from effective spectral signals. Dynamic feature enhancement module, which dynamically enhances the characteristic peaks of target heavy metals through the frequency domain feature screening module, while suppressing the interference peaks of water molecules. The enhancement factor is dynamically adjusted according to the similarity between the real-time signal and the feature fingerprint library; The cross-domain fusion module inputs the enhanced spectral signal and the synchronously collected acoustic sensor data into the acoustic feature mapper to generate a cross-domain fusion feature vector; The intelligent prediction and closed-loop calibration module processes the fused feature vectors through the pre-trained heavy metal concentration prediction model, outputs the concentration prediction values ​​of multiple heavy metals, and dynamically calculates the confidence score based on the deviation between the current prediction value and the historical data distribution. When the confidence score is lower than the preset reliability threshold, or the error between the external verification data and the prediction value exceeds the acceptable range, the model parameter update and system calibration are automatically triggered. The updated model parameters are fed back to the heavy metal concentration prediction model in real time to form a closed-loop optimization.

Citation Information

Cited By

  • Quartz sand proppant turbidity online detection method based on laser scattering

    CN121231430A

  • Swimming pool water quality detection method and system based on optical sensing

    CN121409896A

  • Laser matrix bombardment water quality detection method and system based on multi-pulse fusion algorithm

    CN121482000A

  • Laser matrix bombardment water quality detection method and system based on multi-pulse fusion algorithm

    CN121482000B

  • Spectral determination method, system and equipment for chemical industrial wastewater

    CN121540695A