Method for rapidly measuring water quality of sewage based on spectrum method

By using a dynamic optical path spectroscopy module and an attention-enhanced deep learning model, combined with multi-level spectral preprocessing and two-level result verification, the problems of limited concentration range, low accuracy, and large cross-interference in spectroscopic wastewater quality detection are solved, achieving efficient and reliable rapid detection of multiple indicators.

CN121521783APending Publication Date: 2026-02-13HANGZHOU WENYUAN ENERGY SAVING ENVIRONMENTAL PROTECTION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511802113.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-02
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

Existing spectroscopic methods for wastewater quality detection suffer from limitations such as a limited detection concentration range, low accuracy, significant cross-interference, and poor reliability of results. Furthermore, fixed spectroscopic preprocessing parameters cannot be adaptively adjusted, leading to low detection efficiency.

Method used

By employing a dynamic optical path length spectral module to adaptively adjust the optical path length, combined with an attention-enhanced deep learning model and a two-level result verification mechanism, high-precision detection of samples with different concentrations is achieved through multi-level spectral preprocessing and multi-model fusion quantification.

Benefits of technology

It achieves high-precision detection over a wide concentration range, significantly reduces cross-interference from multiple indicators, and improves the reliability and efficiency of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121521783A_ABST
    Figure CN121521783A_ABST
Patent Text Reader

Abstract

The invention relates to a rapid determination method for sewage quality based on a spectrum method, and belongs to the technical field of water quality detection. According to the method, a sewage sample is subjected to filtering, standing and temperature control pretreatment to remove interference, 200-2500nm full-spectrum data is obtained through a dynamic optical path spectrum acquisition module, and various interference is eliminated through multi-stage pretreatment of sub-band baseline correction, scattering correction and self-adaptive noise reduction; then inputting an attention-enhanced deep learning model to extract a targeted water quality index feature vector, realizing synchronous quantification of chemical oxygen demand, ammonia nitrogen, total phosphorus and total nitrogen through multi-model weighted fusion, and finally outputting a result through two-stage verification of model confidence verification and statistical abnormal value detection. According to the method, the problems of narrow detection concentration range, poor feature extraction pertinence, insufficient result reliability and poor interference elimination effect in the prior art are solved, the detection time is less than or equal to 3 minutes, the accuracy rate of each index is greater than or equal to 97%, the detection limit meets the GB 3838-2002 standard, and the method can be widely applied to on-site rapid monitoring of industrial drain outlets, sewage treatment plants and other scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of water quality testing technology, specifically to a rapid method for determining wastewater quality based on spectroscopy. This method is applicable to the rapid on-site detection of key water quality indicators such as chemical oxygen demand, ammonia nitrogen, total phosphorus, and total nitrogen in various types of wastewater, including industrial wastewater and municipal wastewater. Background Technology

[0002] Wastewater quality monitoring is a crucial aspect of water resource protection and water pollution control. Chemical oxygen demand (COD), ammonia nitrogen, total phosphorus, and total nitrogen are core indicators for assessing the degree of wastewater pollution. Traditional wastewater quality measurement methods primarily rely on chemical analysis. For example, COD is measured using the potassium dichromate digestion method, ammonia nitrogen using the Nessler's reagent colorimetric method, total phosphorus using the ammonium molybdate spectrophotometric method, and total nitrogen using the alkaline potassium persulfate digestion ultraviolet spectrophotometric method.

[0003] However, traditional chemical analysis methods have obvious drawbacks: First, the detection process requires the use of a large number of chemical reagents, which not only increases the detection cost but also generates toxic and harmful waste liquids, causing secondary pollution. Second, the operation steps are cumbersome, and sample pretreatment and reaction take a long time, with a single detection usually taking more than 30 minutes, which cannot meet the needs of rapid on-site monitoring. Third, the detection index is limited, and a single experiment can only measure one index. If multiple indexes need to be detected, sample processing and experimental operations must be repeated, which is extremely inefficient.

[0004] To address the aforementioned issues, spectroscopic water quality testing technology has been gradually developed and applied. Existing spectroscopic methods quantify water quality indicators by measuring the ultraviolet-visible-near-infrared spectra of wastewater samples and combining them with chemometric models. However, three key technical problems remain: First, fixed optical path lengths limit the detection concentration range; high-concentration samples are prone to absorbance saturation, while low-concentration samples exhibit weak spectral signals, both leading to decreased measurement accuracy. Second, feature extraction lacks specificity; existing models do not adequately consider the specific wavelengths of water quality indicators, and cross-interference easily occurs when multiple indicators coexist, affecting quantitative accuracy. Third, the result verification mechanism is simplistic, relying solely on the deviation between model predictions and actual values ​​to determine reliability, without considering the model's own confidence level, resulting in a high risk of misjudgment or omission of outliers. Furthermore, existing spectral preprocessing methods often use fixed parameter settings, failing to adaptively adjust according to the spectral noise and scattering characteristics of different samples, making it difficult to effectively eliminate interference factors.

[0005] Existing spectroscopic detection devices have a fixed optical path, which cannot be adapted to wastewater samples of different concentrations. High-concentration samples have saturated absorbance, while low-concentration samples have weak signals, resulting in a narrow detection concentration range and low accuracy. Existing feature extraction models do not pay enough attention to the specific wavelengths of water quality indicators, have large cross-interference among multiple indicators, and have poor quantitative accuracy. The existing result verification mechanism is simplistic and does not combine model confidence and statistical outlier detection, thus lacking dual assurance of result reliability. The existing spectral preprocessing parameters are fixed and cannot be adaptively adjusted according to the actual spectral conditions of the sample, resulting in poor interference elimination.

[0006] For example, Chinese patent CN 108226078 A discloses an adjustable optical path water quality monitoring device, but it only allows manual adjustment of the optical path length and lacks an automatic adjustment mechanism based on spectral absorbance, resulting in insufficient ease of operation and adaptability. Chinese patent CN 119757251 A discloses a multimodal fusion water quality detection method, but it does not design a dedicated attention enhancement module for spectral data, leading to limited feature extraction accuracy. Therefore, there is an urgent need to develop a rapid spectroscopic method for determining wastewater quality that balances a wide concentration range, high feature extraction accuracy, and high result reliability. Summary of the Invention

[0007] To address the above problems, this invention provides a rapid wastewater quality determination method based on spectrometry, comprising the following steps: a. Sample pretreatment: Collect wastewater samples, filter them through a filter membrane to remove suspended particulate matter, allow them to stand to eliminate air bubbles, and control the sample temperature at 18-22℃; b. Dynamic optical path spectral acquisition: The preprocessed sample's UV-Vis-NIR full spectrum data is acquired using a dynamic optical path spectral module, with a spectral range of 200-2500 nm and a wavelength resolution ≤1 nm; the dynamic optical path spectral module adjusts the optical path length according to the sample's initial spectral absorbance to keep the absorbance in the range of 0.2-0.8. c. Multi-stage spectral preprocessing: The acquired raw spectral data are sequentially subjected to baseline correction, scattering correction, and adaptive noise reduction to eliminate baseline drift, particle scattering, and random noise interference; d. Feature extraction: Input the preprocessed spectral data into the attention-enhanced deep learning model, and output a feature vector containing water quality index feature information; e. Quantitative determination of multiple indicators: The feature vector is input into the multi-model fusion quantitative module, and the concentration values ​​of chemical oxygen demand, ammonia nitrogen, total phosphorus and total nitrogen are calculated and output through preset weights; f. Result verification and output: The measurement results are verified through a two-level process of model confidence verification and statistical outlier detection. After successful verification, a standardized test report is generated and output.

[0008] Preferably, in step a, the filter membrane pore size is 0.45 μm, and the settling time is 10-15 minutes; the sample temperature is controlled by a constant temperature device, and the temperature fluctuation range is ≤ ±1℃.

[0009] Preferably, in step b, the optical path adjustment range of the dynamic optical path spectral module is 0.5-50 mm, and the optical path adjustment accuracy is 0.1 mm.

[0010] Preferably, the multi-level spectral preprocessing in step c specifically includes: baseline correction using a 3rd-order polynomial fitting for the 200-400nm band and a 2nd-order polynomial fitting for the 400-2500nm band; scattering correction using a standard normal variable transformation algorithm; and adaptive noise reduction using a wavelet thresholding algorithm with db4 wavelet basis 3-level decomposition.

[0011] Preferably, the attention-enhanced deep learning model in step d includes a convolutional layer, an attention layer, a long short-term memory layer, and a fully connected layer; the convolutional layer contains 3 convolutional units with kernel sizes of 3×1, 5×1, and 3×1, and the number of kernels are 32, 64, and 128, respectively, and the activation function is ReLU; the attention layer assigns higher weights to the specific wavelengths of water quality indicators; the long short-term memory layer contains 2 long short-term memory units, the number of hidden layer units are 64 and 32, respectively, and the dropout rate is 0.2; the fully connected layer outputs a 32-dimensional feature vector.

[0012] Preferably, the multi-model fusion quantitative module in step e includes an extreme learning machine model, a random forest model, and a support vector regression model; the preset weights are determined by the particle swarm optimization algorithm, and the concentration values ​​are obtained by weighted summation.

[0013] Preferably, the confidence level is ≥0.95 when the model confidence verification passes in step f; the statistical outlier detection adopts the 3σ criterion, and the detection result is considered to pass if it does not exceed the 3σ range.

[0014] Preferably, the determination range for chemical oxygen demand is 10-1500 mg / L, with a detection limit ≤3 mg / L and a relative error ≤±3%; the determination range for ammonia nitrogen is 0.1-80 mg / L, with a detection limit ≤0.03 mg / L and a relative error ≤±2%; the determination range for total phosphorus is 0.01-15 mg / L, with a detection limit ≤0.003 mg / L and a relative error ≤±4%; and the determination range for total nitrogen is 0.5-100 mg / L, with a detection limit ≤0.1 mg / L and a relative error ≤±3%.

[0015] Preferably, the dynamic optical path spectroscopy module in step b includes a xenon lamp light source, a sliding quartz sample cell, a drive motor, and a spectrometer; the wavelength coverage of the xenon lamp light source is 200-2500nm, and the output light intensity stability is ≤±2% / h; the sliding quartz sample cell is made of high-purity quartz with a transmittance ≥90%; the drive motor is a stepper motor with a step angle ≤1.8° and a positioning accuracy ≤0.05mm.

[0016] A system for implementing the above-mentioned rapid wastewater quality determination method based on spectroscopy includes a sample pretreatment unit, a dynamic spectral acquisition unit, a data processing unit, and a result output unit. The sample pretreatment unit includes a filter membrane and a constant temperature settling device. The dynamic spectral acquisition unit is the aforementioned dynamic optical path spectroscopy module. The data processing unit includes a preprocessing module, a feature extraction module, a multi-model fusion quantitative module, and a result verification module. The result output unit includes a display screen, a printer, and a data interface.

[0017] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. Dynamic optical path adaptive adjustment technology: A dynamic optical path spectral module is designed to first acquire the initial spectrum and calculate the maximum absorbance, then automatically adjust the optical path length based on the absorbance, controlling the absorbance within the linear response range of 0.2-0.8. The optical path adjustment range covers 0.5-50mm, adaptable to a wide concentration range of COD (10-1500 mg / L) and other indicators, effectively avoiding the problems of absorbance saturation in high-concentration samples and weak signals in low-concentration samples.

[0018] 2. Attention-enhanced feature extraction technology: An attention layer is added to the deep learning model. The algorithm assigns higher weights to specific wavelengths of water quality indicators (such as 254nm for COD and 213.9nm for ammonia nitrogen), which strengthens the extraction of key features and weakens the interference of non-feature bands. This significantly reduces the cross-interference when multiple indicators coexist and improves the correlation between feature vectors and water quality indicators.

[0019] 3. Two-level result verification technology: A two-level verification system of "model confidence + statistical outlier detection" is established. The model confidence is used to determine the stability of the prediction, and the 3σ criterion is used to detect whether there are outliers in the data. Only when both levels of verification pass can the final result be output, reducing the outlier false positive rate to below 0.1% and significantly improving the reliability of the results.

[0020] 4. Multi-level adaptive preprocessing technology: It adopts a band-based baseline correction method to adapt to the baseline characteristics of different bands; it eliminates sample particle scattering interference through standard normal variable transformation; and it dynamically adjusts the wavelet denoising threshold based on the spectral signal-to-noise ratio to achieve accurate elimination of noise and interference, effectively improving the quality of spectral data. Attached Figure Description

[0021] Figure 1 This is a schematic diagram of the method steps of the present invention.

[0022] Figure 2 This is a schematic diagram of the system structure of the present invention. Detailed Implementation

[0023] The following embodiments, in conjunction with the accompanying drawings, are merely for illustrating the technical solutions described in the claims and are not intended to limit the scope of protection of the claims.

[0024] Example 1 A rapid method for determining wastewater quality based on spectrometry includes the following steps: a. Sample pretreatment: Collect wastewater samples, filter them through a filter membrane to remove suspended particulate matter, allow them to stand to eliminate air bubbles, and control the sample temperature at 18-22℃; b. Dynamic optical path spectral acquisition: The preprocessed sample's UV-Vis-NIR full spectrum data is acquired using a dynamic optical path spectral module, with a spectral range of 200-2500 nm and a wavelength resolution ≤1 nm; the dynamic optical path spectral module adjusts the optical path length according to the sample's initial spectral absorbance to keep the absorbance in the range of 0.2-0.8. c. Multi-stage spectral preprocessing: The acquired raw spectral data are sequentially subjected to baseline correction, scattering correction, and adaptive noise reduction to eliminate baseline drift, particle scattering, and random noise interference; d. Feature extraction: Input the preprocessed spectral data into the attention-enhanced deep learning model, and output a feature vector containing water quality index feature information; e. Quantitative determination of multiple indicators: The feature vector is input into the multi-model fusion quantitative module, and the concentration values ​​of chemical oxygen demand, ammonia nitrogen, total phosphorus and total nitrogen are calculated and output through preset weights; f. Result verification and output: The measurement results are verified through a two-level process of model confidence verification and statistical outlier detection. After successful verification, a standardized test report is generated and output.

[0025] In step a, the filter membrane pore size is 0.45 μm, and the settling time is 10-15 minutes; the sample temperature is controlled by a constant temperature device, and the temperature fluctuation range is ≤ ±1℃.

[0026] The process involved collecting 50 mL of industrial wastewater samples and filtering them using a mixed cellulose ester membrane with a pore size of 0.45 μm to remove suspended particulate matter. The filtered samples were then placed in a constant-temperature settling device and allowed to stand at room temperature for 12 minutes to eliminate air bubbles. The constant-temperature device was then activated to maintain the sample temperature at 20 °C, with temperature fluctuations controlled within ±0.5 °C.

[0027] In step b, the optical path adjustment range of the dynamic optical path spectral module is 0.5-50 mm, and the optical path adjustment accuracy is 0.1 mm.

[0028] The spectral acquisition was performed using a pre-set dynamic optical path spectral module. This module's xenon lamp light source covers a wavelength range of 200-2500 nm, with an output light intensity stability of ±1.5% / h; the transmittance of the sliding quartz sample cell reaches over 92% in the 200-2500 nm band; the stepper motor has a step angle of 1.8° and a positioning accuracy of 0.03 mm. Initially, the initial spectrum of the sample was acquired with an initial optical path of 10 mm, and then... (The sentence is incomplete and requires further context to translate accurately.) Calculate the absorbance at each wavelength of the full spectrum (where wavelength absorbance at that point wavelength The light intensity of the blank solution, wavelength The light intensity of the sample solution was measured, and the maximum absorbance was found to be 0.92. Then, using the formula... Calculate the optimal optical path (where Optical path length The maximum absorbance value across the entire spectrum is used. The sample cell is adjusted to the calculated value by a stepper motor. Full-spectral data from 200 to 2500 nm are collected with a wavelength resolution of 0.8 nm. The data is collected three times, and the average value is taken as the raw spectral data.

[0029] Specifically, step c involves multi-level spectral preprocessing, including: baseline correction using a 3rd-order polynomial fitting for the 200-400nm band and a 2nd-order polynomial fitting for the 400-2500nm band; scattering correction using a standard normal variable transformation algorithm; and adaptive denoising using a wavelet thresholding algorithm with db4 wavelet basis 3-level decomposition.

[0030] The original spectrum was subjected to band-specific fitting, with a third-order polynomial used for the 200-400nm band. Fit (where This is the baseline correction value for this band. For wavelength, (These are the fitting coefficients). The 400-2500nm band uses a quadratic polynomial. Fit (where This is the baseline correction value for this band. (where the coefficients are the fitting coefficients), the fitting coefficients for each band are obtained by solving the least squares method. The baseline correction is completed by subtracting the baseline value of the corresponding band from the original spectrum. The baseline drift after correction is ≤0.01. Among them, the standard normal variable transformation algorithm is adopted, through the formula Calculate (where For the first Scattering correction value at each wavelength point For the first The original spectral intensity at each wavelength point The average intensity across the entire spectrum. (where the standard deviation is the full-spectrum intensity), eliminating the scattering interference from fine particles in the sample, the calculated full-spectrum intensity mean is 0.32 and the standard deviation is 0.08; The calculated spectral signal-to-noise ratio is 38 dB, obtained using the formula... Determine the wavelet denoising threshold (where The noise reduction threshold, The standard deviation of noise. The number of spectral data points. (For spectral signal-to-noise ratio), a 3-level decomposition was performed using the db4 wavelet basis. After thresholding the high-frequency coefficients, the spectrum was reconstructed, and the spectral noise intensity was reduced by more than 65% after noise reduction.

[0031] In step d, the attention-enhanced deep learning model includes a convolutional layer, an attention layer, a long short-term memory layer, and a fully connected layer. The convolutional layer contains three convolutional units with kernel sizes of 3×1, 5×1, and 3×1, and the number of kernels are 32, 64, and 128, respectively. The activation function is ReLU. The attention layer assigns higher weights to the specific wavelengths of water quality indicators. The long short-term memory layer contains two long short-term memory units, with 64 and 32 hidden units, and a dropout rate of 0.2. The fully connected layer outputs a 32-dimensional feature vector.

[0032] The preprocessed spectral data is input into the attention-enhanced deep learning model. The three convolutional units of the convolutional layer sequentially extract local spectral features, and the ReLU activation function effectively avoids the vanishing gradient problem; the attention layer uses the formula... Calculate the weights for each wavelength (where...) wavelength Attention weights at the location For weight parameters, wavelength The spectral feature function assigns higher weights to specific wavelengths such as 254nm for COD, 213.9nm for ammonia nitrogen, 350nm for total phosphorus, and 220nm for total nitrogen, enhancing the extraction of key features; the long short-term memory layer captures the temporal correlation features of spectral data, and the dropout rate of 0.2 effectively prevents model overfitting; the fully connected layer outputs a 32-dimensional feature vector, which has a correlation ≥0.92 with water quality indicators.

[0033] In step e, the multi-model fusion quantitative module includes an extreme learning machine model, a random forest model, and a support vector regression model; the preset weights are determined by the particle swarm optimization algorithm, and the concentration values ​​are obtained by weighted summation.

[0034] The 32-dimensional feature vector is input into the multi-model fusion quantitative module. The weights of the Extreme Learning Machine model, Random Forest model, and Support Vector Regression model in this module are determined using a particle swarm optimization algorithm, with the objective function being: (in These are the model's predicted values. These are actual measured values. (Based on the sample size), the final weights were determined to be 0.35, 0.42, and 0.23, respectively. This was achieved using the formula... The concentration values ​​of each indicator were calculated (wherein) This is the final concentration value. These are the predicted values ​​from the Extreme Learning Machine model. These are the predicted values ​​from the random forest model. For the predicted values ​​of the support vector regression model, (With preset weights): COD was 285 mg / L, ammonia nitrogen was 12.3 mg / L, total phosphorus was 3.5 mg / L, and total nitrogen was 45.8 mg / L. Comparison with the results obtained using the national standard method showed that the relative errors for COD were 2.1%, ammonia nitrogen was 1.5%, total phosphorus was 3.2%, and total nitrogen was 2.8%, all meeting the error requirements.

[0035] In step f, the confidence level is ≥0.95 when the model confidence verification passes; the statistical outlier detection adopts the 3σ criterion, and the detection result is considered to pass if it does not exceed the 3σ range.

[0036] The measurement results underwent two-stage validation. The first-stage model confidence validation was performed using the formula... Calculate (where For model confidence, The average concentration value of the calibration set samples was used to obtain a confidence level of 0.97, which meets the requirement of ≥0.95, and the verification is passed; the second-level statistical outlier detection adopts the 3σ criterion, and is performed using the formula Judgment (where) The mean of 5 parallel measurements is given. To calibrate the sample mean of the calibration set, The standard deviations of the five parallel measurements were calculated as follows: COD mean 284.6 mg / L, standard deviation 3.2 mg / L; ammonia nitrogen mean 12.2 mg / L, standard deviation 0.2 mg / L; total phosphorus mean 3.48 mg / L, standard deviation 0.08 mg / L; and total nitrogen mean 45.6 mg / L, standard deviation 0.6 mg / L. All results were within the 3σ range, indicating successful validation. After successful dual-level validation, a standardized test report was generated and displayed in real-time on a screen. The report file was also exported via a USB data interface.

[0037] The determination range for chemical oxygen demand (COD) is 10-1500 mg / L, with a detection limit ≤3 mg / L and a relative error ≤±3%; the determination range for ammonia nitrogen is 0.1-80 mg / L, with a detection limit ≤0.03 mg / L and a relative error ≤±2%; the determination range for total phosphorus is 0.01-15 mg / L, with a detection limit ≤0.003 mg / L and a relative error ≤±4%; and the determination range for total nitrogen is 0.5-100 mg / L, with a detection limit ≤0.1 mg / L and a relative error ≤±3%.

[0038] In step b, the dynamic optical path spectroscopy module includes a xenon lamp light source, a sliding quartz sample cell, a drive motor, and a spectrometer. The wavelength range of the xenon lamp light source is 200-2500nm, and the output light intensity stability is ≤±2% / h. The sliding quartz sample cell is made of high-purity quartz with a transmittance ≥90%. The drive motor is a stepper motor with a step angle ≤1.8° and a positioning accuracy ≤0.05mm.

[0039] Example 2 A rapid wastewater quality determination system based on spectrometry includes a sample pretreatment unit, a dynamic spectral acquisition unit, a data processing unit, and a result output unit. The sample pretreatment unit includes a membrane filter and a constant-temperature settling device. The dynamic spectral acquisition unit is the aforementioned dynamic optical path spectroscopy module. The data processing unit includes a preprocessing module, a feature extraction module, a multi-model fusion quantitative module, and a result verification module. The result output unit includes a display screen, a printer, and a data interface. This system is used to implement the aforementioned rapid wastewater quality determination method based on spectrometry.

[0040] The sample pretreatment unit is used to eliminate physical interference factors in wastewater samples, providing standardized samples for subsequent spectral acquisition. The sample pretreatment unit includes a membrane filter and a constant-temperature settling device. The membrane filter includes a 0.45μm mixed cellulose ester membrane and a matching filtration assembly; the constant-temperature settling device includes a constant-temperature chamber, a temperature sensor, a heating / cooling module, and a horizontal settling platform.

[0041] The dynamic spectral acquisition unit includes a xenon lamp light source, a sliding quartz sample cell, a stepper motor, and a dynamic optical path spectral module. Through a wide-band stable light source, dynamic optical path adjustment, and high-resolution spectral detection, it acquires high-quality full-spectral data in the range of 200-2500nm, adapting to the detection needs of samples with different concentrations.

[0042] The data processing unit comprises four modules: integrated preprocessing, feature extraction, multi-model fusion quantification, and result verification. Relying on AI chips and data processing chips, it sequentially completes spectral interference elimination, target feature enhancement extraction, multi-index concentration weighted calculation, and dual-level verification, outputting accurate and reliable concentration data.

[0043] The result output unit consists of a touch screen, a built-in thermal printer, and a USB data interface. It is responsible for presenting standardized test reports in three forms: real-time display, paper printing, and electronic export, to meet the needs of on-site reading, record traceability, and digital management.

[0044] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. The basic principles and main features of the present invention have been described above with specific implementation schemes. Based on the present invention, some modifications or substitutions can be made, but these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of protection claimed by the present invention.

Claims

1. A rapid method for determining wastewater quality based on spectrometry, characterized in that, Includes the following steps: a. Sample pretreatment: Collect wastewater samples, filter them through a filter membrane to remove suspended particulate matter, allow them to stand to eliminate air bubbles, and control the sample temperature at 18-22℃; b. Dynamic optical path spectral acquisition: The preprocessed sample's UV-Vis-NIR full spectrum data is acquired using a dynamic optical path spectral module, with a spectral range of 200-2500nm and a wavelength resolution ≤1nm; the dynamic optical path spectral module adjusts the optical path length according to the sample's initial spectral absorbance to keep the absorbance in the range of 0.2-0.

8. c. Multi-stage spectral preprocessing: The acquired raw spectral data are sequentially subjected to baseline correction, scattering correction, and adaptive noise reduction to eliminate baseline drift, particle scattering, and random noise interference; d. Feature extraction: Input the preprocessed spectral data into the attention-enhanced deep learning model, and output a feature vector containing water quality index feature information; e. Quantitative determination of multiple indicators: The feature vector is input into the multi-model fusion quantitative module, and the concentration values ​​of chemical oxygen demand, ammonia nitrogen, total phosphorus and total nitrogen are calculated and output through preset weights; f. Result verification and output: The measurement results are verified through a two-level process of model confidence verification and statistical outlier detection. After successful verification, a standardized test report is generated and output.

2. The rapid wastewater quality determination method based on spectrometry according to claim 1, characterized in that, In step a, the filter membrane pore size is 0.45μm, and the settling time is 10-15 minutes; the sample temperature is controlled by a thermostat, and the temperature fluctuation range is ≤±1℃.

3. The rapid wastewater quality determination method based on spectrometry according to claim 1, characterized in that, In step b, the optical path adjustment range of the dynamic optical path spectral module is 0.5-50 mm, and the optical path adjustment accuracy is 0.1 mm.

4. The rapid wastewater quality determination method based on spectrometry according to claim 1, characterized in that, Step c involves multi-level spectral preprocessing, specifically including: baseline correction using a 3rd-order polynomial fitting for the 200-400nm band and a 2nd-order polynomial fitting for the 400-2500nm band; scattering correction using a standard normal variable transformation algorithm; and adaptive noise reduction using a wavelet thresholding algorithm with db4 wavelet basis 3-level decomposition.

5. The rapid wastewater quality determination method based on spectrometry according to claim 1, characterized in that, The attention-enhanced deep learning model in step d includes a convolutional layer, an attention layer, a long short-term memory layer, and a fully connected layer. The convolutional layer contains three convolutional units with kernel sizes of 3×1, 5×1, and 3×1, and the number of kernels are 32, 64, and 128, respectively. The activation function is ReLU. The attention layer assigns higher weights to the specific wavelengths of water quality indicators. The long short-term memory layer contains two long short-term memory units, with 64 and 32 hidden units, and a dropout rate of 0.

2. The fully connected layer outputs a 32-dimensional feature vector.

6. The rapid wastewater quality determination method based on spectrometry according to claim 1, characterized in that, In step e, the multi-model fusion quantitative module includes an extreme learning machine model, a random forest model, and a support vector regression model; the preset weights are determined by the particle swarm optimization algorithm, and the concentration values ​​are calculated by weighted summation.

7. The rapid wastewater quality determination method based on spectrometry according to claim 1, characterized in that, In step f, the model confidence verification is passed when the confidence level is ≥0.95; the statistical outlier detection adopts the 3σ criterion, and the detection result is passed if it does not exceed the 3σ range.

8. The rapid wastewater quality determination method based on spectrometry according to claim 1, characterized in that, The determination range for chemical oxygen demand (COD) is 10-1500 mg / L, with a detection limit ≤3 mg / L and a relative error ≤±3%; the determination range for ammonia nitrogen is 0.1-80 mg / L, with a detection limit ≤0.03 mg / L and a relative error ≤±2%; the determination range for total phosphorus is 0.01-15 mg / L, with a detection limit ≤0.003 mg / L and a relative error ≤±4%; and the determination range for total nitrogen is 0.5-100 mg / L, with a detection limit ≤0.1 mg / L and a relative error ≤±3%.

9. The rapid wastewater quality determination method based on spectrometry according to claim 1, characterized in that, The dynamic optical path spectroscopy module in step b includes a xenon lamp light source, a sliding quartz sample cell, a drive motor, and a spectrometer; the wavelength coverage of the xenon lamp light source is 200-2500nm, and the output light intensity stability is ≤±2% / h; the sliding quartz sample cell is made of high-purity quartz with a transmittance ≥90%; the drive motor is a stepper motor with a step angle ≤1.8° and a positioning accuracy ≤0.05mm.

10. A system for implementing the rapid wastewater quality determination method based on spectrometry as described in any one of claims 1-9, characterized in that, It includes a sample preprocessing unit, a dynamic spectral acquisition unit, a data processing unit, and a result output unit; the sample preprocessing unit includes a filter membrane and a constant temperature settling device; the dynamic spectral acquisition unit is the dynamic optical path spectral module as described in claim 9; the data processing unit includes a preprocessing module, a feature extraction module, a multi-model fusion quantitative module, and a result verification module; the result output unit includes a display screen, a printer, and a data interface.

Citation Information

Patent Citations

  • Ultraviolet-visible spectrum in situ monitoring device capable of adjusting optical path and water quality multi-parameter measuring method

    CN108226078A

  • Sewage treatment effect detection method based on spectral analysis

    CN119757251A