DOC spectrum monitoring method and device

By employing a detachable flow-through tank and an independent light source spectrometer in a water treatment plant, combined with pretreatment and a stacking model, the accuracy and stability issues of DOC detection were resolved, enabling high-precision monitoring under low turbidity and low concentration water conditions, and supporting real-time control of smart water plants.

CN120948392AActive Publication Date: 2025-11-14SHANGHAI YANXUAN TECH CO LTD

Patent Information

Application Number
CN202511483853.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-17
Publication Date
2025-11-14
Estimated Expiration
2045-10-17

AI Technical Summary

Technical Problem

Existing DOC detection technologies suffer from inaccurate monitoring and operational instability issues. In particular, under conditions of low turbidity and low concentration water quality, traditional UV254 meters and turbidity scattering compensation methods cannot effectively reflect the dynamic changes in DOC in water bodies, affecting the whole-process control of smart water plants.

Method used

It employs a detachable flow cell and an independent light source spectrometer, combined with a pretreatment unit filtration device to eliminate turbidity interference, and uses a stacking strategy to build an integrated meta-model to screen target characteristic wavelengths. Combined with a backwashing unit, it ensures equipment cleanliness and achieves accurate monitoring.

Benefits of technology

It improves the accuracy and stability of DOC detection, reduces maintenance costs, and enables high-precision monitoring under low turbidity and low concentration water conditions, supporting real-time control of smart water plants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120948392A_ABST
    Figure CN120948392A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of water quality monitoring, and discloses a DOC spectrum monitoring method and device. Comprising the following steps: pre-treating a water sample through a filtering device to eliminate the interference of turbidity on spectrum detection; conveying the pretreated water sample into a detachable flow cell, and collecting an ultraviolet spectrum of the water sample through an independently arranged light source spectrometer; determining a target characteristic wavelength subset from the ultraviolet spectrum; inputting the target characteristic wavelength subset into a pre-trained integrated meta-model to obtain a predicted value of the DOC concentration in the water sample; wherein the integrated meta-model is constructed by adopting a Stacking strategy and comprises a plurality of base models and a meta-model, and the meta-model is used for learning prediction results of the base models and performing fusion output; according to the monitoring system state or the preset maintenance period, before the flow cell is disassembled and maintained, the backwashing unit is triggered to execute the pre-cleaning operation, and the technical scheme is provided which gives consideration to the installation convenience, the monitoring accuracy and the operation stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of water quality monitoring technology, and in particular to a DOC spectral monitoring method and device. Background Technology

[0002] With the accelerated development of smart water management, water treatment plants, as the core of urban water supply systems, require crucial water quality monitoring, especially dissolved organic carbon (DOC) monitoring. DOC not only affects the safety of water quality in the pipe network (e.g., providing nutrients for bacterial regeneration leading to biofilm growth), but also directly impacts the efficiency of water purification processes (e.g., guiding coagulant dosage and reducing costs). Spectroscopic methods, due to their advantages of speed, non-destructive nature, low cost, and online monitoring capabilities, have gained widespread attention in DOC monitoring and have become an important technical means for water quality monitoring in water treatment plants.

[0003] However, the inventors have discovered that existing DOC detection technologies have at least the following technical problems:

[0004] Firstly, only a few existing water purification plants have installed UV254 meters capable of monitoring a single wavelength, attempting to invert DOC through UV254. However, this method has an inherent flaw: such instruments can only monitor characteristic absorption at a wavelength of 254nm. Due to differences in molecular structure (such as the morphology of macromolecules and small molecules), some organic matter in water does not have significant absorption characteristics in the UV254 band. This leads to situations where the measured UV254 values ​​are the same, but the laboratory DOC results are quite different. It is difficult to accurately reflect the dynamic changes in DOC in water and cannot provide effective data support for the whole-process control of smart water plants.

[0005] Secondly, light scattering caused by turbidity and suspended particulate matter in the raw water sample can interfere with the ultraviolet-visible spectral signal. Existing technologies typically detect turbidity by measuring the visible spectrum and correct the ultraviolet-visible spectral signal using turbidity scattering compensation. However, the inventors' research found that the raw water used in water treatment plants is mostly Class I water, which is clean and its turbidity is usually maintained at a low level of 3-5 NTU. Under these conditions, the commonly used turbidity scattering compensation methods have limitations.

[0006] The aforementioned problems have limited the effectiveness of spectral methods in online DOC monitoring of water treatment plants, and there is an urgent need for a technical solution that can balance monitoring accuracy and operational stability. Summary of the Invention

[0007] One objective of this application is to provide a DOC spectral monitoring method and apparatus, aiming to provide a technical solution that balances ease of installation, monitoring accuracy, and operational stability.

[0008] To achieve the above objectives, some embodiments of this application provide the following aspects:

[0009] In a first aspect, some embodiments of this application provide a DOC spectral monitoring method, the method comprising: pre-treating a water sample using a filtration device to eliminate interference from turbidity on spectral detection; transporting the pre-treated water sample to a detachable flow cell and acquiring the ultraviolet spectrum of the water sample using an independently configured light source spectrometer; determining a subset of target characteristic wavelengths from the ultraviolet spectrum; inputting the subset of target characteristic wavelengths into a pre-trained ensemble meta-model to obtain a predicted value of the DOC concentration in the water sample; wherein the ensemble meta-model is constructed using a stacking strategy and includes multiple base models and a meta-model, the meta-model being used to learn the prediction results of each base model and perform fusion output; and triggering a backwashing unit to perform a pre-cleaning operation before disassembling and maintaining the flow cell, based on the monitoring system status or a preset maintenance cycle.

[0010] Secondly, some embodiments of this application also provide a DOC spectral monitoring device, the device comprising: a pretreatment unit including a filtration device for pretreating water samples to eliminate turbidity interference; a monitoring unit including a detachable flow cell and an independently configured light source spectrometer, the light source spectrometer being used to collect the ultraviolet spectrum of the water sample in the flow cell; a backwashing unit for performing a pre-cleaning operation before disassembling and maintaining the flow cell; a processing unit for determining a subset of target characteristic wavelengths from the ultraviolet spectrum and inputting the subset into an integrated meta-model to obtain a predicted DOC concentration value; and a control system for triggering the backwashing unit according to the monitoring status or a preset maintenance cycle.

[0011] Compared with related technologies, the solution provided in this application adopts a detachable flow-through pool and connects to an independent light source spectrometer via a quick-release optical interface. This makes the device easier to install, disassemble, and maintain in scenarios where waterworks need to build pipelines to introduce raw water, meeting the needs of convenient installation and monitoring for the flow-through pool design. Furthermore, because the filtration device of the pretreatment unit can effectively eliminate the interference of turbidity and particulate matter on DOC spectral monitoring, it provides a purer water sample basis for monitoring and improves monitoring accuracy. At the same time, due to the synergistic effect of the ultrasonic cleaning transducer on the outer wall of the flow-through pool and the backwashing unit, the filtration device and quartz light window can be cleaned in a directional manner, removing contaminants in a timely manner. Therefore, it ensures the long-term stable operation of the monitoring equipment, reduces manual maintenance costs, and achieves an effective combination of convenient installation and accurate and stable monitoring. Attached Figure Description

[0012] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0013] Figure 1An exemplary flowchart of a DOC spectral monitoring method provided for some embodiments of this application;

[0014] Figure 2 A schematic diagram illustrating the effect of existing technology for some embodiments of this application;

[0015] Figure 3 A schematic diagram illustrating the effect of a DOC spectral monitoring method and apparatus provided in this application, based on some embodiments of this application;

[0016] Figure 4 This is an exemplary schematic diagram illustrating the extraction of key features from spectral samples using a multi-dimensional strategy, as provided in some embodiments of this application.

[0017] Figure 5 An exemplary schematic diagram illustrating the construction of a meta-model based on key spectral features using a Stacking ensemble learning strategy, provided for some embodiments of this application;

[0018] Figure 6 A schematic diagram illustrating the effect of a single base model provided in some embodiments of this application;

[0019] Figure 7 This application provides a schematic diagram illustrating the effect of one of the meta-models as shown in some embodiments.

[0020] Figure 8 The diagram illustrates an application example of a DOC spectral monitoring device provided in some embodiments of this application. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0022] First Embodiment

[0023] The first embodiment of this application relates to a method for DOC spectral monitoring. For example... Figure 1 As shown, the method may include the following steps:

[0024] Step S101: The water sample is pretreated by a filtration device to eliminate the interference of turbidity on spectral detection;

[0025] Step S102: The pretreated water sample is transported to a detachable flow cell, and the ultraviolet spectrum of the water sample is collected by an independently set light source spectrometer.

[0026] Step S103: Determine a subset of target characteristic wavelengths from the ultraviolet spectrum;

[0027] Step S104: Input the target feature wavelength subset into the pre-trained ensemble meta-model to obtain the predicted value of DOC concentration in the water sample; wherein, the ensemble meta-model is constructed using a stacking strategy, including multiple base models and a meta-model, and the meta-model is used to learn the prediction results of each base model and perform fusion output;

[0028] Step S105: Based on the monitoring system status or preset maintenance cycle, trigger the backwash unit to perform a pre-cleaning operation before disassembling and maintaining the flow pool.

[0029] The above will be explained in detail below.

[0030] For step S101, for example, the filtration device can be made of materials such as, but not limited to, MBR membranes, stainless steel membranes, and ceramic membranes. Different membranes can be selected according to different application scenarios to remove interfering substances such as suspended particulate matter (e.g., silt particles), colloids, and microbial flocs from the water sample through the retention effect of the membrane, thereby eliminating the interference of turbidity on subsequent DOC spectral monitoring from the source and providing a low-impurity, low-interference water sample basis for spectral detection.

[0031] Regarding step S102, for example, the flow cell adopts a stable structural design and optical optimization to provide a uniform optical path environment for spectral detection, avoiding signal fluctuations caused by water flow disturbances or the cell itself; the light source spectrometer is connected to the flow cell via a quick-release optical interface, which ensures convenient equipment integration and reduces interference between devices. For example, in practical applications, the light source spectrometer can collect ultraviolet spectra in the range of 190-850nm, which covers the characteristic absorption range of DOC molecules and can effectively reflect the DOC content information in the water sample.

[0032] For step S103, for example, this step determines a subset of target feature wavelengths based on the collected ultraviolet spectrum, which can achieve the purpose of eliminating redundant information. For instance, considering that the 190-850nm spectral range contains 2048 pixels, directly using it for analysis may lead to computational redundancy due to excessive data volume. A PCA-GA hybrid intelligent algorithm can be used: first, PCA is used to compress the data dimension and reduce noise interference; then, a genetic algorithm is used to optimize and screen the data to obtain the wavelengths that respond most significantly to DOC (such as 254nm, 272nm, etc.), forming the subset of target feature wavelengths. By using the PCA-GA hybrid intelligent algorithm, the shortcomings of single algorithms in terms of insufficient local search capability and unstable results can be overcome, ensuring that the selected feature wavelengths can effectively reflect the changing patterns of DOC.

[0033] For step S104, for example, the absorbance data of the target characteristic wavelengths such as 254nm and 272nm obtained by screening can be input into the pre-trained ensemble meta-model, which can quickly output the DOC concentration in the water sample and realize the accurate quantitative conversion from spectral signal to concentration.

[0034] It is understood that the integrated meta-model provided in this embodiment first aggregates the prediction results of multiple base models, and then learns the optimal fusion strategy through the meta-model. This fully leverages the complementarity of different models in feature extraction and pattern recognition, thereby improving the accuracy of DOC concentration prediction. It is particularly suitable for scenarios such as water quality testing where data distribution is complex and features and concentrations exhibit a non-linear relationship. It can reduce the prediction fluctuations of a single model and compensate for the biases of each base model through the meta-model.

[0035] For step S105, for example, regarding the maintenance needs of the flow cell, before disassembly and maintenance, the backwash unit can be triggered to perform a pre-cleaning operation based on the status feedback of the monitoring system or a preset maintenance cycle. This removes contaminants (such as residual organic matter and fine particles) from the inner wall of the flow cell and the surface of the filter device, preventing residual contaminants from affecting equipment performance or subsequent detection accuracy during maintenance. For example, a specific cleaning strategy could be: applying a low pressure of 0.1-0.3 MPa and a high flow rate of 5-10 L / min to the filter device to loosen the trapped material on the membrane surface; applying a high pressure of 0.3-0.5 MPa and a low flow rate of 1-3 L / min to the flow cell, and using an ultrasonic transducer to enhance the cleaning effect. After cleaning, the effect is verified by collecting a blank spectrum of the flow cell. If its absorbance is below a threshold (e.g., 0.02), the cleaning is considered successful; otherwise, a second backwash is triggered to ensure stable detection accuracy after equipment maintenance.

[0036] Understandably, in related technologies, most existing water quality instruments are fixed installations. In scenarios where waterworks need to introduce raw water from various nodes to monitoring points through complex pipelines, the installation process is cumbersome, and subsequent disassembly and maintenance require interruption of the pipeline, which seriously affects monitoring efficiency and flexibility. The core components of the monitoring equipment are easily affected by the adhesion of pollutants, and existing cleaning methods mostly rely on manual intervention, which not only has high maintenance costs, but also easily leads to a decrease in the stability of equipment operation due to untimely cleaning, affecting long-term monitoring accuracy.

[0037] Furthermore, in the scenario of raw water testing at water treatment plants, existing technologies typically employ a visible-segment turbidity measurement-turbidity scattering compensation method to correct the ultraviolet-visible spectral signal, thereby eliminating light scattering interference caused by turbidity and suspended particulate matter in the water sample. However, research has found that this method has limitations under conditions of low concentrations of dissolved organic carbon (DOC) and low turbidity. For example... Figure 2 As shown, Figure 2The x-axis represents wavelength (nm) and the y-axis represents absorbance (Abs). After performing two UV-Vis absorption spectral measurements on the same raw water sample, it was found that turbidity scattering only interfered with the visible spectrum. In the UV spectral region (especially the area marked by the red box in the figure), the curves of raw water spectrum one and raw water spectrum two almost overlapped, showing no significant difference. This indicates that in low-turbidity water, the effect of turbidity scattering on the UV spectrum is negligible. If the overall UV-Vis spectrum is still compensated based on changes in the visible spectrum, it will not only fail to improve detection accuracy but will also introduce additional interference, destroying the integrity of the original UV signal. Therefore, traditional turbidity scattering spectral compensation methods are ineffective under low-concentration DOC and low-turbidity water conditions, and a more suitable solution is urgently needed.

[0038] Therefore, to address the failure of traditional turbidity scattering compensation methods under low DOC concentration and low turbidity water conditions, it is necessary to develop a DOC spectral monitoring device integrating particulate matter filtration functionality. For example... Figure 3 As shown, Figure 3 The x-axis represents wavelength (nm) and the y-axis represents absorbance (Abs). The pretreatment unit in this scheme performs deep filtration on the water sample, effectively trapping suspended particulate matter and colloids. After eliminating light scattering interference, the spectral signal reaches a stable state (comparing the "spectrum before filtration" and the "spectrum after filtration," the signal stability across the entire wavelength range, especially in the ultraviolet region, is significantly improved after filtration). Based on this, by combining multi-method spectral feature extraction with a stacking strategy for multivariate model integration, not only is interference from visible spectrum correction in the ultraviolet region avoided, but accurate detection of DOC in water is also achieved, successfully overcoming the limitations of existing technologies in low signal-to-noise ratio spectral detection scenarios.

[0039] It is not difficult to see that the embodiments of this application take full-spectrum detection of DOC as the core technology. By covering the entire ultraviolet-visible spectrum, it comprehensively captures the absorption characteristics of organic matter with different structures, fundamentally breaking through the limitations of single-wavelength monitoring methods such as UV254 instruments, and becoming a key technology for smart water plants to realize real-time monitoring and precise control of DOC in various process sections.

[0040] Given the failure of traditional turbidity scattering compensation methods in low-concentration DOC and low-turbidity water, this embodiment provides a device with particulate matter filtration capabilities. This filtration device performs advanced treatment on the water sample through pretreatment unit components, efficiently trapping suspended particulate matter and colloids, eliminating light scattering interference, and significantly improving the signal-to-noise ratio of spectral detection. Figure 2 As shown, the spectral signal of the water sample processed by the device tends to be stable, successfully removing particulate matter interference and providing pure sample conditions for the full-spectrum method to accurately capture the characteristic spectrum of DOC.

[0041] Furthermore, this solution achieves synergistic efficiency through multi-dimensional technological innovation: The design employs a detachable flow cell and an independent light source spectrometer, ensuring both optical path stability and ease of equipment maintenance, thus guaranteeing the reliability of full-spectrum acquisition; the strategy of selecting characteristic wavelengths combined with a stacking integrated meta-model significantly improves the accuracy and robustness of low-concentration DOC detection; and the addition of a timed or status-triggered automatic backwashing mechanism removes contaminants before maintenance, preventing secondary pollution and performance degradation. Ultimately, the deep integration of the full-spectrum method and the filtration device not only solves existing technical challenges but also facilitates the advancement of smart water plant DOC monitoring towards high precision, high stability, and low maintenance costs.

[0042] Second Embodiment

[0043] The second embodiment of this application relates to a DOC spectral monitoring method. The second embodiment is an improvement upon the first embodiment, specifically in that it provides a concrete implementation for determining a subset of target characteristic wavelengths from the ultraviolet spectrum.

[0044] Specifically, step S103, which involves determining a subset of target characteristic wavelengths from the ultraviolet spectrum, may include:

[0045] Step S1031: Perform principal component analysis on the ultraviolet spectral data and extract principal component factors whose cumulative contribution rate meets the preset threshold.

[0046] Step S1032: Based on the correlation between each principal component factor and DOC concentration, dynamically adjust the weight coefficients of the principal component factors to form weighted principal component factors;

[0047] Step S1033: Determine the target feature wavelength subset based on the weighted principal component factor and the target genetic algorithm.

[0048] For step S1031, for example, the covariance matrix of each wavelength point can be calculated based on the collected raw spectral data (e.g., absorbance values ​​of 2048 wavelength points within the 190-850nm range). The covariance matrix is ​​used to quantify the fluctuation correlation of data at different wavelengths, reflecting the intrinsic structure of the spectral signal. For example, for 2048 wavelength points, a 2048×2048 covariance matrix can be generated; the larger the element value in the matrix, the higher the correlation between the signals of the corresponding two wavelength points. Then, PCA is performed based on the covariance matrix to screen out principal component factors with a cumulative contribution rate ≥ a preset threshold (e.g., 85%). If the cumulative contribution rate of the first 5 principal component factors reaches 88%, these 5 factors are selected as the basis for subsequent analysis, achieving dimensionality reduction from 2048-dimensional raw data to 5-dimensional principal components, retaining core information while eliminating redundancy.

[0049] For step S1032, for example, the weight coefficients of the principal component factors can be dynamically adjusted based on the correlation between each principal component factor and DOC concentration to form weighted principal component factors. This dynamic weighting mechanism allows subsequent feature screening to focus more on spectral regions sensitive to DOC. Taking five principal components with a cumulative contribution rate of 88% as an example, after weighted calculation, principal component 1 receives a higher weight due to its high correlation, and its corresponding spectral features will be given priority in subsequent screening, thereby improving the correlation between the feature wavelength subset and DOC concentration.

[0050] For step S1033, for example, the weighted principal component factor can be used as input, with a population size of 50, 100 iterations, a crossover probability of 0.8, and a mutation probability of 0.05. A target genetic algorithm (GA) is used with the fitness function of "the prediction accuracy of the feature wavelength subset for DOC concentration," gradually eliminating wavelengths with insignificant responses to DOC and retaining sensitive wavelengths. For example, after iterative optimization, the target genetic algorithm can select wavelengths such as 254nm, 272nm, and 350nm, which have the most significant DOC absorption signals, from 2048 wavelengths to form a target feature wavelength subset. In this step, the combined strategy of PCA+GA can reduce the search dimension of the target genetic algorithm (from 2048 dimensions to 5-dimensional principal component constraints) through PCA, while utilizing the global search capability of the target genetic algorithm to avoid the loss of local information that may be caused by PCA dimensionality reduction, effectively solving the problem of single algorithms easily getting trapped in local optima.

[0051] Optionally, in some embodiments, the step of dynamically adjusting the weight coefficients of the principal component factors based on the correlation between each principal component factor and the DOC concentration to form a weighted principal component factor, i.e., step S1032, may include the following steps:

[0052] Step S10321: Calculate the Pearson correlation coefficient between each principal component factor and the DOC concentration reference value to obtain the correlation quantification index;

[0053] Step S10322: Based on the correlation quantification index, the adaptive weight coefficients of each principal component factor are dynamically generated through a preset nonlinear mapping function; wherein, the principal component factor with a higher correlation with DOC concentration is assigned a larger weight.

[0054] Step S10323: The original principal component factor matrix and the adaptive weight coefficient matrix are weighted and fused to construct a weighted principal component factor.

[0055] For step S10321, for example, the linear correlation between the principal component factors and DOC concentration can be quantified using the Pearson correlation coefficient. Specifically, assuming five principal component factors (PC1-PC5) are extracted using PCA, each principal component factor is a linear combination of the original spectral data, reflecting a specific spectral characteristic pattern. By calculating the Pearson correlation coefficient between each principal component factor and the measured DOC concentration reference value, a quantitative index characterizing the correlation between the two is obtained. For example, the correlation coefficient between principal component PC1 and DOC concentration is calculated to be 0.92, indicating a strong positive correlation between PC1 and DOC concentration; the correlation coefficients for principal components PC2 are 0.85, PC3 is 0.71, PC4 is 0.53, and PC5 is 0.38; the closer the absolute value of the correlation coefficient is to 1, the stronger the characterization ability of the principal component factor for DOC concentration.

[0056] For step S10322, for example, the correlation index can be converted into adaptive weight coefficients through a preset nonlinear mapping function, wherein the higher the correlation, the greater the weight. The nonlinear mapping function can be an exponential function or a sigmoid function, and this embodiment does not specifically limit it.

[0057] In some embodiments, the following formula may be used:

[0058]

[0059] in, For the first The correlation coefficients of the principal components To adjust parameters (such as) ), The corresponding weight has a value range of (0,1). It is the natural constant (also known as the Euler number).

[0060] For example, regarding the correlation coefficient Substituting into the formula, we get ; correspond , correspond The final weight vector is [0.99, 0.98, 0.93, 0.75, 0.54], which shows that the principal components with high correlation are given greater weight.

[0061] For step S10323, for example, the original principal component factor matrix and the adaptive weight coefficients can be multiplied by matrix multiplication to achieve weighted fusion. Assume the original principal component factor matrix is... ,in, For the sample size, Principal component number, such as The weight coefficient matrix is The weighted component factor matrix WPC is calculated as follows: WPC = PC × W.

[0062] For example, in the original principal component matrix, the principal component values ​​of a certain sample are... The weight vector is: W=[0.99,0.98,0.93,0.75,0.54] T Where the superscript T is the transpose symbol, indicating that the row vector is converted into a column vector; the weighted calculation is as follows: =0.8×0.99+0.6×0.98+( )×0.93+0.2×0.75+0.1×0.54=0.792+0.588-0.279+0.15+0.054=1.305; In other words, the obtained weighted principal component factor strengthens the contribution of highly correlated principal components (such as PC1 and PC2) to the results, weakens the influence of low-correlation principal components (such as PC5), and makes the spectral features more focused on the signal strongly correlated with DOC concentration.

[0063] The target genetic algorithm can be a genetic algorithm already existing in related technologies. Optionally, in some other embodiments, determining the target feature wavelength subset based on the weighted principal component factors and the target genetic algorithm, i.e., step S1033, may include the following steps:

[0064] Step S10331: Determine the wavelength selection population according to the binary encoding rules;

[0065] Step S10332: Calculate the prediction error of each wavelength subset in the population based on the partial least squares regression method, and use the reciprocal of the prediction error as the individual fitness value;

[0066] Step S10333: Iterative evolution begins from the initial population. In each iteration, selection, crossover, and mutation operations are performed, and after selection, inferior solutions with lower fitness are accepted with a preset probability. In the iterative evolution process, a multi-objective optimization method is adopted to simultaneously pursue higher prediction accuracy and fewer features.

[0067] Step S10334: When the number of iterations reaches the preset maximum value or the optimal solution no longer improves after several consecutive generations, stop the iteration and select the target feature wavelength subset with the highest prediction accuracy and the fewest feature count from the Pareto front corresponding to the final generation population.

[0068] For step S10331, for example, a "one-bit-one-wavelength" encoding rule can be followed: each wavelength (2048 in total) within the range of 190-850nm corresponds to one binary bit, where "1" indicates that the wavelength is selected and "0" indicates that it is not selected; a complete binary string (such as "100...110") represents a specific wavelength selection combination, called an "individual" in the population. For example, if 190nm corresponds to the first bit of the binary string and 200nm corresponds to the eleventh bit, then the first bit of the binary string being "1" indicates that 190nm is selected, and the eleventh bit being "0" indicates that 200nm is not selected. By randomly generating 50 such 2048-bit binary strings, an initial wavelength selection population can be formed, covering 50 different wavelength combination schemes.

[0069] For step S10332, for example, the corresponding wavelength subset can be parsed out for each "individual" (binary string) in the population, and the spectral data of the wavelength subset and the measured DOC concentration can be used to train the PLSR model. The prediction error of the PLSR model (such as root mean square error RMSE) can be calculated. Then, the reciprocal of the error is used as the individual fitness value - the smaller the error, the higher the fitness value, which means that the prediction performance of the wavelength subset is better.

[0070] For example, if an individual's wavelength subset is 254nm, 278nm, and 350nm, and the PLSR model is trained using absorbance data of these wavelengths, the calculated prediction error RMSE is 0.08mg / L. Therefore, the fitness value of this individual is 1 / 0.08 = 12.5. If another individual's RMSE is 0.1mg / L, its fitness value is 10. This shows that the former wavelength subset is better.

[0071] For step S10333, for example, this step achieves iterative optimization of the population through selection, crossover, and mutation operations, while introducing a "accepting inferior solutions" mechanism and a multi-objective optimization strategy to balance search efficiency and global optimality. The specific process may include:

[0072] Selection operation: Select individuals based on fitness values ​​from high to low (e.g., retain the top 30%) to participate in breeding as parents;

[0073] Crossover operation: Randomly pair the parent generation with a preset crossover probability (e.g., 0.8), exchange some binary bits (e.g., exchange bits 500-1000), and generate offspring individuals;

[0074] Mutation operation: Randomly flip some binary bits of the offspring (e.g., change "1" to "0") with a preset mutation probability (e.g., 0.01) to avoid the population getting trapped in local optima;

[0075] Accepting inferior solutions: After selection, retain individuals with lower fitness with a small probability (e.g., 5%) to increase population diversity;

[0076] Multi-objective optimization: During iteration, we simultaneously pursue "higher prediction accuracy" (larger fitness value) and "fewer feature counts" (lower proportion of "1" in binary strings) to avoid over-reliance on redundant wavelengths.

[0077] For example, after selection, 15 high-fit individuals are retained in the initial population. These individuals are then randomly paired and their binary codes (bits 500-1000) are cross-crossed with a probability of 0.8. Then, one bit is randomly flipped with a probability of 0.01, generating 50 offspring. Simultaneously, two individuals with lower fitness are retained to form the next generation of the population. Through 30 generations of iteration, the population gradually evolves towards a "high-precision + fewer features" approach.

[0078] For step S10334, for example, after the termination condition is met, the optimal feature wavelength subset is selected from the final population. The termination condition may be: the number of iterations reaches a preset maximum value (e.g., 50 generations), or the fitness value of the optimal solution does not significantly improve (change < 0.1) for 10 consecutive generations. At this time, the target genetic algorithm can select the individual with the highest prediction accuracy and the fewest features from the "Pareto front" (i.e., the set of optimal solutions that cannot simultaneously optimize two objectives) corresponding to the final population.

[0079] For example, after 50 iterations, the Pareto front contains three candidate solutions: solution A (98% accuracy, 8 features), solution B (99% accuracy, 5 features), and solution C (97% accuracy, 3 features). Solution B satisfies both "highest accuracy" and "few features." Parsing its corresponding binary string, the wavelengths corresponding to "1" are 254nm, 272nm, 310nm, 350nm, and 410nm. These five wavelengths constitute the target feature wavelength subset.

[0080] In this embodiment, by introducing a poor solution acceptance strategy with simulated annealing mechanism into the traditional genetic algorithm iteration, the target genetic algorithm can jump out of local optima with a certain probability, effectively overcoming the defect of premature convergence in traditional genetic algorithms. At the same time, a multi-objective optimization framework is adopted to simultaneously optimize prediction accuracy and feature quantity, abandoning the limitation of traditional single-objective genetic algorithms that require manual setting of weights or priorities. It automatically finds the Pareto solution set that best balances prediction ability and model complexity, and then automatically outputs the optimal feature subset based on the iteration stopping condition, realizing the selection of fewer, more stable, and easier-to-deploy DOC sensitive wavelength combinations from high-dimensional spectral features.

[0081] It is not difficult to see that in this embodiment, principal component analysis is used to extract the core factors that have the strongest explanatory power for spectral variation, and the weights of each principal component are dynamically adjusted according to the actual correlation between each principal component and DOC concentration, breaking through the limitation of traditional PCA which only uses variance contribution rate as a fixed weight. This weighting method strengthens the influence of principal components closely related to DOC concentration and weakens irrelevant noise interference, thereby providing a more accurate and discriminative feature space for the target genetic algorithm search. On this basis, the target genetic algorithm can more efficiently screen out a smaller subset of feature wavelengths with better predictive performance, which can improve the targeting of feature selection and the accuracy and robustness of the DOC concentration prediction model.

[0082] Third Embodiment

[0083] The third embodiment of this application relates to a DOC spectral monitoring method. The seventh embodiment is an improvement on the first embodiment, specifically in that: in this embodiment, a training method for the ensemble meta-model is provided.

[0084] Specifically, the training method for the ensemble meta-model may include:

[0085] Step S201: Divide the training dataset into a training set and a validation set;

[0086] Step S202: Train multiple different base models using the training set;

[0087] Step S203: Use each base model to predict the validation set and use the prediction results as new features;

[0088] Step S204: Using the new features as input, train the meta-model and learn the optimal fusion strategy of the prediction results of each base model through the meta-model.

[0089] First, key features can be extracted from spectral samples using a multi-dimensional strategy. For example, combining... Figure 4 As shown, N spectral features significantly associated with DOC can be selected using SelectKBest combined with the F-test; M key spectral features for DOC response can be selected using Partial Least Squares (PLS) weight coefficient test; P key spectral features for DOC prediction can be selected using RandomForest feature importance test; and then the results of the three methods are integrated through the spectral feature fusion step to select K most representative important spectral features to provide input for subsequent models. In this way, the limitations of a single method can be overcome.

[0090] Furthermore, combined with Figure 5The Stacking ensemble learning process shown can build a meta-model based on the selected key spectral features to leverage the synergistic advantages of multiple models. The specific steps are as follows:

[0091] For step S201, for example, the original training dataset can be divided into a training set (the set of "training samples" labeled "Training 1", "Training 2", etc. in the figure, which is the input data for the base model training stage) and a validation set; at the same time, there is an independent test set ("test samples" in the figure, used to verify the performance of the ensemble model). The division can be done by random sampling or stratified sampling according to DOC concentration ranges, for example, choosing a stratified sampling ratio of 7:3 or 8:2.

[0092] Assuming the original training dataset contains 1000 samples (each sample contains the absorbance value of key spectral features and the corresponding true value of DOC concentration, i.e. the result corresponding to the "label" in the figure), when using 8:2 stratified sampling, the samples are allocated according to the DOC concentration range (0-1mg / L, 1-3mg / L, 3-5mg / L), which can result in a training set of 800 samples (composed of "Training 1", "Training 2", etc.) and a validation set of 200 samples (used to generate new features), ensuring that the training set and the validation set are consistent in concentration distribution and feature fluctuation trends.

[0093] For step S202, for example, based on the "training samples" of the training set (including samples labeled "Training 1", "Training 2", etc.), three types of base models that combine diversity and complementarity (such as Partial Least Squares (PLS), Random Forest (RF), and Gradient Boosting Tree (XGBoost)) can be trained. Figure 5 The left side shows the "training sample" modules corresponding to PLS, RF, and XGBoost, which utilize the characteristics of each algorithm to capture feature relationships in different dimensions of the data. Specifically, for the PLS model, the absorbance of key spectral features in the "training samples" can be used as input and DOC concentration ("label") as output to construct a linear mapping relationship; for the RF model, multiple decision trees can be integrated to learn the non-linear relationship between spectral features and DOC concentration; for the XGBoost model, a gradient boosting strategy can be used to optimize the decision trees, making it sensitive to local feature differences to capture subtle non-linear correlations. Iterative optimization of the three models on the "training samples"—such as adjusting the principal component count for PLS, the tree depth for RF, and the learning rate for XGBoost—results in three trained base models (corresponding to...). Figure 5 The "prediction" module results generated from the "training samples" after passing through PLS, RF, and XGBoost models.

[0094] For step S203, for example, the trained base models can be used to predict the validation subset (the subset divided from the "training samples" in the training set): the prediction values ​​of the PLS model for each sample in the validation subset form column vector A1, the prediction values ​​of the RF model form column vector A2, and the prediction values ​​of the XGBoost model form column vector A3; then, these three column vectors A1, A2, and A3 are concatenated horizontally to form a new feature matrix of "number of samples × 3". At this time, each row of the new feature matrix corresponds to a sample in the validation subset, which is composed of the corresponding values ​​of the sample in A1, A2, and A3, that is, the new feature vector of the sample, uniformly represented as [A1, A2, A3].

[0095] For example, suppose the validation subset includes three samples: Sample 1, Sample 2, and Sample 3. The PLS model predicts the following values ​​for the three samples: Sample 1 is predicted to have A1 = 1.1 mg / L, Sample 2 is predicted to have A1 = 1.3 mg / L, and Sample 3 is predicted to have A1 = 1.2 mg / L. These values ​​constitute column A1.

[0096] A1= ;

[0097] Similarly: A2 = (Predictions from the RF model for 3 samples, column vector);

[0098] A3= (Predictions from the XGBoost model for 3 samples, column vector);

[0099] The new feature matrix obtained after concatenation is:

[0100] At this point, the first row of the matrix is ​​the new feature vector of sample 1 [A1,A2,A3]=[1.1,1.0,1.2], and so on. That is, the columns represent the predictions of a single base model for all samples, and the concatenated rows represent the predictions of a single sample for all base models. Therefore, each row of the new feature matrix naturally corresponds to the new feature vector [A1,A2,A3] of that sample. For example, if a sample in the validation subset has a value of 1.3 mg / L in A1, 1.4 mg / L in A2, and 1.3 mg / L in A3, then the corresponding row in the new feature matrix for that sample is its new feature vector [A1,A2,A3]=[1.3,1.4,1.3].

[0101] For step S204, for example, the new feature matrix can be used as input, and the true value of the DOC concentration of the subset (“label”) can be verified as output to train the meta-model. The meta-model learns how to optimally fuse [A1, A2, A3] (i.e., the prediction results of PLS, RF, and XGBoost for the sample) of each sample to obtain the fusion strategy (such as weight allocation, error correction, etc.).

[0102] like Figure 5 As shown, when predicting the test set samples, the base models first obtain the following: PLS predictions for each sample in the test set form column B1, RF predictions form column B2, and XGBoost predictions form column B3. The B1, B2, and B3 values ​​for each test sample are combined to form a vector [B1, B2, B3]. After being input into the meta-model, the meta-model applies the trained fusion strategy (such as the weighting rules learned based on [A1, A2, A3]) to [B1, B2, B3], outputting the final integrated prediction result. Assuming linear regression is used as the meta-model, with the new feature matrix as input and the measured DOC concentration of the validation subset as output, the fusion formula is trained as follows:

[0103] Final predicted value = 0.3 × A1 (PLS predicted value in [A1,A2,A3]) + 0.4 × A2 (RF predicted value in [A1,A2,A3]) + 0.3 × A3 (XGBoost predicted value in [A1,A2,A3]);

[0104] In other words, for a test sample, the meta-model will substitute its [B1,B2,B3] into this logic (e.g., when [B1,B2,B3]=[1.5,1.3,1.6] for a certain test sample, the final predicted value = 0.3×1.5+0.4×1.3+0.3×1.6), to obtain the integrated prediction result.

[0105] In summary, it can be clearly seen that A1, A2, and A3 are the prediction results columns of the base model for the training set validation subset (each column corresponds to the predicted value of a base model for all validation samples, and is a column vector). The three column vectors A1, A2, and A3 are concatenated horizontally to form a new feature matrix of "sample number × 3". Each row of the new feature matrix corresponds to the numerical combination of a sample in the validation subset in A1, A2, and A3, which is the new feature vector of that sample [A1, A2, A3]. Correspondingly, the logic of B1, B2, and B3 is consistent with the A series: first, they serve as the prediction results columns (column vectors) of the base model for the test set samples; then, the numerical combinations of B1, B2, and B3 for each test sample form the vector [B1, B2, B3]. This vector is the input for the meta-model to apply the fusion strategy. The meta-model first takes the new feature matrix (containing [A1,A2,A3] of all validation samples) as input and the true value of the validation subset DOC as output to learn the fusion rule; then the fusion rule is applied to [B1,B2,B3] of the test set, and finally outputs the integrated prediction result.

[0106] Compared to a single model, this application utilizes a multi-base model (PLS, RF, XGBoost) in synergy, trained with training samples (including "Training 1", "Training 2", etc.). This reduces the risk of a single model overfitting the training data and improves generalization ability. Different base models have different advantages in fitting the data (e.g., PLS excels at linear correlation, while RF and XGBoost excel at nonlinear correlation). After integration, the complementarity of A1, A2, and A3 can compensate for local prediction errors. The learning capabilities of integrating multiple models can more fully capture the complex relationship between spectral features and DOC concentration. The meta-model fusion strategy (as shown in the figure, the weighting or correction of the results of A1, A2, and A3) can weaken the impact of abnormal predictions from individual base models on the final results (B1, B2, B3, etc.), making the detection results more stable.

[0107] See Figure 6 The image shows the effect of a single base model, where PLS (test R) is visible. 2 =0.9030, Training R 2 =0.9963), RF (test R) 2 =0.8537, Training R 2 =0.9802), XGBoost (test R) 2 =0.8977, Training R 2 The training / test results (=0.9852) are relatively scattered, indicating a limited degree of fit; see [link to relevant documentation]. Figure 7 As shown, in the ensemble model performance, the training R of the Stacking ensemble model is... 2 =0.9822, Test R 2=0.9709, the predicted values ​​of the training and test sets are closer to the actual values, the fitting degree is significantly improved, and the superiority of the ensemble strategy is verified.

[0108] It should be noted that this embodiment can also be an improvement based on the second embodiment.

[0109] It is easy to see that in the embodiments of this application, by synergistically combining multi-method feature extraction and stacking ensemble strategies, on the one hand, multiple heterogeneous base models can be used to learn diverse feature representations from training data, effectively capturing the inherent patterns of data at different levels; on the other hand, the prediction results of each base model on the validation set are used as meta-features to construct a more hierarchical input space to integrate the prediction advantages of different models; and by learning the optimal fusion strategy of these prediction results through the meta-model, the bias or overfitting problems that are prone to occur in a single model can be overcome, thereby improving the generalization ability, robustness, and overall prediction accuracy of the DOC concentration prediction model. This approach is beneficial in preserving the unique advantages of each base model (such as PLS being good at linear fitting and RF being good at capturing nonlinear relationships), while eliminating the limitations of a single model through the meta-model, achieving the goal of high-precision prediction of DOC concentration.

[0110] Fourth embodiment

[0111] The fourth embodiment of this application relates to a DOC spectral monitoring method. The fourth embodiment is an improvement upon the first embodiment, specifically in that it provides a dynamic calibration and post-flow cell maintenance calibration strategy for the integrated meta-model, ensuring that the model maintains high-precision prediction capabilities even after hardware fluctuations or maintenance.

[0112] Specifically, in some embodiments, the method may further include:

[0113] Step S301: Based on the hardware status parameters monitored by the control system and combined with the measured values ​​of standard water samples, perform at least one of the following calibration operations: correct the output deviation of the integrated meta-model based on the measured values ​​of a single set of standard water samples; retrain the calibration curve of the integrated meta-model based on the gradient concentration standard sample set; and trigger the reconstruction of the integrated meta-model when the prediction error continuously exceeds a preset threshold.

[0114] Step S302: For the recalibration after the maintenance of the flow cell, the standard water sample is pre-filtered by the backwashing unit, and the pre-treatment unit is used to remove interference factors and obtain pure standard sample spectral data for calibration of the integrated meta-model.

[0115] For step S301, for example, the integrated meta-model can be specifically adjusted based on the hardware status parameters monitored by the control system (such as the flow cell sealing performance, optical interface alignment accuracy, and light source stability) and the measured values ​​of standard water samples, in order to solve the model deviation problem caused by changes in water sample properties or fluctuations in hardware status. Specifically, this can include the following three methods:

[0116] When the hardware is stable (e.g., no obvious mechanical loosening or optical path misalignment), but there is a fixed deviation between the measured values ​​and model predictions of a single set of standard water samples, the deviation can be eliminated by correcting the output intercept or coefficients of the ensemble meta-model. For example, if a standard water sample with a concentration of 1.0 mg / L has a model prediction value of 1.2 mg / L (fixed deviation + 0.2 mg / L), the fusion formula of the meta-model can be adjusted (e.g., changing the intercept term of the original formula from 0.3 to 0.1) to make the corrected prediction value consistent with the measured value.

[0117] When there are slight fluctuations in hardware conditions or gradual changes in the water sample matrix (such as changes in background organic matter composition due to seasonal variations), and the prediction errors of the gradient concentration standard sample set (such as 0.5 mg / L, 1.0 mg / L, 1.5 mg / L, and 2.0 mg / L) exhibit systematic bias, the calibration curve of the ensemble meta-model can be retrained using this standard sample set. For example, if the original model predicts a value of 0.65 mg / L for the 0.5 mg / L standard sample and 1.8 mg / L for the 2.0 mg / L standard sample (overall too high), the parameters of the basic model and meta-model can be re-optimized using the measured values ​​and spectral data of the four gradient standard samples, so that the prediction error of the new calibration curve is controlled within 5%.

[0118] When the prediction error continuously exceeds a preset threshold (e.g., 5 consecutive errors > 20%, or a single error > 30%), and there are no significant hardware anomalies, it is determined that the original model can no longer adapt to the current data distribution, triggering a comprehensive reconstruction of the ensemble meta-model. For example, if the prediction errors for a 1.0 mg / L standard sample are 22%, 25%, and 28% for three consecutive days (all exceeding the 20% threshold), the training and validation sets can be redefined, the feature wavelength subset can be reused, and all base models and meta-models can be retrained to adapt to significant changes in water sample properties.

[0119] For step S302, for example, to address potential contamination (such as residual contaminants) or optical path deviations (such as optical alignment errors after reinstallation) that may be introduced after the flow cell is disassembled for maintenance, preprocessing is used to ensure the purity of the standard water sample spectral data, providing a reliable benchmark for the calibration of the integrated meta-model.

[0120] The specific process may include: calling the backwashing unit to perform pre-filtration on the standard water sample (e.g., using a filter to remove small particles and colloids, and a defoamer to remove bubbles), followed by a pretreatment unit to further eliminate interference such as turbidity and color; then collecting the spectral data of the processed pure standard sample (e.g., absorbance at characteristic wavelengths such as 254nm and 272nm), using this data to calibrate the integrated meta-model, and correcting prediction deviations caused by the hardware status after maintenance. For example, after maintenance and reinstallation of the flow-through tank, the spectral baseline may shift due to trace amounts of organic matter remaining on the inner wall. In this case, a standard water sample with a concentration of 1.0 mg / L is pre-filtered (the MBR membrane removes impurities with a particle size > 0.1 μm, and the defoamer eliminates bubbles in the optical path), and the absorbance at 254nm is collected as 0.6 (0.68 before filtration, including interference); using this pure spectral data to calibrate the model, correcting the original predicted value of 0.9 mg / L to 1.0 mg / L, ensuring that the model maintains high accuracy after maintenance.

[0121] It should be noted that this embodiment may also be an improvement based on the second embodiment and / or the third embodiment.

[0122] It is easy to see that, in the embodiments of this application, by monitoring the hardware status in real time and combining it with the measured values ​​of standard water samples, differentiated calibration strategies such as single-point correction, curve refitting, or model reconstruction can be adaptively selected for different situations such as model output deviation, correction curve deviation, or severe performance degradation. This effectively addresses the prediction inaccuracies caused by hardware drift or water quality changes. Furthermore, in the post-maintenance calibration, the standard water sample can be pre-filtered through the backwashing unit to eliminate interference such as particulate matter or air bubbles that it may contain, ensuring that the spectral data used for calibration is pure and reliable. This significantly improves the accuracy of the calibration operation, the stability of the system's long-term operation, and the prediction reliability under different operating conditions.

[0123] The steps of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this application. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of the algorithm and process, are also within the scope of protection of this application.

[0124] Fifth Embodiment

[0125] The fifth embodiment of this application relates to a DOC spectral monitoring device. The device is used to implement the method described in any one or more embodiments from the first to the fourth embodiments, and the device may include: a pretreatment unit, a monitoring unit, a backwashing unit, a processing unit, and a control system.

[0126] The pretreatment unit includes a filtration device for pretreating the water sample to eliminate turbidity interference;

[0127] The monitoring unit includes a detachable flow cell and an independently set light source spectrometer; the light source spectrometer is used to collect the ultraviolet spectrum of the water sample in the flow cell.

[0128] The backwash unit is used to perform pre-cleaning operations before disassembling and maintaining the flow-through tank;

[0129] The processing unit is used to determine a subset of target characteristic wavelengths from the ultraviolet spectrum and input the subset into the ensemble meta-model to obtain the predicted DOC concentration.

[0130] And a control system, used to trigger the backwashing unit according to the monitoring status or a preset maintenance cycle.

[0131] The following sections will provide a detailed explanation of each of the above units.

[0132] Specifically, the pretreatment unit incorporates a built-in filtration device specifically designed to address the issue of turbidity and particulate matter light scattering noise masking the DOC spectral signal in low-concentration DOC monitoring. It is understood that in low DOC concentration scenarios, the light scattering noise caused by suspended particulate matter and colloids in the water can far exceed the DOC's own spectral signal, causing conventional turbidity compensation algorithms to fail. In this embodiment, the filtration device, through its precise membrane filtration function, can deeply filter the incoming water, directly intercepting particulate matter and colloids, removing turbidity interference at the source, and preventing light scattering noise from overwhelming the DOC spectral signal, thus improving the accuracy of subsequent DOC spectral detection.

[0133] For example, the membrane pore size of the filtration device can be 0.1-0.2 μm.

[0134] Specifically, the monitoring unit consists of a detachable flow cell and an independent light source spectrometer, achieving dual functions through optimized optical design and mechanical structure.

[0135] For example, the main body of the detachable flow cell is made of stainless steel, and both ends are sealed with high-transmittance quartz glass. The quartz glass has a transmittance of ≥90% in the 190-850nm wavelength range, and the coaxiality deviation of the optical paths of the light source, flow cell, and monitor is controlled to be ≤0.1mm through a precision mechanical structure to reduce the impact of optical deviation on monitoring. An ultrasonic cleaning transducer is integrated into the outer wall of the flow cell to remove contaminants from the surface of the quartz window. In some examples, the transducer frequency is 40kHz, the power is between 50-100W, and the transducer maintains a 1-2mm gap with the quartz window on the inner wall of the flow cell. The system can initiate ultrasonic cleaning at preset intervals, using high-frequency vibration to peel off biofilms, bacteria, and other contaminants, preventing their adhesion from affecting light transmittance. The detachable structure facilitates deep cleaning or maintenance by staff, which helps ensure long-term monitoring stability.

[0136] The light source spectrometer is detachably connected to the flow cell via a quick-release optical interface. This design primarily addresses the issue of biofouling caused by DOC residue during continuous monitoring. It is understood that DOC provides nutrients for bacteria, making it easy for organisms to grow within the monitoring chamber and adhere to the monitoring window during monitoring, resulting in enhanced ultraviolet absorption and interfering with the accuracy of DOC monitoring. This embodiment innovatively utilizes a detachable design between the light source spectrometer and the flow cell, allowing operators to easily disassemble both for thorough maintenance and cleaning of the flow cell. This fundamentally prevents biofouling from affecting monitoring and ensures the accuracy of the results.

[0137] For example, the quick-release optical interface between the light source spectrometer and the flow cell has a sealed and waterproof function. While ensuring stable alignment of the optical path and preventing leakage of the water path during monitoring, it can also enable quick disassembly and assembly of the two. This can meet the requirements of sealing and optical stability during monitoring, and also provide convenience for daily maintenance.

[0138] Specifically, the backwashing unit is connected to the pretreatment unit and the monitoring unit through pipelines, and works in conjunction with the ultrasonic cleaning transducer of the monitoring unit to achieve directional cleaning of the filter device and the quartz light window.

[0139] For example, when the backwashing unit performs pulse rinsing on the filter device, it can provide a pulse pressure of 0.1-0.3 MPa through a booster pump. Each rinsing lasts for 10-30 seconds and is repeated every 1-2 hours to efficiently remove particulate matter and colloids trapped on the membrane surface and maintain filtration accuracy. When the ultrasonic cleaning transducer cleans the quartz window, the backwashing unit can inject a small amount of clean water into the flow tank. This, combined with ultrasonic vibration, will promptly remove the dislodged contaminants, improving the cleaning effect. Therefore, through this linked cleaning mechanism, the backwashing unit can provide a stable operating environment for the pretreatment and monitoring stages.

[0140] Specifically, the processing unit is responsible for selecting a subset of target characteristic wavelengths from the ultraviolet spectrum and inputting this subset into a pre-trained ensemble meta-model. The model then calculates and outputs a predicted value of DOC concentration in the water sample. The processing unit integrates a spectral feature extraction algorithm with a Stacking ensemble learning model, enabling efficient processing of spectral data and achieving accurate conversion from spectral signals to DOC concentration.

[0141] Specifically, the control system, as the intelligent core of the device, can possess multiple control functions. For example, it can automatically trigger the backwashing unit to perform pre-cleaning operations based on hardware status parameters collected by the monitoring system (such as the degree of fouling in the flow tank and the filtration pressure of the membrane module) or a preset maintenance cycle, ensuring stable equipment operation. It can also perform dynamic calibration operations by combining measured values ​​of standard water samples with hardware status, including correcting the output deviation of the integrated meta-model based on a single set of standard water samples, retraining the calibration curve using a gradient concentration standard sample set, and triggering model reconstruction when the prediction error continuously exceeds the limit, ensuring monitoring accuracy. Furthermore, it can coordinate the joint operation of the pretreatment unit, monitoring unit, backwashing unit, and treatment unit. For instance, after maintenance of the flow tank, it can control the backwashing unit to pre-filter the standard water samples to ensure the purity of the calibration data, while simultaneously scheduling the treatment unit to complete the model calibration process.

[0142] It is not difficult to see that, compared with related technologies, given that water quality instruments in water treatment plants are usually fixedly installed in water rooms, and the plant area needs to build pipelines to introduce raw water from each node into each instrument for monitoring, the applicant has creatively designed a flow-through pool type full-spectrum water quality monitoring instrument to facilitate installation and monitoring. Specifically, in the solution provided in this application embodiment, a detachable flow-through pool is used and connected to an independent light source spectrometer through a quick-release optical interface, making the device easier to install, disassemble, and maintain in scenarios where water treatment plants need to build pipelines to introduce raw water, thus meeting the needs of convenient installation and monitoring for the flow-through pool design; furthermore, because the filtration device of the pretreatment unit can effectively eliminate the interference of turbidity and particulate matter on DOC spectral monitoring, it provides a purer water sample basis for monitoring, improving monitoring accuracy; at the same time, due to the synergistic effect of the ultrasonic cleaning transducer on the outer wall of the flow-through pool and the backwashing unit, the filtration device and quartz light window can be cleaned in a targeted manner, removing contaminants in a timely manner, thus ensuring the long-term stable operation of the monitoring equipment, reducing manual maintenance costs, and achieving an effective combination of convenient installation and accurate and stable monitoring.

[0143] It is not difficult to see that this embodiment is a device embodiment corresponding to the first embodiment, and this embodiment can be implemented in conjunction with the first embodiment. The relevant technical details mentioned in the first embodiment are still valid in this embodiment, and will not be repeated here to reduce repetition. Accordingly, the relevant technical details mentioned in this embodiment can also be applied to the first embodiment.

[0144] Sixth Embodiment

[0145] The sixth embodiment of this application relates to a DOC spectral monitoring device. The sixth embodiment is an improvement upon the fifth embodiment, specifically in that the structure of the device is further refined, such as... Figure 8 As shown.

[0146] Specifically, the device may include:

[0147] The water inlet pipeline is equipped with a water inlet ball valve 101 and a feed solenoid valve 103 to control the input of raw water. The raw water enters the pretreatment unit after passing through the water inlet ball valve 101 and the feed solenoid valve 103.

[0148] The pretreatment unit includes a water storage tank 201, a filter device 205 and a defoaming device 202 connected in sequence. The inlet of the water storage tank 201 is connected to the outlet of the feed solenoid valve 103. The filter device 205 is used to remove suspended solids and colloids from the water sample and to eliminate bubbles in the water sample to avoid light scattering interference from bubbles to spectral detection.

[0149] The monitoring unit is connected to the outlet of the defoaming device 202 through the inlet of the flow cell 203, and the outlet is connected to the outlet ball valve 102. The tested water sample can be discharged through the outlet ball valve 102. The light source spectrometer is used to collect the ultraviolet-visible absorption spectrum of the water sample in the flow cell 203.

[0150] The purified water collection tank 204 has an inlet connected to the outlet of the flow tank 203 and is used to store the purified water after testing, providing a clean water source for the backwashing process.

[0151] The backwashing unit includes a water pump 303, a booster pump 304, an air pump 305, a first backwashing solenoid valve 105, and a second backwashing solenoid valve 106. The inlet of the water pump 303 is connected to the water storage tank 201, and the outlet is connected to the defoaming device 202 via a pipeline. It is used to provide power for transporting water samples from the water storage tank 201 to the defoaming device 202 during routine testing. The inlet of the booster pump 304 is connected to the purified water collection tank 204, and the outlet is connected to the backwashing solenoid valve via a backwashing pipeline. The backwashing solenoid valve is connected to the filter device and the flow tank respectively, and is used to perform backwashing. The air pump 305 is connected to the backwashing pipeline to provide air-assisted backwashing.

[0152] Specifically, during routine testing, water pump 303 starts, and water pretreated by filter device 205 in water storage tank 201 is sequentially transported to flow tank 203 through defoaming device 202 to provide power for sampling and testing; during backwashing, booster pump 304 starts, and clean water in clean water collection tank 204 is drawn to provide high pressure power for backwashing; air pump 305 starts, and air is injected into backwash pipeline to enhance the flushing impact force through "air-water mixing".

[0153] For example, the backwash solenoid valve may include a first backwash solenoid valve 105 and a second backwash solenoid valve 106; the first backwash solenoid valve 105 is opened during backwashing to deliver high-pressure air-water mixture to the filter device 205 to achieve backwashing of the filter media; the second backwash solenoid valve 106 is opened during normal testing to provide a passage for the water pump 303 to deliver water samples to the defoaming device 202, and is closed during backwashing to switch the pipeline to "backwash dedicated state";

[0154] An ultrasonic oscillator 302 is installed at the filter device 205 and is used to perform ultrasonic cleaning on the surface of the filter device 205 during cleaning.

[0155] The liquid level sensor 301 is installed in the water storage tank 201 to detect the liquid level in the water storage tank 201. When the liquid level reaches a preset threshold, the detection process is triggered.

[0156] The control system is electrically connected to various solenoid valves, water pumps, sensors, and ultrasonic oscillators. Specifically, it can be electrically connected to the inlet ball valve 101, the feed solenoid valve 103, the outlet ball valve 102, the first backwash solenoid valve 105, the second backwash solenoid valve 106, the water pump 303, the booster pump 304, the air pump 305, the ultrasonic oscillator 302, the liquid level sensor 301, and the light source spectrometer to implement the process control described in any one or more of the first to fourth embodiments.

[0157] See Figure 8 This is one application example of the DOC spectral monitoring device. Specifically, the device works in close coordination among the inlet pipeline, pretreatment unit, monitoring unit, and backwashing unit, covering the entire process from water pretreatment to DOC spectral monitoring and component self-cleaning maintenance.

[0158] For example, the water inlet pipeline achieves both manual and automatic control of raw water input through an inlet ball valve 101 and a feed solenoid valve 103. The inlet ball valve 101 serves as the manual master switch for the raw water access device, allowing manual control of the opening and closing of the water inlet passage to meet water management needs in scenarios such as equipment maintenance and emergency water outages. The feed solenoid valve 103 serves as an automatic control valve, remaining open during routine testing to ensure a stable flow of raw water into the storage tank 201; it automatically closes during the cleaning process, cutting off the connection between the raw water and the pretreatment unit to prevent interference from the raw water during the cleaning process.

[0159] For example, the pretreatment unit may include a water storage tank 201, a filter device 205, and a level sensor 301. The water storage tank 201 temporarily stores the raw water transported via the inlet pipeline, providing a stable water source for subsequent testing processes and ensuring continuous testing. The filter device 205 filters the raw water in the water storage tank 201, removing suspended solids, colloids, and other impurities from the water sample, eliminating interference from turbidity on spectral detection at the source, and providing a low-impurity water sample basis for the monitoring unit. The level sensor 301 is installed in the water storage tank 201 to detect the liquid level in real time; when the liquid level reaches the target level, it triggers the operation of subsequent components such as the water pump 303, serving as a key signal source for starting the conventional testing process.

[0160] For example, the device may further include: a defoaming and spectral preprocessing unit; the defoaming and spectral preprocessing unit may specifically be a defoaming device 202, which is connected to the preprocessing and monitoring unit to ensure the stability of the optical environment for spectral detection: the defoaming device 202 receives the water sample after it has been processed by the filtration device 205, eliminates the bubbles in the water sample (bubbles will cause light scattering, which seriously interferes with the accuracy of spectral detection), and provides the monitoring unit with a bubble-free and optically uniform water sample.

[0161] For example, the monitoring unit includes a flow cell 203, a light source spectrometer (not separately labeled in the figure), and an outlet ball valve 102. The flow cell 203: its inlet connects to the outlet of the defoaming device 202, and is the core location for real-time spectral detection, such as DOC concentration detection, providing a stable space for the light source spectrometer to collect spectra. The light source spectrometer: collects the ultraviolet-visible absorption spectrum of the water sample in the flow cell 203, providing raw data support for subsequent characteristic wavelength screening and integrated meta-model prediction of DOC concentration. The outlet ball valve 102 controls the path of the water after detection, discharging the water after detection or guiding it to a purified water collection tank for later use.

[0162] For example, the device may also include a purified water recovery unit, which may specifically be a purified water collection tank 204. The inlet of the purified water collection tank 204 is connected to the outlet of the flow tank 203 to store the purified water after testing. This achieves water resource recycling on the one hand, and provides a clean water source without impurities for the backwashing unit on the other hand, avoiding the introduction of new pollution during backwashing.

[0163] For example, the backwashing unit may include a water pump 303, a booster pump 304, an air pump 305, a first backwashing solenoid valve 105, and a second backwashing solenoid valve 106. Water pump 303: Starts during routine testing, pumping water pretreated by the filter device 205 from the water storage tank 201 through the defoaming device 202 to the flow tank 203, providing power for the monitoring process. Booster pump 304: Starts during the cleaning process, drawing clean water from the clean water collection tank 204 to provide a high-pressure power source for backwashing. Air pump 305: Starts during the cleaning process, injecting air into the backwashing pipeline, enhancing the backwashing cleaning effect through the impact force of "air-water mixing," and more thoroughly cleaning contaminants from the pipeline and filter device 205. First backwashing solenoid valve 105: Opens during cleaning, working in conjunction with the booster pump 304 and air pump 305 to deliver backwash water / air to components such as the filter device 205, performing "reverse flushing." The second backwash solenoid valve 106: It is opened during routine testing to provide a passage for the water pump 303 to deliver water samples to the defoaming device 202; it is closed during cleaning to switch the pipeline status to adapt to the backwash process.

[0164] The device may further include an auxiliary cleaning and evacuation unit, which includes an ultrasonic oscillator 302 and an evacuation solenoid valve 104. The ultrasonic oscillator 302 is installed at the filter device 205 and is activated during cleaning. It cleans the surface of the filter device 205 using high-frequency ultrasonic vibration, shaking off adhering fine contaminants and ensuring the long-term filtration efficiency of the filter device 205. The evacuation solenoid valve 104 is opened later in the cleaning process to drain the water in the storage tank 201 and the sludge generated during cleaning, discharging the residue after cleaning and preparing for the next round of testing / cleaning.

[0165] like Figure 7 The working process of the device shown may include:

[0166] 1. Standard testing procedure: Inlet ball valve 101 (manually opened and held), feed solenoid valve 103, and second backwash solenoid valve 106 are opened; drain solenoid valve 104 and first backwash solenoid valve 105 are closed. After the level sensor 301 detects that the water level in the storage tank 201 meets the standard, the water pump 303 starts. The raw water is filtered by the filter device 205 and defoamed by the defoaming device 202 before entering the flow tank 203. After the light source spectrometer collects the spectrum, the water flows into the purified water collection tank 204 and is finally discharged or stored through the outlet ball valve 102.

[0167] 2. Cleaning Process: The feed solenoid valve 103, the second backwash solenoid valve 106, and the water pump 303 are closed; the drain solenoid valve 104 and the first backwash solenoid valve 105 are opened. The booster pump 304 starts, drawing water from the clean water collection tank 204, and the air pump 305 starts to inject air to backwash the filter device 205 and other components; at the same time, the ultrasonic oscillator 302 starts to clean the surface of the filter device 205; after cleaning, the drain solenoid valve 104 is opened to drain the residue in the water storage tank 201.

[0168] 3. Abnormalities and maintenance procedures: If the level sensor 301 detects an abnormal level in the water storage tank 201, such as too high or too low, it can trigger the protection mechanism of the control system; each solenoid valve, water pump and other components can be manually operated, such as closing the inlet ball valve 101 or by the control system command, to realize the inspection and maintenance path control of the device.

[0169] It is not difficult to see that in this embodiment, the raw water input is precisely controlled by the inlet ball valve 101 and the feed solenoid valve 103, and the water source is temporarily stored in the storage tank 201 to ensure stability. In the pretreatment unit, the filter device 205 effectively removes suspended solids and colloids, and the defoaming device 202 eliminates bubble interference, ensuring the accuracy of spectral detection from the source. The monitoring unit uses an independent light source spectrometer to collect the ultraviolet spectrum of the pretreated water sample to ensure data reliability. The clean water collection tank 204 stores clean water, and the backwashing unit uses the booster pump 304 and the air pump 305 to achieve air-water mixing backwashing, and combines the ultrasonic oscillator 302 to deeply clean the surface of the filter device 205, effectively solving the problems of membrane fouling and light window adhesion. The control system, together with components such as the liquid level sensor 301, intelligently triggers the detection and cleaning process, which can achieve high accuracy, high stability and low maintenance cost of DOC monitoring.

[0170] Seventh Embodiment

[0171] The seventh embodiment of this application relates to a DOC spectral monitoring device. The seventh embodiment is an improvement upon the fifth embodiment, specifically in that the optical path length of the flow cell is 30–50 mm.

[0172] Specifically, in this embodiment, the optical path length of the flow cell is set to 30–50 mm, which is a key parameter precisely designed in accordance with Lambert-Beer's law to meet the needs of low-concentration DOC monitoring.

[0173] It is understandable that in scenarios such as water treatment plants, the DOC concentration of treated raw water is usually below 2 mg / L, falling into the category of low-level monitoring. According to Lambert-Beer's Law (A=abc), absorbance (A) is related to solution concentration (c), optical path length (b), and molar absorptivity (a, in units of...). The absorbance is directly proportional to the ability of a substance to absorb light of a specific wavelength. When the concentration of DOC is extremely low, its absorption signal is weak. If the optical path is too short, the absorbance value will be too small and easily drowned out by instrument noise, making it difficult to accurately capture the spectral characteristics of DOC. On the other hand, if the optical path is too long, although it can enhance the absorption signal, it may introduce additional interference due to the cumulative absorption of trace impurities remaining in the water, which will affect the monitoring accuracy.

[0174] Based on this, the applicant chose an optical path of 30–50 mm. This can amplify the absorbance signal of low-concentration DOC by appropriately increasing the thickness of the light-transmitting liquid layer to meet the monitoring sensitivity requirements, while avoiding the interference amplification problem caused by excessively extending the optical path. Thus, a balance between signal strength and monitoring stability can be achieved in low-level DOC monitoring.

[0175] It should be noted that this embodiment can also be an improvement based on the sixth embodiment.

[0176] It is not difficult to see that in the embodiments of this application, since the optical path length of the flow cell is set to 30–50 mm, according to the Lambert-Beer law, this optical path length can form an absorbance signal that is suitable for low concentration DOC (usually below 2 mg / L). This can avoid the problem of weak signal and easy noise submersion caused by too short optical path, and can also prevent the accumulation of impurities and absorption interference caused by too long optical path. Therefore, it can enhance the identification of low concentration DOC spectral signal, provide more reliable basic data for subsequent detection, and thus improve the accuracy and stability of detection.

[0177] Eighth embodiment

[0178] The eighth embodiment of this application relates to a DOC spectral monitoring device. The eighth embodiment is an improvement upon the fifth embodiment, specifically in that it provides a concrete implementation of the control system.

[0179] Specifically, the control system may include:

[0180] The status monitoring module is used to monitor the connection status of the flow cell and the sealing of the optical interface in real time;

[0181] The maintenance control module is used to automatically start and stop the monitoring process according to the monitoring status, and trigger the calibration procedure after maintenance;

[0182] A contamination identification module is used to identify the degree of contamination of the MBR membrane and optical window;

[0183] The cleaning control module generates cleaning instructions based on the degree of contamination, and controls the backwashing unit and ultrasonic transducer to perform cleaning operations.

[0184] Specifically, the status monitoring module is used to monitor in real time the connection stability of the detachable flow cell and the quick-release optical interface (such as whether the mechanical connection is loose or misaligned), as well as the sealing of the optical interface (whether there is water leakage or air leakage that could cause optical path interference).

[0185] Specifically, the maintenance control module executes specific control actions based on the monitoring results of the status monitoring module: when the status monitoring module detects a disconnection in the flow cell or optical interface, the maintenance control module can immediately pause the monitoring process and activate the maintenance mode to prevent the equipment from operating under abnormal connection conditions and reduce the risk of failure; when the status monitoring module recognizes that the flow cell has been reinstalled and the optical interface connection has been restored, the maintenance control module will automatically restart the monitoring process and simultaneously trigger a calibration procedure (such as verifying and correcting the integrated meta-model with a standard water sample) to ensure that the monitoring accuracy is not affected after the maintenance operation. The status monitoring module and the maintenance control module work together to achieve full-process monitoring and intelligent response to the connection status of key components, providing a reliable guarantee for the stable operation and detection accuracy of the device.

[0186] Specifically, the contamination identification module is used to identify the degree of contamination of the filtration device and / or the quartz light window of the flow cell based on a preset cycle, sensor feedback, or manual commands. For example, the contamination identification module can acquire contamination information in three ways: first, by periodically assessing the contamination status according to a preset cycle (e.g., a basic cycle combining ultrasonic cleaning transducers starting once every 2 hours); second, by receiving sensor feedback data (e.g., MBR membrane contamination data monitored by a membrane fouling sensor) to capture changes in contamination in real time; and third, by responding to manual commands to meet cleaning needs requiring human intervention. By comprehensively analyzing this information, the contamination identification module can clearly distinguish whether the target cleaning object is the filtration device, the flow cell, or both.

[0187] Specifically, the cleaning control module may include a cleaning instruction generation module and a cleaning execution control module. The cleaning instruction generation module generates a cleaning instruction based on the degree of contamination; the cleaning instruction may include a target cleaning object and corresponding pressure and flow parameters. The cleaning execution control module, based on the target cleaning object and corresponding pressure and flow parameters in the cleaning instruction, controls the backwash unit and the ultrasonic cleaning transducer to perform directional cleaning; wherein, when the target cleaning object is the filter device, a backwash water flow with the corresponding pressure and flow parameters is applied to the filter device; when the target is a flow-through tank, the ultrasonic cleaning transducer is activated, and an auxiliary cleaning water flow with the corresponding pressure and flow parameters is applied to the flow-through tank.

[0188] Specifically, the cleaning instruction generation module is used to generate specific and executable cleaning instructions based on the degree of contamination and the target cleaning object determined by the contamination identification module. The cleaning instruction contains two main elements: first, a clearly defined target cleaning object (filter device or flow tank); and second, pressure and flow parameters matching the target cleaning object. For example, according to a preset program, filter device cleaning corresponds to "low pressure, high flow rate" (e.g., 0.1-0.3 MPa pressure, 5-10 L / min flow rate), while flow tank cleaning corresponds to "high pressure, low flow rate" (e.g., 0.3-0.5 MPa pressure, 1-3 L / min flow rate). By determining these parameters, it is possible to ensure that different components receive appropriate cleaning intensity while balancing cleaning effectiveness and equipment protection.

[0189] Specifically, the cleaning execution control module is used to convert cleaning instructions into specific hardware operations, and to link the backwashing unit and the ultrasonic cleaning transducer to achieve directional cleaning.

[0190] When the target cleaning object is a filter device, the cleaning execution control module can start the booster pump and air compressor, and apply backwash water and auxiliary gas to the filter device according to the pressure and flow parameters in the cleaning command, so as to efficiently remove the pollutants trapped on the membrane surface.

[0191] When the target object to be cleaned is the flow-through tank, the cleaning execution control module can first activate the ultrasonic cleaning transducer on the outer wall of the flow-through tank (running for a preset period of 30 seconds each time), and at the same time control the booster pump to apply auxiliary cleaning water flow with corresponding pressure and flow parameters to the flow-through tank. In conjunction with ultrasonic vibration, the contaminants on the surface of the quartz window are completely peeled off and carried away.

[0192] Optionally, in some embodiments, the control system may further include:

[0193] The model management module is used to monitor the predictive performance of the integrated meta-model and trigger model updates when performance degrades.

[0194] The adaptive calibration module is used to automatically adjust the parameters of the integrated meta-model based on changes in hardware status and water quality characteristics.

[0195] Specifically, the model management module can manage the entire lifecycle of the ensemble meta-model and continuously monitor its predictive performance in practical applications. For example, it can compare model predictions with actual detection data in real time, calculate indicators such as prediction error and coefficient of determination (R²), and determine whether the model's performance has degraded. Once it is found that the prediction error continuously exceeds a preset threshold, or the model's accuracy on the test set continues to decrease, the module will immediately trigger a model update mechanism. For example, it can automatically call a new training dataset to retrain the ensemble meta-model, or use strategies such as transfer learning to optimize model parameters, ensuring that the model always maintains high accuracy and stability and adapts to the constantly changing monitoring environment.

[0196] Specifically, when hardware conditions change (such as optical path shift due to aging of the flow cell or performance degradation of the light source spectrometer), or when water quality characteristics fluctuate (such as a sudden increase in raw water turbidity or changes in organic matter composition), the adaptive calibration module can quickly capture the changes and optimize the parameters of the integrated meta-model based on a preset algorithm. For example, to address the hardware optical path shift problem, the weight coefficients related to the spectral characteristic wavelengths in the model are adjusted; to address changes in water turbidity, the model's compensation parameters for background noise are optimized. Through this adaptive calibration mechanism, the integrated meta-model can quickly adapt to changes in the external environment and continuously maintain a high-accuracy DOC concentration prediction capability.

[0197] It should be noted that this embodiment may also be an improvement based on the sixth and / or seventh embodiments.

[0198] It is not difficult to see that, in this embodiment of the application, since the control system is equipped with a status monitoring module and a maintenance control module, the status monitoring module can monitor the connection status of the detachable flow cell and the quick-release optical interface in real time. The maintenance control module can pause the monitoring process and activate the maintenance mode when the connection is disconnected according to the monitoring results. After the connection is restored, the monitoring process is automatically restarted and calibration is triggered. Therefore, it can avoid detection errors or failures caused by the device operating under abnormal connection conditions, ensure that the detection accuracy is not affected after maintenance, and thus ensure the stability of the device operation and the reliability of the detection results.

[0199] It is worth mentioning that all modules involved in the above embodiments are logical modules. In practical applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. Furthermore, to highlight the innovative aspects of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed in this application; however, this does not mean that other units are absent in this embodiment.

[0200] The flowcharts or block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation that may be implemented by the apparatus and methods according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-specific system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0201] The scope of this application is defined by the appended claims rather than the foregoing description, and is therefore intended to encompass all variations falling within the meaning and scope of equivalents of the claims. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a device claim may also be implemented by a single unit or device in software or hardware. Terms such as "first," "second," etc., are used only for distinguishing descriptions and do not indicate any particular order, nor should they be construed as indicating or implying relative importance.

[0202] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily made by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims, and the above embodiments should be regarded as exemplary and non-limiting.

Claims

1. A method for monitoring DOC spectroscopic parameters, characterized in that, The method includes: The water sample is pretreated by a filtration device to eliminate the interference of turbidity on spectral detection; The pretreated water sample is transported to a detachable flow cell, and the ultraviolet spectrum of the water sample is collected by an independently set light source spectrometer. Determine a subset of target characteristic wavelengths from the ultraviolet spectrum; The target feature wavelength subset is input into a pre-trained ensemble meta-model to obtain the predicted value of DOC concentration in the water sample; wherein, the ensemble meta-model is constructed using a stacking strategy and includes multiple base models and a meta-model, the meta-model being used to learn the prediction results of each base model and perform fusion output; Based on the monitoring system status or preset maintenance cycle, the backwash unit is triggered to perform a pre-cleaning operation before disassembling and maintaining the flow pool.

2. The method according to claim 1, characterized in that, Determining the subset of target characteristic wavelengths from the ultraviolet spectrum includes: Principal component analysis was performed on the ultraviolet spectral data to extract principal component factors whose cumulative contribution rate met the preset threshold. Based on the correlation between each principal component factor and DOC concentration, the weight coefficients of the principal component factors are dynamically adjusted to form weighted principal component factors; the weighted principal component factors are used to enhance the contribution of components closely related to DOC concentration in spectral features. The target feature wavelength subset is determined based on the weighted principal component factor and the target genetic algorithm.

3. The method according to claim 2, characterized in that, The step of dynamically adjusting the weight coefficients of the principal component factors based on the correlation between each principal component factor and DOC concentration to form weighted principal component factors includes: Calculate the Pearson correlation coefficient between each principal component factor and the DOC concentration reference value to obtain a quantitative index of correlation. Based on the aforementioned correlation quantification index, adaptive weight coefficients for each principal component factor are dynamically generated through a preset nonlinear mapping function; wherein, principal component factors with higher correlation to DOC concentration are assigned greater weights. The original principal component factor matrix is ​​weighted and fused with the adaptive weight coefficient matrix to construct a weighted principal component factor.

4. The method according to claim 2, characterized in that, The step of determining the target feature wavelength subset based on the weighted principal component factor and the target genetic algorithm includes: Based on the binary encoding rules, the wavelength selection population is determined; The prediction error of each wavelength subset in the population is calculated based on the partial least squares regression method, and the reciprocal of the prediction error is used as the individual fitness value. Iterative evolution begins with an initial population, with selection, crossover, and mutation operations performed in each iteration. After selection, inferior solutions with lower fitness are accepted with a preset probability. During the iterative evolution process, a multi-objective optimization approach is adopted to simultaneously pursue higher prediction accuracy and fewer features. When the number of iterations reaches the preset maximum value or the optimal solution no longer improves over multiple generations, the iteration stops and the subset of target feature wavelengths with the highest prediction accuracy and the fewest feature count is selected from the Pareto front corresponding to the final generation population.

5. The method according to claim 1, characterized in that, The training method for the ensemble meta-model includes: The training dataset is divided into a training set and a validation set; Multiple different base models are trained using the training set; The validation set is predicted using each base model, and the prediction results are used as new features. Using the new features as input, a meta-model is trained, and the optimal fusion strategy for the prediction results of each base model is learned through the meta-model.

6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Based on the hardware status parameters monitored by the control system and combined with the measured values ​​of standard water samples, perform at least one of the following calibration operations: correct the output deviation of the integrated meta-model based on the measured values ​​of a single set of standard water samples; retrain the calibration curve of the integrated meta-model based on the gradient concentration standard sample set; and trigger the reconstruction of the integrated meta-model when the prediction error continuously exceeds a preset threshold. For recalibration after maintenance of the flow cell, the standard water sample is pre-filtered by the backwashing unit. The pre-treatment unit removes interfering factors and obtains pure standard sample spectral data for calibration of the integrated meta-model.

7. A DOC spectral monitoring device, characterized in that, The apparatus is used to implement the method according to any one of claims 1-6, the apparatus comprising: The pretreatment unit includes a filtration device for pretreating the water sample to eliminate turbidity interference; The monitoring unit includes a detachable flow cell and an independently set light source spectrometer, which is used to collect the ultraviolet spectrum of the water sample in the flow cell; The backwash unit is used to perform pre-cleaning operations before disassembling and maintaining the flow-through tank; The processing unit is used to determine a subset of target characteristic wavelengths from the ultraviolet spectrum and input the subset into the ensemble meta-model to obtain the predicted DOC concentration. And a control system, used to trigger the backwashing unit according to the monitoring status or a preset maintenance cycle.

8. The apparatus according to claim 7, characterized in that, The device includes: The water inlet pipeline is equipped with an inlet ball valve and a feed solenoid valve to control the input of raw water; The pretreatment unit includes a water storage tank, a filtration device, and a defoaming device connected in sequence. The inlet of the water storage tank is connected to the outlet of the feed solenoid valve. The filtration device is used to remove suspended solids and colloids from the water sample. The defoaming device is used to eliminate air bubbles from the water sample. The monitoring unit is connected to the defoaming device outlet through the inlet of the flow tank, and the outlet is connected to the water outlet ball valve. The light source spectrometer is used to collect the ultraviolet spectrum of the water sample in the flow tank. The purified water collection tank, with its inlet connected to the outlet of the flow tank, is used to store the purified water after testing. The backwashing unit includes a water pump, a booster pump, and an air pump. The water pump inlet is connected to a water storage tank, and the outlet is connected to a defoaming device via a pipeline. It provides power for transporting water samples from the water storage tank to the defoaming device during routine testing. The booster pump inlet is connected to the purified water collection tank, and the outlet is connected to a backwashing solenoid valve via a backwashing pipeline. The backwashing solenoid valve is connected to a filter device and a flow tank respectively, and is used to perform backwashing. The air pump is connected to the backwashing pipeline to provide air-assisted backwashing. An ultrasonic oscillator is installed at the filter device and is used to ultrasonically clean the surface of the filter device during cleaning. A liquid level sensor is installed inside the water storage tank to detect the liquid level and trigger the detection process; The control system is electrically connected to each solenoid valve, water pump, sensor, and ultrasonic oscillator.

9. The apparatus according to claim 7, characterized in that, The control system includes: The status monitoring module is used to monitor the connection status of the flow cell and the sealing of the optical interface in real time; The maintenance control module is used to automatically start and stop the monitoring process according to the monitoring status, and trigger the calibration procedure after maintenance; A contamination identification module is used to identify the degree of contamination of the MBR membrane and optical window; The cleaning control module generates cleaning instructions based on the degree of contamination, and controls the backwashing unit and ultrasonic transducer to perform cleaning operations.

10. The apparatus according to claim 9, characterized in that, The control system further includes: The model management module is used to monitor the predictive performance of the integrated meta-model and trigger model updates when performance degrades. The adaptive calibration module is used to automatically adjust the parameters of the integrated meta-model based on changes in hardware status and water quality characteristics.

Citation Information

Patent Citations

  • A classification and prediction method based on multi-stage hybrid model

    CN109242021A

  • Characteristic wavelength selection method and characteristic wavelength selection system of spectrum variable gradient integrated genetic algorithm

    CN110726694A

  • Water quality multi-parameter spectral data Stacking fusion model and water quality multi-parameter measurement method

    CN114894725A

  • Water quality monitoring method and device based on ultraviolet-visible spectroscopy

    CN118362525A

  • An intelligent control method for concentrating and dosing coal sludge water

    CN119781379A

Cited By

  • DOC monitoring method and device, medium and product

    CN121612822A